summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/pc1403.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/pc1403.h')
-rw-r--r--src/mame/includes/pc1403.h94
1 files changed, 53 insertions, 41 deletions
diff --git a/src/mame/includes/pc1403.h b/src/mame/includes/pc1403.h
index 8223728d380..0b6d1641150 100644
--- a/src/mame/includes/pc1403.h
+++ b/src/mame/includes/pc1403.h
@@ -12,61 +12,73 @@
#define MAME_INCLUDES_PC1403_H
#include "pocketc.h"
-#include "cpu/sc61860/sc61860.h"
-#include "machine/nvram.h"
-#include "emupal.h"
-
-#define CONTRAST (ioport("DSW0")->read() & 0x07)
-
class pc1403_state : public pocketc_state
{
public:
- enum
- {
- TIMER_POWER_UP
- };
-
pc1403_state(const machine_config &mconfig, device_type type, const char *tag)
- : pocketc_state(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ : pocketc_state(mconfig, type, tag)
+ , m_keys(*this, "KEY%u", 0U)
+ { }
- uint8_t m_portc;
- uint8_t m_outa;
- int m_power;
- uint8_t m_asic[4];
- int m_DOWN;
- int m_RIGHT;
- uint8_t m_reg[0x100];
+ void pc1403(machine_config &config);
+ void pc1403h(machine_config &config);
- void init_pc1403();
- uint32_t screen_update_pc1403(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_READ_LINE_MEMBER(pc1403_reset);
- DECLARE_READ_LINE_MEMBER(pc1403_brk);
- DECLARE_WRITE8_MEMBER(pc1403_outa);
- DECLARE_WRITE8_MEMBER(pc1403_outc);
- DECLARE_READ8_MEMBER(pc1403_ina);
-
- DECLARE_READ8_MEMBER(pc1403_asic_read);
- DECLARE_WRITE8_MEMBER(pc1403_asic_write);
- DECLARE_READ8_MEMBER(pc1403_lcd_read);
- DECLARE_WRITE8_MEMBER(pc1403_lcd_write);
- virtual void video_start() override;
+protected:
virtual void machine_start() override;
- required_device<sc61860_device> m_maincpu;
- required_device<gfxdecode_device> m_gfxdecode;
- required_device<palette_device> m_palette;
+ virtual void video_start() override;
+
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void pc1403h(machine_config &config);
- void pc1403(machine_config &config);
void pc1403_mem(address_map &map);
void pc1403h_mem(address_map &map);
void pc1421_readmem(address_map &map);
void pc1421_writemem(address_map &map);
+
+ DECLARE_READ_LINE_MEMBER(reset_r);
+ DECLARE_WRITE8_MEMBER(out_c_w);
+ DECLARE_READ8_MEMBER(in_a_r);
+
+ DECLARE_READ8_MEMBER(asic_read);
+ DECLARE_WRITE8_MEMBER(asic_write);
+ DECLARE_READ8_MEMBER(lcd_read);
+ DECLARE_WRITE8_MEMBER(lcd_write);
+
+ int m_down;
+ int m_right;
+
+private:
+ required_ioport_array<14> m_keys;
+
+ uint8_t m_portc;
+ uint8_t m_asic[4];
+ uint8_t m_reg[0x100];
+
+ static const char* const s_line[5];
+ static const char* const s_busy[5];
+ static const char* const s_def[5];
+ static const char* const s_shift[5];
+ static const char* const s_hyp[5];
+ static const char* const s_de[5];
+ static const char* const s_g[5];
+ static const char* const s_rad[5];
+ static const char* const s_braces[5];
+ static const char* const s_m[5];
+ static const char* const s_e[5];
+ static const char* const s_kana[5];
+ static const char* const s_shoo[5];
+ static const char* const s_sml[5];
+};
+
+class pc1403h_state : public pc1403_state
+{
+public:
+ pc1403h_state(const machine_config &mconfig, device_type type, const char *tag)
+ : pc1403_state(mconfig, type, tag)
+ { }
+
protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void video_start() override;
};
#endif // MAME_INCLUDES_PC1403_H