diff options
Diffstat (limited to 'src/mame/includes/psychic5.h')
-rw-r--r-- | src/mame/includes/psychic5.h | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/src/mame/includes/psychic5.h b/src/mame/includes/psychic5.h index 9fd56c781ba..3a7c8f33195 100644 --- a/src/mame/includes/psychic5.h +++ b/src/mame/includes/psychic5.h @@ -5,27 +5,38 @@ class psychic5_state : public driver_device public: psychic5_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this, "spriteram"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), m_vrambank(*this, "vrambank"), + m_spriteram(*this, "spriteram"), m_fg_videoram(*this, "fg_videoram"), m_bg_videoram(*this, "bg_videoram"), m_bg_control(*this, "bg_control"), - m_ps5_palette_ram_bg(*this, "palette_ram_bg"), m_ps5_palette_ram_sp(*this, "palette_ram_sp"), m_ps5_palette_ram_tx(*this, "palette_ram_tx") { } + + required_device<cpu_device> m_maincpu; + required_device<cpu_device> m_audiocpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + optional_device<address_map_bank_device> m_vrambank; + required_shared_ptr<UINT8> m_spriteram; + required_shared_ptr<UINT8> m_fg_videoram; + required_shared_ptr<UINT8> m_bg_videoram; + required_shared_ptr<UINT8> m_bg_control; + required_shared_ptr<UINT8> m_ps5_palette_ram_bg; + required_shared_ptr<UINT8> m_ps5_palette_ram_sp; + required_shared_ptr<UINT8> m_ps5_palette_ram_tx; UINT8 m_bank_latch; UINT8 m_ps5_vram_page; UINT8 m_bg_clip_mode; UINT8 m_title_screen; - tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; UINT16 m_palette_intensity; @@ -33,50 +44,44 @@ public: int m_sx1; int m_sy1; int m_sy2; - required_shared_ptr<UINT8> m_spriteram; - DECLARE_READ8_MEMBER(psychic5_bankselect_r); + + DECLARE_READ8_MEMBER(bankselect_r); + DECLARE_READ8_MEMBER(vram_page_select_r); + DECLARE_WRITE8_MEMBER(vram_page_select_w); + DECLARE_WRITE8_MEMBER(fg_videoram_w); + DECLARE_WRITE8_MEMBER(bg_videoram_w); + DECLARE_WRITE8_MEMBER(sprite_col_w); + DECLARE_WRITE8_MEMBER(bg_col_w); + DECLARE_WRITE8_MEMBER(tx_col_w); + + /* psychic5 specific */ + DECLARE_WRITE8_MEMBER(psychic5_coin_counter_w); DECLARE_WRITE8_MEMBER(psychic5_bankselect_w); + DECLARE_WRITE8_MEMBER(psychic5_title_screen_w); + + /* bombsa specific */ DECLARE_WRITE8_MEMBER(bombsa_bankselect_w); - DECLARE_WRITE8_MEMBER(psychic5_coin_counter_w); DECLARE_WRITE8_MEMBER(bombsa_flipscreen_w); - DECLARE_READ8_MEMBER(psychic5_vram_page_select_r); - DECLARE_WRITE8_MEMBER(psychic5_vram_page_select_w); - DECLARE_WRITE8_MEMBER(psychic5_title_screen_w); DECLARE_WRITE8_MEMBER(bombsa_unknown_w); + TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); + virtual void machine_reset(); + DECLARE_MACHINE_START(psychic5); + DECLARE_MACHINE_START(bombsa); + virtual void video_start(); DECLARE_VIDEO_START(psychic5); - DECLARE_VIDEO_RESET(psychic5); DECLARE_VIDEO_START(bombsa); + DECLARE_VIDEO_RESET(psychic5); + + TIMER_DEVICE_CALLBACK_MEMBER(scanline); + UINT32 screen_update_psychic5(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); UINT32 screen_update_bombsa(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - TIMER_DEVICE_CALLBACK_MEMBER(psychic5_scanline); - void psychic5_change_palette(int offset, UINT8* palram, int palbase); - void psychic5_change_bg_palette(int color, int lo_offs, int hi_offs); + void change_palette(int offset, UINT8* palram, int palbase); + void change_bg_palette(int color, int lo_offs, int hi_offs); void set_background_palette_intensity(); void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_background(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(irqhandler); - required_device<cpu_device> m_maincpu; - required_device<cpu_device> m_audiocpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; - optional_device<address_map_bank_device> m_vrambank; - required_shared_ptr<UINT8> m_fg_videoram; - required_shared_ptr<UINT8> m_bg_videoram; - required_shared_ptr<UINT8> m_bg_control; - - required_shared_ptr<UINT8> m_ps5_palette_ram_bg; - required_shared_ptr<UINT8> m_ps5_palette_ram_sp; - required_shared_ptr<UINT8> m_ps5_palette_ram_tx; - - - - DECLARE_WRITE8_MEMBER(fg_videoram_w); - DECLARE_WRITE8_MEMBER(bg_videoram_w); - DECLARE_WRITE8_MEMBER(sprite_col_w); - DECLARE_WRITE8_MEMBER(bg_col_w); - DECLARE_WRITE8_MEMBER(tx_col_w); - }; |