1 // license:BSD-3-Clause 2 // copyright-holders:Uki 3 /************************************************************************* 4 5 Momoko 120% 6 7 *************************************************************************/ 8 #ifndef MAME_INCLUDES_MOMOKO_H 9 #define MAME_INCLUDES_MOMOKO_H 10 11 #pragma once 12 13 #include "emupal.h" 14 15 class momoko_state : public driver_device 16 { 17 public: momoko_state(const machine_config & mconfig,device_type type,const char * tag)18 momoko_state(const machine_config &mconfig, device_type type, const char *tag) : 19 driver_device(mconfig, type, tag), 20 m_spriteram(*this, "spriteram"), 21 m_videoram(*this, "videoram"), 22 m_bg_scrolly(*this, "bg_scrolly"), 23 m_bg_scrollx(*this, "bg_scrollx"), 24 m_bg_gfx(*this, "bg_gfx"), 25 m_bg_map(*this, "bg_map"), 26 m_bg_col_map(*this, "bg_col_map"), 27 m_fg_map(*this, "fg_map"), 28 m_proms(*this, "proms"), 29 m_bgbank(*this, "bgbank"), 30 m_io_fake(*this, "FAKE"), 31 m_maincpu(*this, "maincpu"), 32 m_gfxdecode(*this, "gfxdecode"), 33 m_palette(*this, "palette") 34 { } 35 36 void momoko(machine_config &config); 37 38 private: 39 /* memory pointers */ 40 required_shared_ptr<u8> m_spriteram; 41 required_shared_ptr<u8> m_videoram; 42 required_shared_ptr<u8> m_bg_scrolly; 43 required_shared_ptr<u8> m_bg_scrollx; 44 required_region_ptr<u8> m_bg_gfx; 45 required_region_ptr<u8> m_bg_map; 46 required_region_ptr<u8> m_bg_col_map; 47 required_region_ptr<u8> m_fg_map; 48 required_region_ptr<u8> m_proms; 49 required_memory_bank m_bgbank; 50 required_ioport m_io_fake; 51 52 /* video-related */ 53 u8 m_fg_scrollx; 54 u8 m_fg_scrolly; 55 u8 m_fg_select; 56 u8 m_text_scrolly; 57 u8 m_text_mode; 58 u8 m_bg_select; 59 u8 m_bg_priority; 60 u8 m_bg_mask; 61 u8 m_fg_mask; 62 u8 m_flipscreen; 63 void bg_read_bank_w(u8 data); 64 void fg_scrollx_w(u8 data); 65 void fg_scrolly_w(u8 data); 66 void fg_select_w(u8 data); 67 void text_scrolly_w(u8 data); 68 void text_mode_w(u8 data); 69 void bg_scrollx_w(offs_t offset, u8 data); 70 void bg_scrolly_w(offs_t offset, u8 data); 71 void bg_select_w(u8 data); 72 void bg_priority_w(u8 data); 73 void flipscreen_w(u8 data); 74 virtual void machine_start() override; 75 virtual void machine_reset() override; 76 u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 77 void draw_bg_pri(bitmap_ind16 &bitmap, int chr, int col, int flipx, int flipy, int x, int y, int pri); 78 required_device<cpu_device> m_maincpu; 79 required_device<gfxdecode_device> m_gfxdecode; 80 required_device<palette_device> m_palette; 81 void momoko_map(address_map &map); 82 void momoko_sound_map(address_map &map); 83 }; 84 85 #endif // MAME_INCLUDES_MOMOKO_H 86