1 // license:BSD-3-Clause 2 // copyright-holders:Nicola Salmoria 3 #ifndef MAME_INCLUDES_HEXION_H 4 #define MAME_INCLUDES_HEXION_H 5 6 #pragma once 7 8 #include "machine/k053252.h" 9 #include "machine/timer.h" 10 #include "emupal.h" 11 #include "tilemap.h" 12 13 class hexion_state : public driver_device 14 { 15 public: hexion_state(const machine_config & mconfig,device_type type,const char * tag)16 hexion_state(const machine_config &mconfig, device_type type, const char *tag) : 17 driver_device(mconfig, type, tag), 18 m_maincpu(*this, "maincpu"), 19 m_k053252(*this, "k053252"), 20 m_gfxdecode(*this, "gfxdecode"), 21 m_palette(*this, "palette") 22 { } 23 24 void hexion(machine_config &config); 25 void hexionb(machine_config &config); 26 27 private: 28 required_device<cpu_device> m_maincpu; 29 required_device<k053252_device> m_k053252; 30 required_device<gfxdecode_device> m_gfxdecode; 31 required_device<palette_device> m_palette; 32 33 uint8_t *m_vram[2]; 34 uint8_t *m_unkram; 35 int m_bankctrl; 36 int m_rambank; 37 int m_pmcbank; 38 int m_gfxrom_select; 39 int m_ccu_int_time; 40 int m_ccu_int_time_count; 41 tilemap_t *m_bg_tilemap[2]; 42 43 void coincntr_w(uint8_t data); 44 void bankswitch_w(uint8_t data); 45 uint8_t bankedram_r(offs_t offset); 46 void bankedram_w(offs_t offset, uint8_t data); 47 void bankctrl_w(uint8_t data); 48 void gfxrom_select_w(uint8_t data); 49 DECLARE_WRITE_LINE_MEMBER(irq_ack_w); 50 DECLARE_WRITE_LINE_MEMBER(nmi_ack_w); 51 void ccu_int_time_w(uint8_t data); 52 53 TILE_GET_INFO_MEMBER(get_tile_info0); 54 TILE_GET_INFO_MEMBER(get_tile_info1); 55 56 TIMER_DEVICE_CALLBACK_MEMBER(scanline); 57 58 virtual void video_start() override; 59 60 uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 61 inline void get_tile_info(tile_data &tileinfo,int tile_index,uint8_t *ram); 62 void hexion_map(address_map &map); 63 void hexionb_map(address_map &map); 64 }; 65 66 #endif // MAME_INCLUDES_HEXION_H 67