summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/xain.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/xain.h')
-rw-r--r--src/mame/includes/xain.h55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/mame/includes/xain.h b/src/mame/includes/xain.h
index be472b819f0..14c1e49b2e7 100644
--- a/src/mame/includes/xain.h
+++ b/src/mame/includes/xain.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Carlos A. Lozano, Rob Rosenbrock, Phil Stroffolino
+#ifndef MAME_INCLUDES_XAIN_H
+#define MAME_INCLUDES_XAIN_H
+
+#pragma once
#include "machine/taito68705interface.h"
@@ -21,49 +25,46 @@ public:
, m_palette(*this, "palette")
, m_soundlatch(*this, "soundlatch")
, m_charram(*this, "charram")
- , m_bgram0(*this, "bgram0")
- , m_bgram1(*this, "bgram1")
+ , m_bgram(*this, "bgram%u", 0U)
, m_spriteram(*this, "spriteram")
+ , m_rom_banks(*this, { "mainbank", "subbank" })
, m_char_tilemap(nullptr)
- , m_bgram0_tilemap(nullptr)
- , m_bgram1_tilemap(nullptr)
+ , m_bg_tilemaps{ nullptr, nullptr }
{
}
+ DECLARE_CUSTOM_INPUT_MEMBER(vblank_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r);
+
+ void xsleena(machine_config &config);
+ void xsleenab(machine_config &config);
+
+protected:
DECLARE_WRITE8_MEMBER(cpuA_bankswitch_w);
DECLARE_WRITE8_MEMBER(cpuB_bankswitch_w);
DECLARE_WRITE8_MEMBER(main_irq_w);
DECLARE_WRITE8_MEMBER(irqA_assert_w);
DECLARE_WRITE8_MEMBER(irqB_clear_w);
DECLARE_READ8_MEMBER(mcu_comm_reset_r);
- DECLARE_WRITE8_MEMBER(bgram0_w);
- DECLARE_WRITE8_MEMBER(bgram1_w);
+ template <unsigned N> DECLARE_WRITE8_MEMBER(bgram_w);
DECLARE_WRITE8_MEMBER(charram_w);
- DECLARE_WRITE8_MEMBER(scrollxP0_w);
- DECLARE_WRITE8_MEMBER(scrollyP0_w);
- DECLARE_WRITE8_MEMBER(scrollxP1_w);
- DECLARE_WRITE8_MEMBER(scrollyP1_w);
+ template <unsigned N> DECLARE_WRITE8_MEMBER(scrollx_w);
+ template <unsigned N> DECLARE_WRITE8_MEMBER(scrolly_w);
DECLARE_WRITE8_MEMBER(flipscreen_w);
- DECLARE_CUSTOM_INPUT_MEMBER(vblank_r);
- DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r);
-
TILEMAP_MAPPER_MEMBER(back_scan);
- TILE_GET_INFO_MEMBER(get_bgram0_tile_info);
- TILE_GET_INFO_MEMBER(get_bgram1_tile_info);
+ template <unsigned N> TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_char_tile_info);
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void xsleenab(machine_config &config);
- void xsleena(machine_config &config);
void bootleg_map(address_map &map);
- void cpu_map_B(address_map &map);
void main_map(address_map &map);
+ void cpu_map_B(address_map &map);
void sound_map(address_map &map);
-protected:
+
virtual void machine_start() override;
virtual void video_start() override;
@@ -81,19 +82,19 @@ protected:
required_device<generic_latch_8_device> m_soundlatch;
required_shared_ptr<u8> m_charram;
- required_shared_ptr<u8> m_bgram0;
- required_shared_ptr<u8> m_bgram1;
+ required_shared_ptr_array<u8, 2> m_bgram;
required_shared_ptr<u8> m_spriteram;
+ required_memory_bank_array<2> m_rom_banks;
+
tilemap_t *m_char_tilemap;
- tilemap_t *m_bgram0_tilemap;
- tilemap_t *m_bgram1_tilemap;
+ tilemap_t *m_bg_tilemaps[2];
int m_vblank;
u8 m_pri;
- u8 m_scrollxP0[2];
- u8 m_scrollyP0[2];
- u8 m_scrollxP1[2];
- u8 m_scrollyP1[2];
+ u8 m_scrollx[2][2];
+ u8 m_scrolly[2][2];
};
+
+#endif // MAME_INCLUDES_XAIN_H