summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/20pacgal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/20pacgal.h')
-rw-r--r--src/mame/includes/20pacgal.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h
index 179f9fe4113..119c2242e0c 100644
--- a/src/mame/includes/20pacgal.h
+++ b/src/mame/includes/20pacgal.h
@@ -14,15 +14,18 @@
class _20pacgal_state : public driver_device
{
public:
- _20pacgal_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ _20pacgal_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_video_ram(*this, "video_ram"),
m_char_gfx_ram(*this, "char_gfx_ram"),
m_stars_seed(*this, "stars_seed"),
m_stars_ctrl(*this, "stars_ctrl"),
m_flip(*this, "flip"),
+ m_proms(*this, "proms"),
+ m_mainbank(*this, "mainbank"),
m_maincpu(*this, "maincpu"),
- m_eeprom(*this, "eeprom") { }
+ m_eeprom(*this, "eeprom"),
+ m_palette(*this, "palette") { }
/* memory pointers */
required_shared_ptr<uint8_t> m_video_ram;
@@ -31,18 +34,22 @@ public:
required_shared_ptr<uint8_t> m_stars_ctrl;
required_shared_ptr<uint8_t> m_flip;
+ optional_memory_region m_proms;
+ optional_memory_bank m_mainbank;
+
/* machine state */
uint8_t m_game_selected; /* 0 = Ms. Pac-Man, 1 = Galaga */
/* devices */
required_device<cpu_device> m_maincpu;
required_device<eeprom_serial_93cxx_device> m_eeprom;
+ required_device<palette_device> m_palette;
/* memory */
- uint8_t m_sprite_gfx_ram[0x2000];
- uint8_t m_sprite_ram[0x180];
- uint8_t m_sprite_color_lookup[0x100];
- uint8_t m_ram_48000[0x2000];
+ std::unique_ptr<uint8_t[]> m_sprite_gfx_ram;
+ std::unique_ptr<uint8_t[]> m_sprite_ram;
+ std::unique_ptr<uint8_t[]> m_sprite_color_lookup;
+ std::unique_ptr<uint8_t[]> m_ram_48000;
/* 25pacman and 20pacgal store the sprite palette at a different address, this is a hardware difference and confirmed NOT to be a register */
uint8_t m_sprite_pal_base;
@@ -60,14 +67,16 @@ public:
void init_20pacgal();
virtual void machine_start() override;
virtual void machine_reset() override;
+ virtual void video_start() override;
uint32_t screen_update_20pacgal(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(vblank_irq);
- void get_pens(pen_t *pens);
+ DECLARE_PALETTE_INIT(starpal_init);
+ void get_pens();
void do_pen_lookup(bitmap_rgb32 &bitmap, const rectangle &cliprect);
- void draw_sprites(bitmap_rgb32 &bitmap);
- void draw_chars(bitmap_rgb32 &bitmap);
- void draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect );
- void draw_sprite(bitmap_rgb32 &bitmap, int y, int x,
+ void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void draw_chars(bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void draw_stars(bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void draw_sprite(bitmap_rgb32 &bitmap, const rectangle &cliprect, int y, int x,
uint8_t code, uint8_t color, int flip_y, int flip_x);
void common_save_state();
void _20pacgal(machine_config &config);