Merge pull request #444 from gamemasterplc/main

Fix dvd.c
This commit is contained in:
Liam Coleman 2024-11-11 17:26:57 -06:00 committed by GitHub
commit ae3ebb8331
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 40 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

@ -210,6 +210,12 @@ cflags_runtime = [
"-inline auto,deferred",
]
# Dolphin library flags
cflags_dolphin = [
*cflags_base,
"-fp_contract off",
]
# Metrowerks library flags
cflags_msl = [
*cflags_base,
@ -304,7 +310,7 @@ def DolphinLib(lib_name, objects):
return {
"lib": lib_name,
"mw_version": "GC/1.2.5n",
"cflags": cflags_base,
"cflags": cflags_dolphin,
"host": False,
"objects": objects,
}
@ -496,7 +502,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;

View file

@ -1,5 +1,9 @@
#include "dolphin/mtx.h"
#include "math.h"
float acosf(float x);
float sinf(float x);
float cosf(float x);
void PSQUATMultiply(register const Quaternion *a, register const Quaternion *b, register Quaternion *ab)
{