-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpakhacks.asm
69 lines (56 loc) · 2.52 KB
/
expakhacks.asm
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
68
69
.org exPakHackRamAddress
//------------------------------------------------------------//
// Read a flag from the enabled hacks table //
//------------------------------------------------------------//
.func getHackEnabledFlag
srl t0, a0, 3
andi t1, a0, 7
lui at, hi(hackEnableTable)
addu at, at, t0
lbu t2, lo(hackEnableTable)(at)
srlv t0, t2, t1
jr ra
andi v0, t0, 1
.endfunc
//------------------------------------------------------------//
// Include all the other hacks to be applied //
//------------------------------------------------------------//
.include "cumulativescore.asm"
.include "finalscore.asm"
.include "rain.asm"
.include "wind.asm"
.include "fastcamera.asm"
.include "celebration.asm"
.include "groundpainter.asm"
.include "changecharacter.asm"
//------------------------------------------------------------//
// Include tables //
//------------------------------------------------------------//
.include "hackenabletable.asm"
.include "modtable.asm"
.include "groundpainter/paintsetindextable.asm"
.include "groundpainter/paintersettable.asm"
//------------------------------------------------------------//
// Write a version number in case this is ever needed... //
//------------------------------------------------------------//
versionString:
.asciiz "MG64EASM0000001"
//------------------------------------------------------------//
// Output ROM pointers to each of the tables (for external //
// reading, i.e. editors) //
//------------------------------------------------------------//
tablePointersTable:
.definelabel tableCount, 4
// Align this file to 16 bytes and the end of this block
// to the end of the ROM
.fill (16 - ((tablePointersTable + (tableCount + 2) * 4) % 16)) % 16
.word romSize - (exPakHackRamEnd - versionString)
.word romSize - (exPakHackRamEnd - hackEnableTable)
.word romSize - (exPakHackRamEnd - modTable)
.word romSize - (exPakHackRamEnd - groundPaintSetIndexTable)
.word romSize - (exPakHackRamEnd - painterSetTable)
.word tableCount + 1
//------------------------------------------------------------//
// Get the end address of this file //
//------------------------------------------------------------//
exPakHackRamEnd: