summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/megadriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/megadriv.h')
-rw-r--r--src/mame/includes/megadriv.h69
1 files changed, 51 insertions, 18 deletions
diff --git a/src/mame/includes/megadriv.h b/src/mame/includes/megadriv.h
index c8db99abb95..0cd19ff39bc 100644
--- a/src/mame/includes/megadriv.h
+++ b/src/mame/includes/megadriv.h
@@ -52,6 +52,7 @@ public:
m_scan_timer(*this, "md_scan_timer"),
m_vdp(*this,"gen_vdp"),
m_megadrive_ram(*this,"megadrive_ram"),
+ m_screen(*this,"megadriv"),
m_io_reset(*this, "RESET"),
m_megadrive_io_read_data_port_ptr(*this),
m_megadrive_io_write_data_port_ptr(*this)
@@ -63,6 +64,7 @@ public:
optional_device<timer_device> m_scan_timer;
required_device<sega315_5313_device> m_vdp;
optional_shared_ptr<uint16_t> m_megadrive_ram;
+ optional_device<screen_device> m_screen;
optional_ioport m_io_reset;
ioport_port *m_io_pad_3b[4];
@@ -129,8 +131,7 @@ public:
void megadriv_stop_scanline_timer();
- DECLARE_MACHINE_START( megadriv );
- DECLARE_MACHINE_RESET( megadriv );
+
DECLARE_VIDEO_START( megadriv );
uint32_t screen_update_megadriv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank_megadriv);
@@ -143,11 +144,16 @@ public:
void md_pal(machine_config &config);
void md2_pal(machine_config &config);
void md_bootleg(machine_config &config);
+
void dcat16_megadriv_base(machine_config &config);
void dcat16_megadriv_map(address_map &map);
void megadriv_map(address_map &map);
void megadriv_z80_io_map(address_map &map);
void megadriv_z80_map(address_map &map);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
};
class md_cons_state : public md_base_state
@@ -178,11 +184,6 @@ public:
uint8_t mess_md_io_read_data_port(offs_t offset);
void mess_md_io_write_data_port(offs_t offset, uint16_t data);
- DECLARE_MACHINE_START( md_common ); // setup ioport_port
- DECLARE_MACHINE_START( ms_megadriv ); // setup ioport_port + install cartslot handlers
- DECLARE_MACHINE_START( ms_megacd ); // setup ioport_port + dma delay for cd
- DECLARE_MACHINE_RESET( ms_megadriv );
-
DECLARE_WRITE_LINE_MEMBER(screen_vblank_console);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( _32x_cart );
@@ -195,24 +196,56 @@ public:
void install_tmss();
uint16_t tmss_r(offs_t offset);
void tmss_swap_w(uint16_t data);
- void genesis_32x_scd(machine_config &config);
- void mdj_32x_scd(machine_config &config);
- void ms_megadpal(machine_config &config);
void dcat16_megadriv_base(machine_config &config);
void dcat16_megadriv(machine_config &config);
- void md_32x_scd(machine_config &config);
+
+ void md_32x(machine_config &config);
+ void genesis_32x(machine_config &config);
void mdj_32x(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+};
+
+class md_cons_slot_state : public md_cons_state
+{
+public:
+ md_cons_slot_state(const machine_config &mconfig, device_type type, const char *tag) :
+ md_cons_state(mconfig, type, tag)
+ { }
+
+ void ms_megadpal(machine_config &config);
void ms_megadriv(machine_config &config);
void ms_megadriv2(machine_config &config);
- void mdj_scd(machine_config &config);
- void md2j_scd(machine_config &config);
- void md_32x(machine_config &config);
- void genesis_32x(machine_config &config);
- void md_scd(machine_config &config);
- void md2_scd(machine_config &config);
+
+ void genesis_tmss(machine_config &config);
+
+
+protected:
+ virtual void machine_start() override;
+};
+
+class md_cons_cd_state : public md_cons_state
+{
+public:
+ md_cons_cd_state(const machine_config &mconfig, device_type type, const char *tag) :
+ md_cons_state(mconfig, type, tag)
+ { }
+
void genesis_scd(machine_config &config);
void genesis2_scd(machine_config &config);
- void genesis_tmss(machine_config &config);
+ void md_scd(machine_config &config);
+ void md2_scd(machine_config &config);
+ void mdj_scd(machine_config &config);
+
+ void mdj_32x_scd(machine_config &config);
+ void md2j_scd(machine_config &config);
+ void genesis_32x_scd(machine_config &config);
+ void md_32x_scd(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
};
#endif // MAME_INCLUDES_MEGADRIV_H