CVCotM: Fix Advance Collection ROM (#5132)

This commit is contained in:
LiquidCat64
2025-06-27 16:25:45 -06:00
committed by GitHub
parent 00f8625280
commit 21864f6f95
3 changed files with 16 additions and 16 deletions

View File

@@ -734,8 +734,8 @@ def get_start_inventory_data(world: "CVCotMWorld") -> Tuple[Dict[int, bytes], bo
magic_items_array[array_offset] += 1 magic_items_array[array_offset] += 1
# Add the start inventory arrays to the offset data in bytes form. # Add the start inventory arrays to the offset data in bytes form.
start_inventory_data[0x680080] = bytes(magic_items_array) start_inventory_data[0x690080] = bytes(magic_items_array)
start_inventory_data[0x6800A0] = bytes(cards_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 # 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. # possible Max Ups.

View File

@@ -132,40 +132,40 @@ start_inventory_giver = [
# Magic Items # Magic Items
0x13, 0x48, # ldr r0, =0x202572F 0x13, 0x48, # ldr r0, =0x202572F
0x14, 0x49, # ldr r1, =0x8680080 0x14, 0x49, # ldr r1, =0x8690080
0x00, 0x22, # mov r2, #0 0x00, 0x22, # mov r2, #0
0x8B, 0x5C, # ldrb r3, [r1, r2] 0x8B, 0x5C, # ldrb r3, [r1, r2]
0x83, 0x54, # strb r3, [r0, r2] 0x83, 0x54, # strb r3, [r0, r2]
0x01, 0x32, # adds r2, #1 0x01, 0x32, # adds r2, #1
0x08, 0x2A, # cmp r2, #8 0x08, 0x2A, # cmp r2, #8
0xFA, 0xDB, # blt 0x8680006 0xFA, 0xDB, # blt 0x8690006
# Max Ups # Max Ups
0x11, 0x48, # ldr r0, =0x202572C 0x11, 0x48, # ldr r0, =0x202572C
0x12, 0x49, # ldr r1, =0x8680090 0x12, 0x49, # ldr r1, =0x8690090
0x00, 0x22, # mov r2, #0 0x00, 0x22, # mov r2, #0
0x8B, 0x5C, # ldrb r3, [r1, r2] 0x8B, 0x5C, # ldrb r3, [r1, r2]
0x83, 0x54, # strb r3, [r0, r2] 0x83, 0x54, # strb r3, [r0, r2]
0x01, 0x32, # adds r2, #1 0x01, 0x32, # adds r2, #1
0x03, 0x2A, # cmp r2, #3 0x03, 0x2A, # cmp r2, #3
0xFA, 0xDB, # blt 0x8680016 0xFA, 0xDB, # blt 0x8690016
# Cards # Cards
0x0F, 0x48, # ldr r0, =0x2025674 0x0F, 0x48, # ldr r0, =0x2025674
0x10, 0x49, # ldr r1, =0x86800A0 0x10, 0x49, # ldr r1, =0x86900A0
0x00, 0x22, # mov r2, #0 0x00, 0x22, # mov r2, #0
0x8B, 0x5C, # ldrb r3, [r1, r2] 0x8B, 0x5C, # ldrb r3, [r1, r2]
0x83, 0x54, # strb r3, [r0, r2] 0x83, 0x54, # strb r3, [r0, r2]
0x01, 0x32, # adds r2, #1 0x01, 0x32, # adds r2, #1
0x14, 0x2A, # cmp r2, #0x14 0x14, 0x2A, # cmp r2, #0x14
0xFA, 0xDB, # blt 0x8680026 0xFA, 0xDB, # blt 0x8690026
# Inventory Items (not currently supported) # Inventory Items (not currently supported)
0x0D, 0x48, # ldr r0, =0x20256ED 0x0D, 0x48, # ldr r0, =0x20256ED
0x0E, 0x49, # ldr r1, =0x86800C0 0x0E, 0x49, # ldr r1, =0x86900C0
0x00, 0x22, # mov r2, #0 0x00, 0x22, # mov r2, #0
0x8B, 0x5C, # ldrb r3, [r1, r2] 0x8B, 0x5C, # ldrb r3, [r1, r2]
0x83, 0x54, # strb r3, [r0, r2] 0x83, 0x54, # strb r3, [r0, r2]
0x01, 0x32, # adds r2, #1 0x01, 0x32, # adds r2, #1
0x36, 0x2A, # cmp r2, #36 0x36, 0x2A, # cmp r2, #36
0xFA, 0xDB, # blt 0x8680036 0xFA, 0xDB, # blt 0x8690036
# Return to the function that checks for Magician Mode. # Return to the function that checks for Magician Mode.
0xBA, 0x21, # movs r1, #0xBA 0xBA, 0x21, # movs r1, #0xBA
0x89, 0x00, # lsls r1, r1, #2 0x89, 0x00, # lsls r1, r1, #2
@@ -176,13 +176,13 @@ start_inventory_giver = [
# LDR number pool # LDR number pool
0x78, 0x7F, 0x00, 0x08, 0x78, 0x7F, 0x00, 0x08,
0x2F, 0x57, 0x02, 0x02, 0x2F, 0x57, 0x02, 0x02,
0x80, 0x00, 0x68, 0x08, 0x80, 0x00, 0x69, 0x08,
0x2C, 0x57, 0x02, 0x02, 0x2C, 0x57, 0x02, 0x02,
0x90, 0x00, 0x68, 0x08, 0x90, 0x00, 0x69, 0x08,
0x74, 0x56, 0x02, 0x02, 0x74, 0x56, 0x02, 0x02,
0xA0, 0x00, 0x68, 0x08, 0xA0, 0x00, 0x69, 0x08,
0xED, 0x56, 0x02, 0x02, 0xED, 0x56, 0x02, 0x02,
0xC0, 0x00, 0x68, 0x08, 0xC0, 0x00, 0x69, 0x08,
] ]
max_max_up_checker = [ max_max_up_checker = [

View File

@@ -335,8 +335,8 @@ class CVCotMPatchExtensions(APPatchExtension):
rom_data.write_bytes(0x679A60, patches.kickless_roc_height_shortener) rom_data.write_bytes(0x679A60, patches.kickless_roc_height_shortener)
# Give the player their Start Inventory upon entering their name on a new file. # 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(0x7F70, [0x00, 0x48, 0x87, 0x46, 0x00, 0x00, 0x69, 0x08])
rom_data.write_bytes(0x680000, patches.start_inventory_giver) rom_data.write_bytes(0x690000, patches.start_inventory_giver)
# Prevent Max Ups from exceeding 255. # Prevent Max Ups from exceeding 255.
rom_data.write_bytes(0x5E170, [0x00, 0x4A, 0x97, 0x46, 0x00, 0x00, 0x6A, 0x08]) rom_data.write_bytes(0x5E170, [0x00, 0x4A, 0x97, 0x46, 0x00, 0x00, 0x6A, 0x08])