Line 257... |
Line 257... |
kbd_int = kbd->kresp || kbd->buf_count ? kbd->ccmdbyte & KBD_CCMDBYTE_INT : 0;
|
kbd_int = kbd->kresp || kbd->buf_count ? kbd->ccmdbyte & KBD_CCMDBYTE_INT : 0;
|
if (config.sim.verbose && kbd_int)
|
if (config.sim.verbose && kbd_int)
|
PRINTF("Keyboard Interrupt.... kbd_kresp %lx kbd_buf_count %lx \n",
|
PRINTF("Keyboard Interrupt.... kbd_kresp %lx kbd_buf_count %lx \n",
|
kbd->kresp, kbd->buf_count);
|
kbd->kresp, kbd->buf_count);
|
if (kbd_int) report_interrupt(kbd->irq);
|
if (kbd_int) report_interrupt(kbd->irq);
|
SCHED_ADD(kbd_job, dat, runtime.sim.cycles + kbd->slowdown);
|
SCHED_ADD(kbd_job, dat, kbd->slowdown);
|
}
|
}
|
|
|
/* Reset all (simulated) ps2 controlers/keyboards */
|
/* Reset all (simulated) ps2 controlers/keyboards */
|
void kbd_reset (void *dat)
|
void kbd_reset (void *dat)
|
{
|
{
|
Line 278... |
Line 278... |
fprintf (stderr, "WARNING: Keyboard has problems with RX file stream.\n");
|
fprintf (stderr, "WARNING: Keyboard has problems with RX file stream.\n");
|
return;
|
return;
|
}
|
}
|
kbd->slowdown = (long) ((config.sim.system_kfreq * 1000.) / KBD_BAUD_RATE);
|
kbd->slowdown = (long) ((config.sim.system_kfreq * 1000.) / KBD_BAUD_RATE);
|
if (kbd->slowdown <= 0) kbd->slowdown = 1;
|
if (kbd->slowdown <= 0) kbd->slowdown = 1;
|
SCHED_ADD(kbd_job, dat, runtime.sim.cycles + kbd->slowdown);
|
SCHED_ADD(kbd_job, dat, kbd->slowdown);
|
}
|
}
|
|
|
|
|
void kbd_info(void *dat)
|
void kbd_info(void *dat)
|
{
|
{
|