trunk/src/mess/machine/x820kb.c
r241647 | r241648 | |
11 | 11 | |
12 | 12 | /* |
13 | 13 | |
| 14 | PCB Layout |
| 15 | ---------- |
| 16 | |
| 17 | Maxi-Switch Co. |
| 18 | 630107-02 |
| 19 | |
| 20 | |-----------------------------------------------------------------------| |
| 21 | | |--CN1--| CN2 | |
| 22 | | 8748 6MHz 74154 * | |
| 23 | | | |
| 24 | |-----------------------------------------------------------------------| |
| 25 | |
| 26 | Notes: |
| 27 | All IC's shown. |
| 28 | |
| 29 | 8048 - NEC D8748D |
| 30 | 74154 - 4-line to 16-line decoder/multiplexer |
| 31 | * - unpopulated 8-pin chip |
| 32 | CN1 - 2x16 PCB header |
| 33 | CN2 - unpopulated RJ-45? connector |
| 34 | |
| 35 | */ |
| 36 | |
| 37 | /* |
| 38 | |
14 | 39 | TODO: |
15 | 40 | |
16 | 41 | - repeat |
r241647 | r241648 | |
63 | 88 | |
64 | 89 | static ADDRESS_MAP_START( xerox_820_keyboard_io, AS_IO, 8, xerox_820_keyboard_t ) |
65 | 90 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(kb_p1_r, kb_p1_w) |
66 | | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(kb_p2_r) |
| 91 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(kb_p2_r) AM_WRITENOP |
67 | 92 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(kb_t0_r) |
68 | 93 | AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T1) AM_READ(kb_t1_r) |
69 | 94 | AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_WRITE(kb_bus_w) |
r241647 | r241648 | |
75 | 100 | //------------------------------------------------- |
76 | 101 | |
77 | 102 | static MACHINE_CONFIG_FRAGMENT( xerox_820_keyboard ) |
78 | | MCFG_CPU_ADD(I8748_TAG, I8048, 4608000) // ??? |
| 103 | MCFG_CPU_ADD(I8748_TAG, I8048, XTAL_6MHz) |
79 | 104 | MCFG_CPU_IO_MAP(xerox_820_keyboard_io) |
80 | | |
81 | | MCFG_DEVICE_ADD("int_clk", CLOCK, 16) // ??? |
82 | | MCFG_CLOCK_SIGNAL_HANDLER(INPUTLINE(I8748_TAG, MCS48_INPUT_IRQ)) |
83 | 105 | MACHINE_CONFIG_END |
84 | 106 | |
85 | 107 | |
r241647 | r241648 | |
261 | 283 | m_kbstb_cb.resolve_safe(); |
262 | 284 | } |
263 | 285 | |
| 286 | void xerox_820_keyboard_t::device_reset_after_children() |
| 287 | { |
| 288 | m_maincpu->set_input_line(MCS48_INPUT_IRQ, ASSERT_LINE); |
| 289 | } |
264 | 290 | |
| 291 | |
265 | 292 | //------------------------------------------------- |
266 | 293 | // kb_p1_r - |
267 | 294 | //------------------------------------------------- |
r241647 | r241648 | |
331 | 358 | |
332 | 359 | READ8_MEMBER( xerox_820_keyboard_t::kb_t0_r ) |
333 | 360 | { |
334 | | return 1; // ??? |
| 361 | UINT8 data = 1; |
| 362 | |
| 363 | switch (m_p1 & 0x0f) |
| 364 | { |
| 365 | case 0xd: data = 1; break; // ??? if 0, return key data | 0x80 |
| 366 | case 0xe: data = 1; break; // ??? if 0, set r6=1 |
| 367 | } |
| 368 | |
| 369 | return data; |
335 | 370 | } |
336 | 371 | |
337 | 372 | |
r241647 | r241648 | |
341 | 376 | |
342 | 377 | READ8_MEMBER( xerox_820_keyboard_t::kb_t1_r ) |
343 | 378 | { |
344 | | return 1; // ??? |
| 379 | return 1; // ??? if 0, toggle P17 |
345 | 380 | } |
346 | 381 | |
347 | 382 | |