diff --git a/README.md b/README.md index 94b3aad64..1f0f6a4f9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # 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. See [progress](#Progress) for more information. +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 repository does not contain assets. Compiling requires asset extraction from a prior copy of the game. @@ -11,7 +11,7 @@ It supports and builds the following versions: | mk64.eu-1.0.z64 | EUR 1.0 | a729039453210b84f17019dda3f248d5888f7690 | | mk64.eu-final.z64 | EUR 1.1 | f6b5f519dd57ea59e9f013cc64816e9d273b2329 | -## Score progress +## Progress Total progress consists of all code segments together. @@ -30,96 +30,23 @@ Game code progress consists of `main`, `ending` and `racing`. - [![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=audioProgress)](https://ci.valandil.ca/job/mk64/job/master/) - [![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=osProgress)](https://ci.valandil.ca/job/mk64/job/master/) -## Dependencies +## Quick Start -The build system has the following package requirements: - - binutils-mips >= 2.27 - python3 >= 3.6 - libaudiofile - -To add submodules run `git submodule update --init --recursive` after cloning. - -## EU Specific Steps (All versions) -Both EU builds first requires US to be built first: +``` +git submodule update --init --recursive +``` ``` make -j ``` -Now build either EU 1.0 `eu-1.0` or EU 1.1 `eu-final` -``` -make -j VERSION=eu-final -``` - -diff/first-diff commands -``` -python3 first-diff.py --eu -./diff -eu -``` - -#### Debian / Ubuntu -``` -sudo apt install build-essential pkg-config git binutils-mips-linux-gnu python3 zlib1g-dev libaudiofile-dev libcapstone-dev -``` - -#### Arch Linux - -To install build dependencies: -``` -sudo pacman -S base-devel capstone python -``` -Install the following AUR packages: -* [mips64-elf-binutils](https://aur.archlinux.org/packages/mips64-elf-binutils) (AUR) - -Review the n64decomp/sm64 readme for instructions to compile in other distributions. - -#### Windows - -Compiling on Windows requires `MSYS2 MinGW x64`. The setup process is a tad intensive. - -[Instructions here](docs/BUILD_WINDOWS.md) - -#### macOS - -Install [Homebrew](https://brew.sh), then install the following dependencies: -``` -brew update -brew install python3 capstone coreutils make pkg-config tehzz/n64-dev/mips64-elf-binutils -``` - -When building, use `gmake` to ensure that homebrew `make` is used instead of the old, macOS system `make`. - -#### Docker - -Build the Docker image: -``` -docker build -t mk64 . -``` - -When building and using other tools, append the following in front of every command you run: -```bash -docker run --rm -v ${PWD}:/mk64 mk64 -``` - -For example: -```bash -docker run --rm -v ${PWD}:/mk64 mk64 make -C tools -docker run --rm -v ${PWD}:/mk64 mk64 make -``` - ## Building -Place a US version of Mario Kart 64 called `baserom.us.z64` into the project folder for asset extraction. +Build instructions located in the [API docs](https://n64decomp.github.io/mk64/compiling.html) +See also, the comprehensive API and documentation which includes an overview of the code-base while also discussing significant concepts, features, and modding. -Run the following commands after pulling: -```bash -make -C tools -make -``` +## Current State -## Progress - -The source is in a 'shiftable' state that may allow modding but glitches may exist. Keep in-mind the code-base will alter significantly overtime. Feedback that raises awareness of new shift issues are welcome as a comment on issue #6. Note that some segments must be moved manually to prevent them colliding into each other. +The code-base may change significanty overtime as naming and documentation continues. The code-base is shiftable. Some menu textures are compressed using a format called tkmk00. A byte-matching compressor/decompressor does not yet exist. @@ -156,8 +83,9 @@ Some menu textures are compressed using a format called tkmk00. A byte-matching ## Documentation -[Doxygen](https://www.doxygen.nl/index.html) is used to generate documentation. To generate the documentation, run `doxygen Doxyfile` from the project root. The documentation will be generated in the `docs/html` folder. -The documentation is also available online at [https://n64decomp.github.io/mk64/](https://n64decomp.github.io/mk64/). +Documentation available online at [https://n64decomp.github.io/mk64/](https://n64decomp.github.io/mk64/). + +Documentation generated using [Doxygen](https://www.doxygen.nl/index.html). Run `make doc -j` to test locally. Documentation resides in `docs/html`. Open index.html to view the site. ## Contributing diff --git a/docs/basics/BUILD_WINDOWS.md b/docs/basics/BUILD_WINDOWS.md index 67429d507..88236bcad 100644 --- a/docs/basics/BUILD_WINDOWS.md +++ b/docs/basics/BUILD_WINDOWS.md @@ -50,13 +50,13 @@ https://github.com/N64-tools/mips64-gcc-toolchain Merge the inner folders (bin, share, etc.) with the respective folders in `C:\msys64\mingw64\` -### Step 5: Compiling recomp.exe in `MSYS2 MinGW x64` +### Step 5: Compiling recomp.exe in MSYS2 MinGW x64 In `MSYS2 MinGW x64` run in `mk64/tools/ido5.3_recomp/`: ``` g++ recomp.cpp -o recomp -g -lcapstone -Dugen53 ``` -### Step 6: Generate Recomp Source Files in `MSYS2 MinGW x64` +### Step 6: Generate Recomp Source Files in MSYS2 MinGW x64 Generate the .c files which will compile into the recomp binaries. mk64 requires the following compiler binaries: `as1, cc, cfe, copt, ugen, ujoin, uld, umerge, uopt` @@ -78,7 +78,7 @@ The binary for cc is in `/ido5.3_compiler/usr/bin/` so do: ``` ./recomp ../ido5.3_compiler/usr/bin/cc > cc_c.c ``` -### Step 7: Compiling the recomp compiler in `MSYS2 MSYS` +### Step 7: Compiling the recomp compiler in MSYS2 MSYS In `MSYS2 MSYS` run in the directory `mk64/tools/ido5.3_recomp/`: ``` gcc libc_impl.c as1_c.c -o as1 -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2 @@ -93,7 +93,7 @@ gcc libc_impl.c uopt_c.c -o uopt -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2 ``` `-O2` is an optional optimization flag. -### Step 8: Compile mk64 in `MSYS2 MinGW x64` +### Step 8: Compile mk64 in MSYS2 MinGW x64 In `/mk64/` run: ``` make -j# diff --git a/docs/basics/actors.md b/docs/basics/actors.md index 560de747d..e29c39714 100644 --- a/docs/basics/actors.md +++ b/docs/basics/actors.md @@ -2,7 +2,7 @@ # Actors If you are familiar with oot or sm64 prepare to be very disappointed. Both games split actors into separate files. In an unorderly fashion, mk64 appears to place all actors in the same file save for the odd exception. -Actor setup: +Example actor setup based on @ref update_course_actors ```c // Loop through the actor list and run that particular actors behaviour. for actorListSize { @@ -32,7 +32,7 @@ Check actor_types.h for a full list of options. You can create a new actor struc See `update_obj_railroad_crossing` for an example of how a timer may be setup and used. -Audio may be activated in the following method: -`func_800C98B8(actor->pos, actor->velocity, s32_audio_flag);` +Audio may be activated using the following method: +@ref func_800C98B8 For more complex uses such as distanceFrom and collision, you will need to analyze the other actors. diff --git a/docs/basics/actorsmenu.md b/docs/basics/actorsmenu.md index 1f6da21b7..49d20e93b 100644 --- a/docs/basics/actorsmenu.md +++ b/docs/basics/actorsmenu.md @@ -14,12 +14,12 @@ The actor code has two main parts; the update code and the render code. The upda `gObjectList` contains: ``` -thwomps, bowser fire-breath, moles, hedgehogs, snowmen, crabs, etc (also, probably penguins and birds). +thwomps, bowser fire-breath, moles, hedgehogs, snowmen, crabs, particles, leaves, etc (also, probably penguins and birds). ``` The object system is much more complex than actors and is not well documented. \htmlonly -

+