er, all cart types might want to have teh B8 command

This commit is contained in:
Arisotura 2021-04-30 17:34:41 +02:00
parent c2f37d44ce
commit da9024e2b7
1 changed files with 16 additions and 5 deletions

View File

@ -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);
}