Previous 15994 Revisions Next

r1132 Wednesday 17th October, 2007 at 07:04:36 UTC by Justin Kerk
Attempt to fix overwriting of MESS-specific hacks in emu/machine/8042kbdc.c
[src/emu/machine]{8042kbdc.c}

src/emu/machine/8042kbdc.c
r1131r1132
181181#include "machine/pit8253.h"
182182#include "machine/pcshare.h"
183183
184#ifdef MESS
185#include "audio/pc.h"
186#endif /* MESS */
184187
188
189
185190/***************************************************************************
186191
187192    Constants & macros
r1131r1132
278283   mame_timer_pulse(MAME_TIME_IN_HZ(60), 0, kbdc8042_time);
279284}
280285
281static void at_8042_receive(UINT8 data)
286static void at_8042_receive(int data)
282287{
283288   if (LOG_KEYBOARD)
284289      logerror("at_8042_receive Received 0x%02x\n", data);
285290
286   kbdc8042.data = data;
291   kbdc8042.data = (UINT8) data;
287292   kbdc8042.keyboard.received = 1;
288293
289294   if (kbdc8042.keyboard_interrupt)
r1131r1132
427432
428433
429434
435static TIMER_CALLBACK(at_8042_receive_timer)
436{
437   at_8042_receive(param);
438}
439
440
441
430442WRITE8_HANDLER(kbdc8042_8_w)
431443{
432444   switch (offset) {
r1131r1132
509521         at_8042_receive(PS2_MOUSE_ON ? 0x00 : 0xff);
510522         break;
511523      case 0xaa:   /* selftest */
512         at_8042_receive(0x55);
524         if (Machine->drv->cpu[0].cpu_type == CPU_I486)
525            mame_timer_set(MAME_TIME_IN_MSEC(10), 0x55, at_8042_receive_timer); /* HACK */
526         else
527            at_8042_receive(0x55);
513528         break;
514529      case 0xab:   /* test keyboard */
515530         at_8042_receive(KEYBOARD_ON ? 0x00 : 0xff);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team