mirror of
https://github.com/holub/mame
synced 2025-05-24 14:56:21 +03:00
sync interrupts to scanlines anyway
This commit is contained in:
parent
2af25c4c7e
commit
23d291fb7b
@ -82,23 +82,23 @@
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static INTERRUPT_GEN( gberet_interrupt_tick )
|
||||
static TIMER_DEVICE_CALLBACK( gberet_interrupt_tick )
|
||||
{
|
||||
gberet_state *state = device->machine().driver_data<gberet_state>();
|
||||
gberet_state *state = timer.machine().driver_data<gberet_state>();
|
||||
UINT8 ticks_mask = ~state->m_interrupt_ticks & (state->m_interrupt_ticks + 1); // 0->1
|
||||
state->m_interrupt_ticks++;
|
||||
|
||||
// NMI on d0
|
||||
if (ticks_mask & state->m_interrupt_mask & 1)
|
||||
device_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE);
|
||||
cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI, ASSERT_LINE);
|
||||
|
||||
// IRQ on d3 (used by mrgoemon)
|
||||
if (ticks_mask & state->m_interrupt_mask<<2 & 8)
|
||||
device_set_input_line(device, 0, ASSERT_LINE);
|
||||
cputag_set_input_line(timer.machine(), "maincpu", 0, ASSERT_LINE);
|
||||
|
||||
// IRQ on d4 (used by gberet)
|
||||
if (ticks_mask & state->m_interrupt_mask<<2 & 16)
|
||||
device_set_input_line(device, 0, ASSERT_LINE);
|
||||
cputag_set_input_line(timer.machine(), "maincpu", 0, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
||||
@ -410,7 +410,7 @@ static MACHINE_CONFIG_START( gberet, gberet_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, XTAL_18_432MHz/6) // X1S (generated by a custom IC)
|
||||
MCFG_CPU_PROGRAM_MAP(gberet_map)
|
||||
MCFG_CPU_PERIODIC_INT(gberet_interrupt_tick, 1000) // period unknown, estimated with pcb recording
|
||||
MCFG_TIMER_ADD_SCANLINE("scantimer", gberet_interrupt_tick, "screen", 0, 16) // ?
|
||||
|
||||
MCFG_MACHINE_START(gberet)
|
||||
MCFG_MACHINE_RESET(gberet)
|
||||
|
Loading…
Reference in New Issue
Block a user