forked from Chadderz121/wii-ct-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILDING
67 lines (56 loc) · 3.38 KB
/
BUILDING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
CT-CODE is built using make and the powerpc-eabi- toolchain. Strictly speaking
you do not need devkitpro to build this, however devkitpro comes bundled with
all the required tools, so this is arguably more convenient.
devkitpro can be downloaded at: http://sourceforge.net/projects/devkitpro/
To build the project, open a terminal in this directory and use the following
commands:
make - explains the build system.
make all - builds all regions.
make rmce - makes the mode for RMCE only.
make rmcj - makes the mode for RMCJ only.
make rmcp - makes the mode for RMCP only.
make clean - deletes all generate files.
The following settings are recognised on the command line
(e.g. make all ONLINE_REGION=256 ENABLE_FILTER=0):
ONLINE_REGION = 0-32767 (default 255)
Replace the region id for online regional races.
ENABLE_CTWW = 0 or 1 (default 1)
Whether or not to enable the 'CTWW' feature.
ENABLE_FILTER = 0 or 1 (default 1)
Whether or not to prevent Nintendo tracks in CTWW.
ENABLE_BSHELL = 0 or 1 (default 1)
Whether or not to include Bean's Blue Shell drag code.
ENABLE_SOM = 0 or 1 (default 1)
Whether or not to enable the Speedometer.
ENABLE_CTS = 0 or 1 (default 1)
Whether or not to enable all CT related features (cups, slots, etc).
Always run `make clean' if you want to rebuild with different settings.
All outputs go in the bin directory (which make will create). Region specifc
files go in subdirectories of bin (e.g. bin/rmce).
All temporary files go in the build directory (which make will create). Region
specifc files go in subdirectories of bin (e.g. build/rmcj).
The build system generates the following files:
boot_code.bin - A code section to be appended to the main executable of
the game (main.dol) which should be loaded at 0x802A5000.
boot_data.bin - A data section to be appended to the main executable of
the game (main.dol) which should be loaded at 0x802A8000.
ctgpr_code.tex0 - A texture file to be inserted into 'English.szs' or
equivalent, which is a BRRES data file containing several
textures. It should be added under the 'CTGP_CODE'.
Presently this installation must be done manually. For ease, you can take a
distribution which already uses this system (such as CTGP-R v1.02) and replace
the existing data with modifications.
The errors generated by different parts of the build system are more or less
friendly depending on just how obscure they are. For example the MOD example
the MOD build system tends to generate errors in build files with no
explanation of how they relate to the source files.
A few variables can be overriden when invoking make. This is done by appending
SETTING=VALUE to the make rules (e.g. make all LOG=).
LOG - command to run before each build target (default @echo $@).
Q - prefix to all build commands (default @ to supress logging).
PREFIX - prefix to all binutils tools (default powerpc-eabi-).
The build can be sped up significantly using multiple threads by appending the
-j flag to the make commands.
Each directory contains a file called makefile.mk, which contains instructions
for the build system specific to that directory (sometimes as simple as just
build all subdirectories).