MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / cbForStateBusy

Function cbForStateBusy

src/dolphin/src/dvd/dvd.c:869–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

867}
868
869static void cbForStateBusy(u32 intType)
870{
871 DVDCommandBlock* finished;
872
873 if (intType == 16)
874 {
875 executing->state = -1;
876 stateTimeout();
877 return;
878 }
879
880 if ((CurrCommand == 3) || (CurrCommand == 15))
881 {
882 if (intType & 2)
883 {
884 executing->state = -1;
885 stateError(0x1234567);
886 return;
887 }
888
889 NumInternalRetry = 0;
890
891 if (CurrCommand == 15)
892 {
893 ResetRequired = TRUE;
894 }
895
896 if (CheckCancel(7))
897 {
898 return;
899 }
900
901 executing->state = 7;
902 stateMotorStopped();
903 return;
904 }
905
906 if (IsDmaCommand(CurrCommand))
907 {
908 executing->transferredSize += executing->currTransferSize - __DIRegs[6];
909 }
910
911 if (intType & 8)
912 {
913 Canceling = FALSE;
914 finished = executing;
915 executing = &DummyCommandBlock;
916
917 finished->state = 10;
918 if (finished->callback)
919 (*finished->callback)(-3, finished);
920 if (CancelCallback)
921 (CancelCallback)(0, finished);
922 stateReady();
923
924 return;
925 }
926

Callers

nothing calls this directly

Calls 10

stateTimeoutFunction · 0.85
stateErrorFunction · 0.85
CheckCancelFunction · 0.85
stateMotorStoppedFunction · 0.85
IsDmaCommandFunction · 0.85
stateReadyFunction · 0.85
stateBusyFunction · 0.85
IsImmCommandWithResultFunction · 0.85
DVDLowAudioStreamFunction · 0.85
stateGettingErrorFunction · 0.85

Tested by

no test coverage detected