More docs (#543)

* More docs
This commit is contained in:
MegaMech 2024-01-14 14:32:13 -07:00 committed by GitHub
parent 7b408209af
commit e09b3797ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 410 additions and 41 deletions

View File

@ -396,6 +396,7 @@ endif
doc:
$(PYTHON) tools/doxygen_symbol_gen.py
doxygen
cp docs/basics/placeholder.png docs/html/placeholder.png
clean:
$(RM) -r $(BUILD_DIR)

View File

@ -1,5 +1,4 @@
@page build
\page buildwindows Compiling for Windows
## Compiling mk64 Decomp In Windows
***This method is not recommended nor supported. However, it is the only solution to build in W7/W8. WSL is the path of least resistance, use that not this***

2
docs/basics/actors.md Normal file
View File

@ -0,0 +1,2 @@
\page actors How Actors Work
# Actors

77
docs/basics/actorsmenu.md Normal file
View File

@ -0,0 +1,77 @@
\page actorsmenu Actors
\htmlonly
How actors in mk64 works. There are two kinds of actors.
<style>
.pagebutton {
display: inline-block;
margin-right: 1em;
margin-bottom: 1em;
}
.pagelink {
display: block;
background-color: rgb(40, 44, 52);
width: 320px;
}
.pageimg {
display: inline-block;
width: 100%;
position: relative;
overflow: hidden;
}
.content {
color: white;
font-size: 1em;
padding: 0;
margin: 0;
}
.pageheading {
padding: .5em .5em;
font-size: 18px;
color: white;
font-weight: bold;
}
.pagedescription {
color: #fff;
border-color: transparent;
opacity: 0.75;
height: 84px;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 10px;
display: block;
padding: 10px;
text-decoration: none;
line-height: 1.64em;
font-size: 1em;
font-weight: normal;
}
.pagea {
display: inline-block;
}
p {
margin: 0;
padding: 0;
}
</style>
<div class="pagebutton">
<a class="pagea" href="actors.html">
<div class="pagelink">
<div class="pageimg"><img width=320 src="placeholder.png" /></div>
<div class="content">
<div class="pageheading">Actors</div>
<div class="pagedescription">
<p>Some actor stuff</p>
</div>
</div>
</div>
</a>
</div>
\endhtmlonly
\subpage actors

View File

@ -1,10 +1,5 @@
@page concepts
#### Definitions
* `Jump/Branch/Function` - Tells the cpu to execute instructions somewhere else and come back here when done.
* `Hexadecimal` - A [numbering system](https://en.wikipedia.org/wiki/Hexadecimal) just like decimal (also called base-ten) or roman numerals. An easy method for programmers and computers to understand each other which groups/separates bytes of information in a readable format. Representing information as decimal results in an unreadable mess.
* `s32/word/int` - A max size for a number. Data represented as 32 bits or 4 bytes: `0x00000001`. It consists of eight digits.
* `s16/half-word/short` - A number represented as 16 bits or 2 bytes: `0x0001`. It consists of four digits. Maximum value 65,535 (0xFFFF).
* `s8/byte/char` - A number represented as 8 bits or 1 byte: `0x01`. It consists of two digits. Maximum value 255 (0xFF).
@page concepts Basic Concepts
See terminology for explanations of terms.
## Addresses
Computers use addresses to jump through code. This works similar to finding a house using its address. Except, that reaching the house is nearly instantaneous and it only contains more instructions and jumps or some data such as a texture or a text string. Also, when finished with the house, you travel back to the previous destination which may have some left-over instructions or more jumps. You can imagine this quickly becoming a spaghetti monster jumping all over the place.

125
docs/basics/basicsmenu.md Normal file
View File

@ -0,0 +1,125 @@
\page basics Understanding the Basics
\htmlonly
Essential skills and concepts to help you get started with mk64 decomp.
<style>
.pagebutton {
display: inline-block;
margin-right: 1em;
margin-bottom: 1em;
}
.pagelink {
display: block;
background-color: rgb(40, 44, 52);
width: 320px;
}
.pageimg {
display: inline-block;
width: 100%;
position: relative;
overflow: hidden;
}
.content {
color: white;
font-size: 1em;
padding: 0;
margin: 0;
}
.pageheading {
padding: .5em .5em;
font-size: 18px;
color: white;
font-weight: bold;
}
.pagedescription {
color: #fff;
border-color: transparent;
opacity: 0.75;
height: 84px;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 10px;
display: block;
padding: 10px;
text-decoration: none;
line-height: 1.64em;
font-size: 1em;
font-weight: normal;
}
.pagea {
display: inline-block;
}
p {
margin: 0;
padding: 0;
}
</style>
<div class="pagebutton">
<a class="pagea" href="compiling.html">
<div class="pagelink">
<div class="pageimg"><img width=320 src="placeholder.png" /></div>
<div class="content">
<div class="pageheading">Installing mk64 Decomp</div>
<div class="pagedescription">
<p>Steps for installing and building the game</p>
</div>
</div>
</div>
</a>
</div>
<div class="pagebutton">
<a class="pagea" href="test.html">
<div class="pagelink">
<div class="pageimg"><img width=320 src="placeholder.png" /></div>
<div class="content">
<div class="pageheading">test</div>
<div class="pagedescription">
<p>test</p>
</div>
</div>
</div>
</a>
</div class="pagebutton">
<h2>Foundational Knowledge</h2>
<p>Become familiar with technical and low-level concepts.</p>
<div class="pagebutton">
<a class="pagea" href="basicconcepts.html">
<div class="pagelink">
<div class="pageimg"><img width=320 src="placeholder.png" /></div>
<div class="content">
<div class="pageheading">Basic Concepts</div>
<div class="pagedescription">
<p>Decomp, hexadecimal, cpu threads, addresses, and types to provide foundation knowledge.</p>
</div>
</div>
</div>
</a>
</div>
<div class="pagebutton">
<a class="pagea" href="terminology.html">
<div class="pagelink">
<div class="pageimg"><img width=320 src="placeholder.png" /></div>
<div class="content">
<div class="pageheading">Decomp Terminology</div>
<div class="pagedescription">
<p>Common terms used in low-level computing and decomp.</p>
</div>
</div>
</div>
</a>
</div>
\endhtmlonly
\subpage compiling
\subpage concepts
\subpage test
\subpage terminology
\subpage buildwindows

View File

@ -1,54 +1,47 @@
@page compiling Compiling mk64
## Dependencies
@page compiling Installing mk64 Decomp
## Build Instructions
The build system has the following package requirements:
binutils-mips >= 2.27
python3 >= 3.6
libaudiofile
* [Linux and WSL](#linux)
* [Arch](#arch)
* [Windows](#windows)
* [macOS](#macos)
* [Docker](#docker)
### Compiling
* [US](#building-us)
* [EU](#building-eu)
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:
```
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 <function> -eu
```
#### Debian / Ubuntu
## Linux
```
sudo apt install build-essential pkg-config git binutils-mips-linux-gnu python3 zlib1g-dev libaudiofile-dev libcapstone-dev
```
#### Arch Linux
### Arch
To install build dependencies:
```
sudo pacman -S base-devel capstone python
```
Install the following AUR packages:
Install the following AUR package:
* [mips64-elf-binutils](https://aur.archlinux.org/packages/mips64-elf-binutils) (AUR)
Review the n64decomp/sm64 readme for instructions to compile in other distributions.
Review the [n64decomp/sm64](https://github.com/n64decomp/sm64) readme for instructions to compile in other distributions.
#### Windows
## Windows
Compiling on Windows requires `MSYS2 MinGW x64`. The setup process is a tad intensive.
Not recommended. Use WSL unless this is your only option.
[Instructions here](docs/BUILD_WINDOWS.md)
#### macOS
## macOS
Install [Homebrew](https://brew.sh), then install the following dependencies:
```
@ -56,9 +49,9 @@ 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`.
Build using `gmake` ensuring homebrew `make` is used instead of the old macOS system `make`.
#### Docker
## Docker
Build the Docker image:
```
@ -76,12 +69,35 @@ docker run --rm -v ${PWD}:/mk64 mk64 make -C tools
docker run --rm -v ${PWD}:/mk64 mk64 make
```
## Building
## Building US
Place a US version of Mario Kart 64 called `baserom.us.z64` into the project folder for asset extraction.
Run the following commands after pulling:
```bash
make -C tools
make
make -j
```
## Building EU
Building EU requires US to be built first. See above.
mk64 decomp supports two EU versions
* EU 1.0 `eu-1.0`
* EU 1.1 `eu-final`
Build using
```
make -j VERSION=eu-1.0
```
or
```
make -j VERSION=eu-final
```
First-diff/diff commands for EU
```
python3 first-diff.py --eu
./diff <function> -eu
```

2
docs/basics/courses.md Normal file
View File

@ -0,0 +1,2 @@
\page courses Courses
# Courses

View File

@ -0,0 +1,77 @@
\page coursesmenu Courses
\htmlonly
How courses work in mk64
<style>
.pagebutton {
display: inline-block;
margin-right: 1em;
margin-bottom: 1em;
}
.pagelink {
display: block;
background-color: rgb(40, 44, 52);
width: 320px;
}
.pageimg {
display: inline-block;
width: 100%;
position: relative;
overflow: hidden;
}
.content {
color: white;
font-size: 1em;
padding: 0;
margin: 0;
}
.pageheading {
padding: .5em .5em;
font-size: 18px;
color: white;
font-weight: bold;
}
.pagedescription {
color: #fff;
border-color: transparent;
opacity: 0.75;
height: 84px;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 10px;
display: block;
padding: 10px;
text-decoration: none;
line-height: 1.64em;
font-size: 1em;
font-weight: normal;
}
.pagea {
display: inline-block;
}
p {
margin: 0;
padding: 0;
}
</style>
<div class="pagebutton">
<a class="pagea" href="courses.html">
<div class="pagelink">
<div class="pageimg"><img width=320 src="placeholder.png" /></div>
<div class="content">
<div class="pageheading">Courses</div>
<div class="pagedescription">
<p>Some course related stuff</p>
</div>
</div>
</div>
</a>
</div>
\endhtmlonly
\subpage courses

68
docs/basics/menu.html Normal file
View File

@ -0,0 +1,68 @@
Essential skills and concepts to help you get started with mk64 decomp.
<style>
.pagelink {
background-color: rgb(40, 44, 52);
width: 320px;
margin-right: 1em;
margin-bottom: 1em;
display: inline-block;
}
.content {
color: white;
padding-left: 15px;
font-size: 1em;
}
.pageheading {
padding: .75em .5em;
font-size: 18px;
color: white;
font-weight: bold;
}
.pagedescription {
color: #fff;
border-color: transparent;
opacity: 0.75;
height: 84;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 10px;
display: block;
padding: 10px;
text-decoration: none;
line-height: 1.64em;
font-size: 1em;
font-weight: normal;
}
</style>
<a href="compiling.md">
<div class="pagelink"><img src="placeholder.png" />
<div style="color: white; padding-left: 15px">
<div class="pageheading">Compiling mk64</div>
<div class="pagedescription"><p>Instructions and dependencies required to build the game</p>
</div>
</div>
</div>
</a>
<a href="Basic Concepts.md">
<div class="pagelink"><img src="placeholder.png" />
<div class="content">
<div class="pageheading">Basic Concepts</div>
<div class="pagedescription">
<p>Decomp, hexadecimal, cpu threads, addresses, and types to provide foundation knowledge.</>
</div>
</div>
</div>
</a>
<a href="test">
<div class="pagelink"><img src="placeholder.png" />
<div class="content">
<div class="pageheading">test</div>
<div class="pagedescription"><p>test</p>
</div>
</div>
</div>
</a>

BIN
docs/basics/placeholder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,7 @@
\page terminology Terminology
#### Definitions
* `Jump/Branch/Function` - Tells the cpu to execute instructions somewhere else and come back here when done.
* `Hexadecimal` - A [numbering system](https://en.wikipedia.org/wiki/Hexadecimal) just like decimal (also called base-ten) or roman numerals. An easy method for programmers and computers to understand each other which groups/separates bytes of information in a readable format. Representing information as decimal results in an unreadable mess.
* `s32/word/int` - A max size for a number. Data represented as 32 bits or 4 bytes: `0x00000001`. It consists of eight digits.
* `s16/half-word/short` - A number represented as 16 bits or 2 bytes: `0x0001`. It consists of four digits. Maximum value 65,535 (0xFFFF).
* `s8/byte/char` - A number represented as 8 bits or 1 byte: `0x01`. It consists of two digits. Maximum value 255 (0xFF).