summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/m52.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/m52.h')
-rw-r--r--src/mame/includes/m52.h67
1 files changed, 50 insertions, 17 deletions
diff --git a/src/mame/includes/m52.h b/src/mame/includes/m52.h
index 5d77946b3f6..04cc7316a6b 100644
--- a/src/mame/includes/m52.h
+++ b/src/mame/includes/m52.h
@@ -13,12 +13,30 @@ public:
m_colorram(*this, "colorram"),
m_spriteram(*this, "spriteram"),
m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
+ m_sp_gfxdecode(*this, "sp_gfxdecode"),
+ m_tx_gfxdecode(*this, "tx_gfxdecode"),
+ m_bg_gfxdecode(*this, "bg_gfxdecode"),
m_screen(*this, "screen"),
- m_palette(*this, "palette") { }
+ m_sp_palette(*this, "sp_palette"),
+ m_tx_palette(*this, "tx_palette"),
+ m_bg_palette(*this, "bg_palette")
+ { }
void m52(machine_config &config);
- void alpha1v(machine_config &config);
+
+ DECLARE_WRITE8_MEMBER(m52_videoram_w);
+ DECLARE_WRITE8_MEMBER(m52_colorram_w);
+ DECLARE_READ8_MEMBER(m52_protection_r);
+
+protected:
+ virtual void video_start() override;
+ virtual DECLARE_WRITE8_MEMBER(m52_scroll_w);
+
+ /* board mod changes? */
+ int m_spritelimit;
+ bool m_do_bg_fills;
+
+ tilemap_t* m_tx_tilemap;
private:
/* memory pointers */
@@ -27,35 +45,50 @@ private:
optional_shared_ptr<uint8_t> m_spriteram;
/* video-related */
- tilemap_t* m_bg_tilemap;
uint8_t m_bg1xpos;
uint8_t m_bg1ypos;
uint8_t m_bg2xpos;
uint8_t m_bg2ypos;
uint8_t m_bgcontrol;
- DECLARE_WRITE8_MEMBER(m52_scroll_w);
- DECLARE_WRITE8_MEMBER(m52_videoram_w);
- DECLARE_WRITE8_MEMBER(m52_colorram_w);
- DECLARE_READ8_MEMBER(m52_protection_r);
DECLARE_WRITE8_MEMBER(m52_bg1ypos_w);
DECLARE_WRITE8_MEMBER(m52_bg1xpos_w);
DECLARE_WRITE8_MEMBER(m52_bg2xpos_w);
DECLARE_WRITE8_MEMBER(m52_bg2ypos_w);
DECLARE_WRITE8_MEMBER(m52_bgcontrol_w);
DECLARE_WRITE8_MEMBER(m52_flipscreen_w);
- DECLARE_WRITE8_MEMBER(alpha1v_flipscreen_w);
TILE_GET_INFO_MEMBER(get_tile_info);
virtual void machine_reset() override;
- virtual void video_start() override;
- DECLARE_PALETTE_INIT(m52);
- uint32_t screen_update_m52(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect, int xpos, int ypos, int image);
- void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int initoffs);
+ void init_palette();
+ void init_sprite_palette(const int *resistances_3, const int *resistances_2, double *weights_r, double *weights_g, double *weights_b, double scale);
+ uint32_t screen_update_m52(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect, int xpos, int ypos, int image);
+ void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, int initoffs);
required_device<cpu_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
+ required_device<gfxdecode_device> m_sp_gfxdecode;
+ required_device<gfxdecode_device> m_tx_gfxdecode;
+ required_device<gfxdecode_device> m_bg_gfxdecode;
required_device<screen_device> m_screen;
- required_device<palette_device> m_palette;
- void alpha1v_map(address_map &map);
+ required_device<palette_device> m_sp_palette;
+ required_device<palette_device> m_tx_palette;
+ required_device<palette_device> m_bg_palette;
void main_map(address_map &map);
void main_portmap(address_map &map);
};
+
+class m52_alpha1v_state : public m52_state
+{
+public:
+ m52_alpha1v_state(const machine_config &mconfig, device_type type, const char *tag)
+ : m52_state(mconfig, type, tag)
+ { }
+
+ void alpha1v(machine_config &config);
+
+ void alpha1v_map(address_map &map);
+
+protected:
+ virtual void video_start() override;
+ virtual DECLARE_WRITE8_MEMBER(m52_scroll_w) override;
+ DECLARE_WRITE8_MEMBER(alpha1v_flipscreen_w);
+
+}; \ No newline at end of file