mirror of
https://github.com/holub/mame
synced 2025-05-27 16:21:34 +03:00
Missing file ...
This commit is contained in:
parent
0a498e31f7
commit
f6dc3b14b1
@ -64,7 +64,7 @@ void aakart_device::device_start()
|
|||||||
m_rxtimer = timer_alloc(RX_TIMER);
|
m_rxtimer = timer_alloc(RX_TIMER);
|
||||||
m_rxtimer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
|
m_rxtimer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
|
||||||
m_txtimer = timer_alloc(TX_TIMER);
|
m_txtimer = timer_alloc(TX_TIMER);
|
||||||
m_txtimer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
|
m_txtimer->adjust(attotime::from_hz(clock()*3), 0, attotime::from_hz(clock()*3));
|
||||||
m_mousetimer = timer_alloc(MOUSE_TIMER);
|
m_mousetimer = timer_alloc(MOUSE_TIMER);
|
||||||
m_mousetimer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
|
m_mousetimer->adjust(attotime::from_hz(clock()), 0, attotime::from_hz(clock()));
|
||||||
m_keybtimer = timer_alloc(KEYB_TIMER);
|
m_keybtimer = timer_alloc(KEYB_TIMER);
|
||||||
@ -108,6 +108,8 @@ void aakart_device::device_reset()
|
|||||||
// device_timer - handler timer events
|
// device_timer - handler timer events
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
void aakart_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
void aakart_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
@ -233,6 +235,27 @@ void aakart_device::device_timer(emu_timer &timer, device_timer_id id, int param
|
|||||||
m_new_command |= 2;
|
m_new_command |= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
void aakart_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||||
|
{
|
||||||
|
if(id == RX_TIMER && m_new_command & 2)
|
||||||
|
{
|
||||||
|
m_out_rx_func(ASSERT_LINE);
|
||||||
|
m_out_tx_func(CLEAR_LINE);
|
||||||
|
m_rx = m_rx_latch;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(id == TX_TIMER && m_new_command & 1)
|
||||||
|
{
|
||||||
|
m_out_tx_func(ASSERT_LINE);
|
||||||
|
m_new_command &= ~1;
|
||||||
|
m_new_command |= 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// READ/WRITE HANDLERS
|
// READ/WRITE HANDLERS
|
||||||
@ -240,7 +263,7 @@ void aakart_device::device_timer(emu_timer &timer, device_timer_id id, int param
|
|||||||
|
|
||||||
READ8_MEMBER( aakart_device::read )
|
READ8_MEMBER( aakart_device::read )
|
||||||
{
|
{
|
||||||
m_out_tx_func(CLEAR_LINE);
|
m_out_rx_func(CLEAR_LINE);
|
||||||
return m_rx;
|
return m_rx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,6 +272,78 @@ WRITE8_MEMBER( aakart_device::write )
|
|||||||
// if(m_new_command) printf("skip cmd %02x\n",data);
|
// if(m_new_command) printf("skip cmd %02x\n",data);
|
||||||
|
|
||||||
m_tx_latch = data;
|
m_tx_latch = data;
|
||||||
|
switch(m_status)
|
||||||
|
{
|
||||||
|
case STATUS_NORMAL:
|
||||||
|
{
|
||||||
|
switch(m_tx_latch)
|
||||||
|
{
|
||||||
|
case 0x00: //set leds
|
||||||
|
break;
|
||||||
|
case RQID:
|
||||||
|
m_rx_latch = 0x81; //keyboard ID
|
||||||
|
break;
|
||||||
|
case HRST:
|
||||||
|
m_rx_latch = HRST;
|
||||||
|
m_status = STATUS_HRST;
|
||||||
|
break;
|
||||||
|
case SMAK:
|
||||||
|
case MACK:
|
||||||
|
case SACK:
|
||||||
|
case NACK:
|
||||||
|
if(m_tx_latch & 2) { m_mouse_enable = 1; }
|
||||||
|
if(m_tx_latch & 1) { m_keyb_enable = 1; }
|
||||||
|
m_rx_latch = 0;
|
||||||
|
break;
|
||||||
|
case BACK:
|
||||||
|
m_rx_latch = machine().rand(); // ???
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//printf("%02x\n",data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case STATUS_KEYDOWN:
|
||||||
|
{
|
||||||
|
m_rx_latch = machine().rand();
|
||||||
|
|
||||||
|
switch(m_tx_latch)
|
||||||
|
{
|
||||||
|
case HRST:
|
||||||
|
m_rx_latch = HRST;
|
||||||
|
m_status = STATUS_HRST;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//m_rx_latch = 0xc0 | 0x04;
|
||||||
|
printf("%02x\n",data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case STATUS_HRST:
|
||||||
|
{
|
||||||
|
switch(m_tx_latch)
|
||||||
|
{
|
||||||
|
case HRST: { m_rx_latch = HRST; m_keyb_enable = m_mouse_enable = 0; break; }
|
||||||
|
case RAK1: { m_rx_latch = RAK1; m_keyb_enable = m_mouse_enable = 0; break; }
|
||||||
|
case RAK2: { m_rx_latch = RAK2; m_status = STATUS_NORMAL; break; }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
m_new_command |= 1;
|
m_new_command |= 1;
|
||||||
m_out_rx_func(CLEAR_LINE);
|
|
||||||
|
//m_tx_latch = data;
|
||||||
|
//m_new_command |= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
void aakart_device::write_kbd_buf()
|
||||||
|
{
|
||||||
|
//printf("%08x\n",data);
|
||||||
|
m_out_tx_func(ASSERT_LINE);
|
||||||
|
//debugger_break(machine());
|
||||||
|
m_status = STATUS_KEYDOWN;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user