Previous 15994 Revisions Next

r13095 Sunday 23rd October, 2011 at 08:42:30 UTC by Robbbert
Fixed keyboard on alice90.
[src/mess/drivers]mc10.c

src/mess/drivers/mc10.c
r13094r13095
3939public:
4040   mc10_state(const machine_config &mconfig, device_type type, const char *tag)
4141      : driver_device(mconfig, type, tag),
42        m_maincpu(*this, "maincpu"),
43        m_mc6847(*this, "mc6847"),
44        m_ef9345(*this, "ef9345"),
45        m_dac(*this, "dac"),
46        m_ram(*this, RAM_TAG),
47        m_cassette(*this, CASSETTE_TAG),
48        m_printer(*this, "printer")
49      { }
42   m_maincpu(*this, "maincpu"),
43   m_mc6847(*this, "mc6847"),
44   m_ef9345(*this, "ef9345"),
45   m_dac(*this, "dac"),
46   m_ram(*this, RAM_TAG),
47   m_cassette(*this, CASSETTE_TAG),
48   m_printer(*this, "printer")
49   { }
5050
5151   required_device<cpu_device> m_maincpu;
5252   optional_device<device_t> m_mc6847;
r13094r13095
7070
7171   DECLARE_READ8_MEMBER( mc10_bfff_r );
7272   DECLARE_WRITE8_MEMBER( mc10_bfff_w );
73   DECLARE_READ8_MEMBER( alice90_bfff_r );
7374   DECLARE_WRITE8_MEMBER( alice32_bfff_w );
7475   DECLARE_READ8_MEMBER( mc10_port1_r );
7576   DECLARE_WRITE8_MEMBER( mc10_port1_w );
r13094r13095
99100   return result;
100101}
101102
103READ8_MEMBER( mc10_state::alice90_bfff_r )
104{
105   UINT8 result = 0xff;
106
107   if (!BIT(m_keyboard_strobe, 7)) result &= input_port_read(machine(), "pb7");
108   else
109   if (!BIT(m_keyboard_strobe, 6)) result &= input_port_read(machine(), "pb6");
110   else
111   if (!BIT(m_keyboard_strobe, 5)) result &= input_port_read(machine(), "pb5");
112   else
113   if (!BIT(m_keyboard_strobe, 4)) result &= input_port_read(machine(), "pb4");
114   else
115   if (!BIT(m_keyboard_strobe, 3)) result &= input_port_read(machine(), "pb3");
116   else
117   if (!BIT(m_keyboard_strobe, 2)) result &= input_port_read(machine(), "pb2");
118   else
119   if (!BIT(m_keyboard_strobe, 1)) result &= input_port_read(machine(), "pb1");
120   else
121   if (!BIT(m_keyboard_strobe, 0)) result &= input_port_read(machine(), "pb0");
122
123   return result;
124}
125
102126WRITE8_MEMBER( mc10_state::mc10_bfff_w )
103127{
104128   /* bit 2 to 6, mc6847 mode lines */
r13094r13095
285309   AM_RANGE(0x0100, 0x2fff) AM_NOP /* unused */
286310   AM_RANGE(0x3000, 0xafff) AM_RAMBANK("bank1")   /* 32k internal ram */
287311   AM_RANGE(0xbf20, 0xbf29) AM_DEVREADWRITE("ef9345", ef9345_device, data_r, data_w)
288   AM_RANGE(0xbfff, 0xbfff) AM_READWRITE(mc10_bfff_r, alice32_bfff_w)
312   AM_RANGE(0xbfff, 0xbfff) AM_READWRITE(alice90_bfff_r, alice32_bfff_w)
289313   AM_RANGE(0xc000, 0xffff) AM_ROM AM_REGION("maincpu", 0x0000) /* ROM */
290314ADDRESS_MAP_END
291315
r13094r13095
584608   MCFG_CPU_MODIFY("maincpu")
585609   MCFG_CPU_PROGRAM_MAP(alice90_mem)
586610
587    MCFG_RAM_MODIFY(RAM_TAG)
611   MCFG_RAM_MODIFY(RAM_TAG)
588612   MCFG_RAM_DEFAULT_SIZE("32K")
589613
590614   /* Software lists */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team