trunk/src/mess/machine/kb_pcxt83.c
| r0 | r23837 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | IBM PC/XT 5150/5160 83-key keyboard emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | *********************************************************************/ |
| 9 | |
| 10 | #include "kb_pcxt83.h" |
| 11 | |
| 12 | |
| 13 | |
| 14 | //************************************************************************** |
| 15 | // MACROS / CONSTANTS |
| 16 | //************************************************************************** |
| 17 | |
| 18 | #define I8048_TAG "i8048" |
| 19 | |
| 20 | |
| 21 | |
| 22 | //************************************************************************** |
| 23 | // DEVICE DEFINITIONS |
| 24 | //************************************************************************** |
| 25 | |
| 26 | const device_type PC_KBD_IBM_PC_XT_83 = &device_creator<ibm_pc_xt_83_keyboard_device>; |
| 27 | |
| 28 | |
| 29 | //------------------------------------------------- |
| 30 | // ROM( ibm_pc_xt_83_keyboard ) |
| 31 | //------------------------------------------------- |
| 32 | |
| 33 | ROM_START( ibm_pc_xt_83_keyboard ) |
| 34 | ROM_REGION( 0x400, I8048_TAG, 0 ) |
| 35 | /* |
| 36 | MOI 74 01 |
| 37 | PN 4584751 |
| 38 | GX 344231 |
| 39 | |
| 40 | i 4429745 |
| 41 | ZO P 379297 |
| 42 | 8143 P |
| 43 | (C) INTEL 76 |
| 44 | */ |
| 45 | ROM_LOAD( "4584751.bin", 0x000, 0x400, CRC(c59aa9d1) SHA1(4f5b2a075c68f6493310ec1e2a24271ceea330df) ) |
| 46 | ROM_END |
| 47 | |
| 48 | |
| 49 | //------------------------------------------------- |
| 50 | // rom_region - device-specific ROM region |
| 51 | //------------------------------------------------- |
| 52 | |
| 53 | const rom_entry *ibm_pc_xt_83_keyboard_device::device_rom_region() const |
| 54 | { |
| 55 | return ROM_NAME( ibm_pc_xt_83_keyboard ); |
| 56 | } |
| 57 | |
| 58 | |
| 59 | //------------------------------------------------- |
| 60 | // ADDRESS_MAP( kb_io ) |
| 61 | //------------------------------------------------- |
| 62 | |
| 63 | static ADDRESS_MAP_START( ibm_pc_xt_83_keyboard_io, AS_IO, 8, ibm_pc_xt_83_keyboard_device ) |
| 64 | ADDRESS_MAP_END |
| 65 | |
| 66 | |
| 67 | //------------------------------------------------- |
| 68 | // MACHINE_DRIVER( ibm_pc_xt_83_keyboard ) |
| 69 | //------------------------------------------------- |
| 70 | |
| 71 | static MACHINE_CONFIG_FRAGMENT( ibm_pc_xt_83_keyboard ) |
| 72 | MCFG_CPU_ADD(I8048_TAG, I8048, 4000000) |
| 73 | MCFG_CPU_IO_MAP(ibm_pc_xt_83_keyboard_io) |
| 74 | MACHINE_CONFIG_END |
| 75 | |
| 76 | |
| 77 | //------------------------------------------------- |
| 78 | // machine_config_additions - device-specific |
| 79 | // machine configurations |
| 80 | //------------------------------------------------- |
| 81 | |
| 82 | machine_config_constructor ibm_pc_xt_83_keyboard_device::device_mconfig_additions() const |
| 83 | { |
| 84 | return MACHINE_CONFIG_NAME( ibm_pc_xt_83_keyboard ); |
| 85 | } |
| 86 | |
| 87 | |
| 88 | //------------------------------------------------- |
| 89 | // INPUT_PORTS( ibm_pc_xt_83_keyboard ) |
| 90 | //------------------------------------------------- |
| 91 | |
| 92 | INPUT_PORTS_START( ibm_pc_xt_83_keyboard ) |
| 93 | INPUT_PORTS_END |
| 94 | |
| 95 | |
| 96 | //------------------------------------------------- |
| 97 | // input_ports - device-specific input ports |
| 98 | //------------------------------------------------- |
| 99 | |
| 100 | ioport_constructor ibm_pc_xt_83_keyboard_device::device_input_ports() const |
| 101 | { |
| 102 | return INPUT_PORTS_NAME( ibm_pc_xt_83_keyboard ); |
| 103 | } |
| 104 | |
| 105 | |
| 106 | |
| 107 | //************************************************************************** |
| 108 | // LIVE DEVICE |
| 109 | //************************************************************************** |
| 110 | |
| 111 | //------------------------------------------------- |
| 112 | // ibm_pc_xt_83_keyboard_device - constructor |
| 113 | //------------------------------------------------- |
| 114 | |
| 115 | ibm_pc_xt_83_keyboard_device::ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 116 | : device_t(mconfig, PC_KBD_IBM_PC_XT_83, "IBM PC/XT 5150/5160 Keyboard", tag, owner, clock, "kb_pcxt83", __FILE__), |
| 117 | device_pc_kbd_interface(mconfig, *this), |
| 118 | m_maincpu(*this, I8048_TAG) |
| 119 | { |
| 120 | } |
| 121 | |
| 122 | |
| 123 | //------------------------------------------------- |
| 124 | // device_start - device-specific startup |
| 125 | //------------------------------------------------- |
| 126 | |
| 127 | void ibm_pc_xt_83_keyboard_device::device_start() |
| 128 | { |
| 129 | } |
| 130 | |
| 131 | |
| 132 | //------------------------------------------------- |
| 133 | // device_reset - device-specific reset |
| 134 | //------------------------------------------------- |
| 135 | |
| 136 | void ibm_pc_xt_83_keyboard_device::device_reset() |
| 137 | { |
| 138 | } |
| 139 | |
| 140 | |
| 141 | //------------------------------------------------- |
| 142 | // clock_write - |
| 143 | //------------------------------------------------- |
| 144 | |
| 145 | WRITE_LINE_MEMBER( ibm_pc_xt_83_keyboard_device::clock_write ) |
| 146 | { |
| 147 | } |
| 148 | |
| 149 | |
| 150 | //------------------------------------------------- |
| 151 | // data_write - |
| 152 | //------------------------------------------------- |
| 153 | |
| 154 | WRITE_LINE_MEMBER( ibm_pc_xt_83_keyboard_device::data_write ) |
| 155 | { |
| 156 | } |
trunk/src/mess/machine/kb_pcxt83.h
| r0 | r23837 | |
| 1 | /********************************************************************** |
| 2 | |
| 3 | IBM PC/XT 5150/5160 83-key keyboard emulation |
| 4 | |
| 5 | Copyright MESS Team. |
| 6 | Visit http://mamedev.org for licensing and usage restrictions. |
| 7 | |
| 8 | *********************************************************************/ |
| 9 | |
| 10 | #pragma once |
| 11 | |
| 12 | #ifndef __PCXT83_KEYBOARD__ |
| 13 | #define __PCXT83_KEYBOARD__ |
| 14 | |
| 15 | #include "emu.h" |
| 16 | #include "cpu/mcs48/mcs48.h" |
| 17 | #include "machine/pc_kbdc.h" |
| 18 | |
| 19 | |
| 20 | |
| 21 | //************************************************************************** |
| 22 | // TYPE DEFINITIONS |
| 23 | //************************************************************************** |
| 24 | |
| 25 | // ======================> ibm_pc_xt_83_keyboard_device |
| 26 | |
| 27 | class ibm_pc_xt_83_keyboard_device : public device_t, |
| 28 | public device_pc_kbd_interface |
| 29 | { |
| 30 | public: |
| 31 | // construction/destruction |
| 32 | ibm_pc_xt_83_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 33 | |
| 34 | // optional information overrides |
| 35 | virtual const rom_entry *device_rom_region() const; |
| 36 | virtual machine_config_constructor device_mconfig_additions() const; |
| 37 | virtual ioport_constructor device_input_ports() const; |
| 38 | |
| 39 | protected: |
| 40 | // device-level overrides |
| 41 | virtual void device_start(); |
| 42 | virtual void device_reset(); |
| 43 | |
| 44 | // device_pc_kbd_interface overrides |
| 45 | virtual DECLARE_WRITE_LINE_MEMBER( clock_write ); |
| 46 | virtual DECLARE_WRITE_LINE_MEMBER( data_write ); |
| 47 | |
| 48 | private: |
| 49 | required_device<cpu_device> m_maincpu; |
| 50 | }; |
| 51 | |
| 52 | |
| 53 | // device type definition |
| 54 | extern const device_type PC_KBD_IBM_PC_XT_83; |
| 55 | |
| 56 | |
| 57 | |
| 58 | #endif |