Some CD-ROM image and IDE fixes.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* CD-ROM image support.
|
* CD-ROM image support.
|
||||||
*
|
*
|
||||||
* Version: @(#)cdrom_image.cc 1.0.3 2018/10/17
|
* Version: @(#)cdrom_image.cc 1.0.4 2018/10/20
|
||||||
*
|
*
|
||||||
* Author: RichardG867,
|
* Author: RichardG867,
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -723,13 +723,8 @@ image_readsector_raw(cdrom_t *dev, uint8_t *buffer, int sector, int ismsf, int c
|
|||||||
if (!is_legal(dev->id, cdrom_sector_type, cdrom_sector_flags, audio, mode2))
|
if (!is_legal(dev->id, cdrom_sector_type, cdrom_sector_flags, audio, mode2))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((cdrom_sector_type == 3) || ((cdrom_sector_type > 4) && (cdrom_sector_type != 8))) {
|
if ((cdrom_sector_type > 5) && (cdrom_sector_type != 8)) {
|
||||||
if (cdrom_sector_type == 3) {
|
cdrom_image_log("CD-ROM %i: Attempting to read an unrecognized sector type from an image\n", dev->id);
|
||||||
cdrom_image_log("CD-ROM %i: Attempting to read a Yellowbook Mode 2 data sector from an image\n", dev->id);
|
|
||||||
}
|
|
||||||
if (cdrom_sector_type > 4) {
|
|
||||||
cdrom_image_log("CD-ROM %i: Attempting to read a XA Mode 2 Form 2 data sector from an image\n", dev->id);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
} else if (cdrom_sector_type == 1) {
|
} else if (cdrom_sector_type == 1) {
|
||||||
if (!audio || dev->img_is_iso) {
|
if (!audio || dev->img_is_iso) {
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
* Implementation of the IDE emulation for hard disks and ATAPI
|
* Implementation of the IDE emulation for hard disks and ATAPI
|
||||||
* CD-ROM devices.
|
* CD-ROM devices.
|
||||||
*
|
*
|
||||||
* Version: @(#)hdc_ide.c 1.0.51 2018/10/17
|
* Version: @(#)hdc_ide.c 1.0.52 2018/10/20
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -1458,7 +1458,7 @@ static uint32_t
|
|||||||
ide_read_data(ide_t *ide, int length)
|
ide_read_data(ide_t *ide, int length)
|
||||||
{
|
{
|
||||||
scsi_device_data_t *atapi = (scsi_device_data_t *) ide->p;
|
scsi_device_data_t *atapi = (scsi_device_data_t *) ide->p;
|
||||||
uint32_t temp;
|
uint32_t temp = 0;
|
||||||
|
|
||||||
if (!ide->buffer) {
|
if (!ide->buffer) {
|
||||||
switch (length) {
|
switch (length) {
|
||||||
@@ -1479,12 +1479,12 @@ ide_read_data(ide_t *ide, int length)
|
|||||||
|
|
||||||
if (ide->command == WIN_PACKETCMD) {
|
if (ide->command == WIN_PACKETCMD) {
|
||||||
ide->pos = 0;
|
ide->pos = 0;
|
||||||
if (!ide_drive_is_atapi(ide)) {
|
if (ide_drive_is_atapi(ide))
|
||||||
|
temp = ide->packet_read(ide->p, length);
|
||||||
|
else {
|
||||||
ide_log("Drive not ATAPI (position: %i)\n", ide->pos);
|
ide_log("Drive not ATAPI (position: %i)\n", ide->pos);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (ide_drive_is_atapi(ide))
|
|
||||||
temp = ide->packet_read(ide->p, length);
|
|
||||||
} else {
|
} else {
|
||||||
switch (length) {
|
switch (length) {
|
||||||
case 1:
|
case 1:
|
||||||
|
Reference in New Issue
Block a user