Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

igs_m027_023vid.cpp - tweak interrupt timing #12895

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading