mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
(MESS) c128: Fixed extended keyboard line reading. (nw)
This commit is contained in:
parent
8a12803575
commit
39b0a997bb
@ -135,20 +135,21 @@ static READ8_DEVICE_HANDLER( c128_cia0_port_a_r )
|
||||
|
||||
static READ8_DEVICE_HANDLER( c128_cia0_port_b_r )
|
||||
{
|
||||
// c128_state *state = device->machine().driver_data<c128_state>();
|
||||
c128_state *state = device->machine().driver_data<c128_state>();
|
||||
UINT8 value = 0xff;
|
||||
UINT8 cia0porta = mos6526_pa_r(device->machine().device("cia_0"), 0);
|
||||
//device_t *vic2e = device->machine().device("vic2e");
|
||||
device_t *vic2e = device->machine().device("vic2e");
|
||||
vic2e_device_interface *intf = dynamic_cast<vic2e_device_interface*>(vic2e);
|
||||
|
||||
value &= cbm_common_cia0_port_b_r(device, cia0porta);
|
||||
/*
|
||||
if (!vic2e->k0_r())
|
||||
|
||||
if (!intf->k0_r())
|
||||
value &= state->m_keyline[0];
|
||||
if (!vic2e->k1_r())
|
||||
if (!intf->k1_r())
|
||||
value &= state->m_keyline[1];
|
||||
if (!vic2e->k2_r())
|
||||
if (!intf->k2_r())
|
||||
value &= state->m_keyline[2];
|
||||
*/
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -477,10 +477,21 @@ public:
|
||||
mos8562_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
class vic2e_device_interface
|
||||
{
|
||||
public:
|
||||
vic2e_device_interface() {}
|
||||
virtual ~vic2e_device_interface() {}
|
||||
|
||||
virtual DECLARE_READ_LINE_MEMBER( k0_r ) { return 1; }
|
||||
virtual DECLARE_READ_LINE_MEMBER( k1_r ) { return 1; }
|
||||
virtual DECLARE_READ_LINE_MEMBER( k2_r ) { return 1; }
|
||||
};
|
||||
|
||||
|
||||
// ======================> mos8564_device
|
||||
|
||||
class mos8564_device : public mos6567_device
|
||||
class mos8564_device : public mos6567_device, public vic2e_device_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
@ -518,7 +529,7 @@ public:
|
||||
|
||||
// ======================> mos8566_device
|
||||
|
||||
class mos8566_device : public mos6569_device
|
||||
class mos8566_device : public mos6569_device, public vic2e_device_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
|
Loading…
Reference in New Issue
Block a user