mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
i960: added scanbyte and IP-relative lda opcodes, masked low bits of branch targets [R. Belmont]
This commit is contained in:
parent
595d7e2cc8
commit
f66261b713
@ -106,6 +106,13 @@ uint32_t i960_cpu_device::get_ea(uint32_t opcode)
|
|||||||
case 0x4:
|
case 0x4:
|
||||||
return m_r[abase];
|
return m_r[abase];
|
||||||
|
|
||||||
|
case 0x5: // address of this instruction + the offset dword + 8
|
||||||
|
// which in reality is "address of next instruction + the offset dword"
|
||||||
|
ret = m_direct->read_dword(m_IP);
|
||||||
|
m_IP += 4;
|
||||||
|
ret += m_IP;
|
||||||
|
return ret;
|
||||||
|
|
||||||
case 0x7:
|
case 0x7:
|
||||||
return m_r[abase] + (m_r[index] << scale);
|
return m_r[abase] + (m_r[index] << scale);
|
||||||
|
|
||||||
@ -357,6 +364,7 @@ void i960_cpu_device::bxx(uint32_t opcode, int mask)
|
|||||||
{
|
{
|
||||||
if(m_AC & mask) {
|
if(m_AC & mask) {
|
||||||
m_IP += get_disp(opcode);
|
m_IP += get_disp(opcode);
|
||||||
|
m_IP &= ~3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,6 +372,7 @@ void i960_cpu_device::bxx_s(uint32_t opcode, int mask)
|
|||||||
{
|
{
|
||||||
if(m_AC & mask) {
|
if(m_AC & mask) {
|
||||||
m_IP += get_disp_s(opcode);
|
m_IP += get_disp_s(opcode);
|
||||||
|
m_IP &= ~3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1069,6 +1078,21 @@ void i960_cpu_device::execute_op(uint32_t opcode)
|
|||||||
set_ri(opcode, t2-1);
|
set_ri(opcode, t2-1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0xc: // scanbyte
|
||||||
|
m_icount -= 2;
|
||||||
|
m_AC &= ~7; // clear CC
|
||||||
|
t1 = get_1_ri(opcode);
|
||||||
|
t2 = get_2_ri(opcode);
|
||||||
|
printf("t1 %08x t2 %08x\n", t1, t2);
|
||||||
|
if ((t1 & 0xff000000) == (t2 & 0xff000000) ||
|
||||||
|
(t1 & 0x00ff0000) == (t2 & 0x00ff0000) ||
|
||||||
|
(t1 & 0x0000ff00) == (t2 & 0x0000ff00) ||
|
||||||
|
(t1 & 0x000000ff) == (t2 & 0x000000ff))
|
||||||
|
{
|
||||||
|
m_AC |= 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 0xe: // chkbit
|
case 0xe: // chkbit
|
||||||
m_icount -= 2;
|
m_icount -= 2;
|
||||||
t1 = get_1_ri(opcode) & 0x1f;
|
t1 = get_1_ri(opcode) & 0x1f;
|
||||||
|
@ -144,10 +144,13 @@ static ADDRESS_MAP_START( igt_gameking_mem, AS_PROGRAM, 32, igt_gameking_state )
|
|||||||
AM_RANGE(0x10000020, 0x1000021f) AM_RAM // strange range to test, correct or CPU issue?
|
AM_RANGE(0x10000020, 0x1000021f) AM_RAM // strange range to test, correct or CPU issue?
|
||||||
AM_RANGE(0x10000220, 0x1003ffff) AM_RAM
|
AM_RANGE(0x10000220, 0x1003ffff) AM_RAM
|
||||||
|
|
||||||
|
AM_RANGE(0x1807d000, 0x1807dfff) AM_RAM // used by MS3 for the restart IAC and afterwards
|
||||||
|
|
||||||
AM_RANGE(0x28010008, 0x2801000b) AM_READ(igt_gk_28010008_r)
|
AM_RANGE(0x28010008, 0x2801000b) AM_READ(igt_gk_28010008_r)
|
||||||
|
AM_RANGE(0x28020000, 0x280205ff) AM_RAM
|
||||||
AM_RANGE(0x28030000, 0x28030003) AM_READ(igt_gk_28030000_r)
|
AM_RANGE(0x28030000, 0x28030003) AM_READ(igt_gk_28030000_r)
|
||||||
|
|
||||||
|
AM_RANGE(0xa1000000, 0xa1011fff) AM_RAM // used by gkkey for restart IAC
|
||||||
|
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user