summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/undrfire.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/undrfire.h')
-rw-r--r--src/mame/includes/undrfire.h59
1 files changed, 35 insertions, 24 deletions
diff --git a/src/mame/includes/undrfire.h b/src/mame/includes/undrfire.h
index 67351907c6b..af0e5494806 100644
--- a/src/mame/includes/undrfire.h
+++ b/src/mame/includes/undrfire.h
@@ -24,14 +24,18 @@ public:
m_shared_ram(*this, "shared_ram"),
m_spriteram(*this, "spriteram"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_spritemap(*this, "spritemap"),
+ m_spritemaphi(*this, "spritemaphi"),
+ m_in_gunx(*this, "GUNX%u", 1U),
+ m_in_guny(*this, "GUNY%u", 1U),
+ m_io_fake(*this, "FAKE")
{ }
void undrfire(machine_config &config);
void cbombers(machine_config &config);
- void init_undrfire();
- void init_cbombers();
+ void driver_init() override;
protected:
enum
@@ -44,12 +48,12 @@ protected:
private:
struct uf_tempsprite
{
- int gfx;
- int code,color;
- int flipx,flipy;
+ u8 gfx;
+ u32 code,color;
+ bool flipx,flipy;
int x,y;
int zoomx,zoomy;
- int primask;
+ u32 primask;
};
required_device<cpu_device> m_maincpu;
@@ -57,30 +61,37 @@ private:
required_device<tc0100scn_device> m_tc0100scn;
required_device<tc0480scp_device> m_tc0480scp;
required_device<eeprom_serial_93cxx_device> m_eeprom;
- optional_shared_ptr<uint32_t> m_ram;
- optional_shared_ptr<uint32_t> m_shared_ram;
- uint16_t m_port_sel;
+ optional_shared_ptr<u32> m_ram;
+ optional_shared_ptr<u16> m_shared_ram;
+ u16 m_port_sel;
int m_frame_counter;
std::unique_ptr<uf_tempsprite[]> m_spritelist;
- uint16_t m_rotate_ctrl[8];
- uint8_t m_dislayer[6];
- required_shared_ptr<uint32_t> m_spriteram;
+ u16 m_rotate_ctrl[8];
+ u8 m_dislayer[6];
+ required_shared_ptr<u32> m_spriteram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- DECLARE_WRITE8_MEMBER(coin_word_w);
- DECLARE_READ16_MEMBER(shared_ram_r);
- DECLARE_WRITE16_MEMBER(shared_ram_w);
- DECLARE_READ32_MEMBER(undrfire_lightgun_r);
- DECLARE_WRITE32_MEMBER(rotate_control_w);
- DECLARE_WRITE32_MEMBER(motor_control_w);
- DECLARE_WRITE32_MEMBER(cbombers_cpua_ctrl_w);
+ required_region_ptr<u16> m_spritemap;
+ optional_region_ptr<u8> m_spritemaphi;
+
+ optional_ioport_array<2> m_in_gunx;
+ optional_ioport_array<2> m_in_guny;
+ optional_ioport m_io_fake;
+
+ void coin_word_w(u8 data);
+ u16 shared_ram_r(offs_t offset);
+ void shared_ram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
+ u32 undrfire_lightgun_r(offs_t offset);
+ void rotate_control_w(offs_t offset, u16 data);
+ void motor_control_w(u8 data);
+ void cbombers_cpua_ctrl_w(u32 data);
DECLARE_READ_LINE_MEMBER(frame_counter_r);
- uint32_t screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- uint32_t screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(undrfire_interrupt);
- void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs);
- void draw_sprites_cbombers(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs);
+ void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect,const u32 *primasks,int x_offs,int y_offs);
+ void draw_sprites_cbombers(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect,const u32 *primasks,int x_offs,int y_offs);
void cbombers_cpua_map(address_map &map);
void cbombers_cpub_map(address_map &map);