SCSI changes 2:
Replaced the string comparisons with proper drive types comparisons without strings.
This commit is contained in:
@@ -531,7 +531,7 @@ cdrom_audio_play(cdrom_t *dev, uint32_t pos, uint32_t len, int ismsf)
|
||||
f = pos & 0xff;
|
||||
|
||||
/* NEC CDR-260 speaks BCD. */
|
||||
if (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.01") || (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.00"))) /*NEC*/
|
||||
if ((dev->type == CDROM_TYPE_NEC_260_100) || (dev->type == CDROM_TYPE_NEC_260_101)) /*NEC*/
|
||||
msf_from_bcd(&m, &s, &f);
|
||||
|
||||
if (pos == 0xffffff) {
|
||||
@@ -545,7 +545,7 @@ cdrom_audio_play(cdrom_t *dev, uint32_t pos, uint32_t len, int ismsf)
|
||||
f = len & 0xff;
|
||||
|
||||
/* NEC CDR-260 speaks BCD. */
|
||||
if (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.01") || (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.00"))) /*NEC*/
|
||||
if ((dev->type == CDROM_TYPE_NEC_260_100) || (dev->type == CDROM_TYPE_NEC_260_101)) /*NEC*/
|
||||
msf_from_bcd(&m, &s, &f);
|
||||
|
||||
len = MSFtoLBA(m, s, f) - 150;
|
||||
@@ -810,7 +810,7 @@ cdrom_get_current_subchannel(cdrom_t *dev, uint8_t *b, int msf)
|
||||
b[pos] = 0;
|
||||
|
||||
/* NEC CDR-260 speaks BCD. */
|
||||
if (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.01") || (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.00"))) /*NEC*/ {
|
||||
if ((dev->type == CDROM_TYPE_NEC_260_100) || (dev->type == CDROM_TYPE_NEC_260_101)) { /*NEC*/
|
||||
m = subc.abs_m;
|
||||
s = subc.abs_s;
|
||||
f = subc.abs_f;
|
||||
@@ -829,7 +829,7 @@ cdrom_get_current_subchannel(cdrom_t *dev, uint8_t *b, int msf)
|
||||
b[pos] = 0;
|
||||
|
||||
/* NEC CDR-260 speaks BCD. */
|
||||
if (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.01") || (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.00"))) /*NEC*/ {
|
||||
if ((dev->type == CDROM_TYPE_NEC_260_100) || (dev->type == CDROM_TYPE_NEC_260_101)) { /*NEC*/
|
||||
m = subc.rel_m;
|
||||
s = subc.rel_s;
|
||||
f = subc.rel_f;
|
||||
@@ -1063,7 +1063,7 @@ read_toc_normal(cdrom_t *dev, unsigned char *b, unsigned char start_track, int m
|
||||
b[len++] = 0;
|
||||
|
||||
/* NEC CDR-260 speaks BCD. */
|
||||
if (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.01") || (!strcmp(cdrom_drive_types[dev->type].internal_name, "NEC_CD-ROM_DRIVE260_1.00"))) { /*NEC*/
|
||||
if ((dev->type == CDROM_TYPE_NEC_260_100) || (dev->type == CDROM_TYPE_NEC_260_101)) { /*NEC*/
|
||||
m = ti.m;
|
||||
s = ti.s;
|
||||
f = ti.f;
|
||||
|
@@ -60,6 +60,52 @@ enum {
|
||||
CDROM_BUS_USB = 8
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CDROM_TYPE_86BOX_100,
|
||||
CDROM_TYPE_AZT_CDA46802I_115,
|
||||
CDROM_TYPE_BTC_BCD36XH_U10,
|
||||
CDROM_TYPE_GOLDSTAR_CRD_8160B_314,
|
||||
CDROM_TYPE_HITACHI_CDR_8130_0020,
|
||||
CDROM_TYPE_KENWOOD_UCR_421_208E,
|
||||
CDROM_TYPE_MATSHITA_587_7S13,
|
||||
CDROM_TYPE_MATSHITA_588_LS15,
|
||||
CDROM_TYPE_MATSHITA_571_10e,
|
||||
CDROM_TYPE_MATSHITA_572_10j,
|
||||
CDROM_TYPE_MITSUMI_FX4820T_D02A,
|
||||
CDROM_TYPE_NEC_260_100,
|
||||
CDROM_TYPE_NEC_260_101,
|
||||
CDROM_TYPE_NEC_273_420,
|
||||
CDROM_TYPE_NEC_280_105,
|
||||
CDROM_TYPE_NEC_280_308,
|
||||
CDROM_TYPE_PHILIPS_PCA403CD_U31P,
|
||||
CDROM_TYPE_SONY_CDU76_10i,
|
||||
CDROM_TYPE_SONY_CDU311_30h,
|
||||
CDROM_TYPE_TOSHIBA_5302TA_0305,
|
||||
CDROM_TYPE_TOSHIBA_5702B_TA70,
|
||||
CDROM_TYPE_CHINON_CDS431_H42,
|
||||
CDROM_TYPE_DEC_RRD45_0436,
|
||||
CDROM_TYPE_MATSHITA_501_10b,
|
||||
CDROM_TYPE_NEC_38_103,
|
||||
CDROM_TYPE_NEC_211_100,
|
||||
CDROM_TYPE_NEC_464_105,
|
||||
CDROM_TYPE_SONY_CDU541_10i,
|
||||
CDROM_TYPE_SONY_CDU561_18k,
|
||||
CDROM_TYPE_SONY_CDU76S_100,
|
||||
CDROM_TYPE_PHILIPS_CDD2600_107,
|
||||
CDROM_TYPE_PIONEER_DRM604X_2403,
|
||||
CDROM_TYPE_PLEXTOR_PX32TS_103,
|
||||
CDROM_TYPE_TEAC_CD50_100,
|
||||
CDROM_TYPE_TEAC_R55S_10R,
|
||||
CDROM_TYPE_TEXEL_DMXX24_100,
|
||||
CDROM_TYPE_TOSHIBA_XM_3433,
|
||||
CDROM_TYPE_TOSHIBA_XM3201B_3232,
|
||||
CDROM_TYPE_TOSHIBA_XM3301TA_0272,
|
||||
CDROM_TYPE_TOSHIBA_XM5701TA_3136,
|
||||
CDROM_TYPE_TOSHIBA_SDM1401_1008,
|
||||
CDROM_TYPES_NUM
|
||||
};
|
||||
|
||||
#define KNOWN_CDROM_DRIVE_TYPES 41
|
||||
#define BUS_TYPE_IDE CDROM_BUS_ATAPI
|
||||
#define BUS_TYPE_SCSI CDROM_BUS_SCSI
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user