-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRiver City Ransom RAM map.txt
334 lines (292 loc) · 10.9 KB
/
River City Ransom RAM map.txt
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
River City Ransom
No RAM map was available so I started figuring it on my own.
These are some messy notes describing what I could discover so far
- William Wenge-Murphy
===========================================================
(1b) is a one byte value, (2b) is 2
Addresses are in hexadecimal but not denoted with 0x
Values in hex ARE denoted with 0x, otherwise assume they're decimal
All 1 byte. Player 2's stats are next byte after each.
Punch: 049F
Kick: 04A3
Weapon: 04A7
Throwing: 04AB
Agility: 04AF
Defense: 04B3
Strength: 04B7
Willpower: 04BB
Stamina: 04BF
Max power: 04C3
Money:
04C7 Lower cents digit
04C8 Lower dollars digit
04C9 Upper two dollars digits
These money values are stored in a really strange way described here:
http://www.gamefaqs.com/nes/563453-river-city-ransom/faqs/20905
Inventory: 064D - 0654
Shops:
0036:
Related to entering doors 0 normally. Tracks the process of entering a shop or other door
not just the related animation
For shops with animated doors:
changes with animation: 0, 41, 58, 59, 123
Setting 123, for example, will immediately pop you inside a shop. Usually this appears
to be the last shop you visited, unless you move from one town to another
Shops without animated doors:
changes to 72 once inside
Other doors:
0, 41, 58, 59, then back to 0 on the other side.
123 and 72 mark sub-areas, then?
No change when zoning between normal areas (walking off side of screen)
0084: Shopkeeper position (normally 0x1E?)
00CC:
Shop sprite pointer (of some kind). Messing with value loads in different graphics for shopkeeper
0 while outside shops
00CB: Player graphic while in shop. Varies by shop (most are broken graphics). These work for bookstore:
0x1A Normal
0x1C Bowl of rice
0x20 Weapon
0x23 Hamburger
Sprites (any/general):
02E3 (1b): Screen-relative X pos
Where a sprite is in the viewable area.
NPCs/enemies:
0085 - 0086 (1b): X position of an NPC
008E, 008F (1b): Area section of NPC
(see below under "Player 1" for explanation)
00A0, 00A1 (1b): Y pos of NPC
00A9, 00AA (1b): NPC visibility? (set to > 1 for invisible)
02B9, 02BD (1b): Animation tracker of sprite. Toggles back and forth as sprites walk in place (by cheat/lock X pos)
006A:
052A: Each is a walking animation tracker (?) of an NPC
(Freezing this value allows the sprites to continue to move, but they glide)
0097, 0098:
Somehow related to up-down movement of NPCs.
Flips rapidly between many values as they move
009D:
Takes various vaguely bitflag-looking values when an NPC dies, but also at other times (32, 64, 112, 88, etc)
00BB, 00BC
Height of NPC above ground (just like for items)
Applies to falling NPCs, or when they turn into coins.
Tracks height of coin as it bounces
Keeps whatever value it last had once coin disappears
00CD, 00CE:
Graphics chooser for NPCs (including enemies and townfolk)
Usually 2 for enemies, 21 - 25 for townfolk. 16 when enemy becomes coin
Some fun values for townfolk:
0x0A: Stick (weapon)
0x0B: Stick (different color)
0x0C: Chain
0x0D: Crate
0x0E: Tire
0x0F: Trash can
00D5, 00D6: Animation tracker of enemy
Items:
0087 - 0089: item x pos
0091, 0092: Area section of item
00A2 - 00A4: Y pos of item
00A6: Y pos that...
Someone was last hit by item
Item last hit ground
NPC hit ground
00BD - 00BF: Item distance above ground
Various precise values:
ex. 32 for item above head, but 33 for walking frames. 16 for held chain. Offset when jumping or on ledge
00D7 - 00D9: Animation tracker of item
UNEXPLAINED:
00A7 - 00AE: Sticks at 0...
00C1, 00C2: Odd physics tracker
Changes to 255 when player is about to hit ground from ledge
0 when player falls from running into screen boundary
Various values when item is thrown then lands (different if it bounces off and hits player)
00C4: Briefly changes (sometimes) while enemy is spawning. Mostly just 0.
00CF, 00DO: Takes various values between 8 - 14 when zoning into areas
00D1, 00D2: Also takes various values while zoning (up to 28?)
00E0: Takes various values when entering shops
(and often different values for the same shop, depending on what was done previously)
00E1, 00E2: Takes strange values when zoning between areas
00E3 - 00ED: Stays at 0
00F2: Stays at 255
00F3 - 00F5: Stays at 0
00FB - 00FD: Flips between values as enemies move and attack
00FE - 010A
Player 1:
00F0: Pressed button
00EE: Breifly takes same value when pressed (probably to detect held vs tapped button)
(p2 values at EF, F1)
0083 (1b): X pos
008C (1b): Area section
X position only goes 0-255, so this tells you which 256px section the player is in
Starts with 0 on the left
009E (1b): Y pos
(up is higher, down is lower!)
00B9: How far player is above ground level
0 when on ground
31 height of jump
32 when on a ledge
63 height of jump from top of ledge
00A7: Player invisibility? (set to 0x40 and become invisible)
0005: Facing?
64 right
0 left
252? At moment of dashing into right edge of screen? (right before fall)
001E: Physics/status tracker:
0x10 - Normal
0x0F - Falling (very rapidly switches between other values while about to hit ground)
0x0F - (Also!) standing up on a ledge
0x00 - Lying on ground
0x00 - (Also!) touching left edge of screen
0xFF - Touching right edge of screen
IMPORTANT NOTE: Flips between MANY values with NPCs around, including enemies, townfolk
and coins. Does not flip between values for unmoving items, but does for
moving (thrown) items, or items player is hitting with
004F: Moving flag
0x81 while moving, 0x80 otherwise
005D: Running physics tracker
128 while running (either direction)
32 while stopping
0 stopped
192 while leaping (jumping after running start, or falling from hitting a wall)
64 while jumping (straight up)
0068: Walked/ran distance tracker
Continues to increment while moving (including if you quickly change directions without stopping)
Resets to 0 on stop
00D3: Animation frame tracker.
Rapidly flips between values as animation plays:
0x00, 0x01, 0x02 walking left (0x00 facing left)
0x80, 0x81, 0x82 walking right (0x80 facing right)
0xA1 - 0xA3 Puncing right
0x21 - 0x23 Punching left
0x24 - 0x26 Kicking left
0xA4 - 0xA6 Kicking right
0x0A - Jumping (left)
0x8A - Jumping (right)
0x0C/0x8C - Touching ground when landing
006F (1b): Facing?
128 left, 0 right.
Retains prev value walking up/down
04D4 (1b): Facing?
1 right, 2 left.
Retains prev value walking up/down
030F (1b): Facing? (including up-down). Here facing means direction they last moved, or are moving
192 left
64 right
0 up
128 down
160 down-left
32 up-right
96 down-right
224 up-left
(Seem like bit flags, obviously)
032D (1b): Another direction tracker. Value depends on facing
160 down (facing right)
64 down (facing left)
96 up (facing left)
192 up (facing right)
32 diagonally down (either one)
224 diagonally up (either one)
0335 (1b): Up/down walk flag?
1 when moving (or moved) up, 254 down, 0 left/right
0388 (2b): X pos (different value)
03C9 (1b): Key press (and release) counter. Increments when press arrow, or release
Other:
00DE: Top display scroll (0 when in life bar mode. Increases to 255 as money display slides in)
00DF: Menu scroll
0 normally. Rises to 255 as pause menu slides in
003F (1b): Pause menu status
160 when paused
96 menu sliding in
64 menu sliding out
0 not paused
0042: Area tracker
Goes from 0x00 (beginning) to 0x22 (final rooftop)
Keeps value while in shops
Switching this while in one area will immediately cause it to start behaving like the new area including
collisions and hotspots (i.e. leaving area, pits, going in shops, etc). Will scroll in broken
graphics when screen scrolls, and can even make (non-broken) townfolk suddenly appear
0497: Hit timer
Counts up by 1 per second while player takes no blows from enemies
Goes down significantly per blow, but not necessarily to 0
Freezes while in town. (only?) activates again when enemy is around.
03EB: Enemy dealt damage counter?
Increases when an enemy hits the player. Each enemy seems to have their own count: changes back and forth
as enemies take turns dealing blows. Seems to be some kind of working RAM, storing a damage value
from elsewhere.
00DC (1b): Screen scroll
00DD: Related value (somehow)
00F6 (1b): Also screen scroll? (stores identical value)
003D: Scroll section
Like the section tracker for player, but related to scroll offset.
0475: NPC related somehow. Setting to 255 makes it impossible to pick up any coins
Takes a value of 2 or 3 when enemies are still alive in the area. 255 when they're all dead.
0094: Screen # where an item last hit something? (including side of screen or player)
Changes to -1 (255) or 3 when it goes off left/right side of screen.
00F8: Scroll + pixel drawing related?
Flips between 136 and 140 as screen scrolls (either direction)
010B: Drawing related?
Normally switches each frame between 0 and 1. When shop menu text is drawn, value moves upward.
Continues to go up as more text is drawn (e.g. navigating back and forth in submenus) but not down.
Back to 0/1 upon exit
Also applies to belongings menu (increase every time text is redrawn, including throwing items away)
00DA: Switches to various values when buying an item in shops
Value depends on specific shop, and whether item is "to go"
(not the 'smile')
0110: 15 normally, 12 in all pause submenus (belongings/password/level/status/help)
0111: 12 normally, 9 in belongs + help submenu, 15 in others
0112, 0113: Flips to various values depending on area or whether in shop
==============================
List of areas:
0x00 Cross Town High (beginning)
0x01 Sticksville
0x02 Grotto Mall
0x03 Sticksville
0x04 Sherman Park
0x05 Sticksville
0x06 Waterfront mall
0x07 Capitol Avenue Bridge
0x08 Capitol Avenue Bridge (Benny + Clyde)
0x09 Downtown
0x0A W.S.L Co Warehouse
0x0B W.S.L Co Warehouse (inside)
0x0C W.S.L Co Warehouse (exit)
0x0D Armstrong Thru-way
0x0E Armstrong Thru-way (tunnel)
0x0F Armstrong Thru-way
0x10 Downtown
0x11 Flatirons Mall
0x12 Flatirons Mall
0x13 Downtown
0x14 Vacant 3rd Wheel Factory
0x15 Vacant 3rd Wheel Factory (inside)
0x16 Vacant 3rd Wheel Factory (inside)
0x17 Vacant 3rd Wheel Factory (exit)
0x18 Oak Hill Mall
0x19 Oak Hill Mall
0x1A Burb Village
0x1B Burb Village
0x1C River City High
0x1D River City High (gym)
0x1E River City High (upstairs L1)
0x1F River City High (upstairs L2)
0x20 River City High (upstairs L3)
0x21 River City High (classroom - rescue)
0x22 Rooftop
0x08 0x0A
| |
0x04 0x06 -- 0x07 -- 0x09 -- 0x0A -- 0x0B [bldg] -- 0x0C -- 0x0D -- 0x0E -- 0x0F
| |
0x00 -- 0x01 -- 0x02 -- 0x03 -- 0x05
(cont)
0x1C
|
0x18 -- 0x19 -- 0x1A -- 0x1B
|
0x15 -- 0x16 -- 0x17
|
0x14
|
0x11 -- 0x12 -- 0x13
|
0x10
|
0x0F