Resident Evil 2: Dual Shock Ver. (NTSC‐U) - modo-lv/game-hacking GitHub Wiki

Memory addresses

Code

Code addresses contain assembly instructions, which may glitch if modified in emulators with Recompiler CPU setting (Interpreter recommended).

Address (Leond d.) Address (Claire d.) Type Description
0x00E3BC 0x00E3BC 4th survivor playtime counter (millisecons)
80051B38 24 04 00 1E (li a0,0x1e): Passes the item code 1E (Ink Ribbon) to the function that checks inventory contents, to determine whether the activated typewriter should work or not. The last byte can be changed to 0 to keep the ribbons, but it won't work if the player's inventory is full (only empty slots match 0).
80051B3C 80051B14 0A 00 40 04 (bltz v0,04): Jumps to the typewriter rejection code if player doesn't have any Ink Ribbons. Jump distance 0A can be patched to 00 to always continue with the "ribbon found" code.
80051B7C DC FB 22 AC (sw v0,-0x424(at)): Restores 800CFBDC flags to what they were before typewriter rejection text was displayed. Replace with 0 (nop) to disable.

When memory card binary is loaded

Address (Leon d.) Address (Claire d.) Description
801C0C10 801C0C14 01 00 42 24 (addiu v0,v0,1). Add 1 to total save count just before writing to the memory card. Patching 01 to 00 changes the increase to 0, preventing save count increase.
801C0BC4 801C0BC8 FF FF 42 24 (addiu v0,v0,-1). Removes 1 Ink Ribbon from inventory on save. Patching the FFFF to 0000 changes the -1 to 0, preventing ribbon loss.

Data

Address (Leon d.) Address (Claire d.) Type Description
8000B870 8000B870 Address Address of the "start" function (main entry point).
Leon: 80078408
Claire: 800783C0
800CE2FC 800CE2B4 Short Button inputs ("joker command").
800CE30C Bin32 Action input. Similar to regular inputs ("joker command"), but registers actions mapped to buttons, not buttons themselves.
0001: Move forward
0002: Turn right
0004: Move backward
0008: Turn left
0010: Aim up
0020: Aim down
00C0: Interact/shoot
0200: Dash
0400: Open inventory
0800: Raise weapon
1000: Confirm
2000: Cancel
0x0CFB74 Bin32 Misc. flags
00000001: Tofu mode (in 4th Survivor).
00000008: 4th Survivor mode.
00000040: Display (most) in-game text in English.
00000100: Return to main menu (combine with 4th survivor flags to switch menus).
00008000: Display (most) in-game text in Japanese.
00020000: Playing Original game.
00040000: Sets the save menu as the next menu to load with Loading trigger. Bypasses Ink Ribbon check (but still spends one on save if present).
00080000: Playing Arrange game.
800CFBD9 Binary8 Bit 7: Inventory open state & trigger.
800CFBDC 800CFB97 Bin32 Misc. flags.
80000000 (game seems to always set the whole higher byte to FF, even though only the highest bit controls the freezing): Freeze player during message display. Can be set by itself, and will be unset when any message is displayed and fully cleared.
800D4A64 Int8 Item code in the Lighter slot.
800D449C 800D4454 Int Address of a method, seems to only be used in context with activating typewriters.
80051B04 (L) / 80051ADC (C): standard typewriter activation, shows a message depending on whether player has ribbons and continues on to save menu if he does and confirms the prompt.
800D46C4 800D467C Byte Total save count.
800D46AC Int8 Total number of inventory slots available: 08 or 0A, or 00 when not in game.
800D481C 800D47D4 Short Some kind of location category? Not always 100% consistent.
00: Streets
01: RPD Precinct
800D481E 800D47D6 Short Location.
03: RPD Courtyard
1B: Courtyard Boulevard
800D486A Binary8 01: Costume locker unlocked.
800D4A2D 800D49E5 Binary8 Flags:
40: Zombie Brad shows up
800D5C00 800D5BB8 Byte Determines what kind of screen will show when inventory is opened next time:
0: Normal inventory
1: Chest
2: Item pickup prompt
3: Map
0x0D5C14 Int8 Currently selected item chest slot (0-0x3F). Resets to 0 when chest is opened.
0x0D5BF2 Int8 Cursor location when in item chest:
0x00: Player inventory
0x01: Chest inventory.
0x0D5BFC Int8 Currently selected inventory item slot (0x00-0x0A).
800DF348 800DF300 Byte Subscreen trigger/indicator.
0: No subscreen (normal gameplay)
1: Subscreen loading (includes door transitions). Will freeze if the target is not set.
2: Subscreen done (menus: open, door transitions: finished, reset to 0).
800E873C 800E86F4 Binary8 01: Non-default response option selected.
80: Message is currently displayed (and most likely waiting for user input).

When ENDING overlay loaded

Address (Leon d.) Address (Claire d.) Type Description
801252B0 Bin32 Post-credits flags.
0x00000100: "4th Survivor" mode unlocked.
0x00000200: "Tofu Survivor" mode unlocked.

Binary overlays

RE2 loads parts of its code on the fly from the files in COMMON/BIN. Each file has a set address location where it needs to be placed in order to function correctly as part of the main code. Also, the first byte of each overlay is unique, which can be used to simply check whether a specific overlay is currently loaded.

File Load address First byte
CONFIG.BIN 801BFA18 4F
DIEDEMO.BIN 80190000 4D
ENDING.BIN 8011A000 49
MEM_CARD.BIN 801BFA18 4E
OPENING.BIN 801BFA18 50
RESULT.BIN 80158000 52
SELECT.BIN 801BFA18 51
STAGE1.BIN (unknown) 43
STAGE2.BIN (unknown) 44
STAGE3.BIN (unknown) 45
STAGE4.BIN (unknown) 46
STAGE5.BIN (unknown) 47
STAGE6.BIN (unknown) 4A
STAGE7.BIN 8011A000 48
TITLE.BIN 80190000 4C

GameShark codes

Save count: 0

Keeps total save count at 0 at all times.

D000B870 8408 ; If Leon's disc
800D46C4 0000 ; Set saves to 0
D000B870 83C0 ; If Claire's disc
800D467C 0000 ; Set saves to 0

Freeze save count

Press/hold [L1] while in the save menu to switch off save count increase (until the menu is closed).

Leon's disc:

D00CE2FC 0004 ; If [L1]
E00DF348 0002 ; And in a sub-screen
301C0C10 0000 ; Disable save count increase (automatically resets when exiting screen)

Claire's disc:

D00CE2B4 0004 ; If [L1]
E00DF300 0002 ; And in a sub-screen
301C0C14 0000 ; Disable save count increase (automatically resets when exiting screen)

Switch text to Japanese

Changes item descriptions and object interaction messages, and adds Japanese subtitles to in-game dialog (movies, files, menus etc. remain in English).

Leon's disc:

310CFB75 00000008 ; Set the Japanese language flag.

Save without ribbons

  • Without ribbons, hold [L1] when activating a typewriter to save for free.
  • If you have ribbons you want to keep, hold [L1] while the save screen is loading to save for free.

Leon's disc:

D00CE2FC 0004 ; If [L1]
30051B3C 0000 ; Skip ribbon checking on typewriter
E0051B3C 0000 ; If ribbon checking skipped
E00DF348 0002 ; And in save screen
D01C0BC4 FFFF ; And memory card instruction loaded
D01C0BC6 2442 ; +++
801C0BC4 0000 ; Set the Ink Ribbon change to 0 (will be reverted when exiting save screen).
D00CE2FC 0000 ; If [nothing] pressed
30051B3C 000A ; Restore ribbon checking at typewriters

Claire's disc:

D00CE2B4 0004 ; If [L1]
30051B14 0000 ; Skip ribbon checking on typewriter
E0051B14 0000 ; If ribbon checking skipped
E00DF300 0002 ; And in save screen
D01C0BC8 FFFF ; And memory card instruction loaded
D01C0BCA 2442 ; +++
801C0BC8 0000 ; Set the Ink Ribbon change to 0 (will be reverted when exiting save screen).
D00CE2B4 0000 ; If [nothing] pressed
30051B14 000A ; Restore ribbon checking at typewriters

Save anywhere

Press [L1]+[Triangle] to save game in any room.

  • Will require a ribbon (unless a "no ribbon" code is activated as well).
  • The location will be the same as the last normal save. If there haven't been normal saves yet, the location will be "Scenario 1st" and new game intro movies will play on load.
  • Can cause glitches after loading if saved away from the room entrance or in rooms where cutscenes happen (such as the weapons shop at the start).

Leon's disc:

D00CE2FC 0014 ; If [L1]+[Triangle]
E00DF348 0000 ; And no subscreens open
D00D449C 0000 ; And no typewriter/box interaction trigger active
800D449C 1B04 ; Start typewriter interaction trigger
D00D449C 1B04 ; If trigger started
800D449E 8005 ; Finish it
E30E873C 0080 ; If any message is displayed
300CFBDF 00FF ; Freeze player until text is finished

Claire's disc:

D00CE2B4 0014 ; If [L1]+[Triangle]
E00DF300 0000 ; And no subscreens open
D00D4454 0000 ; And no typewriter/box interaction trigger active
800D4454 1ADC ; Start typewriter interaction trigger
D00D4454 1ADC ; If trigger started
800D4456 8005 ; Finish it
E30E86F4 0080 ; If any message is displayed
300CFB97 00FF ; Freeze player until text is finished

Open chest anywhere

Press [L1]+[Circle] to open the item chest in any room. May cause temporary graphical glitches in player inventory that should resolve when the next room loads.

Leon's disc:

D00CE2FC 0024 ; If [L1]+[Circle]
300D5C00 0001 ; Set the inventory mode to "chest" ([Circle] will trigger it to open).

Claire's disc:

D00CE2B4 0024 ; If [L1]+[Circle]
300D5BB8 0001 ; Set the inventory mode to "chest" ([Circle] will trigger it to open).

Zombie Brad always shows up

Zombie Brad spawns when entering the RPD courtyard, even if you picked up items at the start of scenario A.

  • Game mode requirements still apply (must be Original Game, Normal).
  • Does not respawn when killed (must take the special key before leaving the area).

DuckStation

D000B870 8408 ; If Leon's disc
D00D481E 0003 ; And at RPD Courtyard
310D4A2D 0040 ; Set Leon's Brad flag
D000B870 83C0 ; If Claire's disc
D00D47D6 0003 ; And at RPD Courtyard
310D49E5 0040 ; Set Claire's Brad flag

Always unlock Tofu (Scenario B ending)

After finishing any Scenario B, "Tofu Survivor" mode will get unlocked regardless of previous playthroughs or ranks.

DuckStation

D000B870 8408 ; If Leon's disc
3011A000 0049 ; And ENDING overlay loaded
311252B1 0002 ; Set "Tofu Survivor Earned" flag
Change item in the chest

Open an item chest, make sure the default item slot is selected. Press [Select] to decrease item ID in the slot, and [Start] to increase. Press [Square] to empty the slot.

  • IMPORTANT! This only changes the item, without affecting the amount/ammo/number of uses that each item can have. Use an amount modification cheat to fix this as needed.
  • Item image does not update during change, but gets fixed when moving it to inventory or scrolling/reopening the chest.
  • Item selection loops from 99 ("Platform key") back to 0 ("no item"), as any items after 99 are not made for player inventory and cause glitches (documents etc.).
D00CE2FC 0100 // If [Select]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
210D4A70 0001 // Decrement item code in chest slot 3
D00CE2FC 0100 // If [Select]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
300D5C14 0040 // Set selection index to 40 (appears same as index 0, does not move cursor)
E00D4A70 00FF // If item in chest slot 3 is 0xFF (gone below 0)
300D4A70 0063 // Loop over to 0x63
D00CE2FC 0800 // If [Start]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
200D4A70 0001 // Increment item code in chest slot 3
D00CE2FC 0800 // If [Start]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
300D5C14 0040 // Set selection index to 40 (appears same as index 0, does not move cursor)
E00D4A70 0064 // If item in chest slot 3 is 0x64 (gone past 0x63)
300D4A70 0000 // Loop over to 0x00
D00CE2FC 0000 // If nothing pressed
E00D5C14 0040 // And chest selection index 40
300D5C14 0000 // Set chest selection index to 0 (slot 3)
D00CE2FC 0080 // If [Square]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
300D4A70 0000 // Set item in chest slot 3 to 0
Change item amount in the chest

Open an item chest, make sure the default item slot is selected and move the cursor to it. Press [Left] to decrease item amount, or [Right] to increase. Press [Square] to set the amount to 0.

  • IMPORTANT! Even items without visible numbers can have amounts, particularly keys. Just like a gun has ammo, a key has a "number of uses" that decreases with every unlocked door, and the game will ask to discard the key when this amount goes from 1 to 0.
  • Items with actual ammo (guns, ammo boxes), become infinite use if their amount is set to 255. It will reset back to normal maximum if the gun/ammo box is combined with another.
D00CE2FC 8000 // If [Left]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
E00D5BF2 0001 // And cursor is in the chest inventory
210D4A71 0001 // Decrement item amount in chest slot 3
D00CE2FC 8000 // If [Left]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
E00D5BF2 0001 // And cursor is in the chest inventory
300D5C14 0040 // Set selection index to 40 (appears same as index 0, does not move cursor)
D00CE2FC 2000 // If [Right]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
E00D5BF2 0001 // And cursor is in the chest inventory
200D4A71 0001 // Increment item code in chest slot 3
D00CE2FC 2000 // If [Right]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
E00D5BF2 0001 // And cursor is in the chest inventory
300D5C14 0040 // Set selection index to 40 (appears same as index 0, does not move cursor)
D00CE2FC 0000 // If [nothing] pressed
E00D5C14 0040 // And chest selection index 40
300D5C14 0000 // Set chest selection index to 0 (slot 3)
D00CE2FC 0080 // If [Square]
E00DF348 0002 // And inventory open
E00D5C14 0000 // And chest selection index 0 (slot 3)
300D4A71 0000 // Set item amount in chest slot 3 to 0

Useful links

⚠️ **GitHub.com Fallback** ⚠️