summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/pc4.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/pc4.h')
-rw-r--r--src/mame/includes/pc4.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/mame/includes/pc4.h b/src/mame/includes/pc4.h
index f799382a865..ed5eac80488 100644
--- a/src/mame/includes/pc4.h
+++ b/src/mame/includes/pc4.h
@@ -5,11 +5,11 @@
VTech Laser PC4
****************************************************************************/
+#ifndef MAME_INCLUDES_PC4_H
+#define MAME_INCLUDES_PC4_H
#pragma once
-#ifndef MAME_INCLUDES_PC4_H
-#define MAME_INCLUDES_PC4_H
#include "sound/beep.h"
#include "emupal.h"
@@ -17,27 +17,34 @@
class pc4_state : public driver_device
{
public:
- pc4_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ pc4_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_beep(*this, "beeper"),
m_region_charset(*this, "charset"),
- m_rombank(*this, "rombank") { }
+ m_rombank(*this, "rombank")
+ { }
- required_device<cpu_device> m_maincpu;
- required_device<beep_device> m_beep;
+ void pc4(machine_config &config);
+
+protected:
+ static const device_timer_id BUSY_TIMER = 0;
+ static const device_timer_id BLINKING_TIMER = 1;
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_start() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
DECLARE_WRITE8_MEMBER( beep_w );
DECLARE_WRITE8_MEMBER( bank_w );
DECLARE_READ8_MEMBER( kb_r );
//LCD controller
- void update_ac(void);
+ void update_ac();
void set_busy_flag(uint16_t usec);
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
DECLARE_WRITE8_MEMBER(lcd_control_w);
DECLARE_READ8_MEMBER(lcd_control_r);
@@ -45,8 +52,10 @@ public:
DECLARE_READ8_MEMBER(lcd_data_r);
DECLARE_WRITE8_MEMBER( lcd_offset_w );
- static const device_timer_id BUSY_TIMER = 0;
- static const device_timer_id BLINKING_TIMER = 1;
+ void pc4_palette(palette_device &palette) const;
+
+ void pc4_io(address_map &map);
+ void pc4_mem(address_map &map);
emu_timer *m_blink_timer;
emu_timer *m_busy_timer;
@@ -65,12 +74,10 @@ public:
int8_t m_disp_shift;
int8_t m_direction;
uint8_t m_blink;
- DECLARE_PALETTE_INIT(pc4);
- void pc4(machine_config &config);
- void pc4_io(address_map &map);
- void pc4_mem(address_map &map);
-protected:
+ required_device<cpu_device> m_maincpu;
+ required_device<beep_device> m_beep;
+
required_memory_region m_region_charset;
required_memory_bank m_rombank;
ioport_port *io_port[8];