hmcs40: Workaround related to MT #6638; this disables a poorly implemented disassembly feature to prevent assertion failures and crashes when debugging drivers using HD44801 (nw)

This commit is contained in:
AJR 2017-08-01 08:12:03 -04:00
parent 8a1ba16a8f
commit 46a221b95e

View File

@ -81,6 +81,7 @@ static const u32 s_flags[] =
0
};
#ifdef COMPUTE_NEXT_PC
// next program counter in sequence (relative)
static const s8 s_next_pc[0x40] =
{
@ -89,6 +90,7 @@ static const s8 s_next_pc[0x40] =
-32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17,
-15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, -1
};
#endif
static const u8 hmcs40_mnemonic[0x400] =
@ -226,6 +228,11 @@ CPU_DISASSEMBLE(hmcs40)
}
}
#ifdef COMPUTE_NEXT_PC
// falsifying instruction lengths like this breaks the MAME disassembler quite badly
int pos = s_next_pc[pc & 0x3f] & DASMFLAG_LENGTHMASK;
return pos | s_flags[instr] | DASMFLAG_SUPPORTED;
#else
return 1 | s_flags[instr] | DASMFLAG_SUPPORTED;
#endif
}