Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"__gx.h": "c",
"gxenum.h": "c",
"gxmanage.h": "c",
"__ax.h": "c"
"__ax.h": "c",
"math_api.h": "c",
"arith.h": "c"
},
// Disable C/C++ IntelliSense, use clangd instead
"C_Cpp.intelliSenseEngine": "default",
Expand Down
56 changes: 28 additions & 28 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,33 +475,33 @@ def MatchingFor(*versions):
Object(NonMatching, "dolphin/src/axfx/reverb_hi.c"),
Object(NonMatching, "dolphin/src/axfx/reverb_std.c"),
Object(NonMatching, "dolphin/src/axfx/chorus.c"),
Object(NonMatching, "dolphin/src/axfx/delay.c"),
Object(NonMatching, "dolphin/src/axfx/axfx.c"),
Object(Matching, "dolphin/src/axfx/delay.c"),
Object(Matching, "dolphin/src/axfx/axfx.c"),
Object(NonMatching, "dolphin/src/axfx/reverb_hi_4ch.c"),
]
),
DolphinLib(
"base",
[
Object(NonMatching, "dolphin/src/base/PPCArch.c")
Object(Matching, "dolphin/src/base/PPCArch.c")
]
),
DolphinLib(
"card",
[
Object(NonMatching, "dolphin/src/card/CARDBios.c"),
Object(Matching, "dolphin/src/card/CARDBios.c"),
Object(NonMatching, "dolphin/src/card/CARDUnlock.c"),
Object(NonMatching, "dolphin/src/card/CARDRdwr.c"),
Object(NonMatching, "dolphin/src/card/CARDBlock.c"),
Object(NonMatching, "dolphin/src/card/CARDDir.c"),
Object(NonMatching, "dolphin/src/card/CARDCheck.c"),
Object(NonMatching, "dolphin/src/card/CARDMount.c"),
Object(NonMatching, "dolphin/src/card/CARDFormat.c"),
Object(Matching, "dolphin/src/card/CARDRdwr.c"),
Object(Matching, "dolphin/src/card/CARDBlock.c"),
Object(Matching, "dolphin/src/card/CARDDir.c"),
Object(Matching, "dolphin/src/card/CARDCheck.c"),
Object(Matching, "dolphin/src/card/CARDMount.c"),
Object(Matching, "dolphin/src/card/CARDFormat.c"),
Object(NonMatching, "dolphin/src/card/CARDOpen.c"),
Object(NonMatching, "dolphin/src/card/CARDCreate.c"),
Object(Matching, "dolphin/src/card/CARDCreate.c"),
Object(NonMatching, "dolphin/src/card/CARDRead.c"),
Object(NonMatching, "dolphin/src/card/CARDWrite.c"),
Object(NonMatching, "dolphin/src/card/CARDDelete.c"),
Object(Matching, "dolphin/src/card/CARDWrite.c"),
Object(Matching, "dolphin/src/card/CARDDelete.c"),
Object(NonMatching, "dolphin/src/card/CARDStat.c"),
Object(NonMatching,"dolphin/src/card/CARDStatEx.c"),
Object(NonMatching, "dolphin/src/card/CARDNet.c"),
Expand All @@ -510,14 +510,14 @@ def MatchingFor(*versions):
DolphinLib(
"db",
[
Object(NonMatching, "dolphin/src/db/db.c"),
Object(Matching, "dolphin/src/db/db.c"),
]
),
DolphinLib(
"dsp",
[
Object(NonMatching, "dolphin/src/dsp/dsp.c"),
Object(NonMatching, "dolphin/src/dsp/dsp_debug.c"),
Object(Matching, "dolphin/src/dsp/dsp_debug.c"),
Object(NonMatching, "dolphin/src/dsp/dsp_task.c")
]
),
Expand All @@ -527,18 +527,18 @@ def MatchingFor(*versions):
Object(NonMatching, "dolphin/src/dvd/dvdlow.c"),
Object(NonMatching, "dolphin/src/dvd/dvdfs.c"),
Object(NonMatching, "dolphin/src/dvd/dvd.c"),
Object(NonMatching, "dolphin/src/dvd/dvdqueue.c"),
Object(NonMatching, "dolphin/src/dvd/dvderror.c"),
Object(NonMatching, "dolphin/src/dvd/dvdidutils.c"),
Object(NonMatching, "dolphin/src/dvd/dvdFatal.c"),
Object(NonMatching, "dolphin/src/dvd/emu_level2/fstload.c"),
Object(Matching, "dolphin/src/dvd/dvdqueue.c"),
Object(Matching, "dolphin/src/dvd/dvderror.c"),
Object(Matching, "dolphin/src/dvd/dvdidutils.c"),
Object(Matching, "dolphin/src/dvd/dvdFatal.c"),
Object(Matching, "dolphin/src/dvd/emu_level2/fstload.c"),
],
),
DolphinLib(
"exi",
[
Object(NonMatching, "dolphin/src/exi/EXIBios.c"),
Object(NonMatching, "dolphin/src/exi/EXIUart.c")
Object(Matching, "dolphin/src/exi/EXIBios.c"),
Object(Matching, "dolphin/src/exi/EXIUart.c")
]
),
DolphinLib(
Expand Down Expand Up @@ -669,11 +669,11 @@ def MatchingFor(*versions):
Object(Matching, "MSL_C/MSL_Common/errno.c"),
Object(NonMatching, "MSL_C/MSL_Common/file_io.c"),
Object(NonMatching, "MSL_C/MSL_Common/FILE_POS.C"),
Object(NonMatching, "MSL_C/MSL_Common/locale.c"),
Object(Matching, "MSL_C/MSL_Common/locale.c"),
Object(NonMatching, "MSL_C/MSL_Common/mbstring.c"),
Object(NonMatching, "MSL_C/MSL_Common/mem.c"),
Object(NonMatching, "MSL_C/MSL_Common/mem_funcs.c"),
Object(NonMatching, "MSL_C/MSL_Common/misc_io.c"),
Object(Matching, "MSL_C/MSL_Common/misc_io.c"),
Object(NonMatching, "MSL_C/MSL_Common/printf.c"),
Object(NonMatching, "MSL_C/MSL_Common/qsort.c"),
Object(NonMatching, "MSL_C/MSL_Common/rand.c"),
Expand All @@ -682,7 +682,7 @@ def MatchingFor(*versions):
Object(NonMatching, "MSL_C/MSL_Common/string.c"),
Object(NonMatching, "MSL_C/MSL_Common/strtold.c"),
Object(NonMatching, "MSL_C/MSL_Common/strtoul.c"),
Object(NonMatching, "MSL_C/MSL_Common/float.c"),
Object(Matching, "MSL_C/MSL_Common/float.c"),
Object(NonMatching, "MSL_C/MSL_Common/char_io.c"),
Object(NonMatching, "MSL_C/MSL_Common/wchar_io.c"),
Object(NonMatching, "MSL_C/MSL_Common_Embedded/uart_console_io_gcn.c")
Expand All @@ -692,8 +692,8 @@ def MatchingFor(*versions):
"fdlibm.PPCEABI.H",
[],
[
Object(NonMatching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c"),
Object(NonMatching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c"),
Expand Down Expand Up @@ -721,7 +721,7 @@ def MatchingFor(*versions):
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c"),
Object(NonMatching, "MSL_C/PPC_EABI/math_ppc.c"),
Object(Matching, "MSL_C/PPC_EABI/math_ppc.c"),
]
),
trkLib(
Expand Down
24 changes: 24 additions & 0 deletions dwarf/SB04_Multi_Sku/Engine/Game/zStreamedSound.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef ZSTREAMEDSOUND_H
#define ZSTREAMEDSOUND_H

#include "iSnd.h"

struct zStreamedSoundList
{
U32 mNumSounds;
zStreamedSound* mSounds;

void Reset();
void InitWithSounds(zStreamedSound* soundList);
};

struct zStreamedSound
{
char* mAssetName;
F32 mCycleTime;
U32 mFlags;
F32 mSoonestTimeToPlay;
iSndGroupHandle mSoundGroupHdl;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ MATH_INLINE float cosf(float __x)
return cos((double)__x);
}

MATH_INLINE float atanf(float __x)
// The 3 inlines below were originally MATH_INLINE
// Changed to correct issues. Change back if needed

inline float atanf(float __x)
{
return atan((double)__x);
}

MATH_INLINE int __fpclassifyf(f32 x)
inline int __fpclassifyf(f32 x)
{
switch ((*(s32*)&x) & 0x7f800000)
{
Expand All @@ -60,7 +63,7 @@ MATH_INLINE int __fpclassifyf(f32 x)
return 4;
}

MATH_INLINE int __fpclassifyd(f64 x)
inline int __fpclassifyd(f64 x)
{
switch (__HI(x) & 0x7ff00000)
{
Expand Down
16 changes: 8 additions & 8 deletions src/PowerPC_EABI_Support/src/MSL_C/MSL_Common/float.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
long __float_nan[] = { 0x7FFFFFFF };
long __float_huge[] = { 0x7F800000 };
long __double_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
long __double_huge[] = { 0x7FF00000, 0 };
long __extended_min[] = { 0x00100000, 0 };
long __extended_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
long __float_max[] = { 0x7F7FFFFF };
long __float_epsilon[] = { 0x34000000 };
long __float_nan[] = { 0x7FFFFFFF };
long __float_huge[] = { 0x7F800000 };
long __double_min[] = { 0x00100000, 0x00000000 };
long __double_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
long __double_huge[] = { 0x7FF00000, 0 };
long __extended_min[] = { 0x00100000, 0 };
long __extended_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
long __float_max[] = { 0x7F7FFFFF };
55 changes: 28 additions & 27 deletions src/PowerPC_EABI_Support/src/MSL_C/MSL_Common/locale.c
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
#include "types.h"

typedef struct {
char* _0;
char* _4;
char* _8;
char* _C;
char* _10;
char* _14;
char* _18;
char* _1C;
char* _20;
char _24;
char _25;
char _26;
char _27;
char _28;
char _29;
char _2A;
char* _2C;
char _30;
char _31;
char _32;
char _33;
char _34;
char _35;
char _36;
typedef struct
{
char* _0;
char* _4;
char* _8;
char* _C;
char* _10;
char* _14;
char* _18;
char* _1C;
char* _20;
char _24;
char _25;
char _26;
char _27;
char _28;
char _29;
char _2A;
char* _2C;
char _30;
char _31;
char _32;
char _33;
char _34;
char _35;
char _36;
} lconv;

lconv __lconv
= { ".", "", "", "", "", "", "", "", "", 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, "", 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F };
lconv __lconv = { ".", "", "", "", "", "", "", "", "", 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x7F, 0x7F, "", 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F };

const char* dummy = "C";
21 changes: 2 additions & 19 deletions src/PowerPC_EABI_Support/src/MSL_C/MSL_Common/misc_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@ extern void (*__stdio_exit)(void);

extern void __close_all(void);

void clearerr(void)
void __stdio_atexit(void)
{
// UNUSED FUNCTION
__stdio_exit = __close_all;
}

void feof(void)
{
// UNUSED FUNCTION
}

void ferror(void)
{
// UNUSED FUNCTION
}

void perror(void)
{
// UNUSED FUNCTION
}

void __stdio_atexit(void) { __stdio_exit = __close_all; }
2 changes: 1 addition & 1 deletion src/PowerPC_EABI_Support/src/MSL_C/MSL_Common/rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ int rand()
return ((next >> 16) & 0x7fff);
}

void srand(u32 seed)
inline void srand(u32 seed)
{
next = seed;
}
Loading