summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/a2600.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/a2600.h')
-rw-r--r--src/mame/includes/a2600.h74
1 files changed, 45 insertions, 29 deletions
diff --git a/src/mame/includes/a2600.h b/src/mame/includes/a2600.h
index 60e933f8d2f..b3fc8edce24 100644
--- a/src/mame/includes/a2600.h
+++ b/src/mame/includes/a2600.h
@@ -36,27 +36,23 @@
#define CONTROL2_TAG "joyport2"
-class a2600_state : public driver_device
+class a2600_base_state : public driver_device
{
-public:
- a2600_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+protected:
+ a2600_base_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_riot_ram(*this, "riot_ram"),
- m_joy1(*this, CONTROL1_TAG),
- m_joy2(*this, CONTROL2_TAG),
- m_cart(*this, "cartslot"),
m_tia(*this, "tia_video"),
m_maincpu(*this, "maincpu"),
+ m_riot(*this, "riot"),
+ m_joy1(*this, CONTROL1_TAG),
+ m_joy2(*this, CONTROL2_TAG),
m_screen(*this, "screen"),
- m_swb(*this, "SWB"),
- m_riot(*this, "riot")
+ m_swb(*this, "SWB")
{ }
- void a2600(machine_config &config);
- void a2600p(machine_config &config);
-
-protected:
virtual void machine_start() override;
+
DECLARE_WRITE8_MEMBER(switch_A_w);
DECLARE_READ8_MEMBER(switch_A_r);
DECLARE_WRITE8_MEMBER(switch_B_w);
@@ -66,34 +62,54 @@ protected:
DECLARE_READ8_MEMBER(a2600_get_databus_contents);
DECLARE_WRITE16_MEMBER(a2600_tia_vsync_callback);
DECLARE_WRITE16_MEMBER(a2600_tia_vsync_callback_pal);
- DECLARE_WRITE8_MEMBER(cart_over_tia_w);
- // investigate how the carts mapped here (Mapper JVP) interact with the RIOT device
- DECLARE_READ8_MEMBER(cart_over_riot_r);
- DECLARE_WRITE8_MEMBER(cart_over_riot_w);
- DECLARE_READ8_MEMBER(cart_over_all_r);
- DECLARE_WRITE8_MEMBER(cart_over_all_w);
- void a2600_cartslot(machine_config &config);
void a2600_mem(address_map &map);
-private:
required_shared_ptr<uint8_t> m_riot_ram;
- uint16_t m_current_screen_height;
-
- required_device<vcs_control_port_device> m_joy1;
- required_device<vcs_control_port_device> m_joy2;
- optional_device<vcs_cart_slot_device> m_cart;
required_device<tia_video_device> m_tia;
-
required_device<m6507_device> m_maincpu;
- required_device<screen_device> m_screen;
- required_ioport m_swb;
#if USE_NEW_RIOT
required_device<mos6532_t> m_riot;
#else
required_device<riot6532_device> m_riot;
#endif
+
+private:
+ uint16_t m_current_screen_height;
+
+ required_device<vcs_control_port_device> m_joy1;
+ required_device<vcs_control_port_device> m_joy2;
+
+ required_device<screen_device> m_screen;
+ required_ioport m_swb;
};
+class a2600_state : public a2600_base_state
+{
+public:
+ a2600_state(const machine_config &mconfig, device_type type, const char *tag) :
+ a2600_base_state(mconfig, type, tag),
+ m_cart(*this, "cartslot")
+ { }
+
+ void a2600(machine_config &config);
+ void a2600p(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+
+ DECLARE_WRITE8_MEMBER(cart_over_tia_w);
+ // investigate how the carts mapped here (Mapper JVP) interact with the RIOT device
+ DECLARE_READ8_MEMBER(cart_over_riot_r);
+ DECLARE_WRITE8_MEMBER(cart_over_riot_w);
+ DECLARE_READ8_MEMBER(cart_over_all_r);
+ DECLARE_WRITE8_MEMBER(cart_over_all_w);
+
+ void a2600_cartslot(machine_config &config);
+
+private:
+ required_device<vcs_cart_slot_device> m_cart;
+};
+
#endif // MAME_INCLUDES_A2600_H