diff --git a/src/backend/GameDB.cpp b/src/backend/GameDB.cpp index 79130edd..080b4671 100644 --- a/src/backend/GameDB.cpp +++ b/src/backend/GameDB.cpp @@ -20,7 +20,7 @@ void GameDB::match(Mem& mem) { mem.rom.gameNameDB = i.name; return; } else { - Util::warn("Matched code for %s, but not region! Game supposedly exists in regions [{}] but this image has region {}", + Util::warn("Matched code for {}, but not region! Game supposedly exists in regions [{}] but this image has region {}", i.name, i.regions, rom.header.countryCode[0]); } } diff --git a/src/backend/core/mmio/PIF.cpp b/src/backend/core/mmio/PIF.cpp index bdefd2b5..bb94b296 100644 --- a/src/backend/core/mmio/PIF.cpp +++ b/src/backend/core/mmio/PIF.cpp @@ -141,6 +141,9 @@ FORCE_INLINE u8 data_crc(const u8* data) { return crc; } +#define BCD_ENCODE(x) (((x) / 10) << 4 | ((x) % 10)) +#define BCD_DECODE(x) (((x) >> 4) * 10 + ((x) & 15)) + void PIF::ProcessCommands(Mem &mem) { u8 control = ram[63]; if (control & 1) { @@ -194,6 +197,11 @@ void PIF::ProcessCommands(Mem &mem) { case 5: EepromWrite(cmd, res, mem); break; + case 6: + res[0] = 0x00; + res[1] = 0x10; + res[2] = 0x00; + break; default: Util::panic("Invalid PIF command: {:X}", cmd[2]); }