summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/aerofgt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/aerofgt.h')
-rw-r--r--src/mame/includes/aerofgt.h82
1 files changed, 36 insertions, 46 deletions
diff --git a/src/mame/includes/aerofgt.h b/src/mame/includes/aerofgt.h
index f3aefa80d21..b46d4d358b4 100644
--- a/src/mame/includes/aerofgt.h
+++ b/src/mame/includes/aerofgt.h
@@ -11,36 +11,33 @@ class aerofgt_state : public driver_device
{
public:
aerofgt_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_bg1videoram(*this, "bg1videoram"),
- m_bg2videoram(*this, "bg2videoram"),
- m_rasterram(*this, "rasterram"),
- m_bitmapram(*this, "bitmapram"),
- m_spriteram1(*this, "spriteram1"),
- m_spriteram2(*this, "spriteram2"),
- m_spriteram3(*this, "spriteram3"),
- m_tx_tilemap_ram(*this, "tx_tilemap_ram"),
- m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_oki(*this, "oki"),
- m_upd7759(*this, "upd"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette"),
- m_spr(*this, "vsystem_spr"),
- m_spr_old(*this, "vsystem_spr_old"),
- m_spr_old2(*this, "vsystem_spr_ol2"),
- m_soundlatch(*this, "soundlatch"),
- m_soundbank(*this, "soundbank"),
- m_okibank(*this, "okibank") { }
+ : driver_device(mconfig, type, tag)
+ , m_vram(*this, "vram.%u", 0)
+ , m_rasterram(*this, "rasterram")
+ , m_bitmapram(*this, "bitmapram")
+ , m_sprlookupram(*this, "sprlookupram%u", 1)
+ , m_spriteram(*this, "spriteram")
+ , m_tx_tilemap_ram(*this, "tx_tilemap_ram")
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
+ , m_oki(*this, "oki")
+ , m_upd7759(*this, "upd")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_spr(*this, "vsystem_spr")
+ , m_spr_old(*this, "vsystem_spr_old%u", 1)
+ , m_soundlatch(*this, "soundlatch")
+ , m_sprlookuprom(*this, "sprlookuprom")
+ , m_soundbank(*this, "soundbank")
+ , m_okibank(*this, "okibank")
+ { }
/* memory pointers */
- required_shared_ptr<uint16_t> m_bg1videoram;
- optional_shared_ptr<uint16_t> m_bg2videoram;
+ optional_shared_ptr_array<uint16_t, 2> m_vram;
optional_shared_ptr<uint16_t> m_rasterram;
optional_shared_ptr<uint16_t> m_bitmapram;
- optional_shared_ptr<uint16_t> m_spriteram1;
- optional_shared_ptr<uint16_t> m_spriteram2;
- required_shared_ptr<uint16_t> m_spriteram3;
+ optional_shared_ptr_array<uint16_t, 2> m_sprlookupram;
+ required_shared_ptr<uint16_t> m_spriteram;
optional_shared_ptr<uint16_t> m_tx_tilemap_ram;
/* devices referenced above */
@@ -51,22 +48,19 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
optional_device<vsystem_spr_device> m_spr; // only the aerofgt parent uses this chip
- optional_device<vsystem_spr2_device> m_spr_old; // every other (non-bootleg) uses this
- optional_device<vsystem_spr2_device> m_spr_old2; // or a pair of them..
+ optional_device_array<vsystem_spr2_device, 2> m_spr_old; // every other (non-bootleg) uses this or a pair of them..
optional_device<generic_latch_8_device> m_soundlatch;
+ optional_region_ptr<uint16_t> m_sprlookuprom;
optional_memory_bank m_soundbank;
optional_memory_bank m_okibank;
/* video-related */
- tilemap_t *m_bg1_tilemap;
- tilemap_t *m_bg2_tilemap;
+ tilemap_t *m_tilemap[2];
uint8_t m_gfxbank[8];
uint16_t m_bank[4];
- uint16_t m_bg1scrollx;
- uint16_t m_bg1scrolly;
- uint16_t m_bg2scrollx;
- uint16_t m_bg2scrolly;
+ uint16_t m_scrollx[2];
+ uint16_t m_scrolly[2];
bool m_flip_screen;
uint16_t m_wbbc97_bitmap_enable;
int m_charpalettebank;
@@ -77,6 +71,7 @@ public:
uint32_t aerofgt_old_tile_callback( uint32_t code );
uint32_t aerofgt_ol2_tile_callback( uint32_t code );
+ uint32_t spinbrk_tile_callback( uint32_t code );
/* handlers */
DECLARE_WRITE8_MEMBER(karatblzbl_soundlatch_w);
@@ -84,8 +79,7 @@ public:
DECLARE_WRITE8_MEMBER(aerofgt_sh_bankswitch_w);
DECLARE_WRITE8_MEMBER(spinlbrk_sh_bankswitch_w);
DECLARE_WRITE8_MEMBER(aerfboot_okim6295_banking_w);
- DECLARE_WRITE16_MEMBER(aerofgt_bg1videoram_w);
- DECLARE_WRITE16_MEMBER(aerofgt_bg2videoram_w);
+ template<int Layer> DECLARE_WRITE16_MEMBER(vram_w);
DECLARE_WRITE8_MEMBER(pspikes_gfxbank_w);
DECLARE_WRITE16_MEMBER(pspikesb_gfxbank_w);
DECLARE_WRITE16_MEMBER(spikes91_lookup_w);
@@ -94,10 +88,8 @@ public:
DECLARE_WRITE8_MEMBER(kickball_gfxbank_w);
DECLARE_WRITE16_MEMBER(turbofrc_gfxbank_w);
DECLARE_WRITE16_MEMBER(aerofgt_gfxbank_w);
- DECLARE_WRITE16_MEMBER(aerofgt_bg1scrollx_w);
- DECLARE_WRITE16_MEMBER(aerofgt_bg1scrolly_w);
- DECLARE_WRITE16_MEMBER(aerofgt_bg2scrollx_w);
- DECLARE_WRITE16_MEMBER(aerofgt_bg2scrolly_w);
+ template<int Layer> DECLARE_WRITE16_MEMBER(scrollx_w);
+ template<int Layer> DECLARE_WRITE16_MEMBER(scrolly_w);
DECLARE_WRITE8_MEMBER(pspikes_palette_bank_w);
DECLARE_WRITE8_MEMBER(spinlbrk_flip_screen_w);
DECLARE_WRITE8_MEMBER(turbofrc_flip_screen_w);
@@ -107,11 +99,9 @@ public:
DECLARE_WRITE8_MEMBER(karatblzbl_d7759_write_port_0_w);
DECLARE_WRITE8_MEMBER(karatblzbl_d7759_reset_w);
TILE_GET_INFO_MEMBER(get_pspikes_tile_info);
- TILE_GET_INFO_MEMBER(karatblz_bg1_tile_info);
- TILE_GET_INFO_MEMBER(karatblz_bg2_tile_info);
- TILE_GET_INFO_MEMBER(spinlbrk_bg1_tile_info);
- TILE_GET_INFO_MEMBER(get_bg1_tile_info);
- TILE_GET_INFO_MEMBER(get_bg2_tile_info);
+ template<int Layer> TILE_GET_INFO_MEMBER(karatblz_tile_info);
+ template<int Layer> TILE_GET_INFO_MEMBER(spinlbrk_tile_info);
+ template<int Layer> TILE_GET_INFO_MEMBER(get_tile_info);
DECLARE_MACHINE_START(aerofgt);
DECLARE_MACHINE_START(spinlbrk);
DECLARE_MACHINE_RESET(aerofgt);
@@ -135,7 +125,7 @@ public:
uint32_t screen_update_aerfboo2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_wbbc97(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void aerofgt_register_state_globals( );
- void setbank( tilemap_t *tmap, int num, int bank );
+ void setbank( int layer, int num, int bank );
void aerfboo2_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri );
void pspikesb_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
void spikes91_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );