diff --git a/src/devices/cpu/hmcs40/hmcs40d.cpp b/src/devices/cpu/hmcs40/hmcs40d.cpp index 0b05d8b3f76..fb59cbd5b73 100644 --- a/src/devices/cpu/hmcs40/hmcs40d.cpp +++ b/src/devices/cpu/hmcs40/hmcs40d.cpp @@ -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 }