Skip to content

Commit 6c6bc17

Browse files
committed
Linked more of the SDK
1 parent 2e2f83a commit 6c6bc17

File tree

19 files changed

+681
-658
lines changed

19 files changed

+681
-658
lines changed

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
"__gx.h": "c",
2323
"gxenum.h": "c",
2424
"gxmanage.h": "c",
25-
"__ax.h": "c"
25+
"__ax.h": "c",
26+
"math_api.h": "c",
27+
"arith.h": "c"
2628
},
2729
// Disable C/C++ IntelliSense, use clangd instead
2830
"C_Cpp.intelliSenseEngine": "default",

configure.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -475,33 +475,33 @@ def MatchingFor(*versions):
475475
Object(NonMatching, "dolphin/src/axfx/reverb_hi.c"),
476476
Object(NonMatching, "dolphin/src/axfx/reverb_std.c"),
477477
Object(NonMatching, "dolphin/src/axfx/chorus.c"),
478-
Object(NonMatching, "dolphin/src/axfx/delay.c"),
479-
Object(NonMatching, "dolphin/src/axfx/axfx.c"),
478+
Object(Matching, "dolphin/src/axfx/delay.c"),
479+
Object(Matching, "dolphin/src/axfx/axfx.c"),
480480
Object(NonMatching, "dolphin/src/axfx/reverb_hi_4ch.c"),
481481
]
482482
),
483483
DolphinLib(
484484
"base",
485485
[
486-
Object(NonMatching, "dolphin/src/base/PPCArch.c")
486+
Object(Matching, "dolphin/src/base/PPCArch.c")
487487
]
488488
),
489489
DolphinLib(
490490
"card",
491491
[
492-
Object(NonMatching, "dolphin/src/card/CARDBios.c"),
492+
Object(Matching, "dolphin/src/card/CARDBios.c"),
493493
Object(NonMatching, "dolphin/src/card/CARDUnlock.c"),
494-
Object(NonMatching, "dolphin/src/card/CARDRdwr.c"),
495-
Object(NonMatching, "dolphin/src/card/CARDBlock.c"),
496-
Object(NonMatching, "dolphin/src/card/CARDDir.c"),
497-
Object(NonMatching, "dolphin/src/card/CARDCheck.c"),
498-
Object(NonMatching, "dolphin/src/card/CARDMount.c"),
499-
Object(NonMatching, "dolphin/src/card/CARDFormat.c"),
494+
Object(Matching, "dolphin/src/card/CARDRdwr.c"),
495+
Object(Matching, "dolphin/src/card/CARDBlock.c"),
496+
Object(Matching, "dolphin/src/card/CARDDir.c"),
497+
Object(Matching, "dolphin/src/card/CARDCheck.c"),
498+
Object(Matching, "dolphin/src/card/CARDMount.c"),
499+
Object(Matching, "dolphin/src/card/CARDFormat.c"),
500500
Object(NonMatching, "dolphin/src/card/CARDOpen.c"),
501-
Object(NonMatching, "dolphin/src/card/CARDCreate.c"),
501+
Object(Matching, "dolphin/src/card/CARDCreate.c"),
502502
Object(NonMatching, "dolphin/src/card/CARDRead.c"),
503-
Object(NonMatching, "dolphin/src/card/CARDWrite.c"),
504-
Object(NonMatching, "dolphin/src/card/CARDDelete.c"),
503+
Object(Matching, "dolphin/src/card/CARDWrite.c"),
504+
Object(Matching, "dolphin/src/card/CARDDelete.c"),
505505
Object(NonMatching, "dolphin/src/card/CARDStat.c"),
506506
Object(NonMatching,"dolphin/src/card/CARDStatEx.c"),
507507
Object(NonMatching, "dolphin/src/card/CARDNet.c"),
@@ -510,14 +510,14 @@ def MatchingFor(*versions):
510510
DolphinLib(
511511
"db",
512512
[
513-
Object(NonMatching, "dolphin/src/db/db.c"),
513+
Object(Matching, "dolphin/src/db/db.c"),
514514
]
515515
),
516516
DolphinLib(
517517
"dsp",
518518
[
519519
Object(NonMatching, "dolphin/src/dsp/dsp.c"),
520-
Object(NonMatching, "dolphin/src/dsp/dsp_debug.c"),
520+
Object(Matching, "dolphin/src/dsp/dsp_debug.c"),
521521
Object(NonMatching, "dolphin/src/dsp/dsp_task.c")
522522
]
523523
),
@@ -527,18 +527,18 @@ def MatchingFor(*versions):
527527
Object(NonMatching, "dolphin/src/dvd/dvdlow.c"),
528528
Object(NonMatching, "dolphin/src/dvd/dvdfs.c"),
529529
Object(NonMatching, "dolphin/src/dvd/dvd.c"),
530-
Object(NonMatching, "dolphin/src/dvd/dvdqueue.c"),
531-
Object(NonMatching, "dolphin/src/dvd/dvderror.c"),
532-
Object(NonMatching, "dolphin/src/dvd/dvdidutils.c"),
533-
Object(NonMatching, "dolphin/src/dvd/dvdFatal.c"),
534-
Object(NonMatching, "dolphin/src/dvd/emu_level2/fstload.c"),
530+
Object(Matching, "dolphin/src/dvd/dvdqueue.c"),
531+
Object(Matching, "dolphin/src/dvd/dvderror.c"),
532+
Object(Matching, "dolphin/src/dvd/dvdidutils.c"),
533+
Object(Matching, "dolphin/src/dvd/dvdFatal.c"),
534+
Object(Matching, "dolphin/src/dvd/emu_level2/fstload.c"),
535535
],
536536
),
537537
DolphinLib(
538538
"exi",
539539
[
540-
Object(NonMatching, "dolphin/src/exi/EXIBios.c"),
541-
Object(NonMatching, "dolphin/src/exi/EXIUart.c")
540+
Object(Matching, "dolphin/src/exi/EXIBios.c"),
541+
Object(Matching, "dolphin/src/exi/EXIUart.c")
542542
]
543543
),
544544
DolphinLib(
@@ -669,11 +669,11 @@ def MatchingFor(*versions):
669669
Object(Matching, "MSL_C/MSL_Common/errno.c"),
670670
Object(NonMatching, "MSL_C/MSL_Common/file_io.c"),
671671
Object(NonMatching, "MSL_C/MSL_Common/FILE_POS.C"),
672-
Object(NonMatching, "MSL_C/MSL_Common/locale.c"),
672+
Object(Matching, "MSL_C/MSL_Common/locale.c"),
673673
Object(NonMatching, "MSL_C/MSL_Common/mbstring.c"),
674674
Object(NonMatching, "MSL_C/MSL_Common/mem.c"),
675675
Object(NonMatching, "MSL_C/MSL_Common/mem_funcs.c"),
676-
Object(NonMatching, "MSL_C/MSL_Common/misc_io.c"),
676+
Object(Matching, "MSL_C/MSL_Common/misc_io.c"),
677677
Object(NonMatching, "MSL_C/MSL_Common/printf.c"),
678678
Object(NonMatching, "MSL_C/MSL_Common/qsort.c"),
679679
Object(NonMatching, "MSL_C/MSL_Common/rand.c"),
@@ -682,7 +682,7 @@ def MatchingFor(*versions):
682682
Object(NonMatching, "MSL_C/MSL_Common/string.c"),
683683
Object(NonMatching, "MSL_C/MSL_Common/strtold.c"),
684684
Object(NonMatching, "MSL_C/MSL_Common/strtoul.c"),
685-
Object(NonMatching, "MSL_C/MSL_Common/float.c"),
685+
Object(Matching, "MSL_C/MSL_Common/float.c"),
686686
Object(NonMatching, "MSL_C/MSL_Common/char_io.c"),
687687
Object(NonMatching, "MSL_C/MSL_Common/wchar_io.c"),
688688
Object(NonMatching, "MSL_C/MSL_Common_Embedded/uart_console_io_gcn.c")
@@ -692,8 +692,8 @@ def MatchingFor(*versions):
692692
"fdlibm.PPCEABI.H",
693693
[],
694694
[
695-
Object(NonMatching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c"),
696-
Object(NonMatching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c"),
695+
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c"),
696+
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c"),
697697
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c"),
698698
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c"),
699699
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c"),
@@ -721,7 +721,7 @@ def MatchingFor(*versions):
721721
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c"),
722722
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log.c"),
723723
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c"),
724-
Object(NonMatching, "MSL_C/PPC_EABI/math_ppc.c"),
724+
Object(Matching, "MSL_C/PPC_EABI/math_ppc.c"),
725725
]
726726
),
727727
trkLib(

src/PowerPC_EABI_Support/include/PowerPC_EABI_Support/MSL_C/MSL_Common/math_api.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ MATH_INLINE float cosf(float __x)
3131
return cos((double)__x);
3232
}
3333

34-
MATH_INLINE float atanf(float __x)
34+
// The 3 inlines below were originally MATH_INLINE
35+
// Changed to correct issues. Change back if needed
36+
37+
inline float atanf(float __x)
3538
{
3639
return atan((double)__x);
3740
}
3841

39-
MATH_INLINE int __fpclassifyf(f32 x)
42+
inline int __fpclassifyf(f32 x)
4043
{
4144
switch ((*(s32*)&x) & 0x7f800000)
4245
{
@@ -60,7 +63,7 @@ MATH_INLINE int __fpclassifyf(f32 x)
6063
return 4;
6164
}
6265

63-
MATH_INLINE int __fpclassifyd(f64 x)
66+
inline int __fpclassifyd(f64 x)
6467
{
6568
switch (__HI(x) & 0x7ff00000)
6669
{
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
long __float_nan[] = { 0x7FFFFFFF };
2-
long __float_huge[] = { 0x7F800000 };
3-
long __double_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
4-
long __double_huge[] = { 0x7FF00000, 0 };
5-
long __extended_min[] = { 0x00100000, 0 };
6-
long __extended_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
7-
long __float_max[] = { 0x7F7FFFFF };
8-
long __float_epsilon[] = { 0x34000000 };
1+
long __float_nan[] = { 0x7FFFFFFF };
2+
long __float_huge[] = { 0x7F800000 };
3+
long __double_min[] = { 0x00100000, 0x00000000 };
4+
long __double_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
5+
long __double_huge[] = { 0x7FF00000, 0 };
6+
long __extended_min[] = { 0x00100000, 0 };
7+
long __extended_max[] = { 0x7FEFFFFF, 0xFFFFFFFF };
8+
long __float_max[] = { 0x7F7FFFFF };
Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
#include "types.h"
22

3-
typedef struct {
4-
char* _0;
5-
char* _4;
6-
char* _8;
7-
char* _C;
8-
char* _10;
9-
char* _14;
10-
char* _18;
11-
char* _1C;
12-
char* _20;
13-
char _24;
14-
char _25;
15-
char _26;
16-
char _27;
17-
char _28;
18-
char _29;
19-
char _2A;
20-
char* _2C;
21-
char _30;
22-
char _31;
23-
char _32;
24-
char _33;
25-
char _34;
26-
char _35;
27-
char _36;
3+
typedef struct
4+
{
5+
char* _0;
6+
char* _4;
7+
char* _8;
8+
char* _C;
9+
char* _10;
10+
char* _14;
11+
char* _18;
12+
char* _1C;
13+
char* _20;
14+
char _24;
15+
char _25;
16+
char _26;
17+
char _27;
18+
char _28;
19+
char _29;
20+
char _2A;
21+
char* _2C;
22+
char _30;
23+
char _31;
24+
char _32;
25+
char _33;
26+
char _34;
27+
char _35;
28+
char _36;
2829
} lconv;
2930

30-
lconv __lconv
31-
= { ".", "", "", "", "", "", "", "", "", 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, "", 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F };
31+
lconv __lconv = { ".", "", "", "", "", "", "", "", "", 0x7F, 0x7F, 0x7F,
32+
0x7F, 0x7F, 0x7F, 0x7F, "", 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F };
3233

3334
const char* dummy = "C";

src/PowerPC_EABI_Support/src/MSL_C/MSL_Common/misc_io.c

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,7 @@ extern void (*__stdio_exit)(void);
22

33
extern void __close_all(void);
44

5-
void clearerr(void)
5+
void __stdio_atexit(void)
66
{
7-
// UNUSED FUNCTION
7+
__stdio_exit = __close_all;
88
}
9-
10-
void feof(void)
11-
{
12-
// UNUSED FUNCTION
13-
}
14-
15-
void ferror(void)
16-
{
17-
// UNUSED FUNCTION
18-
}
19-
20-
void perror(void)
21-
{
22-
// UNUSED FUNCTION
23-
}
24-
25-
void __stdio_atexit(void) { __stdio_exit = __close_all; }

src/PowerPC_EABI_Support/src/MSL_C/MSL_Common/rand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ int rand()
88
return ((next >> 16) & 0x7fff);
99
}
1010

11-
void srand(u32 seed)
11+
inline void srand(u32 seed)
1212
{
1313
next = seed;
1414
}

0 commit comments

Comments
 (0)