Improved passing of scan codes to the emulated keyboards;

Fixed Sound Blaster 16 and earlier CD-ROM volume registers (and made them no longer default to 0);
Serial mouse now resets the FIFO before sending the ID, fixes mouse detection after clipping and moving the mouse;
Rewritten CD-ROM and SCSI disk Mode Select handling and changed things regarding Mode Sense as well, also fixes emulator segmentation faults when anything attempts to do a Mode Select;
Fixed the Microsoft InPort mouse emulation (used the Bochs code as reference for the polling/state update code), now it actually moves;
The PCjr initialization now sets the XT scan code table, makes the keyboard actually work on the PCjr again;
Several bugfixes regarding the Read CD commands, fixes CD Audio in digital mode on Windows ME;
Finally properly fixed the regular CD Audio MSF/LBA conversion mess;
Applied all applicable PCem commits.
This commit is contained in:
OBattler
2018-01-13 22:56:13 +01:00
parent b4aff71a6b
commit 845c8ed4bd
29 changed files with 2127 additions and 2358 deletions

View File

@@ -61,12 +61,18 @@ void serial_update_ints(SERIAL *serial)
serial->iir = 0;
}
if (stat && ((serial->mctrl & 8) || PCJR))
picintlevel(1 << serial->irq);
else
if (stat && ((serial->mctrl & 8) || PCJR)) {
picintlevel(1 << serial->irq);
} else
picintc(1 << serial->irq);
}
void serial_clear_fifo(SERIAL *serial)
{
memset(serial->fifo, 0, 256);
serial->fifo_read = serial->fifo_write = 0;
}
void serial_write_fifo(SERIAL *serial, uint8_t dat)
{
serial->fifo[serial->fifo_write] = dat;
@@ -190,8 +196,9 @@ uint8_t serial_read(uint16_t addr, void *p)
serial->int_status &= ~SERIAL_INT_RECEIVE;
serial_update_ints(serial);
temp = serial_read_fifo(serial);
if (serial->fifo_read != serial->fifo_write)
if (serial->fifo_read != serial->fifo_write) {
serial->recieve_delay = 1000LL * TIMER_USEC;
}
break;
case 1:
if (serial->lcr & 0x80)