diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-04-03 18:52:53 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-04-03 18:52:53 -0400 |
commit | 85c5f68c5359f38bac0fb0d56876f63ac6378711 (patch) | |
tree | e1bb0daa8dd64b0c29e31b25fd8e685dd49575fa | |
parent | bc2acfcb76b3a69ff48f48cb70cbc257b5c75a07 (diff) |
thunderj: Decouple from atarigen_state (nw)
-rw-r--r-- | src/mame/drivers/thunderj.cpp | 10 | ||||
-rw-r--r-- | src/mame/includes/thunderj.h | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index 8c5ac2ea950..ecc2591d2fc 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -51,16 +51,15 @@ * *************************************/ -void thunderj_state::update_interrupts() +WRITE_LINE_MEMBER(thunderj_state::scanline_int_write_line) { - m_maincpu->set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE); - m_extra->set_input_line(4, m_scanline_int_state ? ASSERT_LINE : CLEAR_LINE); + m_maincpu->set_input_line(M68K_IRQ_4, state ? ASSERT_LINE : CLEAR_LINE); + m_extra->set_input_line(M68K_IRQ_4, state ? ASSERT_LINE : CLEAR_LINE); } void thunderj_state::machine_start() { - atarigen_state::machine_start(); save_item(NAME(m_alpha_tile_bank)); } @@ -123,7 +122,7 @@ void thunderj_state::main_map(address_map &map) map(0x360010, 0x360011).w(this, FUNC(thunderj_state::latch_w)); map(0x360020, 0x360021).w(m_jsa, FUNC(atari_jsa_ii_device::sound_reset_w)); map(0x360031, 0x360031).w(m_jsa, FUNC(atari_jsa_ii_device::main_command_w)); - map(0x3e0000, 0x3e0fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); + map(0x3e0000, 0x3e0fff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); map(0x3effc0, 0x3effff).rw(m_vad, FUNC(atari_vad_device::control_read), FUNC(atari_vad_device::control_write)); map(0x3f0000, 0x3f1fff).ram().w(m_vad, FUNC(atari_vad_device::playfield2_latched_msb_w)).share("vad:playfield2"); map(0x3f2000, 0x3f3fff).ram().w(m_vad, FUNC(atari_vad_device::playfield_latched_lsb_w)).share("vad:playfield"); @@ -152,7 +151,6 @@ void thunderj_state::extra_map(address_map &map) map(0x260010, 0x260011).portr("260010"); map(0x260012, 0x260013).r(this, FUNC(thunderj_state::special_port2_r)); map(0x260031, 0x260031).r(m_jsa, FUNC(atari_jsa_ii_device::main_response_r)); - map(0x360000, 0x360001).w(this, FUNC(thunderj_state::video_int_ack_w)); map(0x360010, 0x360011).w(this, FUNC(thunderj_state::latch_w)); map(0x360020, 0x360021).w(m_jsa, FUNC(atari_jsa_ii_device::sound_reset_w)); map(0x360031, 0x360031).w(m_jsa, FUNC(atari_jsa_ii_device::main_command_w)); diff --git a/src/mame/includes/thunderj.h b/src/mame/includes/thunderj.h index c83096e38f0..b9f7a1133aa 100644 --- a/src/mame/includes/thunderj.h +++ b/src/mame/includes/thunderj.h @@ -10,19 +10,20 @@ #pragma once -#include "machine/atarigen.h" #include "audio/atarijsa.h" #include "video/atarimo.h" #include "video/atarivad.h" #include "screen.h" -class thunderj_state : public atarigen_state +class thunderj_state : public driver_device { public: thunderj_state(const machine_config &mconfig, device_type type, const char *tag) : - atarigen_state(mconfig, type, tag), + driver_device(mconfig, type, tag), + m_screen(*this, "screen"), m_jsa(*this, "jsa"), m_vad(*this, "vad"), + m_maincpu(*this, "maincpu"), m_extra(*this, "extra") { } @@ -31,7 +32,7 @@ public: protected: virtual void machine_start() override; - virtual void update_interrupts() override; + DECLARE_WRITE_LINE_MEMBER(scanline_int_write_line); DECLARE_READ16_MEMBER(special_port2_r); DECLARE_WRITE16_MEMBER(latch_w); TILE_GET_INFO_MEMBER(get_alpha_tile_info); @@ -43,8 +44,10 @@ protected: void main_map(address_map &map); private: + required_device<screen_device> m_screen; required_device<atari_jsa_ii_device> m_jsa; required_device<atari_vad_device> m_vad; + required_device<cpu_device> m_maincpu; required_device<cpu_device> m_extra; uint8_t m_alpha_tile_bank; |