1 // license:BSD-3-Clause 2 // copyright-holders:Nicola Salmoria 3 /************************************************************************* 4 5 Oh My God! 6 7 *************************************************************************/ 8 #ifndef MAME_INCLUDES_OHMYGOD_H 9 #define MAME_INCLUDES_OHMYGOD_H 10 11 #pragma once 12 13 #include "emupal.h" 14 #include "tilemap.h" 15 16 class ohmygod_state : public driver_device 17 { 18 public: ohmygod_state(const machine_config & mconfig,device_type type,const char * tag)19 ohmygod_state(const machine_config &mconfig, device_type type, const char *tag) : 20 driver_device(mconfig, type, tag), 21 m_videoram(*this, "videoram"), 22 m_spriteram(*this, "spriteram"), 23 m_maincpu(*this, "maincpu"), 24 m_gfxdecode(*this, "gfxdecode"), 25 m_palette(*this, "palette") 26 { } 27 28 void ohmygod(machine_config &config); 29 30 void init_ohmygod(); 31 void init_naname(); 32 33 private: 34 void ohmygod_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 35 void ohmygod_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 36 void ohmygod_spritebank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 37 void ohmygod_scrollx_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 38 void ohmygod_scrolly_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); 39 TILE_GET_INFO_MEMBER(get_tile_info); 40 virtual void machine_start() override; 41 virtual void machine_reset() override; 42 virtual void video_start() override; 43 uint32_t screen_update_ohmygod(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 44 void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); 45 void ohmygod_map(address_map &map); 46 void oki_map(address_map &map); 47 48 /* memory pointers */ 49 required_shared_ptr<uint16_t> m_videoram; 50 required_shared_ptr<uint16_t> m_spriteram; 51 52 /* video-related */ 53 tilemap_t *m_bg_tilemap; 54 int m_spritebank; 55 uint16_t m_scrollx; 56 uint16_t m_scrolly; 57 58 /* misc */ 59 int m_adpcm_bank_shift; 60 int m_sndbank; 61 62 required_device<cpu_device> m_maincpu; 63 required_device<gfxdecode_device> m_gfxdecode; 64 required_device<palette_device> m_palette; 65 }; 66 67 #endif // MAME_INCLUDES_OHMYGOD_H 68