Skip to content

Commit

Permalink
igs/igs_m027_023vid.cpp: Trigger FIQ at start of vertical blanking an…
Browse files Browse the repository at this point in the history
…d IRQ at end of vertical blanking. (mamedev#12895)
  • Loading branch information
mamehaze authored Oct 23, 2024
1 parent c8ec2fb commit c9df4f7
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions src/mame/igs/igs_m027_023vid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ class igs_m027_023vid_state : public driver_device

void gpio_w(u8 data);

TIMER_DEVICE_CALLBACK_MEMBER(interrupt);

u16 sprites_r(offs_t offset);
void screen_vblank(int state);

Expand Down Expand Up @@ -164,6 +162,13 @@ void igs_m027_023vid_state::screen_vblank(int state)
{
// first 0xa00 of main ram = sprites, seems to be buffered, DMA?
m_video->get_sprites();

m_maincpu->pulse_input_line(arm7_cpu_device::ARM7_FIRQ_LINE, m_maincpu->minimum_quantum_time());
}
else
{
// this handles palette transfers, what scanline should it happen on? incorrect frame timing causes some graphics to be missing in service mode
igs_m027_023vid_state::irq_w<0>(ASSERT_LINE);
}
}

Expand Down Expand Up @@ -358,24 +363,6 @@ void igs_m027_023vid_state::gpio_w(u8 data)
m_gpio_out = data;
}


TIMER_DEVICE_CALLBACK_MEMBER(igs_m027_023vid_state::interrupt)
{
int const scanline = param;

switch (scanline)
{
case 0:
m_maincpu->pulse_input_line(arm7_cpu_device::ARM7_FIRQ_LINE, m_maincpu->minimum_quantum_time()); // vbl?
break;

case 192:
igs_m027_023vid_state::irq_w<0>(ASSERT_LINE);
break;
}
}


u16 igs_m027_023vid_state::sprites_r(offs_t offset)
{
// there does seem to be a spritelist at the start of mainram like PGM
Expand Down Expand Up @@ -417,8 +404,6 @@ void igs_m027_023vid_state::m027_023vid(machine_config &config)

PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1200/2);

TIMER(config, "scantimer").configure_scanline(FUNC(igs_m027_023vid_state::interrupt), "screen", 0, 1);

// PGM video
IGS023_VIDEO(config, m_video, 0);
m_video->set_palette(m_palette);
Expand Down

0 comments on commit c9df4f7

Please sign in to comment.