diff options
author | CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> | 2023-12-06 00:03:53 -0800 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2023-12-06 16:51:22 +0100 |
commit | 1b7b5106e24d1bad0776c97696f834209e30d900 (patch) | |
tree | 156bbe4a1861518c670ec92ad4507a2a48485729 /freebios | |
parent | 090627b3c19488e36677113e2f1ac16bdb4e2d05 (diff) |
FreeBIOS: Ensure upper 16 bits are cleared in the initial crc16 value.
Fixes Castlevania: Dawn of Sorrow's checksumming which uses crc16 swi and has garbage in the upper 16 bits of r0.
The official BIOS would seem to implicitly clear these upper 16 bits.
Diffstat (limited to 'freebios')
-rwxr-xr-x | freebios/bios_common.S | 3 | ||||
-rwxr-xr-x | freebios/drastic_bios_arm7.bin | bin | 16384 -> 16384 bytes | |||
-rwxr-xr-x | freebios/drastic_bios_arm9.bin | bin | 4096 -> 4096 bytes |
3 files changed, 3 insertions, 0 deletions
diff --git a/freebios/bios_common.S b/freebios/bios_common.S index 56d349e..308d67c 100755 --- a/freebios/bios_common.S +++ b/freebios/bios_common.S @@ -517,6 +517,9 @@ swi_get_crc16: mov const_0x1E, #0x1E adr crc_table_ptr, crc_table + bic crc_value, crc_value, #0xFF000000 + bic crc_value, crc_value, #0x00FF0000 + movs crc_length, crc_length, lsr #1 beq 1f diff --git a/freebios/drastic_bios_arm7.bin b/freebios/drastic_bios_arm7.bin Binary files differindex e586eb9..adffb53 100755 --- a/freebios/drastic_bios_arm7.bin +++ b/freebios/drastic_bios_arm7.bin diff --git a/freebios/drastic_bios_arm9.bin b/freebios/drastic_bios_arm9.bin Binary files differindex 51a8282..95c330d 100755 --- a/freebios/drastic_bios_arm9.bin +++ b/freebios/drastic_bios_arm9.bin |