Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
8179794
Update clang-pr.yml (#683)
coco875 Sep 23, 2024
9cb6bf6
clang format (#682)
github-actions[bot] Sep 23, 2024
cb0e767
Match func_800A66A8 (#686)
MegaMech Sep 25, 2024
eb90cd7
Clang Format (#687)
github-actions[bot] Sep 25, 2024
1381235
Fix color text array and function (#689)
AloXado320 Sep 26, 2024
0e0345f
Label menus.c and small documentation (#690)
AloXado320 Oct 5, 2024
8901f82
some rename and allow change the course engine (#691)
coco875 Oct 20, 2024
1c957fb
remove useless yaml file (#692)
coco875 Oct 22, 2024
f4f57d6
Update format (#693)
coco875 Oct 22, 2024
f387262
Update code_800029B0.c (#695)
MegaMech Nov 4, 2024
5e1ce53
the big code_80091750.c rename (#684)
coco875 Jan 4, 2025
731b24e
Doc code 80005fd0 (#697)
coco875 Jan 19, 2025
8094505
match func_80099AEC and fix some warnings (#699)
sonicdcer Jan 24, 2025
1b10da7
fix matching (#702)
sonicdcer Feb 16, 2025
5dbcf42
Misc matches (#704)
inspectredc Apr 30, 2025
8dfb7e7
move SQ macro define to header file so project builds (#705)
Rainchus May 2, 2025
daab4f5
PR Matches (#706)
MegaMech May 8, 2025
6d900d3
PR Matching func_80086074 (#707)
MegaMech May 8, 2025
1f9e0d7
Square is a Bad Company (#708)
RevoSucks May 9, 2025
30fef62
Fix EU build and related cleanup and fixes (#710)
AloXado320 May 12, 2025
89fb420
Match Mario Kart 64 (#709)
MegaMech May 12, 2025
ffa7bdf
Update README.md (#712)
MegaMech May 12, 2025
668523b
Fix progress rounding script (#711)
AloXado320 May 12, 2025
d7e4342
[Documentation] Update compiling for EU (#713)
tsunamistate May 12, 2025
c6dcc84
document greyscale math (#700)
coco875 May 18, 2025
c6e40bc
fix name introduce by the previous pr (#701)
coco875 May 18, 2025
8d4fa64
Document functions and variables (balloons, acceleration, a button ha…
MaciekBaron Jun 10, 2025
ac4dfe3
Document alpha, movement (#721)
MaciekBaron Jun 21, 2025
3288752
Document projection matrix function (#722)
JedGrabman Jun 21, 2025
184f593
Shiftability fix and documentation (#723)
JedGrabman Jun 21, 2025
d6076b5
Labeling particle related code (#719)
ZackWeinstein Jun 21, 2025
b329e81
Upgrade Torch to include CMake 4.0 fixes (#725)
tsunamistate Jun 21, 2025
d2b3217
document vertex of player (#729)
coco875 Jun 28, 2025
91ee36c
Rewrite of math_util (#727)
JedGrabman Jun 28, 2025
6b08e60
Document time trial input replay system (#730)
JedGrabman Jun 28, 2025
4975cb2
Update README.md (#718)
arefdsg Jun 30, 2025
e19b3b7
Update torch (#736)
coco875 Jul 9, 2025
b8823f1
Update cpu_vehicles_camera_path.c (#738)
MegaMech Jul 13, 2025
6c60f5d
Fix alfa for `find_vtx_and_set_colours()` (#739)
MegaMech Jul 17, 2025
e88f33f
Document sound effects (#735)
JedGrabman Jul 18, 2025
0a27fbb
Revert "Document sound effects (#735)" (#741)
MegaMech Jul 18, 2025
a5526cc
Document effects and define magic values (#733)
JedGrabman Jul 18, 2025
12e6c6b
Revert "Fix alfa for `find_vtx_and_set_colours()` (#739)" (#744)
MegaMech Jul 19, 2025
a927b1d
Fix alfa for `find_vtx_and_set_colours()` (#745)
MegaMech Jul 19, 2025
bb8ac99
Better match for add_unused_obj_index (#734)
MegaMech Jul 19, 2025
f5caebc
Document *.m64 sequence IDs (and also add support for custom track mu…
ProjectUltra75 Jul 19, 2025
4f63d17
Document Sound Effects (#742)
JedGrabman Jul 21, 2025
e49fe2a
adjust some name from pr730 (#737)
coco875 Jul 21, 2025
d3feca2
Player bitflag attributes (#750)
JedGrabman Sep 16, 2025
4ccce89
Clang Format
MegaMech Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/clang-format-suggest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on: [pull_request]
jobs:
formatting-check:
runs-on: ubuntu-24.04
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install Dependance
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/clang-pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: clang-format PR
on: [push]
on:
push:
branches:
- master
jobs:
formatting-check:
runs-on: ubuntu-24.04
Expand All @@ -15,6 +18,6 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: clang format
title: Applid Clang format on the branch
commit-message: Clang Format
title: Clang Format
branch: clang-format
27 changes: 18 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,40 @@ $(eval $(call validate-option,COMPILER,ido gcc))
# Run make clean first
DEBUG ?= 0

# Avoid undefined behavior. Enables shiftability when making changes
AVOID_UB ?= 0

# Compile with GCC
GCC ?= 0

# VERSION - selects the version of the game to build
# us - builds the 1997 North American version
# eu - builds the 1997 1.1 PAL version
# us - builds the 1997 North American version
# eu.v10 - builds the 1997 1.0 PAL version
# eu.v11 - builds the 1997 1.1 PAL version
VERSION ?= us
$(eval $(call validate-option,VERSION,us eu-1.0 eu-final))
$(eval $(call validate-option,VERSION,us eu.v10 eu.v11))

ifeq ($(VERSION),us)
DEFINES += VERSION_US=1
GRUCODE ?= f3dex_old
else ifeq ($(VERSION),eu-1.0)
DEFINES += VERSION_EU=1 VERSION_EU_1_0=1
else ifeq ($(VERSION),eu.v10)
DEFINES += VERSION_EU=1 VERSION_EU_V10=1
GRUCODE ?= f3dex_old
else ifeq ($(VERSION),eu-final)
DEFINES += VERSION_EU=1 VERSION_EU_1_1=1
else ifeq ($(VERSION),eu.v11)
DEFINES += VERSION_EU=1 VERSION_EU_V11=1
GRUCODE ?= f3dex_old
endif

ifeq ($(DEBUG),1)
DEFINES += DEBUG=1
DEFINES += AVOID_UB=1
COMPARE ?= 0
endif

ifeq ($(AVOID_UB),1)
DEFINES += AVOID_UB=1
endif

TARGET := mk64.$(VERSION)

BASEROM := baserom.$(VERSION).z64
Expand Down Expand Up @@ -244,7 +253,7 @@ include $(MAKEFILE_SPLIT)
# These are files that need to be encoded into EUC-JP in order for the ROM to match
# We filter them out from the regular C_FILES since we don't need nor want the
# UTF-8 versions getting compiled
EUC_JP_FILES := src/ending/credits.c src/code_80005FD0.c src/code_80091750.c
EUC_JP_FILES := src/ending/credits.c src/cpu_vehicles_camera_path.c src/menu_items.c
C_FILES := $(filter-out %.inc.c,$(filter-out $(EUC_JP_FILES),$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))))
S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s))
# Include source files in courses/course_name/files.c but exclude .inc.c files.
Expand Down Expand Up @@ -349,7 +358,7 @@ CC_CHECK ?= gcc
CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) -std=gnu90 -Wall -Wempty-body -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(DEF_INC_CFLAGS)

# C compiler options
HIDE_WARNINGS := -woff 838,649
HIDE_WARNINGS := -woff 838,649,807
CFLAGS = -G 0 $(OPT_FLAGS) $(TARGET_CFLAGS) $(MIPSISET) $(DEF_INC_CFLAGS)
ifeq ($(COMPILER),gcc)
CFLAGS += -mno-shared -march=vr4300 -mfix4300 -mabi=32 -mhard-float -mdivide-breaks -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra
Expand Down
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,32 @@
# Mario Kart 64
This work-in-progress decompilation of Mario Kart 64 pursues historical and educational elements within the game found via taking it apart and putting it back together. Inspiration to do so not only emanates from the game's hardware and technology but also its immensely positive effects on the cultures and families of nearly every nationality.
This decompilation of Mario Kart 64 pursues historical and educational elements within the game found via taking it apart and putting it back together. Inspiration to do so not only emanates from the game's hardware and technology but also its immensely positive effects on the cultures and families of nearly every nationality.

This repository does not contain assets. Compiling requires asset extraction from a prior copy of the game.

It supports and builds the following versions:

| ROM Output | Revision| SHA-1 Checksum |
|-------------------|---------|------------------------------------------|
| mk64.us.z64 | USA | 579c48e211ae952530ffc8738709f078d5dd215e |
| mk64.eu-1.0.z64 | EUR 1.0 | a729039453210b84f17019dda3f248d5888f7690 |
| mk64.eu-final.z64 | EUR 1.1 | f6b5f519dd57ea59e9f013cc64816e9d273b2329 |

[![Linux Compile](https://github.com/n64decomp/mk64/actions/workflows/linux-compile.yml/badge.svg)](https://github.com/n64decomp/mk64/actions/workflows/linux-compile.yml)
| ROM Output | Revision| SHA-1 Checksum |
|-----------------|---------|------------------------------------------|
| mk64.us.z64 | USA | 579c48e211ae952530ffc8738709f078d5dd215e |
| mk64.eu.v10.z64 | EUR 1.0 | a729039453210b84f17019dda3f248d5888f7690 |
| mk64.eu.v11.z64 | EUR 1.1 | f6b5f519dd57ea59e9f013cc64816e9d273b2329 |

## Progress

Total progress consists of all code segments together.

Game code progress consists of `main`, `ending` and `racing`.
[![Linux Compile](https://github.com/n64decomp/mk64/actions/workflows/linux-compile.yml/badge.svg)](https://github.com/n64decomp/mk64/actions/workflows/linux-compile.yml)

![Build Status](https://n64decomp.github.io/mk64/total_progress.svg)
![Build Status](https://n64decomp.github.io/mk64/game_progress.svg)

![Build Status](https://n64decomp.github.io/mk64/asm_funcs.svg)
![Build Status](https://n64decomp.github.io/mk64/m2c_funcs.svg)
![Build Status](https://n64decomp.github.io/mk64/nonmatching_funcs.svg)

- ![Build Status](https://n64decomp.github.io/mk64/seg_main_progress.svg)
- ![Build Status](https://n64decomp.github.io/mk64/seg_ending_progress.svg)
- ![Build Status](https://n64decomp.github.io/mk64/seg_racing_progress.svg)
- ![Build Status](https://n64decomp.github.io/mk64/audio_progress.svg)
- ![Build Status](https://n64decomp.github.io/mk64/libultra_progress.svg)

## Quick Start

```
git submodule update --init --recursive
OR
git clone https://github.com/n64decomp/mk64 --recurse-submodules
```
Extract assets
```
make -C tools -j
make assets -j
make -j
```
Expand All @@ -50,7 +38,8 @@ See also, the comprehensive API and documentation which includes an overview of

## Current State

The code-base may change significanty overtime as naming and documentation continues. The code-base is shiftable.
The code-base may change significanty overtime as naming and documentation continues.
Adjustments to the game require compiling with AVOID_UB=1 to enable shiftability. Use DEBUG=1 to enable the games debug mode.

Some menu textures are compressed using a format called tkmk00. A byte-matching compressor/decompressor does not yet exist.

Expand Down
Loading