Reworked serial and LPT set up - they can now bet set to any I/O base address (though that capability is not used by anything yet);
The CD-ROM IOCTL direct pass through code now does sanity check on the requested data size before passing the command - fixes crashes with some DMA-only host DVD drives; The network poller is now in its own thread; The hack is back in the emulation of the National Semiconductors PC87306 Super I/O Chip - it's the only way right now to have serial working on that board; Fixed a part of the code that was still using NukedOPL even when OPL 3 was set to DOSBox OPL; Applied all mainline PCem commits.
This commit is contained in:
@@ -42,14 +42,14 @@ int cdrom_ioctl_do_log = 0;
|
||||
void cdrom_ioctl_log(const char *format, ...)
|
||||
{
|
||||
#ifdef ENABLE_CDROM_LOG
|
||||
if (cdrom_ioctl_do_log)
|
||||
{
|
||||
if (cdrom_ioctl_do_log)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
vprintf(format, ap);
|
||||
va_end(ap);
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -534,11 +534,33 @@ static int ioctl_get_block_length(uint8_t id, const UCHAR *cdb, int number_of_bl
|
||||
|
||||
if (no_length_check)
|
||||
{
|
||||
return 65534;
|
||||
switch (cdb[0])
|
||||
{
|
||||
case 0x25:
|
||||
/* READ CAPACITY */
|
||||
return 8;
|
||||
case 0x42: /* READ SUBCHANNEL */
|
||||
case 0x43: /* READ TOC */
|
||||
case 0x51: /* READ DISC INFORMATION */
|
||||
case 0x52: /* READ TRACK INFORMATION */
|
||||
case 0x5A: /* MODE SENSE (10) */
|
||||
return ((uint16_t) cdb[8]) + (((uint16_t) cdb[7]) << 8);
|
||||
default:
|
||||
return 65534;
|
||||
}
|
||||
}
|
||||
|
||||
switch (cdb[0])
|
||||
{
|
||||
case 0x25:
|
||||
/* READ CAPACITY */
|
||||
return 8;
|
||||
case 0x42: /* READ SUBCHANNEL */
|
||||
case 0x43: /* READ TOC */
|
||||
case 0x51: /* READ DISC INFORMATION */
|
||||
case 0x52: /* READ TRACK INFORMATION */
|
||||
case 0x5A: /* MODE SENSE (10) */
|
||||
return ((uint16_t) cdb[8]) + (((uint16_t) cdb[7]) << 8);
|
||||
case 0x08:
|
||||
case 0x28:
|
||||
case 0xa8:
|
||||
|
||||
Reference in New Issue
Block a user