make sure to byteswap genesis bootrom (gpgx expects us to do this too)

This commit is contained in:
CasualPokePlayer 2024-04-30 20:56:23 -07:00
parent f4473cc4b9
commit 7d9483ea0f
2 changed files with 9 additions and 0 deletions

Binary file not shown.

View File

@ -969,6 +969,15 @@ GPGX_EX int gpgx_init(const char* feromextension,
// not fatal if this fails (unless we're recording a movie, which we handle elsewhere)
if (load_archive(MD_BIOS, boot_rom, sizeof(boot_rom), NULL) != 0)
{
#ifdef LSB_FIRST
// gpgx also expects us to byteswap the boot rom
for (int i = 0; i < sizeof(boot_rom); i += 2)
{
uint8 temp = boot_rom[i];
boot_rom[i] = boot_rom[i+1];
boot_rom[i+1] = temp;
}
#endif
system_bios |= SYSTEM_MD;
}
}