| 1848 | } |
| 1849 | |
| 1850 | static 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 | |
| 1872 | static bool cdvdCommandErrorHandler() |
| 1873 | { |