Skip to content

Commit

Permalink
alpha/splendor.cpp: denote same irq meanings as per equites.cpp bullfgtr
Browse files Browse the repository at this point in the history
  • Loading branch information
angelosa committed Jun 1, 2024
1 parent 2aa040e commit 228a411
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/mame/alpha/equites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(equites_state::scanline_cb)

// all games but bullfgtr have both valid
// bullfgtr definitely expects to vblank from 2, reversing will make it to run at half speed.
if(scanline == 232) // vblank-out irq
if(scanline == 232) // vblank-in irq
m_maincpu->set_input_line(2, HOLD_LINE);

if(scanline == 24) // vblank-in irq or sprite DMA done
if(scanline == 24) // vblank-out irq or sprite DMA done
m_maincpu->set_input_line(1, HOLD_LINE);
}

Expand Down
24 changes: 14 additions & 10 deletions src/mame/alpha/splendor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Stephh's notes (based on the games M68000 code and some tests) :
hvoltage:
- There is sort of "debug mode" that you can access if 0x000038.w returns 0x0000
instead of 0xffff. To enable it, use the MAME debugger or cheats.
- When you are in "debug mode", the Inputs and Dip Switches have special features.
Here is IMO the full list :
instead of 0xffff under irq 1. To enable it, use the MAME debugger or cheats.
This also applies to all non-parent splndrbt sets, at least for the freeze part.
- When you are in "debug mode", the Inputs and Dip Switches have special features:
* pressing IPT_JOYSTICK_DOWN of player 2 freezes the game
* pressing IPT_JOYSTICK_UP of player 2 unfreezes the game
Expand Down Expand Up @@ -130,7 +130,7 @@ class splendor_state : public driver_device
TILE_GET_INFO_MEMBER(bg_info);
void palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect);

Expand Down Expand Up @@ -395,15 +395,19 @@ uint32_t splendor_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
/******************************************************************************/
// Interrupt Handlers

TIMER_DEVICE_CALLBACK_MEMBER(splendor_state::scanline)
// Same as alpha/equites.cpp, including the almost empty irq 1 service observed with bullfgtr
TIMER_DEVICE_CALLBACK_MEMBER(splendor_state::scanline_cb)
{
int scanline = param;

if(scanline == 224) // vblank-out irq
m_maincpu->set_input_line(1, HOLD_LINE);

if(scanline == 32) // vblank-in irq
// vblank-in irq
if(scanline == 224)
m_maincpu->set_input_line(2, HOLD_LINE);

// vblank-out irq or sprite DMA end, applies bg scroll writes
// and checks debug flag (if available) for screen freeze.
if(scanline == 32)
m_maincpu->set_input_line(1, HOLD_LINE);
}


Expand Down Expand Up @@ -635,7 +639,7 @@ void splendor_state::splndrbt(machine_config &config)
// basic machine hardware
M68000(config, m_maincpu, 24_MHz_XTAL/4); // 68000P8 running at 6mhz, verified on pcb
m_maincpu->set_addrmap(AS_PROGRAM, &splendor_state::splndrbt_map);
TIMER(config, "scantimer").configure_scanline(FUNC(splendor_state::scanline), "screen", 0, 1);
TIMER(config, "scantimer").configure_scanline(FUNC(splendor_state::scanline_cb), "screen", 0, 1);

LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(splendor_state::flip_screen_set));
Expand Down

0 comments on commit 228a411

Please sign in to comment.