trunk/src/mess/machine/mackbd.c
| r19578 | r19579 | |
| 44 | 44 | ---x Data to Mac |
| 45 | 45 | |
| 46 | 46 | The T1 line is "Option". |
| 47 | |
| 48 | There is a later M0110 keyboard version which uses a GI PIC1657; we do not have a dump of that version. |
| 47 | 49 | */ |
| 48 | 50 | |
| 49 | 51 | |
| r19578 | r19579 | |
| 63 | 65 | |
| 64 | 66 | const device_type MACKBD = &device_creator<mackbd_device>; |
| 65 | 67 | |
| 66 | | // typed in from the listing in the above-cited "IM Underground", but the PDF on Bitsavers is missing a page :( |
| 67 | 68 | ROM_START( mackbd ) |
| 68 | | ROM_REGION(0x400, MACKBD_CPU_TAG, 0) |
| 69 | | ROM_LOAD( "mackbd.bin", 0x0000, 0x0400, BAD_DUMP CRC(c9af25a5) SHA1(4a6f81da036b071d2ea090cbde78e11c43a3b3b3) ) |
| 69 | ROM_REGION(0x800, MACKBD_CPU_TAG, 0) |
| 70 | // original Mac keyboard and optional external keypad |
| 71 | ROM_LOAD( "ip8021h_2173.bin", 0x000000, 0x000400, CRC(5fbd9a94) SHA1(32a3b58afb445a8675b12a4de3aec2fa00c99222) ) |
| 72 | // Mac Plus all-in-one keyboard (not yet supported) |
| 73 | ROM_LOAD( "341-0332-a.bin", 0x000400, 0x000400, CRC(6554f5b6) SHA1(a80404a122d74721cda13b285c412057c2c78bd7) ) |
| 70 | 74 | ROM_END |
| 71 | 75 | |
| 72 | 76 | //------------------------------------------------- |
| r19578 | r19579 | |
| 74 | 78 | //------------------------------------------------- |
| 75 | 79 | |
| 76 | 80 | static ADDRESS_MAP_START( mackbd_map, AS_PROGRAM, 8, mackbd_device ) |
| 77 | | // AM_RANGE(0x0000, 0x03ff) AM_ROM AM_REGION(MACKBD_CPU_TAG, 0) |
| 81 | AM_RANGE(0x0000, 0x03ff) AM_ROM AM_REGION(MACKBD_CPU_TAG, 0) |
| 78 | 82 | ADDRESS_MAP_END |
| 79 | 83 | |
| 84 | static ADDRESS_MAP_START( mackbd_io_map, AS_IO, 8, mackbd_device ) |
| 85 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(p0_r) |
| 86 | AM_RANGE(0x2f, 0x2f) AM_WRITE(p0_w) |
| 87 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(p1_r, p1_w) |
| 88 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(p2_r, p2_w) |
| 89 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(t1_r) |
| 90 | ADDRESS_MAP_END |
| 91 | |
| 80 | 92 | //------------------------------------------------- |
| 81 | 93 | // MACHINE_CONFIG |
| 82 | 94 | //------------------------------------------------- |
| r19578 | r19579 | |
| 84 | 96 | static MACHINE_CONFIG_FRAGMENT( mackbd ) |
| 85 | 97 | MCFG_CPU_ADD(MACKBD_CPU_TAG, I8021, 100000) // "100,000 operations per second"? |
| 86 | 98 | MCFG_CPU_PROGRAM_MAP(mackbd_map) |
| 87 | | MCFG_DEVICE_DISABLE() |
| 99 | MCFG_CPU_IO_MAP(mackbd_io_map) |
| 88 | 100 | MACHINE_CONFIG_END |
| 89 | 101 | |
| 90 | 102 | |
| r19578 | r19579 | |
| 140 | 152 | m_shortname = "mackbd"; |
| 141 | 153 | } |
| 142 | 154 | |
| 155 | READ8_MEMBER(mackbd_device::p0_r) |
| 156 | { |
| 157 | return 0x20; // 0x20 indicates we're a keyboard rather than the keypad |
| 158 | } |
| 159 | |
| 160 | WRITE8_MEMBER(mackbd_device::p0_w) |
| 161 | { |
| 162 | } |
| 163 | |
| 164 | READ8_MEMBER(mackbd_device::p1_r) |
| 165 | { |
| 166 | return 0; |
| 167 | } |
| 168 | |
| 169 | WRITE8_MEMBER(mackbd_device::p1_w) |
| 170 | { |
| 171 | } |
| 172 | |
| 173 | READ8_MEMBER(mackbd_device::p2_r) |
| 174 | { |
| 175 | return 0; |
| 176 | } |
| 177 | |
| 178 | WRITE8_MEMBER(mackbd_device::p2_w) |
| 179 | { |
| 180 | } |
| 181 | |
| 182 | READ8_MEMBER(mackbd_device::t1_r) |
| 183 | { |
| 184 | return 0; |
| 185 | } |
| 186 | |
trunk/src/mess/machine/mackbd.h
| r19578 | r19579 | |
| 38 | 38 | // construction/destruction |
| 39 | 39 | mackbd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 40 | 40 | |
| 41 | DECLARE_READ8_MEMBER(p0_r); |
| 42 | DECLARE_WRITE8_MEMBER(p0_w); |
| 43 | DECLARE_READ8_MEMBER(p1_r); |
| 44 | DECLARE_WRITE8_MEMBER(p1_w); |
| 45 | DECLARE_READ8_MEMBER(p2_r); |
| 46 | DECLARE_WRITE8_MEMBER(p2_w); |
| 47 | DECLARE_READ8_MEMBER(t1_r); |
| 48 | |
| 41 | 49 | protected: |
| 42 | 50 | // device-level overrides |
| 43 | 51 | virtual void device_start(); |