bypass first save command byte when it's zero. for Pokémon games.

This commit is contained in:
StapleButter 2017-04-10 20:56:22 +02:00
parent 8bbcc83771
commit 84664a6ded
1 changed files with 9 additions and 2 deletions

View File

@ -471,6 +471,13 @@ void Write(u8 val, u32 hold)
switch (CurCmd)
{
case 0x00:
// Pokémon carts have an IR transceiver thing, and send this
// to bypass it and access SRAM.
// TODO: design better
CurCmd = val;
break;
case 0x02:
case 0x03:
case 0x0A:
@ -495,8 +502,8 @@ void Write(u8 val, u32 hold)
break;
default:
//if (DataPos==0)
// printf("unknown save SPI command %02X %08X\n", CurCmd);
if (DataPos==0)
printf("unknown save SPI command %02X %08X\n", CurCmd);
break;
}