-
Notifications
You must be signed in to change notification settings - Fork 2
/
memory.s
220 lines (183 loc) · 5.58 KB
/
memory.s
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
.segment "ZEROPAGE"
.ifdef fourscore
MaxNumPlayers = 4
.else
MaxNumPlayers = 2
.endif
AttractMode: .res 1
FourScorePluggedIn: .res 1
retraces: .res 1
keydown: .res MaxNumPlayers
keylast: .res MaxNumPlayers
random1: .res 2
random2: .res 2
psg_sfx_state: .res 32
ScrollX: .res 2
ScrollMode: .res 1
TileCycleIndex: .res 1
PlayerEnabled: .res MaxNumPlayers
PlayerPX: .res MaxNumPlayers
PlayerPYH: .res MaxNumPlayers
PlayerPYL: .res MaxNumPlayers
PlayerVYH: .res MaxNumPlayers
PlayerVYL: .res MaxNumPlayers
PlayerInvincible: .res MaxNumPlayers
PlayerDropLock: .res MaxNumPlayers
PlayerDead: .res MaxNumPlayers
PlayerTeleportCooldown: .res MaxNumPlayers
PlayerWasRunning: .res MaxNumPlayers ; was the player running when they jumped?
PlayerXShifted: .res 1
PlayerPowerEnabled: .res 1 ; set during player handler,
; is PowerType, but -1 if PowerTime is zero
PlayerDir: .res MaxNumPlayers ; 0 or 1
PlayerLives: .res MaxNumPlayers
PlayerHealth: .res MaxNumPlayers
MaxHealthNormal = 4
MaxHealthHard = 3
MaxNumBlockUpdates = 4
MaxNumTileUpdates = 5
BlockUpdateA1: .res MaxNumBlockUpdates
BlockUpdateA2: .res MaxNumBlockUpdates
BlockUpdateB1: .res MaxNumBlockUpdates
BlockUpdateB2: .res MaxNumBlockUpdates
BlockUpdateT1: .res MaxNumBlockUpdates
BlockUpdateT2: .res MaxNumBlockUpdates
BlockUpdateT3: .res MaxNumBlockUpdates
BlockUpdateT4: .res MaxNumBlockUpdates
TileUpdateA1: .res MaxNumTileUpdates
TileUpdateA2: .res MaxNumTileUpdates
TileUpdateT: .res MaxNumTileUpdates
StatusRow1: .res 28
StatusRow2: .res 16
Update28 = StatusRow1
Update28Address: .res 2
EnableNMIDraw: .res 1
GameDifficulty: .res 1
DIFFICULTY_STANDARD = 0
DIFFICULTY_HARDER = 1
DIFFICULTY_MOREHARD = 2
LevelNumber: .res 1
TempX: .res 1
OamPtr: .res 1
TempVal: .res 4
FlashColor: .res 1
TouchRight: .res 1
TouchBottom: .res 1
TouchTopA: .res 1
TouchTopB: .res 1
TouchLeftA: .res 1
TouchLeftB: .res 1
TouchWidthA: .res 1
TouchWidthB: .res 1
TouchHeightA: .res 1
TouchHeightB: .res 1
TouchTemp: .res 1
TouchTemp2: .res 1
EnemyWidth: .res 1
DispEnemyBodyType: .res 1
DispEnemyWeapon: .res 1
DispEnemyHead: .res 1
.segment "BSS"
.res 14
soundBSS: .res 64
NumRowsMade: .res 1
PlayerHead: .res MaxNumPlayers ; tile number
PlayerBody: .res MaxNumPlayers ; not a tile number
PlayerHeld: .res MaxNumPlayers ; tile number?
PlayerPowerType: .res MaxNumPlayers ;
.enum
APOWERUP_NONE
APOWERUP_DIAGSHOOT
APOWERUP_BOMBS
APOWERUP_JUMP
APOWERUP_BILLBLOCK
.endenum
PlayerPowerTime: .res MaxNumPlayers ; measured in 1/4 frames
PlayerJumpCancelLock: .res MaxNumPlayers
NumScoreDigits = 5
ScoreDigits: .res NumScoreDigits*MaxNumPlayers
.res 1
EditorBouncyFX: .res 1 ; a timer
IsWarmboot: .res 1
WarmbootData: .res 4
PlayerStartPX: .res MaxNumPlayers
PlayerStartPY: .res MaxNumPlayers
MaxDelayedMetaEdits = 10
DelayedMetaEditIndx: .res MaxDelayedMetaEdits
DelayedMetaEditTime: .res MaxDelayedMetaEdits
DelayedMetaEditType: .res MaxDelayedMetaEdits
MaxExplosions = 5
ExplosionPosX: .res MaxExplosions
ExplosionPosY: .res MaxExplosions
ExplosionSize: .res MaxExplosions
ExplosionTime: .res MaxExplosions
PowerupLen = 3
PowerupPX: .res PowerupLen
PowerupPY: .res PowerupLen
PowerupVX: .res PowerupLen
PowerupVY: .res PowerupLen
PowerupF: .res PowerupLen
; E----TTT
; E - Enabled
; T - Type of powerup
NeedPowerupSound: .res 1
BothDeadTimer: .res 1
VersusMode: .res 1
VersusNeed2Win: .res 1
VersusWins: .res MaxNumPlayers
BulletLen = 12
ObjectLen = 14
BulletPX: .res BulletLen
BulletPXL: .res BulletLen
BulletPY: .res BulletLen
BulletPYL: .res BulletLen
BulletVX: .res BulletLen
BulletVXL: .res BulletLen
BulletVY: .res BulletLen
BulletVYL: .res BulletLen
BulletLife: .res BulletLen
BulletF: .res BulletLen ;flags
; EP--TTTT
; E - enabled
; P - player bullet, if 1 can damage enemies (as well as players!)
; T - type
ObjectPX: .res ObjectLen
ObjectPYH: .res ObjectLen
ObjectPYL: .res ObjectLen
ObjectVYH: .res ObjectLen
ObjectVYL: .res ObjectLen
ObjectF1: .res ObjectLen ; HHTTTTTD, Health, Type, Direction
ObjectF2: .res ObjectLen ; ----SSSS, State
ObjectF3: .res ObjectLen ; PPP-----, Parameter, Weapon
ObjectTimer: .res ObjectLen ; when timer reaches 0, reset state
BombDroppedIndex: .res 1
; level config
LevelGoalType: .res 1
LevelGoalParam: .res 1
LevelEnemyPool: .res 16
ScreenEnemiesCount: .res 1
MaxScreenEnemies: .res 1
LevelWon: .res 1
Timer60: .res 1
LevelConfigBytes: .res 8
LevelMapPointer = LevelConfigBytes + 6
LevelEditMode: .res 1
LevelEditStartX: .res 1
LevelEditStartY: .res 1
IsMappedLevel: .res 1
LevelEditKeyRepeat: .res 1
IsScoreMode: .res 1
IsFightMode: .res 1
JustPickedFromMenu: .res 1
NoLevelCycle: .res 1
VersusPowerups: .res 1
; ScrollGameMode: .res 1
EditorCurX: .res 1
EditorCurY: .res 1
EditorCurT: .res 1
PlayerEnabledCopy: .res MaxNumPlayers
LevelBuf = $700
BulletMap = LevelBuf - 64
AttribMap = BulletMap - 64
CollectMap = AttribMap - 32
.code