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.
This commit is contained in:
CasualPokePlayer
2023-12-06 00:03:53 -08:00
committed by Nadia Holmquist Pedersen
parent 090627b3c1
commit 1b7b5106e2
4 changed files with 347 additions and 344 deletions

View File

@ -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

Binary file not shown.

Binary file not shown.