mc68hc11: Added JMP INDX, JMP INDY, changed a reg_w assert to a logerror since this game writes 0xff to 0x00-0x3f I/O ports.

Fixed CMPA INDY wrong opcode bug.
This commit is contained in:
Angelo Salese 2009-06-19 15:21:23 +00:00
parent e3fab21720
commit 318d6bfd3c
3 changed files with 20 additions and 2 deletions

View File

@ -1388,6 +1388,21 @@ static void HC11OP(iny)(hc11_state *cpustate)
CYCLES(cpustate, 4);
}
/* JMP IND X 0x6E */
static void HC11OP(jmp_indx)(hc11_state *cpustate)
{
UINT16 adr = FETCH(cpustate);
SET_PC(cpustate, cpustate->ix + adr);
CYCLES(cpustate, 3);
}
/* JMP IND Y 0x18 0x6E */
static void HC11OP(jmp_indy)(hc11_state *cpustate)
{
UINT16 adr = FETCH(cpustate);
SET_PC(cpustate, cpustate->iy + adr);
CYCLES(cpustate, 4);
}
/* JMP EXT 0x7E */
static void HC11OP(jmp_ext)(hc11_state *cpustate)

View File

@ -79,7 +79,7 @@ static const hc11_opcode_list_struct hc11_opcode_list[] =
{ 0, 0x91, HC11OP(cmpa_dir) },
{ 0, 0xb1, HC11OP(cmpa_ext) },
{ 0, 0xa1, HC11OP(cmpa_indx) },
{ 0x18, 0x81, HC11OP(cmpa_indy) },
{ 0x18, 0xa1, HC11OP(cmpa_indy) },
{ 0, 0xc1, HC11OP(cmpb_imm) },
{ 0, 0xd1, HC11OP(cmpb_dir) },
{ 0, 0xf1, HC11OP(cmpb_ext) },
@ -111,6 +111,8 @@ static const hc11_opcode_list_struct hc11_opcode_list[] =
{ 0, 0x4c, HC11OP(inca) },
{ 0, 0x08, HC11OP(inx) },
{ 0x18, 0x08, HC11OP(iny) },
{ 0, 0x6e, HC11OP(jmp_indx) },
{ 0x18, 0x6e, HC11OP(jmp_indy) },
{ 0, 0x7e, HC11OP(jmp_ext) },
{ 0, 0x9d, HC11OP(jsr_dir) },
{ 0, 0xbd, HC11OP(jsr_ext) },

View File

@ -256,7 +256,8 @@ static void hc11_regs_w(hc11_state *cpustate, UINT32 address, UINT8 value)
return;
}
fatalerror("HC11: regs_w %02X, %02X", reg, value);
logerror("HC11: regs_w %02X, %02X\n", reg, value);
}
/*****************************************************************************/