diff options
author | Arisotura <thetotalworm@gmail.com> | 2021-04-25 00:48:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 00:48:02 +0200 |
commit | 1846a712659ed31357e8ae795055dace0bdd951d (patch) | |
tree | a11c1bf2c0b61ee787dac81eec6d7f35fbcace63 /src/DSi_I2C.cpp | |
parent | ede6e832d84b9d4b1117ee480122480a7c540509 (diff) |
Cart refactor (#1073)
complete cart-interface refactor, will make this code a lot easier to deal with
Diffstat (limited to 'src/DSi_I2C.cpp')
-rw-r--r-- | src/DSi_I2C.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/DSi_I2C.cpp b/src/DSi_I2C.cpp index 16ec1a8..ad01a42 100644 --- a/src/DSi_I2C.cpp +++ b/src/DSi_I2C.cpp @@ -79,14 +79,15 @@ void Start() u8 Read(bool last) { + //printf("BPTWL: read %02X -> %02X @ %08X\n", CurPos, Registers[CurPos], NDS::GetPC(1)); + u8 ret = Registers[CurPos++]; + if (last) { CurPos = -1; - return 0; } - //printf("BPTWL: read %02X -> %02X\n", CurPos, Registers[CurPos]); - return Registers[CurPos++]; + return ret; } void Write(u8 val, bool last) |