diff options
Diffstat (limited to 'src/mame/includes/pocketc.h')
-rw-r--r-- | src/mame/includes/pocketc.h | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/src/mame/includes/pocketc.h b/src/mame/includes/pocketc.h index 51e6865b246..6b21c0b07b1 100644 --- a/src/mame/includes/pocketc.h +++ b/src/mame/includes/pocketc.h @@ -9,26 +9,59 @@ #ifndef MAME_INCLUDES_POCKETC_H #define MAME_INCLUDES_POCKETC_H +#include "cpu/sc61860/sc61860.h" +#include "machine/nvram.h" #include "emupal.h" - -typedef const char *POCKETC_FIGURE[]; +#include "screen.h" class pocketc_state : public driver_device { public: pocketc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") + , m_screen(*this, "screen") + , m_cpu_nvram(*this, "cpu_nvram") + , m_ram_nvram(*this, "ram_nvram") + , m_dsw0(*this, "DSW0") + , m_extra(*this, "EXTRA") + , m_power_timer(nullptr) + { } - void pocketc(machine_config &config); + void pocketc_base(machine_config &config); protected: - void pocketc_draw_special(bitmap_ind16 &bitmap,int x, int y, const POCKETC_FIGURE fig, int color); - - static const unsigned short pocketc_colortable[8][2]; + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; -private: DECLARE_PALETTE_INIT(pocketc); + void pocketc_draw_special(bitmap_ind16 &bitmap,int x, int y, const char* const *fig, int color); + + static const device_timer_id TIMER_POWER_UP = 0; + + DECLARE_WRITE8_MEMBER(out_a_w); + DECLARE_READ_LINE_MEMBER(brk_r); + + required_device<sc61860_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + required_device<screen_device> m_screen; + required_device<nvram_device> m_cpu_nvram; + required_device<nvram_device> m_ram_nvram; + required_ioport m_dsw0; + required_ioport m_extra; + + uint8_t m_outa; + uint8_t m_outb; + int m_power; + emu_timer *m_power_timer; + + static const int colortable[8][2]; + static const rgb_t indirect_palette[6]; }; #endif // MAME_INCLUDES_POCKETC_H |