summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2022-08-31 12:31:47 +0200
committer hap <happppp@users.noreply.github.com>2022-08-31 12:31:47 +0200
commit339bfa52d9e7bd2973db24db63d9d8fa7618f6b1 (patch)
treeebc994ee2490b66873534dceb09d0546f3be5ec8
parent35d2b1d33bc7fc526ea3d17a6c0d84da4a773c8b (diff)
zerohour_stars: remove need for trampoline
-rw-r--r--src/mame/atari/atarisy2.cpp1
-rw-r--r--src/mame/universal/sraider.cpp10
-rw-r--r--src/mame/universal/zerohour.cpp9
-rw-r--r--src/mame/universal/zerohour_stars.cpp5
-rw-r--r--src/mame/universal/zerohour_stars.h2
5 files changed, 7 insertions, 20 deletions
diff --git a/src/mame/atari/atarisy2.cpp b/src/mame/atari/atarisy2.cpp
index 16ce74a0bbd..7add4802a28 100644
--- a/src/mame/atari/atarisy2.cpp
+++ b/src/mame/atari/atarisy2.cpp
@@ -1259,6 +1259,7 @@ void atarisy2_state::atarisy2(machine_config &config)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, m6502_device::NMI_LINE);
+ // apb3 fails the self-test with a 100 µs delay or less
m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(200)); });
GENERIC_LATCH_8(config, m_mainlatch);
diff --git a/src/mame/universal/sraider.cpp b/src/mame/universal/sraider.cpp
index 421d10b7736..3c7591d27e9 100644
--- a/src/mame/universal/sraider.cpp
+++ b/src/mame/universal/sraider.cpp
@@ -59,7 +59,6 @@ protected:
u8 rnd_r();
virtual void io_w(u8 data);
void mrsdyna_palette(palette_device &palette) const;
- DECLARE_WRITE_LINE_MEMBER(update_stars);
virtual void machine_start() override;
virtual u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -95,7 +94,6 @@ public:
protected:
virtual void io_w(u8 data) override;
void sraider_palette(palette_device &palette) const;
- DECLARE_WRITE_LINE_MEMBER(update_stars);
TILE_GET_INFO_MEMBER(get_grid_tile_info);
tilemap_t *m_grid_tilemap = nullptr;
@@ -238,12 +236,6 @@ void sraider_state::video_start()
m_grid_tilemap->set_transparent_pen(0);
}
-WRITE_LINE_MEMBER(sraider_state::update_stars)
-{
- if (!state)
- m_stars->update_state();
-}
-
u32 mrsdyna_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// clear the bg bitmap
@@ -678,7 +670,7 @@ void sraider_state::sraider(machine_config &config)
PALETTE(config.replace(), m_palette, FUNC(sraider_state::sraider_palette), 4*8 + 4*16 + 32 + 2, 32 + 32 + 1);
ZEROHOUR_STARS(config, m_stars).has_va_bit(false);
- subdevice<screen_device>("screen")->screen_vblank().set(FUNC(sraider_state::update_stars));
+ subdevice<screen_device>("screen")->screen_vblank().set(m_stars, FUNC(zerohour_stars_device::update_state));
}
diff --git a/src/mame/universal/zerohour.cpp b/src/mame/universal/zerohour.cpp
index 51a553d40ab..921b527ed37 100644
--- a/src/mame/universal/zerohour.cpp
+++ b/src/mame/universal/zerohour.cpp
@@ -76,7 +76,6 @@ protected:
virtual void machine_start() override;
virtual void video_start() override;
- DECLARE_WRITE_LINE_MEMBER(update_stars);
void videoram_w(offs_t offset, u8 data);
DECLARE_WRITE_LINE_MEMBER(flipscreen_w);
void irqack_w(u8 data) { m_maincpu->set_input_line(0, CLEAR_LINE); }
@@ -289,12 +288,6 @@ void zerohour_state::star_reset_w(u8 data)
m_stars->set_enable(true);
}
-WRITE_LINE_MEMBER(zerohour_state::update_stars)
-{
- if (!state)
- m_stars->update_state();
-}
-
TILE_GET_INFO_MEMBER(zerohour_state::get_fg_tile_info)
{
@@ -783,7 +776,7 @@ void zerohour_state::base(machine_config &config)
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_raw(9.828_MHz_XTAL / 2, 312, 8, 248, 262, 32, 224);
screen.set_screen_update(FUNC(zerohour_state::screen_update));
- screen.screen_vblank().set(FUNC(zerohour_state::update_stars));
+ screen.screen_vblank().set(m_stars, FUNC(zerohour_stars_device::update_state));
screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_zerohour);
diff --git a/src/mame/universal/zerohour_stars.cpp b/src/mame/universal/zerohour_stars.cpp
index ec541de5104..22c36008a6c 100644
--- a/src/mame/universal/zerohour_stars.cpp
+++ b/src/mame/universal/zerohour_stars.cpp
@@ -65,9 +65,10 @@ void zerohour_stars_device::set_enable(bool on)
}
// This sets up which starfield to draw and the offset, to be called from screen_vblank_*()
-void zerohour_stars_device::update_state()
+void zerohour_stars_device::update_state(int state)
{
- if (m_enable)
+ // end of vblank
+ if (!state && m_enable)
{
m_count = m_count ? 0 : 1;
if (!m_count)
diff --git a/src/mame/universal/zerohour_stars.h b/src/mame/universal/zerohour_stars.h
index c5d00454bc5..eb4aa9d5d96 100644
--- a/src/mame/universal/zerohour_stars.h
+++ b/src/mame/universal/zerohour_stars.h
@@ -17,7 +17,7 @@ public:
// public interface
void set_enable(bool on);
- void update_state();
+ void update_state(int state);
void set_speed(u8 speed, u8 mask);
void draw(bitmap_ind16 &bitmap, rectangle const &cliprect);