CD-ROM: Add configuration option to bypass CRC and ECC checks.
This commit is contained in:
@@ -344,7 +344,7 @@ cdrom_is_sector_good(cdrom_t *dev, const uint8_t *b, const uint8_t mode2, const
|
|||||||
{
|
{
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
|
|
||||||
if ((dev->cd_status != CD_STATUS_DVD) && (!mode2 || (form == 1))) {
|
if (!dev->no_check && (dev->cd_status != CD_STATUS_DVD) && (!mode2 || (form == 1))) {
|
||||||
if (mode2 && (form == 1)) {
|
if (mode2 && (form == 1)) {
|
||||||
const uint32_t crc = cdrom_crc32(0xffffffff, &(b[16]), 2056) ^ 0xffffffff;
|
const uint32_t crc = cdrom_crc32(0xffffffff, &(b[16]), 2056) ^ 0xffffffff;
|
||||||
|
|
||||||
|
|||||||
@@ -1463,6 +1463,9 @@ load_floppy_and_cdrom_drives(void)
|
|||||||
sprintf(temp, "cdrom_%02i_speed", c + 1);
|
sprintf(temp, "cdrom_%02i_speed", c + 1);
|
||||||
cdrom[c].speed = ini_section_get_int(cat, temp, 8);
|
cdrom[c].speed = ini_section_get_int(cat, temp, 8);
|
||||||
|
|
||||||
|
sprintf(temp, "cdrom_%02i_no_check", c + 1);
|
||||||
|
cdrom[c].no_check = ini_section_get_int(cat, temp, 0);
|
||||||
|
|
||||||
sprintf(temp, "cdrom_%02i_type", c + 1);
|
sprintf(temp, "cdrom_%02i_type", c + 1);
|
||||||
p = ini_section_get_string(cat, temp, cdrom[c].bus_type == CDROM_BUS_MKE ? "cr563" : "86cd");
|
p = ini_section_get_string(cat, temp, cdrom[c].bus_type == CDROM_BUS_MKE ? "cr563" : "86cd");
|
||||||
/* TODO: Configuration migration, remove when no longer needed. */
|
/* TODO: Configuration migration, remove when no longer needed. */
|
||||||
@@ -3405,6 +3408,12 @@ save_floppy_and_cdrom_drives(void)
|
|||||||
sprintf(temp, "cdrom_%02i_host_drive", c + 1);
|
sprintf(temp, "cdrom_%02i_host_drive", c + 1);
|
||||||
ini_section_delete_var(cat, temp);
|
ini_section_delete_var(cat, temp);
|
||||||
|
|
||||||
|
sprintf(temp, "cdrom_%02i_no_check", c + 1);
|
||||||
|
if (cdrom[c].no_check)
|
||||||
|
ini_section_set_int(cat, temp, cdrom[c].no_check);
|
||||||
|
else
|
||||||
|
ini_section_delete_var(cat, temp);
|
||||||
|
|
||||||
sprintf(temp, "cdrom_%02i_speed", c + 1);
|
sprintf(temp, "cdrom_%02i_speed", c + 1);
|
||||||
if ((cdrom[c].bus_type == 0) || (cdrom[c].speed == 8))
|
if ((cdrom[c].bus_type == 0) || (cdrom[c].speed == 8))
|
||||||
ini_section_delete_var(cat, temp);
|
ini_section_delete_var(cat, temp);
|
||||||
|
|||||||
@@ -367,6 +367,8 @@ typedef struct cdrom {
|
|||||||
uint8_t host_letter;
|
uint8_t host_letter;
|
||||||
uint8_t mode2;
|
uint8_t mode2;
|
||||||
|
|
||||||
|
int no_check;
|
||||||
|
|
||||||
uint8_t _F_LUT[_LUT_SIZE];
|
uint8_t _F_LUT[_LUT_SIZE];
|
||||||
uint8_t _B_LUT[_LUT_SIZE];
|
uint8_t _B_LUT[_LUT_SIZE];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user