-casio/pv1000.cpp: Fixed I/O read issues:

* Don't take a tript through the scheduler if matrix IRQ wasn't active.
* Suppress read side effects for debugger.

-dataeast/deco_ld.cpp: A few less literal tags.
This commit is contained in:
Vas Crabb 2024-08-23 05:18:38 +10:00
parent 41194bfda5
commit 4272120237
2 changed files with 22 additions and 19 deletions

View File

@ -279,7 +279,7 @@ void pv1000_state::io_w(offs_t offset, uint8_t data)
m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
break;
// case 0x06 VRAM + PCG location, always fixed at 0xb8xx
//case 0x06 VRAM + PCG location, always fixed at 0xb8xx
case 0x07:
/* ---- -xxx unknown, border color? */
m_pcg_bank = (data & 0xe0) >> 5;
@ -313,28 +313,31 @@ uint8_t pv1000_state::io_r(offs_t offset)
{
case 4: // port $FC returns player 2 joystick and interrupt status
return 0x80
| m_joysticks[3]->read()
| m_joysticks[2]->read()
| (m_irq_active & 3);
/* Bit 1 = Matrix IRQ asserted *
* Bit 0 = Prerender IRQ asserted */
| m_joysticks[3]->read()
| m_joysticks[2]->read()
| (m_irq_active & 3); // Bit 1 = Matrix IRQ, Bit 0 = Prerender IRQ
case 5: // port $FD returns both joysticks and acknowledges matrix scan IRQ
m_irq_active &= ~2;
if (m_irq_active == 0)
m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
if (!machine().side_effects_disabled())
{
if (m_irq_active & 2)
{
m_irq_active &= ~2;
if (m_irq_active == 0)
m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE);
}
}
return 0x80
| m_joysticks[3]->read()
| m_joysticks[2]->read()
| m_joysticks[1]->read()
| m_joysticks[0]->read();
| m_joysticks[3]->read()
| m_joysticks[2]->read()
| m_joysticks[1]->read()
| m_joysticks[0]->read();
default:
/* Ports 0xF8-0xFB, 0xFE, and 0xFF are undriven, and pulled high by the
/* Ports $F8-$FB, $FE, and $FF are undriven, and pulled high by the
resistors next to the Z80 */
return 0xff;
}
}

View File

@ -293,10 +293,10 @@ void deco_ld_state::main_map(address_map &map)
map(0x1006, 0x1006).r(FUNC(deco_ld_state::acia_status_hack_r));
map(0x1007, 0x1007).rw(m_laserdisc, FUNC(sony_ldp1000_device::status_r), FUNC(sony_ldp1000_device::command_w));
map(0x1800, 0x1fff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0x2000, 0x23ff).mirror(0x800).ram().w(FUNC(deco_ld_state::vram_w<0>)).share("vram0");
map(0x2400, 0x27ff).mirror(0x800).ram().w(FUNC(deco_ld_state::attr_w<0>)).share("attr0");
map(0x3000, 0x33ff).mirror(0x800).ram().w(FUNC(deco_ld_state::vram_w<1>)).share("vram1");
map(0x3400, 0x37ff).mirror(0x800).ram().w(FUNC(deco_ld_state::attr_w<1>)).share("attr1");
map(0x2000, 0x23ff).mirror(0x800).ram().w(FUNC(deco_ld_state::vram_w<0>)).share(m_vram[0]);
map(0x2400, 0x27ff).mirror(0x800).ram().w(FUNC(deco_ld_state::attr_w<0>)).share(m_attr[0]);
map(0x3000, 0x33ff).mirror(0x800).ram().w(FUNC(deco_ld_state::vram_w<1>)).share(m_vram[1]);
map(0x3400, 0x37ff).mirror(0x800).ram().w(FUNC(deco_ld_state::attr_w<1>)).share(m_attr[1]);
map(0x4000, 0xffff).rom();
}