Fix dvd.c

This commit is contained in:
gamemasterplc 2024-11-11 17:20:41 -06:00
parent 691a938104
commit 5bfbe7814b
3 changed files with 3 additions and 38 deletions

View file

@ -5627,7 +5627,7 @@ Prepared = .sbss:0x801D4320; // type:object size:0x8 scope:local data:4byte
ResetFunctionQueue = .sbss:0x801D4328; // type:object size:0x8 scope:local data:4byte
ResetCallback = .sbss:0x801D4330; // type:object size:0x4 data:4byte
Down = .sbss:0x801D4334; // type:object size:0x4 data:4byte
LastState = .sbss:0x801D4338; // type:object size:0x8 data:4byte
LastState = .sbss:0x801D4338; // type:object size:0x8 scope:local data:4byte
HoldUp = .sbss:0x801D4340; // type:object size:0x8 align:8 data:4byte
HoldDown = .sbss:0x801D4348; // type:object size:0x8 align:8 data:4byte
RunQueueBits = .sbss:0x801D4350; // type:object size:0x4 scope:local data:4byte

View file

@ -496,7 +496,7 @@ config.libs = [
[
Object(Matching, "dolphin/dvd/dvdlow.c"),
Object(Matching, "dolphin/dvd/dvdfs.c"),
Object(NonMatching, "dolphin/dvd/dvd.c"),
Object(Matching, "dolphin/dvd/dvd.c"),
Object(Matching, "dolphin/dvd/dvdqueue.c"),
Object(Matching, "dolphin/dvd/dvderror.c"),
Object(Matching, "dolphin/dvd/fstload.c"),

View file

@ -6,7 +6,6 @@
#include <dolphin/os/OSBootInfo.h>
typedef void (*stateFunc)(DVDCommandBlock *block);
stateFunc LastState;
extern OSThreadQueue __DVDThreadQueue;
@ -34,6 +33,7 @@ static DVDCommandBlock DummyCommandBlock;
static OSAlarm ResetAlarm;
static BOOL DVDInitialized = FALSE;
static stateFunc LastState;
/* States */
static void stateReadingFST();
@ -736,41 +736,6 @@ static void stateBusy(DVDCommandBlock *block)
}
}
// removing these matches DVDCancelAsync and DVDCheckDisk
static u32 ImmCommand[] = { 0xffffffff, 0xffffffff, 0xffffffff };
static u32 DmaCommand[] = { 0xffffffff };
inline static BOOL IsImmCommandWithResult(u32 command)
{
u32 i;
if (command == 9 || command == 10 || command == 11 || command == 12) {
return TRUE;
}
for (i = 0; i < sizeof(ImmCommand) / sizeof(ImmCommand[0]); i++) {
if (command == ImmCommand[i])
return TRUE;
}
return FALSE;
}
inline static BOOL IsDmaCommand(u32 command)
{
u32 i;
if (command == 1 || command == 4 || command == 5 || command == 14)
return TRUE;
for (i = 0; i < sizeof(DmaCommand) / sizeof(DmaCommand[0]); i++) {
if (command == DmaCommand[i])
return TRUE;
}
return FALSE;
}
void cbForStateBusy(u32 intType)
{
DVDCommandBlock *finished;