naomi: relax some eeprom checks based on BOOTID specs

This commit is contained in:
Flyinghead 2023-01-21 12:01:22 +01:00
parent a6bf9dd39c
commit b443467770
2 changed files with 7 additions and 6 deletions

View File

@ -35,10 +35,11 @@ struct RomBootID
u32 testPC; // test mode entry point
u8 country; // supported regions bitmap
u8 cabinet; // supported # of players bitmap: b0 1 player, b1 2 players, ...
u8 resolution; // 0: 31kHz, 1: 15kHz
u8 vertical; // b0: horizontal mode, b1: vertical mode
u8 resolution; // 0: 31kHz, 1: 15kHz, other: no check
u8 vertical; // 1: horizontal mode, 2: vertical mode, other: no check
u8 serialID; // if 1, check the ROM/DIMM board serial# eeprom
u8 _res[211]; // _res[210]: if 0xFF then the header is unencrypted. if not then the header is encrypted starting at offset 0x010.
u8 serviceMode; // 0: common, 1: individual, other: use configured setting
u8 _res[210]; // _res[210]: if 0xFF then the header is unencrypted. if not then the header is encrypted starting at offset 0x010.
// Note: this structure is copied to system RAM by the BIOS at location 0c01f400
};

View File

@ -195,19 +195,19 @@ void configure_naomi_eeprom(const RomBootID *bootId)
{
initEeprom(bootId);
// Horizontal / vertical screen orientation
if (bootId->vertical & 2)
if (bootId->vertical == 2)
{
NOTICE_LOG(NAOMI, "EEPROM: vertical monitor orientation");
write_naomi_eeprom(2, readEeprom(2) | 1);
config::Rotate90.override(true);
}
else if (bootId->vertical & 1)
else if (bootId->vertical == 1)
{
NOTICE_LOG(NAOMI, "EEPROM: horizontal monitor orientation");
write_naomi_eeprom(2, readEeprom(2) & ~1);
}
// Number of players
if (bootId->cabinet != 0)
if (bootId->cabinet != 0 && bootId->cabinet < 0x10)
{
int nPlayers = readEeprom(8) >> 4; // 0 to 3
if (!(bootId->cabinet & (1 << nPlayers)))