1 // license:BSD-3-Clause 2 // copyright-holders:Ville Laitinen, Aaron Giles 3 /*************************************************************************** 4 5 Sun Electronics Kangaroo hardware 6 7 driver by Ville Laitinen 8 9 ***************************************************************************/ 10 11 #include "emupal.h" 12 13 class kangaroo_state : public driver_device 14 { 15 public: kangaroo_state(const machine_config & mconfig,device_type type,const char * tag)16 kangaroo_state(const machine_config &mconfig, device_type type, const char *tag) 17 : driver_device(mconfig, type, tag), 18 m_video_control(*this, "video_control"), 19 m_maincpu(*this, "maincpu"), 20 m_palette(*this, "palette") { } 21 22 /* memory pointers */ 23 required_shared_ptr<uint8_t> m_video_control; 24 25 /* video-related */ 26 std::unique_ptr<uint32_t[]> m_videoram; 27 28 /* misc */ 29 uint8_t m_mcu_clock; 30 uint8_t mcu_sim_r(); 31 void mcu_sim_w(uint8_t data); 32 void kangaroo_coin_counter_w(uint8_t data); 33 void kangaroo_videoram_w(offs_t offset, uint8_t data); 34 void kangaroo_video_control_w(offs_t offset, uint8_t data); 35 virtual void machine_start() override; 36 virtual void machine_reset() override; 37 virtual void video_start() override; 38 DECLARE_MACHINE_START(kangaroo_mcu); 39 uint32_t screen_update_kangaroo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); 40 void videoram_write( uint16_t offset, uint8_t data, uint8_t mask ); 41 void blitter_execute( ); 42 required_device<cpu_device> m_maincpu; 43 required_device<palette_device> m_palette; 44 void nomcu(machine_config &config); 45 void mcu(machine_config &config); 46 void main_map(address_map &map); 47 void sound_map(address_map &map); 48 void sound_portmap(address_map &map); 49 }; 50