mirror of
https://github.com/libretro/beetle-pce-fast-libretro.git
synced 2024-11-26 17:40:40 +00:00
Cleanups
This commit is contained in:
parent
e16cfa1da0
commit
34ac45b465
@ -740,19 +740,19 @@ static DECLFR(IORead)
|
||||
{
|
||||
PCEF_CASEL(VDC_00, 0x00):
|
||||
HuC6280_StealCycle();
|
||||
return(VDC_Read(0, false));
|
||||
return(VDC_Read(0));
|
||||
|
||||
PCEF_CASEL(VDC_01, 0x01):
|
||||
HuC6280_StealCycle();
|
||||
return(VDC_Read(1, false));
|
||||
return(VDC_Read(1));
|
||||
|
||||
PCEF_CASEL(VDC_02, 0x02):
|
||||
HuC6280_StealCycle();
|
||||
return(VDC_Read(2, false));
|
||||
return(VDC_Read(2));
|
||||
|
||||
PCEF_CASEL(VDC_03, 0x03):
|
||||
HuC6280_StealCycle();
|
||||
return(VDC_Read(3, false));
|
||||
return(VDC_Read(3));
|
||||
|
||||
PCEF_CASEL(VCE_00, 0x04):
|
||||
PCEF_CASEL(VCE_01, 0x05):
|
||||
|
@ -428,15 +428,11 @@ int32_t CDAccess_CHD::MakeSubPQ(int32_t lba, uint8_t *SubPWBuf) const
|
||||
uint32_t ma, sa, fa;
|
||||
uint32_t m, s, f;
|
||||
uint8_t pause_or = 0x00;
|
||||
bool track_found = false;
|
||||
|
||||
for (track = FirstTrack; track < (FirstTrack + NumTracks); track++)
|
||||
{
|
||||
if (lba >= (Tracks[track].LBA - Tracks[track].pregap_dv - Tracks[track].pregap) && lba < (Tracks[track].LBA + Tracks[track].sectors + Tracks[track].postgap))
|
||||
{
|
||||
track_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (lba < Tracks[track].LBA)
|
||||
|
@ -1217,22 +1217,15 @@ int32_t CDAccess_Image::MakeSubPQ(int32_t lba, uint8_t *SubPWBuf) const
|
||||
uint32_t ma, sa, fa;
|
||||
uint32_t m, s, f;
|
||||
uint8_t pause_or = 0x00;
|
||||
bool track_found = false;
|
||||
|
||||
for(track = FirstTrack; track < (FirstTrack + NumTracks); track++)
|
||||
{
|
||||
if(lba >= (Tracks[track].LBA - Tracks[track].pregap_dv - Tracks[track].pregap) && lba < (Tracks[track].LBA + Tracks[track].sectors + Tracks[track].postgap))
|
||||
{
|
||||
track_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(!track_found)
|
||||
throw(MDFN_Error(0, _("Could not find track for sector %u!"), lba));
|
||||
#endif
|
||||
|
||||
if(lba < Tracks[track].LBA)
|
||||
lba_relative = Tracks[track].LBA - 1 - lba;
|
||||
else
|
||||
|
@ -174,8 +174,6 @@ static int simple_lec(unsigned char *frame)
|
||||
|
||||
int ValidateRawSector(unsigned char *frame, bool xaMode)
|
||||
{
|
||||
int lec_did_sth = false;
|
||||
|
||||
/* Do simple L-EC.
|
||||
It seems that drives stop their internal L-EC as soon as the
|
||||
EDC is okay, so we may see uncorrected errors in the parity bytes.
|
||||
@ -192,8 +190,6 @@ int ValidateRawSector(unsigned char *frame, bool xaMode)
|
||||
memset(frame + 12, 0, 4);
|
||||
}
|
||||
|
||||
lec_did_sth = simple_lec(frame);
|
||||
|
||||
if(xaMode)
|
||||
memcpy(frame + 12, header, 4);
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ DECLFW(VDC_Write);
|
||||
|
||||
DECLFR(VCE_Read);
|
||||
|
||||
static INLINE uint8 VDC_Read(unsigned int A, bool SGX)
|
||||
static INLINE uint8 VDC_Read(unsigned int A)
|
||||
{
|
||||
uint8 ret = 0;
|
||||
int msb = A & 1;
|
||||
|
Loading…
Reference in New Issue
Block a user