From 21864f6f950d752b3fb8c0411517f5b442708ac4 Mon Sep 17 00:00:00 2001 From: LiquidCat64 <74896918+LiquidCat64@users.noreply.github.com> Date: Fri, 27 Jun 2025 16:25:45 -0600 Subject: [PATCH] CVCotM: Fix Advance Collection ROM (#5132) --- worlds/cvcotm/aesthetics.py | 4 ++-- worlds/cvcotm/data/patches.py | 24 ++++++++++++------------ worlds/cvcotm/rom.py | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/worlds/cvcotm/aesthetics.py b/worlds/cvcotm/aesthetics.py index d52165d0..86134f8e 100644 --- a/worlds/cvcotm/aesthetics.py +++ b/worlds/cvcotm/aesthetics.py @@ -734,8 +734,8 @@ def get_start_inventory_data(world: "CVCotMWorld") -> Tuple[Dict[int, bytes], bo magic_items_array[array_offset] += 1 # Add the start inventory arrays to the offset data in bytes form. - start_inventory_data[0x680080] = bytes(magic_items_array) - start_inventory_data[0x6800A0] = bytes(cards_array) + start_inventory_data[0x690080] = bytes(magic_items_array) + start_inventory_data[0x6900A0] = bytes(cards_array) # Add the extra max HP/MP/Hearts to all classes' base stats. Doing it this way makes us less likely to hit the max # possible Max Ups. diff --git a/worlds/cvcotm/data/patches.py b/worlds/cvcotm/data/patches.py index c2a9aa79..37fba3bd 100644 --- a/worlds/cvcotm/data/patches.py +++ b/worlds/cvcotm/data/patches.py @@ -132,40 +132,40 @@ start_inventory_giver = [ # Magic Items 0x13, 0x48, # ldr r0, =0x202572F - 0x14, 0x49, # ldr r1, =0x8680080 + 0x14, 0x49, # ldr r1, =0x8690080 0x00, 0x22, # mov r2, #0 0x8B, 0x5C, # ldrb r3, [r1, r2] 0x83, 0x54, # strb r3, [r0, r2] 0x01, 0x32, # adds r2, #1 0x08, 0x2A, # cmp r2, #8 - 0xFA, 0xDB, # blt 0x8680006 + 0xFA, 0xDB, # blt 0x8690006 # Max Ups 0x11, 0x48, # ldr r0, =0x202572C - 0x12, 0x49, # ldr r1, =0x8680090 + 0x12, 0x49, # ldr r1, =0x8690090 0x00, 0x22, # mov r2, #0 0x8B, 0x5C, # ldrb r3, [r1, r2] 0x83, 0x54, # strb r3, [r0, r2] 0x01, 0x32, # adds r2, #1 0x03, 0x2A, # cmp r2, #3 - 0xFA, 0xDB, # blt 0x8680016 + 0xFA, 0xDB, # blt 0x8690016 # Cards 0x0F, 0x48, # ldr r0, =0x2025674 - 0x10, 0x49, # ldr r1, =0x86800A0 + 0x10, 0x49, # ldr r1, =0x86900A0 0x00, 0x22, # mov r2, #0 0x8B, 0x5C, # ldrb r3, [r1, r2] 0x83, 0x54, # strb r3, [r0, r2] 0x01, 0x32, # adds r2, #1 0x14, 0x2A, # cmp r2, #0x14 - 0xFA, 0xDB, # blt 0x8680026 + 0xFA, 0xDB, # blt 0x8690026 # Inventory Items (not currently supported) 0x0D, 0x48, # ldr r0, =0x20256ED - 0x0E, 0x49, # ldr r1, =0x86800C0 + 0x0E, 0x49, # ldr r1, =0x86900C0 0x00, 0x22, # mov r2, #0 0x8B, 0x5C, # ldrb r3, [r1, r2] 0x83, 0x54, # strb r3, [r0, r2] 0x01, 0x32, # adds r2, #1 0x36, 0x2A, # cmp r2, #36 - 0xFA, 0xDB, # blt 0x8680036 + 0xFA, 0xDB, # blt 0x8690036 # Return to the function that checks for Magician Mode. 0xBA, 0x21, # movs r1, #0xBA 0x89, 0x00, # lsls r1, r1, #2 @@ -176,13 +176,13 @@ start_inventory_giver = [ # LDR number pool 0x78, 0x7F, 0x00, 0x08, 0x2F, 0x57, 0x02, 0x02, - 0x80, 0x00, 0x68, 0x08, + 0x80, 0x00, 0x69, 0x08, 0x2C, 0x57, 0x02, 0x02, - 0x90, 0x00, 0x68, 0x08, + 0x90, 0x00, 0x69, 0x08, 0x74, 0x56, 0x02, 0x02, - 0xA0, 0x00, 0x68, 0x08, + 0xA0, 0x00, 0x69, 0x08, 0xED, 0x56, 0x02, 0x02, - 0xC0, 0x00, 0x68, 0x08, + 0xC0, 0x00, 0x69, 0x08, ] max_max_up_checker = [ diff --git a/worlds/cvcotm/rom.py b/worlds/cvcotm/rom.py index 6ae0b6e4..35082929 100644 --- a/worlds/cvcotm/rom.py +++ b/worlds/cvcotm/rom.py @@ -335,8 +335,8 @@ class CVCotMPatchExtensions(APPatchExtension): rom_data.write_bytes(0x679A60, patches.kickless_roc_height_shortener) # Give the player their Start Inventory upon entering their name on a new file. - rom_data.write_bytes(0x7F70, [0x00, 0x48, 0x87, 0x46, 0x00, 0x00, 0x68, 0x08]) - rom_data.write_bytes(0x680000, patches.start_inventory_giver) + rom_data.write_bytes(0x7F70, [0x00, 0x48, 0x87, 0x46, 0x00, 0x00, 0x69, 0x08]) + rom_data.write_bytes(0x690000, patches.start_inventory_giver) # Prevent Max Ups from exceeding 255. rom_data.write_bytes(0x5E170, [0x00, 0x4A, 0x97, 0x46, 0x00, 0x00, 0x6A, 0x08])