fix REDD/SEDD opcodes

This commit is contained in:
hap 2015-03-21 20:28:06 +01:00
parent f31a7d3811
commit 033c15f969
4 changed files with 7 additions and 7 deletions

View File

@ -315,7 +315,7 @@ void hmcs40_cpu_device::device_reset()
UINT8 hmcs40_cpu_device::read_r(int index)
{
index &= 7;
UINT8 inp = 0xf;
UINT8 inp = 0;
switch (index)
{
@ -575,7 +575,7 @@ void hmcs40_cpu_device::execute_run()
// fetch next opcode
debugger_instruction_hook(this, m_pc);
m_op = m_program->read_word(m_pc << 1) & 0x3ff;
m_i = BITSWAP8(m_op,7,6,5,4,0,1,2,3) & 0xf; // reversed bit-order for 4-bit immediate param (except for XAMR)
m_i = BITSWAP8(m_op,7,6,5,4,0,1,2,3) & 0xf; // reversed bit-order for 4-bit immediate param (except for XAMR, REDD, SEDD)
increment_pc();
// handle opcode

View File

@ -55,7 +55,7 @@ static const INT8 s_bits[] =
2, 2, 2,
6, 6, 5, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0,
0, 0, 0, -4, -4, 3, 3, 3, 3, 3,
0, 0, 0, 4, 4, 3, 3, 3, 3, 3,
0, 0
};

View File

@ -618,13 +618,13 @@ void hmcs40_cpu_device::op_td()
void hmcs40_cpu_device::op_sedd()
{
// SEDD n: Set Discrete I/O Latch Direct
write_d(m_i, 1);
write_d(m_op & 0xf, 1);
}
void hmcs40_cpu_device::op_redd()
{
// REDD n: Reset Discrete I/O Latch Direct
write_d(m_i, 0);
write_d(m_op & 0xf, 0);
}
void hmcs40_cpu_device::op_lar()

View File

@ -694,8 +694,8 @@ static INPUT_PORTS_START( epacman2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY // "
PORT_START("IN.2") // D3 port R0x
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("P1 Skill Control")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Demo Light Test")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Skill Control")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Demo Light Test")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )