Skip to content

Commit ffffc0e

Browse files
committed
fix (#60): Properly compare mapper byte and remove FastROM bit
1 parent d614379 commit ffffc0e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/support/check_header.asm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,17 @@ validate_checksum:
9292
macro validate_mapping_mode(variable address) {
9393
log_string("Checking mapping mode")
9494
ld.w r1,(mapping_mode_addr)
95+
and r1,#0xEF // Mask off FastROM set bit
9596

96-
if (address == 0x7FBC) {
97+
if (address == 0x7FBD) {
9798
cmp r1,#0x20 // Compare against mapper 0x20 (LoROM)
9899
jp nz, noscore{#}
99100
cmp r1,#0x22 // Compare against mapper 0x22 (SDD1)
100101
jp nz, noscore{#}
101-
} else if (address == 0xFFBC) {
102+
} else if (address == 0xFFBD) {
102103
cmp r1,#0x21 // Compare against mapper 0x21 (HiROM)
103104
jp nz, noscore{#}
104-
} else if (address == 0x40FFBC) {
105+
} else if (address == 0x40FFBD) {
105106
cmp r1,#0x25 // Compare against mapper 0x25 (ExHiROM)
106107
jp nz, noscore{#}
107108
}

0 commit comments

Comments
 (0)