diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-04-10 20:56:22 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-04-10 20:56:22 +0200 |
commit | 84664a6ded536573ce2f20a551531453511357af (patch) | |
tree | 2f9173aa576c006019f7f5b7e8f8f0155f958a04 /src | |
parent | 8bbcc83771fb466aabb751be86e0c593e45313ae (diff) |
bypass first save command byte when it's zero. for Pokémon games.
Diffstat (limited to 'src')
-rw-r--r-- | src/NDSCart.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp index 68c6fe7..69102b5 100644 --- a/src/NDSCart.cpp +++ b/src/NDSCart.cpp @@ -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; } |