summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/deco32.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/deco32.h')
-rw-r--r--src/mame/includes/deco32.h133
1 files changed, 74 insertions, 59 deletions
diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h
index 1c9d6358855..1e6ecd925cd 100644
--- a/src/mame/includes/deco32.h
+++ b/src/mame/includes/deco32.h
@@ -23,48 +23,31 @@ class deco32_state : public driver_device
public:
deco32_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
- , m_maincpu(*this, "maincpu")
- , m_audiocpu(*this, "audiocpu")
- , m_ioprot(*this, "ioprot")
- , m_deco_irq(*this, "irq")
- , m_decobsmt(*this, "decobsmt")
, m_sprgen(*this, "spritegen%u", 1)
- , m_eeprom(*this, "eeprom")
- , m_ym2151(*this, "ymsnd")
- , m_oki(*this, "oki%u", 1)
, m_deco_tilegen(*this, "tilegen%u", 1)
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
+ , m_deco_irq(*this, "irq")
+ , m_decobsmt(*this, "decobsmt")
+ , m_eeprom(*this, "eeprom")
+ , m_ioprot(*this, "ioprot")
+ , m_ym2151(*this, "ymsnd")
+ , m_oki(*this, "oki%u", 1)
, m_soundlatch(*this, "soundlatch")
+ , m_maincpu(*this, "maincpu")
+ , m_audiocpu(*this, "audiocpu")
, m_pf_rowscroll32(*this, "pf%u_rowscroll32", 1)
, m_generic_paletteram_32(*this, "paletteram")
{ }
- required_device<cpu_device> m_maincpu;
- optional_device<cpu_device> m_audiocpu;
- required_device<deco_146_base_device> m_ioprot;
- optional_device<deco_irq_device> m_deco_irq;
- optional_device<decobsmt_device> m_decobsmt;
- optional_device_array<decospr_device, 2> m_sprgen;
- optional_device<eeprom_serial_93cxx_device> m_eeprom;
- optional_device<ym2151_device> m_ym2151;
- optional_device_array<okim6295_device, 3> m_oki;
- required_device_array<deco16ic_device, 2> m_deco_tilegen;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<screen_device> m_screen;
- optional_device<palette_device> m_palette;
- optional_device<generic_latch_8_device> m_soundlatch;
-
- // we use the pointers below to store a 32-bit copy..
- required_shared_ptr_array<uint32_t, 4> m_pf_rowscroll32;
- optional_shared_ptr<uint32_t> m_generic_paletteram_32;
+ DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
- std::unique_ptr<uint8_t[]> m_dirty_palette; // all but captaven
- int m_pri; // all but dragngun
- std::unique_ptr<uint16_t[]> m_spriteram16[2]; // all but dragngun
- std::unique_ptr<uint16_t[]> m_spriteram16_buffered[2]; // all but dragngun
- std::unique_ptr<uint16_t[]> m_pf_rowscroll[4]; // common
+protected:
+ void h6280_sound_custom_latch_map(address_map &map);
+ void h6280_sound_map(address_map &map);
+ void z80_sound_io(address_map &map);
+ void z80_sound_map(address_map &map);
// common
DECLARE_READ16_MEMBER(ioprot_r);
@@ -75,7 +58,6 @@ public:
DECLARE_WRITE32_MEMBER(vblank_ack_w);
template<int Chip> DECLARE_WRITE32_MEMBER(pf_rowscroll_w);
- DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
// captaven, fghthist, nslasher and tattass
template<int Chip> DECLARE_READ32_MEMBER(spriteram_r);
@@ -87,17 +69,38 @@ public:
DECLARE_WRITE32_MEMBER(buffered_palette_w);
DECLARE_WRITE32_MEMBER(palette_dma_w);
- void h6280_sound_custom_latch_map(address_map &map);
- void h6280_sound_map(address_map &map);
- void z80_sound_io(address_map &map);
- void z80_sound_map(address_map &map);
-protected:
- virtual void video_start() override;
+ optional_device_array<decospr_device, 2> m_sprgen;
+ required_device_array<deco16ic_device, 2> m_deco_tilegen;
+ required_device<gfxdecode_device> m_gfxdecode;
+ required_device<screen_device> m_screen;
+ optional_device<palette_device> m_palette;
+ optional_device<deco_irq_device> m_deco_irq;
+ optional_device<decobsmt_device> m_decobsmt;
+ optional_device<eeprom_serial_93cxx_device> m_eeprom;
+ required_device<deco_146_base_device> m_ioprot;
+ optional_device<ym2151_device> m_ym2151;
+ optional_device_array<okim6295_device, 3> m_oki;
+ optional_device<generic_latch_8_device> m_soundlatch;
void allocate_spriteram(int chip);
void allocate_buffered_palette();
void allocate_rowscroll(int size1, int size2, int size3, int size4);
+ virtual void video_start() override;
+
+ std::unique_ptr<uint8_t[]> m_dirty_palette; // all but captaven
+ int m_pri; // all but dragngun
+ std::unique_ptr<uint16_t[]> m_spriteram16[2]; // all but dragngun
+ std::unique_ptr<uint16_t[]> m_spriteram16_buffered[2]; // all but dragngun
+ std::unique_ptr<uint16_t[]> m_pf_rowscroll[4]; // common
+
+private:
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_audiocpu;
+
+ // we use the pointers below to store a 32-bit copy..
+ required_shared_ptr_array<uint32_t, 4> m_pf_rowscroll32;
+ optional_shared_ptr<uint32_t> m_generic_paletteram_32;
};
class captaven_state : public deco32_state
@@ -107,6 +110,11 @@ public:
: deco32_state(mconfig, type, tag)
{ }
+ void captaven(machine_config &config);
+
+ void init_captaven();
+
+private:
DECLARE_READ32_MEMBER(_71_r);
DECLARE_READ8_MEMBER(captaven_dsw1_r);
DECLARE_READ8_MEMBER(captaven_dsw2_r);
@@ -114,16 +122,13 @@ public:
DECLARE_READ8_MEMBER(captaven_soundcpu_status_r);
DECLARE_VIDEO_START(captaven);
- void init_captaven();
uint32_t screen_update_captaven(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(captaven_bank_callback);
DECOSPR_PRIORITY_CB_MEMBER(captaven_pri_callback);
- void captaven(machine_config &config);
void captaven_map(address_map &map);
-private:
};
class fghthist_state : public deco32_state
@@ -133,21 +138,24 @@ public:
: deco32_state(mconfig, type, tag)
{ }
+ void fghthist(machine_config &config);
+ void fghthistu(machine_config &config);
+ void fghthsta(machine_config &config);
+
+ void init_fghthist();
+
+private:
DECLARE_WRITE32_MEMBER(sound_w);
DECLARE_READ16_MEMBER(fghthist_in0_r);
DECLARE_READ16_MEMBER(fghthist_in1_r);
DECLARE_READ32_MEMBER(unk_status_r);
- void init_fghthist();
DECLARE_VIDEO_START(fghthist);
uint32_t screen_update_fghthist(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(fghthist_bank_callback);
- void fghthist(machine_config &config);
- void fghthistu(machine_config &config);
- void fghthsta(machine_config &config);
void fghthist_map(address_map &map);
void fghthsta_memmap(address_map &map);
private:
@@ -161,14 +169,21 @@ public:
: deco32_state(mconfig, type, tag)
, m_deco_ace(*this, "deco_ace")
{ }
+
+ void nslasheru(machine_config &config);
+ void tattass(machine_config &config);
+ void nslasher(machine_config &config);
+
+ void init_tattass();
+ void init_nslasher();
+
+private:
required_device<deco_ace_device> m_deco_ace;
DECLARE_WRITE32_MEMBER(tattass_control_w);
DECLARE_WRITE_LINE_MEMBER(tattass_sound_irq_w);
DECLARE_READ16_MEMBER(nslasher_debug_r);
- void init_tattass();
- void init_nslasher();
DECLARE_VIDEO_START(nslasher);
uint32_t screen_update_nslasher(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -176,12 +191,9 @@ public:
DECLARE_READ16_MEMBER(port_b_tattass);
DECO16IC_BANK_CB_MEMBER(tattass_bank_callback);
- void nslasheru(machine_config &config);
- void tattass(machine_config &config);
- void nslasher(machine_config &config);
void nslasher_map(address_map &map);
void tattass_map(address_map &map);
-private:
+
void mixDualAlphaSprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, gfx_element *gfx0, gfx_element *gfx1, int mixAlphaTilemap);
std::unique_ptr<bitmap_ind16> m_tilemap_alpha_bitmap;
@@ -209,6 +221,17 @@ public:
, m_gun_speaker_disabled(true)
{ }
+ void dragngun(machine_config &config);
+ void lockload(machine_config &config);
+ void lockloadu(machine_config &config);
+
+ void init_dragngun();
+ void init_dragngunj();
+ void init_lockload();
+
+ DECLARE_INPUT_CHANGED_MEMBER(lockload_gun_trigger);
+
+private:
required_device<deco_zoomspr_device> m_sprgenzoom;
required_device<buffered_spriteram32_device> m_spriteram;
@@ -239,26 +262,18 @@ public:
DECLARE_WRITE8_MEMBER(lockload_okibank_lo_w);
DECLARE_WRITE8_MEMBER(lockload_okibank_hi_w); // lockload
- void init_dragngun();
- void init_dragngunj();
- void init_lockload();
DECLARE_VIDEO_START(dragngun);
void dragngun_init_common();
- DECLARE_INPUT_CHANGED_MEMBER(lockload_gun_trigger);
uint32_t screen_update_dragngun(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECO16IC_BANK_CB_MEMBER(bank_1_callback);
DECO16IC_BANK_CB_MEMBER(bank_2_callback);
- void dragngun(machine_config &config);
- void lockload(machine_config &config);
- void lockloadu(machine_config &config);
void dragngun_map(address_map &map);
void lockload_map(address_map &map);
void lockloadu_map(address_map &map);
void lockload_sound_map(address_map &map);
void lockloadu_sound_map(address_map &map);
-private:
bool m_gun_speaker_disabled;
};