Applied all relevant PCem commits;
Extensively cleaned up and changed the CD-ROM code; Removed CD-ROM IOCTTL (it was causing performance and stability issues); Turned a lot of things into device_t's; Added the PS/1 Model 2011 XTA and standalone XTA hard disk controllers, ported from Varcem; Numerous FDC fixes for the PS/1 Model 2121; NVR changes ported from Varcem; The PCap code no longer requires libpcap to be compiled; Numerous fixes to various SCSI controllers; Updated NukedOPL to 1.8; Fixes to OpenAL initialization and closing, should give less Audio issues now; Revorked parts of the common (S)VGA code (also based on code from QEMU); Removed the Removable SCSI hard disks (they were a never finished experiment so there was no need to keep them there); Cleaned up the SCSI hard disk and Iomega ZIP code (but more cleanups of that are coming in the future); In some occasions (IDE hard disks in multiple sector mode and SCSI hard disks) the status bar icon is no longer updated, should improve performance a bit; Redid the way the tertiary and quaternary IDE controllers are configured (and they are now device_t's); Extensively reworked the IDE code and fixed quite a few bugs; Fixes to XT MFM, AT MFM, and AT ESDI code; Some changes to XTIDE and MCA ESDI code; Some fixes to the CD-ROM image handler.
This commit is contained in:
@@ -9,19 +9,20 @@
|
||||
* Implementation of the CD-ROM null interface for unmounted
|
||||
* guest CD-ROM drives.
|
||||
*
|
||||
* Version: @(#)cdrom_null.c 1.0.6 2017/11/04
|
||||
* Version: @(#)cdrom_null.c 1.0.7 2018/03/26
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2016 Sarah Walker.
|
||||
* Copyright 2016,2017 Miran Grca.
|
||||
* Copyright 2016-2018 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../86box.h"
|
||||
#include "../scsi/scsi.h"
|
||||
#include "cdrom.h"
|
||||
|
||||
|
||||
@@ -50,17 +51,6 @@ null_getcurrentsubchannel(uint8_t id, uint8_t *b, int msf)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
null_eject(uint8_t id)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
null_load(uint8_t id)
|
||||
{
|
||||
}
|
||||
|
||||
static int
|
||||
null_readsector_raw(uint8_t id, uint8_t *buffer, int sector, int ismsf, int cdrom_sector_type, int cdrom_sector_flags, int *len)
|
||||
{
|
||||
@@ -114,7 +104,7 @@ cdrom_null_reset(uint8_t id)
|
||||
void cdrom_set_null_handler(uint8_t id);
|
||||
|
||||
int
|
||||
cdrom_null_open(uint8_t id, char d)
|
||||
cdrom_null_open(uint8_t id)
|
||||
{
|
||||
cdrom_set_null_handler(id);
|
||||
|
||||
@@ -134,20 +124,6 @@ void null_exit(uint8_t id)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
null_is_track_audio(uint8_t id, uint32_t pos, int ismsf)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
null_pass_through(uint8_t id, uint8_t *in_cdb, uint8_t *b, uint32_t *len)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
null_media_type_id(uint8_t id)
|
||||
{
|
||||
@@ -158,7 +134,7 @@ null_media_type_id(uint8_t id)
|
||||
void
|
||||
cdrom_set_null_handler(uint8_t id)
|
||||
{
|
||||
cdrom_drives[id].handler = &null_cdrom;
|
||||
cdrom[id]->handler = &null_cdrom;
|
||||
cdrom_drives[id].host_drive = 0;
|
||||
memset(cdrom_image[id].image_path, 0, sizeof(cdrom_image[id].image_path));
|
||||
}
|
||||
@@ -174,16 +150,12 @@ static CDROM null_cdrom = {
|
||||
null_readtoc_session,
|
||||
null_readtoc_raw,
|
||||
null_getcurrentsubchannel,
|
||||
null_pass_through,
|
||||
null_readsector_raw,
|
||||
NULL,
|
||||
null_load,
|
||||
null_eject,
|
||||
NULL,
|
||||
NULL,
|
||||
null_size,
|
||||
null_status,
|
||||
null_is_track_audio,
|
||||
NULL,
|
||||
null_exit
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user