mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
mc68hc11: Fix disassembly and execution of BRCLR/BRSET (IND, Y)
This commit is contained in:
parent
5f95c10b36
commit
12684d33ee
@ -1227,7 +1227,7 @@ offs_t hc11_disassembler::disassemble(std::ostream &stream, offs_t pc, const dat
|
|||||||
imm8 = opcodes.r8(cpc++);
|
imm8 = opcodes.r8(cpc++);
|
||||||
mask = opcodes.r8(cpc++);
|
mask = opcodes.r8(cpc++);
|
||||||
rel8 = opcodes.r8(cpc++);
|
rel8 = opcodes.r8(cpc++);
|
||||||
util::stream_format(stream, "%s (Y+0x%02X), 0x%02X, [0x%04X]", op_table->mnemonic, imm8, mask, pc+2+rel8);
|
util::stream_format(stream, "%s (Y+0x%02X), 0x%02X, [0x%04X]", op_table->mnemonic, imm8, mask, pc+5+rel8);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAGE2:
|
case PAGE2:
|
||||||
|
@ -1191,7 +1191,7 @@ void HC11OP(brclr_indx)()
|
|||||||
CYCLES(7);
|
CYCLES(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* BRCLR INDX 0x18, 0x1F */
|
/* BRCLR INDY 0x18, 0x1F */
|
||||||
void HC11OP(brclr_indy)()
|
void HC11OP(brclr_indy)()
|
||||||
{
|
{
|
||||||
uint8_t offset = FETCH();
|
uint8_t offset = FETCH();
|
||||||
@ -1202,7 +1202,7 @@ void HC11OP(brclr_indy)()
|
|||||||
|
|
||||||
if ((i & mask) == 0)
|
if ((i & mask) == 0)
|
||||||
{
|
{
|
||||||
SET_PC(m_ppc + rel + 4);
|
SET_PC(m_ppc + rel + 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
CYCLES(8);
|
CYCLES(8);
|
||||||
@ -1216,7 +1216,7 @@ void HC11OP(brset_dir)()
|
|||||||
int8_t rel = FETCH();
|
int8_t rel = FETCH();
|
||||||
uint8_t i = READ8(d);
|
uint8_t i = READ8(d);
|
||||||
|
|
||||||
if(i & mask)
|
if ((~i & mask) == 0)
|
||||||
{
|
{
|
||||||
SET_PC(m_ppc + rel + 4);
|
SET_PC(m_ppc + rel + 4);
|
||||||
}
|
}
|
||||||
@ -1253,7 +1253,7 @@ void HC11OP(brset_indy)()
|
|||||||
|
|
||||||
if ((~i & mask) == 0)
|
if ((~i & mask) == 0)
|
||||||
{
|
{
|
||||||
SET_PC(m_ppc + rel + 4);
|
SET_PC(m_ppc + rel + 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
CYCLES(8);
|
CYCLES(8);
|
||||||
|
Loading…
Reference in New Issue
Block a user