summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2024-04-06 11:07:58 -0700
committerGitHub <noreply@github.com>2024-04-06 11:07:58 -0700
commit471d86f5303aa2afac56cd8cd498f1d5ab59f6ed (patch)
treeb6f519eb4bea29c435275fbacf159ae6cd308369 /docs
parent45ae63ccc550ea29f475669a87f7f8ac681a6b29 (diff)
Build Sync (#1600)
* Rename outputs * Makefile target renames * Add run target * yeet z64compress * venv * baserom_uncompressed -> baserom-decompressed * input rom name to baserom.z64 * Add BUILD_DIR makefile variable * Move built roms to build dir * Move baserom to baseroms folder * Add version to map file name * Makefile cleanup * Rename ldscript to include version * Multiversion build * n64-us version name * Remove venv as dependency of setup * Readme wording * extract_baserom.py suggestion * Readd checksums * Make .venv work with windows * missed an endif * Cleaner windows venv implementation * Remove duplciate process * Build process steps * Move make_options back * Fix schedule build directory * Fix schedule includes * Makefile NON_MATCHING check -> != 0 * OOT 1704 changes * Small cleanups * Missed 1 thing * UNSET -> SYMS * Update extract_baserom.py * dmadata.py * Small cleanup * dmadata_start * Format * dmadata files * Fix makefile comment * Jenkins report fix * extracted dir * Python dependencies order in readme
Diffstat (limited to 'docs')
-rw-r--r--docs/schedule_scripting_language.md2
-rw-r--r--docs/tools.md20
-rw-r--r--docs/tutorial/data.md14
-rw-r--r--docs/tutorial/merging.md16
-rw-r--r--docs/tutorial/vscode.md11
5 files changed, 40 insertions, 23 deletions
diff --git a/docs/schedule_scripting_language.md b/docs/schedule_scripting_language.md
index 872eac06a..1c92d7fe8 100644
--- a/docs/schedule_scripting_language.md
+++ b/docs/schedule_scripting_language.md
@@ -279,7 +279,7 @@ static ScheduleScript D_80BD3DB0[] = {
In the actor's C code:
```c
-#include "build/src/overlays/actors/ovl_En_Ah/scheduleScripts.schl.inc"
+#include "src/overlays/actors/ovl_En_Ah/scheduleScripts.schl.inc"
```
## Commands
diff --git a/docs/tools.md b/docs/tools.md
index c307382f9..9ec495313 100644
--- a/docs/tools.md
+++ b/docs/tools.md
@@ -42,6 +42,22 @@
There are a variety of tools that are used to assist in the decompilation process. This guide is an introduction to some of the tools that are used. Most of these tools are located in the `mm/tools` directory, others are either in the project root, or are separate programs entirely. Almost all of these programs have more information available via running them with `-h`.
+**Important:** Many tools require activating a Python virtual environment that contains Python dependencies. This virtual environment is automatically installed into the `.venv` directory by `make setup`, but you need to **activate** it in your current terminal session in order to run Python tools. To start using the virtual environment in your current terminal run:
+
+```bash
+source .venv/bin/activate
+```
+
+Keep in mind that for each new terminal session, you will need to activate the Python virtual environment again. That is, run the above `source .venv/bin/activate` command.
+
+To deactivate the virtual environment, run
+
+```bash
+deactivate
+```
+
+and your terminal session state will be restored to what it was before.
+
## In the repository
### `diff.py`
@@ -56,7 +72,7 @@ To use `diff.py`, you need a copy of a matching build folder to diff against. In
./diff.py <flags> ObjTree_Init
```
-`diff.py` reads the respective `mm.map` files to find the function. If the function has been renamed, it will not be able to find it. You should not edit map files yourself, but instead rerun `make diff-init` (it is possible to copy the build folder manually, but it's better not to, since `make diff-init` guarantees an OK `expected` folder).
+`diff.py` reads the respective `mm-n64-us.map` file to find the function. If the function has been renamed, it will not be able to find it. You should not edit map files yourself, but instead rerun `make diff-init` (it is possible to copy the build folder manually, but it's better not to, since `make diff-init` guarantees an OK `expected` folder).
The recommended flags used are `-mwo`, `-mwo3`, or `-mwob`:
@@ -102,7 +118,7 @@ Can be given a symbol (function or variable name, for example), and will find it
```bash
$ ./sym_info.py ObjTree_Init
-Symbol ObjTree_Init (RAM: 0x80B9A0B0, ROM: 0xFFF210, build/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.o)
+Symbol ObjTree_Init (RAM: 0x80B9A0B0, ROM: 0xFFF210, build/n64-us/src/overlays/actors/ovl_Obj_Tree/z_obj_tree.o)
```
### `extract_assets.py`
diff --git a/docs/tutorial/data.md b/docs/tutorial/data.md
index 2c3f1d2e2..ad3fdda71 100644
--- a/docs/tutorial/data.md
+++ b/docs/tutorial/data.md
@@ -78,9 +78,9 @@ First, we tell the compiler to ignore the original data file. To do this, open t
beginseg
name "ovl_En_Recepgirl"
compress
- include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
- include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o"
- include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
+ include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o"
+ include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o"
endseg
```
@@ -90,9 +90,9 @@ We will eventually remove both of the bottom two lines and replace them with our
beginseg
name "ovl_En_Recepgirl"
compress
- include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
- //include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o"
- include "build/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
+ //include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.data.o"
+ include "$(BUILD_DIR)/data/ovl_En_Recepgirl/ovl_En_Recepgirl.reloc.o"
endseg
```
@@ -131,7 +131,7 @@ The game has a convenient system that allows it to sometimes effectively use off
There is an obvious problem here, which is that is that these symbols have to be defined *somewhere*, or the linker will complain (indeed, if we change the ones in the array to `D_...`, even if we extern them, we get
```
-mips-linux-gnu-ld: build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o:(.data+0x20): undefined reference to `D_0600F8F0'
+mips-linux-gnu-ld: build/n64-us/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o:(.data+0x20): undefined reference to `D_0600F8F0'
```
As we'd expect, of course: we didn't fulfil our promise that they were defined elsewhere.)
diff --git a/docs/tutorial/merging.md b/docs/tutorial/merging.md
index 88664494d..68c2571cf 100644
--- a/docs/tutorial/merging.md
+++ b/docs/tutorial/merging.md
@@ -12,9 +12,9 @@ Specifically, to use the automatically generated reloc, rather than the original
```
beginseg
name "ovl_En_Recepgirl"
- include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
- //include "build/data/overlays/actors/ovl_En_Recepgirl.data.o"
- include "build/data/overlays/actors/ovl_En_Recepgirl.reloc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
+ //include "$(BUILD_DIR)/data/overlays/actors/ovl_En_Recepgirl.data.o"
+ include "$(BUILD_DIR)/data/overlays/actors/ovl_En_Recepgirl.reloc.o"
endseg
```
@@ -23,8 +23,8 @@ and change to use our reloc:
```
beginseg
name "ovl_En_Recepgirl"
- include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
- include "build/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o"
endseg
```
@@ -51,11 +51,11 @@ in the C file. Also, due to the way `GLOBAL_ASM` works, we also cannot use gener
beginseg
name "ovl_En_Recepgirl"
compress
- include "build/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/z_en_recepgirl.o"
#ifdef NON_MATCHING
- include "build/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o"
+ include "$(BUILD_DIR)/src/overlays/actors/ovl_En_Recepgirl/ovl_En_Recepgirl_reloc.o"
#else
- include "build/data/overlays/actors/ovl_En_Recepgirl.reloc.o"
+ include "$(BUILD_DIR)/data/overlays/actors/ovl_En_Recepgirl.reloc.o"
#endif
endseg
```
diff --git a/docs/tutorial/vscode.md b/docs/tutorial/vscode.md
index 288bf0e48..936a64d03 100644
--- a/docs/tutorial/vscode.md
+++ b/docs/tutorial/vscode.md
@@ -39,18 +39,18 @@ You can create a `.vscode/c_cpp_properties.json` file with `C/C++: Edit Configur
{
"configurations": [
{
- "name": "Linux",
+ "name": "n64-us",
"compilerPath": "${default}", // Needs to not be "" for -m32 to work
"compilerArgs": [
"-m32" // Removes integer truncation warnings with gbi macros
],
"intelliSenseMode": "${default}", // Shouldn't matter
"includePath": [ // Matches makefile's includes
- "${workspaceFolder}/**",
+ "include",
"src",
"assets",
- "build",
- "include"
+ "build/n64-us/",
+ "${workspaceFolder}",
],
"defines": [
"_LANGUAGE_C" // For gbi.h
@@ -72,10 +72,11 @@ Add the following to (or create) the `.vscode/settings.json` file for VSCode to
"search.useIgnoreFiles": false,
"search.exclude": {
"**/.git": true,
- "baserom/**": true,
+ "baseroms/**": true,
"build/**": true,
"expected/**": true,
"nonmatchings/**": true,
+ ".venv/**": true
},
}
```