armrec: ignore invalid op ('SEGA')

fixes megadrive cdi crash
This commit is contained in:
Flyinghead 2021-03-11 12:15:57 +01:00
parent cb52d0b6ec
commit 77bb6eade5
2 changed files with 3 additions and 3 deletions

View File

@ -588,8 +588,8 @@ void compile()
//Goto next opcode
pc += 4;
if (opcd != 0) // andeq r0, r0, r0 -> NOP
{ // ARAM is filled with these at start up
if (opcd != 0 && opcd != 0x41474553) // andeq r0, r0, r0 (== NOP) and 'SEGA'
{ // ARAM is filled with these at start up
if (last_op.op_type == ArmOp::FALLBACK)
{

View File

@ -552,7 +552,7 @@ public:
for (u32 i = 0; i < block_ops.size(); i++)
{
const ArmOp& op = block_ops[i];
DEBUG_LOG(AICA_ARM, "-> %s\n", op.toString().c_str());
DEBUG_LOG(AICA_ARM, "-> %s", op.toString().c_str());
set_flags = op.flags & ArmOp::OP_SETS_FLAGS;
logical_op_set_flags = op.isLogicalOp() && set_flags;