diff options
author | Arisotura <thetotalworm@gmail.com> | 2021-04-30 17:34:41 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2021-04-30 17:34:41 +0200 |
commit | da9024e2b78795f0c53206a218d917e435f5a703 (patch) | |
tree | d65e793fb25a26ebdf8c589ada3fafdf6cb0c6e4 /src/NDSCart.cpp | |
parent | c2f37d44ce154bcf224256f405d115df9707a9a4 (diff) |
er, all cart types might want to have teh B8 command
Diffstat (limited to 'src/NDSCart.cpp')
-rw-r--r-- | src/NDSCart.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp index 9808fef..3647a29 100644 --- a/src/NDSCart.cpp +++ b/src/NDSCart.cpp @@ -322,6 +322,22 @@ int CartCommon::ROMCommandStart(u8* cmd, u8* data, u32 len) case 0xA0: CmdEncMode = 2; return 0; + + default: + return 0; + } + } + else if (CmdEncMode == 2) + { + switch (cmd[0]) + { + case 0xB8: + for (u32 pos = 0; pos < len; pos += 4) + *(u32*)&data[pos] = ChipID; + return 0; + + default: + return 0; } } @@ -533,11 +549,6 @@ int CartRetail::ROMCommandStart(u8* cmd, u8* data, u32 len) } return 0; - case 0xB8: - for (u32 pos = 0; pos < len; pos += 4) - *(u32*)&data[pos] = ChipID; - return 0; - default: return CartCommon::ROMCommandStart(cmd, data, len); } |