1 // license:GPL-2.0+ 2 // copyright-holders:Peter Trauner 3 /***************************************************************************** 4 * 5 * includes/pocketc.h 6 * 7 ****************************************************************************/ 8 #ifndef MAME_INCLUDES_POCKETC_H 9 #define MAME_INCLUDES_POCKETC_H 10 11 #pragma once 12 13 #include "cpu/sc61860/sc61860.h" 14 #include "machine/nvram.h" 15 #include "emupal.h" 16 #include "screen.h" 17 18 class pocketc_state : public driver_device 19 { 20 public: pocketc_state(const machine_config & mconfig,device_type type,const char * tag)21 pocketc_state(const machine_config &mconfig, device_type type, const char *tag) 22 : driver_device(mconfig, type, tag) 23 , m_maincpu(*this, "maincpu") 24 , m_gfxdecode(*this, "gfxdecode") 25 , m_palette(*this, "palette") 26 , m_screen(*this, "screen") 27 , m_cpu_nvram(*this, "cpu_nvram") 28 , m_ram_nvram(*this, "ram_nvram") 29 , m_dsw0(*this, "DSW0") 30 , m_extra(*this, "EXTRA") 31 , m_power_timer(nullptr) 32 { } 33 34 void pocketc_base(machine_config &config); 35 36 protected: 37 static const device_timer_id TIMER_POWER_UP = 0; 38 39 virtual void machine_start() override; 40 virtual void machine_reset() override; 41 virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; 42 43 void pocketc_palette(palette_device &palette) const; 44 45 void pocketc_draw_special(bitmap_ind16 &bitmap,int x, int y, const char* const *fig, int color); 46 47 void out_a_w(uint8_t data); 48 DECLARE_READ_LINE_MEMBER(brk_r); 49 50 required_device<sc61860_device> m_maincpu; 51 required_device<gfxdecode_device> m_gfxdecode; 52 required_device<palette_device> m_palette; 53 required_device<screen_device> m_screen; 54 required_device<nvram_device> m_cpu_nvram; 55 required_device<nvram_device> m_ram_nvram; 56 required_ioport m_dsw0; 57 required_ioport m_extra; 58 59 uint8_t m_outa; 60 uint8_t m_outb; 61 int m_power; 62 emu_timer *m_power_timer; 63 64 static const int colortable[8][2]; 65 static const rgb_t indirect_palette[6]; 66 }; 67 68 #endif // MAME_INCLUDES_POCKETC_H 69