1 // license:GPL-2.0+ 2 // copyright-holders:Peter Trauner 3 /***************************************************************************** 4 * 5 * includes/pc1403.h 6 * 7 * Pocket Computer 1403 8 * 9 ****************************************************************************/ 10 11 #ifndef MAME_INCLUDES_PC1403_H 12 #define MAME_INCLUDES_PC1403_H 13 14 #include "pocketc.h" 15 16 class pc1403_state : public pocketc_state 17 { 18 public: pc1403_state(const machine_config & mconfig,device_type type,const char * tag)19 pc1403_state(const machine_config &mconfig, device_type type, const char *tag) 20 : pocketc_state(mconfig, type, tag) 21 , m_keys(*this, "KEY%u", 0U) 22 { } 23 24 void pc1403(machine_config &config); 25 void pc1403h(machine_config &config); 26 27 protected: 28 virtual void machine_start() override; 29 virtual void video_start() override; 30 31 uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); 32 33 void pc1403_mem(address_map &map); 34 void pc1403h_mem(address_map &map); 35 void pc1421_readmem(address_map &map); 36 void pc1421_writemem(address_map &map); 37 38 DECLARE_READ_LINE_MEMBER(reset_r); 39 void out_c_w(uint8_t data); 40 uint8_t in_a_r(); 41 42 uint8_t asic_read(offs_t offset); 43 void asic_write(offs_t offset, uint8_t data); 44 uint8_t lcd_read(offs_t offset); 45 void lcd_write(offs_t offset, uint8_t data); 46 47 int m_down; 48 int m_right; 49 50 private: 51 required_ioport_array<14> m_keys; 52 53 uint8_t m_portc; 54 uint8_t m_asic[4]; 55 uint8_t m_reg[0x100]; 56 57 static const char* const s_line[5]; 58 static const char* const s_busy[5]; 59 static const char* const s_def[5]; 60 static const char* const s_shift[5]; 61 static const char* const s_hyp[5]; 62 static const char* const s_de[5]; 63 static const char* const s_g[5]; 64 static const char* const s_rad[5]; 65 static const char* const s_braces[5]; 66 static const char* const s_m[5]; 67 static const char* const s_e[5]; 68 static const char* const s_kana[5]; 69 static const char* const s_shoo[5]; 70 static const char* const s_sml[5]; 71 }; 72 73 class pc1403h_state : public pc1403_state 74 { 75 public: pc1403h_state(const machine_config & mconfig,device_type type,const char * tag)76 pc1403h_state(const machine_config &mconfig, device_type type, const char *tag) 77 : pc1403_state(mconfig, type, tag) 78 { } 79 80 protected: 81 virtual void video_start() override; 82 }; 83 84 #endif // MAME_INCLUDES_PC1403_H 85