Previous 199869 Revisions Next

r33136 Sunday 2nd November, 2014 at 10:17:17 UTC by Curt Coder
(MESS) x820: Keyboard WIP. (nw)
[src/mess/machine]x820kb.c x820kb.h

trunk/src/mess/machine/x820kb.c
r241647r241648
1111
1212/*
1313
14PCB Layout
15----------
16
17Maxi-Switch Co.
18630107-02
19
20|-----------------------------------------------------------------------|
21|                                                       |--CN1--| CN2   |
22|            8748   6MHz                 74154   *                      |
23|                                                                       |
24|-----------------------------------------------------------------------|
25
26Notes:
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
1439   TODO:
1540
1641   - repeat
r241647r241648
6388
6489static ADDRESS_MAP_START( xerox_820_keyboard_io, AS_IO, 8, xerox_820_keyboard_t )
6590   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
6792   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(kb_t0_r)
6893   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T1) AM_READ(kb_t1_r)
6994   AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_WRITE(kb_bus_w)
r241647r241648
75100//-------------------------------------------------
76101
77102static MACHINE_CONFIG_FRAGMENT( xerox_820_keyboard )
78   MCFG_CPU_ADD(I8748_TAG, I8048, 4608000) // ???
103   MCFG_CPU_ADD(I8748_TAG, I8048, XTAL_6MHz)
79104   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))
83105MACHINE_CONFIG_END
84106
85107
r241647r241648
261283   m_kbstb_cb.resolve_safe();
262284}
263285
286void xerox_820_keyboard_t::device_reset_after_children()
287{
288   m_maincpu->set_input_line(MCS48_INPUT_IRQ, ASSERT_LINE);
289}
264290
291
265292//-------------------------------------------------
266293//  kb_p1_r -
267294//-------------------------------------------------
r241647r241648
331358
332359READ8_MEMBER( xerox_820_keyboard_t::kb_t0_r )
333360{
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;
335370}
336371
337372
r241647r241648
341376
342377READ8_MEMBER( xerox_820_keyboard_t::kb_t1_r )
343378{
344   return 1; // ???
379   return 1; // ??? if 0, toggle P17
345380}
346381
347382
trunk/src/mess/machine/x820kb.h
r241647r241648
1616
1717#include "emu.h"
1818#include "cpu/mcs48/mcs48.h"
19#include "machine/clock.h"
2019
2120
2221
r241647r241648
6160   // device-level overrides
6261   virtual void device_start();
6362   virtual void device_reset();
63   virtual void device_reset_after_children();
6464
6565private:
6666   required_device<cpu_device> m_maincpu;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team