summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/playmark.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/playmark.h')
-rw-r--r--src/mame/includes/playmark.h147
1 files changed, 87 insertions, 60 deletions
diff --git a/src/mame/includes/playmark.h b/src/mame/includes/playmark.h
index 4923f02e41b..88b0b496c5d 100644
--- a/src/mame/includes/playmark.h
+++ b/src/mame/includes/playmark.h
@@ -12,23 +12,55 @@
#include "emupal.h"
#include "tilemap.h"
-class playmark_state : public driver_device
+class playmark_base_state : public driver_device // base class for powerbal.cpp, too
{
public:
- playmark_state(const machine_config &mconfig, device_type type, const char *tag) :
+ playmark_base_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_bgvideoram(*this, "bgvideoram"),
- m_videoram(*this, "videoram%u", 1U),
m_spriteram(*this, "spriteram"),
- m_rowscroll(*this, "rowscroll"),
m_sprtranspen(0),
m_oki(*this, "oki"),
m_okibank(*this, "okibank"),
- m_eeprom(*this, "eeprom"),
m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
+ m_palette(*this, "palette")
+ { }
+
+protected:
+ // memory pointers
+ required_shared_ptr<u16> m_bgvideoram;
+ required_shared_ptr<u16> m_spriteram;
+
+ // video-related
+ tilemap_t *m_bg_tilemap;
+
+ s8 m_xoffset;
+ s8 m_yoffset;
+ u8 m_sprtranspen;
+
+ // misc
+ u8 m_oki_numbanks;
+ void configure_oki_banks();
+
+ // devices
+ required_device<okim6295_device> m_oki;
+ required_memory_bank m_okibank;
+ required_device<cpu_device> m_maincpu;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<palette_device> m_palette;
+};
+
+class playmark_state : public playmark_base_state
+{
+public:
+ playmark_state(const machine_config &mconfig, device_type type, const char *tag) :
+ playmark_base_state(mconfig, type, tag),
+ m_fgvideoram(*this, "fgvideoram"),
+ m_txtvideoram(*this, "txtvideoram"),
+ m_rowscroll(*this, "rowscroll"),
+ m_audiocpu(*this, "audiocpu"),
+ m_eeprom(*this, "eeprom"),
m_ticket(*this, "ticket"),
m_token(*this, "token")
{ }
@@ -47,80 +79,75 @@ protected:
virtual void machine_start() override;
virtual void machine_reset() override;
+private:
// memory pointers
- optional_shared_ptr<u16> m_bgvideoram;
- optional_shared_ptr_array<u16, 3> m_videoram;
- required_shared_ptr<u16> m_spriteram;
- optional_shared_ptr<u16> m_rowscroll;
+ required_shared_ptr<u16> m_fgvideoram;
+ required_shared_ptr<u16> m_txtvideoram;
+ optional_shared_ptr<u16> m_rowscroll;// wbeachvl
// video-related
- tilemap_t *m_tx_tilemap;
tilemap_t *m_fg_tilemap;
- tilemap_t *m_bg_tilemap;
+ tilemap_t *m_tx_tilemap;
+
+ // bigtwin and excelsr
s32 m_bgscrollx;
s16 m_bgscrolly;
bool m_bg_enable;
bool m_bg_full_size;
+
+ // wbeachvl
u32 m_fgscrollx;
bool m_fg_rowscroll_enable;
- s8 m_xoffset;
- s8 m_yoffset;
+ // all
u16 m_pri_masks[3];
u16 m_scroll[7];
- u8 m_sprtranspen;
// misc
- u16 m_snd_command;
- u16 m_snd_flag;
+ // all
+ u8 m_snd_command;
+ u8 m_snd_flag;
u8 m_oki_control;
u8 m_oki_command;
- u8 m_dispenser_latch;
- u8 m_oki_numbanks;
- void configure_oki_banks();
+
+ u8 m_dispenser_latch; // hotmind luckboomh
// devices
- required_device<okim6295_device> m_oki;
- optional_memory_bank m_okibank;
- optional_device<eeprom_serial_93cxx_device> m_eeprom;
- required_device<cpu_device> m_maincpu;
- optional_device<pic16c57_device> m_audiocpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
- optional_device<ticket_dispenser_device> m_ticket;
- optional_device<ticket_dispenser_device> m_token;
+ required_device<pic16c57_device> m_audiocpu; // all
+ optional_device<eeprom_serial_93cxx_device> m_eeprom; // wbeachvl hotmind
+ optional_device<ticket_dispenser_device> m_ticket; // hotmind luckboomh
+ optional_device<ticket_dispenser_device> m_token; // hotmind luckboomh
-private:
- void coinctrl_w(u8 data);
- void wbeachvl_coin_eeprom_w(u8 data);
- void hotmind_coin_eeprom_w(u8 data);
- void luckboomh_dispenser_w(u8 data);
+ void coinctrl_w(u8 data); // bigtwin excelsr hrdtimes
+ void wbeachvl_coin_eeprom_w(u8 data); // wbeachvl
+ void hotmind_coin_eeprom_w(u8 data); // hotmind
+ void luckboomh_dispenser_w(u8 data); // hotmind luckboomh
void playmark_snd_command_w(u8 data);
u8 playmark_snd_command_r();
u8 playmark_snd_flag_r();
void playmark_oki_w(u8 data);
void playmark_snd_control_w(u8 data);
- void hrdtimes_snd_control_w(u8 data);
- void wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void bigtwin_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void wbeachvl_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
+ void hrdtimes_snd_control_w(u8 data); // hrdtimes, hotmind, luckboomh
+ void wbeachvl_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwin, wbeachvl, excelsr
+ void wbeachvl_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwin, wbeachvl, excelsr
+ void wbeachvl_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // wbeachvl
+ void hrdtimes_txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
+ void hrdtimes_fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
+ void hrdtimes_bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
+ void bigtwin_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwin
+ void wbeachvl_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // wbeachvk
+ void excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // excelsr
+ void hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh
void playmark_oki_banking_w(u8 data);
- TILE_GET_INFO_MEMBER(bigtwin_get_tx_tile_info);
- TILE_GET_INFO_MEMBER(bigtwin_get_fg_tile_info);
- TILE_GET_INFO_MEMBER(wbeachvl_get_tx_tile_info);
- TILE_GET_INFO_MEMBER(wbeachvl_get_fg_tile_info);
- TILE_GET_INFO_MEMBER(wbeachvl_get_bg_tile_info);
- TILE_GET_INFO_MEMBER(hrdtimes_get_tx_tile_info);
- TILE_GET_INFO_MEMBER(bigtwinb_get_tx_tile_info);
- TILE_GET_INFO_MEMBER(hrdtimes_get_fg_tile_info);
- TILE_GET_INFO_MEMBER(hrdtimes_get_bg_tile_info);
+ TILE_GET_INFO_MEMBER(bigtwin_get_tx_tile_info); // bigtwin, excelsr
+ TILE_GET_INFO_MEMBER(bigtwin_get_fg_tile_info); // bigtwin, excelsr
+ TILE_GET_INFO_MEMBER(wbeachvl_get_tx_tile_info); // wbeachvk
+ TILE_GET_INFO_MEMBER(wbeachvl_get_fg_tile_info); // wbeachvk
+ TILE_GET_INFO_MEMBER(wbeachvl_get_bg_tile_info); // wbeachvk
+ TILE_GET_INFO_MEMBER(hrdtimes_get_tx_tile_info); // hrdtimes, hotmind, luckboomh
+ TILE_GET_INFO_MEMBER(bigtwinb_get_tx_tile_info); // bigtwinb
+ TILE_GET_INFO_MEMBER(hrdtimes_get_fg_tile_info); // bigtwinb, hrdtimes, hotmind, luckboomh
+ TILE_GET_INFO_MEMBER(hrdtimes_get_bg_tile_info); // bigtwinb, hrdtimes, hotmind, luckboomh
DECLARE_VIDEO_START(bigtwin);
DECLARE_VIDEO_START(bigtwinb);
DECLARE_VIDEO_START(wbeachvl);
@@ -128,15 +155,15 @@ private:
DECLARE_VIDEO_START(hotmind);
DECLARE_VIDEO_START(hrdtimes);
DECLARE_VIDEO_START(luckboomh);
- TILEMAP_MAPPER_MEMBER(playmark_tilemap_scan_pages);
+ TILEMAP_MAPPER_MEMBER(playmark_tilemap_scan_pages); // hrdtimes
u32 screen_update_bigtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_bigtwinb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_wbeachvl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
u32 screen_update_excelsr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- u32 screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift );
- void bigtwinb_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift );
- void draw_bitmap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
+ u32 screen_update_hrdtimes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); // hrdtimes, hotmind, luckboomh
+ void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift); // all but bigtwinb
+ void bigtwinb_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int codeshift); // bigtwinb
+ void draw_bitmap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); // bigtwin, excelsr
u8 playmark_asciitohex(u8 data);
void playmark_decode_pic_hex_dump(void);