summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/ddragon.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/ddragon.h')
-rw-r--r--src/mame/includes/ddragon.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h
index 36003266b43..974fedefe15 100644
--- a/src/mame/includes/ddragon.h
+++ b/src/mame/includes/ddragon.h
@@ -7,6 +7,7 @@
*************************************************************************/
#include "cpu/m6805/m68705.h"
+#include "machine/bankdev.h"
#include "machine/gen_latch.h"
#include "machine/timer.h"
#include "sound/msm5205.h"
@@ -29,12 +30,13 @@ public:
, m_maincpu(*this, "maincpu")
, m_soundcpu(*this, "soundcpu")
, m_subcpu(*this, "sub")
- , m_adpcm1(*this, "adpcm1")
- , m_adpcm2(*this, "adpcm2")
+ , m_adpcm(*this, "adpcm%u", 1U)
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
, m_soundlatch(*this, "soundlatch")
+ , m_mainbank(*this, "mainbank")
+ , m_adpcm_rom(*this, "adpcm%u", 1U)
{
}
@@ -50,18 +52,17 @@ public:
/* video-related */
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
- uint8_t m_technos_video_hw;
- uint8_t m_scrollx_hi;
- uint8_t m_scrolly_hi;
+ uint8_t m_technos_video_hw;
+ uint8_t m_scrollx_hi;
+ uint8_t m_scrolly_hi;
/* misc */
- uint8_t m_ddragon_sub_port;
- uint8_t m_sprite_irq;
- uint8_t m_ym_irq;
- uint8_t m_adpcm_sound_irq;
- uint32_t m_adpcm_pos[2];
- uint32_t m_adpcm_end[2];
- uint8_t m_adpcm_idle[2];
+ uint8_t m_ddragon_sub_port;
+ uint8_t m_sprite_irq;
+ uint8_t m_adpcm_sound_irq;
+ uint32_t m_adpcm_pos[2];
+ uint32_t m_adpcm_end[2];
+ bool m_adpcm_idle[2];
int m_adpcm_data[2];
/* for Sai Yu Gou Ma Roku */
@@ -79,17 +80,18 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
optional_device<cpu_device> m_subcpu;
- optional_device<msm5205_device> m_adpcm1;
- optional_device<msm5205_device> m_adpcm2;
+ optional_device_array<msm5205_device, 2> m_adpcm;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
+ optional_memory_bank m_mainbank;
+ optional_region_ptr_array<uint8_t, 2> m_adpcm_rom;
int scanline_to_vcount(int scanline);
void ddragon_interrupt_ack(address_space &space, offs_t offset, uint8_t data);
- void dd_adpcm_int(msm5205_device *device, int chip);
+ void dd_adpcm_int(int chip);
/* video/ddragon.c */
TILEMAP_MAPPER_MEMBER(background_scan);
@@ -105,7 +107,6 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(ddragon_scanline);
- DECLARE_WRITE_LINE_MEMBER(irq_handler);
DECLARE_WRITE8_MEMBER(ddragon_bgvideoram_w);
DECLARE_WRITE8_MEMBER(ddragon_fgvideoram_w);
DECLARE_CUSTOM_INPUT_MEMBER(subcpu_bus_free);
@@ -136,6 +137,7 @@ public:
void dd2_sound_map(address_map &map);
void dd2_sub_map(address_map &map);
void ddragon_map(address_map &map);
+ void ddragon_base_map(address_map &map);
void ddragonba_sub_map(address_map &map);
void ddragonba_sub_portmap(address_map &map);
void sound_map(address_map &map);
@@ -149,6 +151,7 @@ public:
darktowr_state(const machine_config &mconfig, device_type type, const char *tag)
: ddragon_state(mconfig, type, tag)
, m_mcu(*this, "mcu")
+ , m_darktowr_bank(*this, "darktowr_bank")
, m_mcu_port_a_out(0xff)
{
}
@@ -161,10 +164,13 @@ public:
void init_darktowr();
void darktowr(machine_config &config);
+ void darktowr_map(address_map &map);
+ void darktowr_banked_map(address_map &map);
protected:
required_device<m68705p_device> m_mcu;
+ optional_device<address_map_bank_device> m_darktowr_bank;
- uint8_t m_mcu_port_a_out;;
+ uint8_t m_mcu_port_a_out;
};
@@ -180,4 +186,5 @@ public:
void init_toffy();
void toffy(machine_config &config);
+ void toffy_map(address_map &map);
};