inlined due to being referenced in only one place.
| 1213 | |
| 1214 | // inlined due to being referenced in only one place. |
| 1215 | __fi void cdvdActionInterrupt() |
| 1216 | { |
| 1217 | u8 ready_status = CDVD_DRIVE_READY; |
| 1218 | if (cdvd.AbortRequested) |
| 1219 | { |
| 1220 | Console.Warning("Action Abort %d", cdvd.Action); |
| 1221 | cdvd.Error = 0x1; // Abort Error |
| 1222 | ready_status |= CDVD_DRIVE_ERROR; |
| 1223 | cdvdUpdateReady(ready_status); |
| 1224 | cdvdUpdateStatus(CDVD_STATUS_PAUSE); |
| 1225 | cdvd.WaitingDMA = false; |
| 1226 | CDVDCancelReadAhead(); |
| 1227 | psxRegs.interrupt &= ~(1 << IopEvt_Cdvd); // Stop any current reads |
| 1228 | } |
| 1229 | |
| 1230 | switch (cdvd.Action) |
| 1231 | { |
| 1232 | case cdvdAction_Seek: |
| 1233 | cdvd.Spinning = true; |
| 1234 | cdvdUpdateReady(ready_status); |
| 1235 | cdvd.CurrentSector = cdvd.SeekToSector; |
| 1236 | cdvdUpdateStatus(CDVD_STATUS_PAUSE); |
| 1237 | CDVDSECTORREADY_INT(cdvd.ReadTime); |
| 1238 | break; |
| 1239 | |
| 1240 | case cdvdAction_Standby: |
| 1241 | DevCon.Warning("CDVD Standby Call"); |
| 1242 | cdvd.Spinning = true; //check (rama) |
| 1243 | cdvdUpdateReady(ready_status); |
| 1244 | cdvd.CurrentSector = cdvd.SeekToSector; |
| 1245 | cdvdUpdateStatus(CDVD_STATUS_PAUSE); |
| 1246 | cdvd.nextSectorsBuffered = 0; |
| 1247 | CDVDSECTORREADY_INT(cdvd.ReadTime); |
| 1248 | break; |
| 1249 | |
| 1250 | case cdvdAction_Stop: |
| 1251 | cdvd.Spinning = false; |
| 1252 | cdvdUpdateReady(ready_status); |
| 1253 | cdvd.CurrentSector = 0; |
| 1254 | cdvdUpdateStatus(CDVD_STATUS_STOP); |
| 1255 | break; |
| 1256 | |
| 1257 | default: // cdvdAction_Error |
| 1258 | cdvdUpdateReady(CDVD_DRIVE_READY | CDVD_DRIVE_ERROR); |
| 1259 | cdvdUpdateStatus(CDVD_STATUS_PAUSE); |
| 1260 | break; |
| 1261 | } |
| 1262 | |
| 1263 | cdvd.Action = cdvdAction_None; |
| 1264 | cdvdSetIrq(); |
| 1265 | } |
| 1266 | |
| 1267 | __fi void cdvdSectorReady() |
| 1268 | { |
no test coverage detected