MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / cdvdReadErrorHandler

Function cdvdReadErrorHandler

pcsx2/CDVD/CDVD.cpp:1850–1870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1848}
1849
1850static bool cdvdReadErrorHandler()
1851{
1852 if (cdvd.SectorCnt <= 0)
1853 {
1854 DevCon.Warning("Bad Sector Count Error");
1855 cdvd.Error = 0x21; // Number of read sectors abnormal
1856 return false;
1857 }
1858
1859 if (cdvd.SeekToSector >= cdvd.MaxSector)
1860 {
1861 DevCon.Warning("Error reading past end of disc");
1862 // Probably should be 0x20 (bad LSN) but apparently Silent Hill 2 Black Ribbon has a fade at the end of the first trailer
1863 // And the only way you can throw an error and it still does that is to use 0x30 (Read error), anything else it skips the fade.
1864 // This'll do for now but needs investigation
1865 cdvd.Error = 0x30; // Problem occurred during read
1866 return false;
1867 }
1868
1869 return true;
1870}
1871
1872static bool cdvdCommandErrorHandler()
1873{

Callers 1

cdvdWrite04Function · 0.85

Calls 1

WarningMethod · 0.45

Tested by

no test coverage detected