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_SD.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_SD.cpp')
-rw-r--r-- | src/DSi_SD.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/DSi_SD.cpp b/src/DSi_SD.cpp index aba477d..01b6442 100644 --- a/src/DSi_SD.cpp +++ b/src/DSi_SD.cpp @@ -464,6 +464,10 @@ u16 DSi_SDHost::Read(u32 addr) case 0x102: return 0; case 0x104: return BlockLen32; case 0x108: return BlockCount32; + + // dunno + case 0x106: return 0; + case 0x10A: return 0; } printf("unknown %s read %08X @ %08X\n", SD_DESC, addr, NDS::GetPC(1)); @@ -626,6 +630,10 @@ void DSi_SDHost::Write(u32 addr, u16 val) case 0x102: return; case 0x104: BlockLen32 = val & 0x03FF; return; case 0x108: BlockCount32 = val; return; + + // dunno + case 0x106: return; + case 0x10A: return; } printf("unknown %s write %08X %04X\n", SD_DESC, addr, val); @@ -847,8 +855,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param) } RWCommand = 18; Host->SendResponse(CSR, true); - ReadBlock(RWAddress); - RWAddress += BlockSize; + RWAddress += ReadBlock(RWAddress); SetState(0x05); return; @@ -862,8 +869,7 @@ void DSi_MMCStorage::SendCMD(u8 cmd, u32 param) } RWCommand = 25; Host->SendResponse(CSR, true); - WriteBlock(RWAddress); - RWAddress += BlockSize; + RWAddress += WriteBlock(RWAddress); SetState(0x04); return; |