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
16 changes: 15 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,21 @@
"*.inc": "c",
".clangd": "yaml",
"cstring": "cpp",
"cmath": "cpp"
"cmath": "cpp",
"dolphin.h": "c",
"types.h": "c",
"__ax.h": "c",
"ctype.h": "c",
"stdio.h": "c",
"stdarg.h": "c",
"string.h": "c",
"stddef.h": "c",
"size_t.h": "c",
"ax.h": "c",
"math.h": "c",
"os.h": "c",
"va_list.h": "c",
"fake_tgmath.h": "c"
},
// Disable C/C++ IntelliSense, use clangd instead
"C_Cpp.intelliSenseEngine": "default",
Expand Down
22 changes: 11 additions & 11 deletions config/GGVE78/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1536,25 +1536,25 @@ dolphin/ax/src/AXProf.c:
.text start:0x802D8E84 end:0x802D8ECC
.sbss start:0x804B1E78 end:0x804B1E88

reverb_hi.c:
dolphin/axfx/src/reverb_hi.c:
.text start:0x802D8ECC end:0x802D9D10
.data start:0x803BF6C0 end:0x803BF6E0
.sdata2 start:0x804B4990 end:0x804B49D0

reverb_std.c:
dolphin/axfx/src/reverb_std.c:
.text start:0x802D9D10 end:0x802D9E58

chorus.c:
dolphin/axfx/src/chorus.c:
.text start:0x802D9E58 end:0x802D9EA8

delay.c:
dolphin/axfx/src/delay.c:
.text start:0x802D9EA8 end:0x802D9F38

axfx.c:
dolphin/axfx/src/axfx.c:
.text start:0x802D9F38 end:0x802D9F88
.sdata start:0x804B0610 end:0x804B0618

reverb_hi_4ch.c:
dolphin/axfx/src/reverb_hi_4ch.c:
.text start:0x802D9F88 end:0x802DAC68
.data start:0x803BF6E0 end:0x803BF708
.sdata2 start:0x804B49D0 end:0x804B4A08
Expand Down Expand Up @@ -1753,7 +1753,7 @@ dolphin/gx/src/GXPerf.c:
.text start:0x802EFA54 end:0x802F0414
.data start:0x803C05F8 end:0x803C06E8

mix.c:
dolphin/mix/src/mix.c:
.text start:0x802F0414 end:0x802F2748
.data start:0x803C06E8 end:0x803C12A8
.bss start:0x80483878 end:0x80485080
Expand Down Expand Up @@ -1811,7 +1811,7 @@ dolphin/os/src/OSError.c:
.bss start:0x804850F0 end:0x80485140
.sdata start:0x804B06F8 end:0x804B0700

OSExec.c:
dolphin/os/src/OSExec.c:
.text start:0x802F54F0 end:0x802F5E50
.data start:0x803C1C58 end:0x803C1C68
.sdata start:0x804B0700 end:0x804B0708
Expand Down Expand Up @@ -1856,7 +1856,7 @@ dolphin/os/src/OSRtc.c:
.text start:0x802F8230 end:0x802F8DD0
.bss start:0x80485140 end:0x80485198

OSSemaphore.c:
dolphin/os/src/OSSemaphore.c:
.text start:0x802F8DD0 end:0x802F8EF8

dolphin/os/src/OSSync.c:
Expand All @@ -1873,11 +1873,11 @@ dolphin/os/src/OSTime.c:
.text start:0x802FAA58 end:0x802FAED4
.data start:0x803C3018 end:0x803C3078

dolphin/os/src/init/__start.c:
dolphin/os/src/__start.c:
.init start:0x800051EC end:0x800054EC
.sbss start:0x804B20D8 end:0x804B20E0

dolphin/os/src/init/__ppc_eabi_init.cpp:
dolphin/os/src/__ppc_eabi_init.cpp:
.init start:0x800054EC end:0x80005544
.text start:0x802FAED4 end:0x802FAF68

Expand Down
28 changes: 24 additions & 4 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@
'-pragma "cpp_extensions on"',
"-inline off",
"-gccinc",
"-sym on",
"-i include/bink",
"-i include/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include",
"-i include/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include",
f"-i include/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include",
f"-i include/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include",
"-i include/inline",
"-i include/rwsdk",
"-i src/SB/Core/gc",
Expand Down Expand Up @@ -413,6 +414,17 @@ def MatchingFor(*versions):
Object(NonMatching, "dolphin/ax/src/AXProf.c"),
],
),
DolphinLib(
"axfx",
[
Object(NonMatching, "dolphin/axfx/src/axfx.c"),
Object(NonMatching, "dolphin/axfx/src/chorus.c"),
Object(NonMatching, "dolphin/axfx/src/delay.c"),
Object(NonMatching, "dolphin/axfx/src/reverb_hi.c"),
Object(NonMatching, "dolphin/axfx/src/reverb_hi_4ch.c"),
Object(NonMatching, "dolphin/axfx/src/reverb_std.c"),
],
),
DolphinLib(
"base",
[
Expand Down Expand Up @@ -493,6 +505,12 @@ def MatchingFor(*versions):
Object(NonMatching, "dolphin/gx/src/GXPerf.c"),
],
),
DolphinLib(
"mix",
[
Object(NonMatching, "dolphin/mix/src/mix.c"),
],
),
DolphinLib(
"mtx",
[
Expand All @@ -517,6 +535,7 @@ def MatchingFor(*versions):
Object(NonMatching, "dolphin/os/src/OSCache.c"),
Object(NonMatching, "dolphin/os/src/OSContext.c"),
Object(NonMatching, "dolphin/os/src/OSError.c"),
Object(NonMatching, "dolphin/os/src/OSExec.c"),
Object(NonMatching, "dolphin/os/src/OSFont.c"),
Object(NonMatching, "dolphin/os/src/OSInterrupt.c"),
Object(NonMatching, "dolphin/os/src/OSLink.c"),
Expand All @@ -526,11 +545,12 @@ def MatchingFor(*versions):
Object(NonMatching, "dolphin/os/src/OSReset.c"),
Object(NonMatching, "dolphin/os/src/OSResetSW.c"),
Object(NonMatching, "dolphin/os/src/OSRtc.c"),
Object(NonMatching, "dolphin/os/src/OSSemaphore.c"),
Object(NonMatching, "dolphin/os/src/OSSync.c"),
Object(NonMatching, "dolphin/os/src/OSThread.c"),
Object(NonMatching, "dolphin/os/src/OSTime.c"),
Object(NonMatching, "dolphin/os/src/init/__start.c"),
Object(NonMatching, "dolphin/os/src/init/__ppc_eabi_init.cpp"),
Object(NonMatching, "dolphin/os/src/__start.c"),
Object(NonMatching, "dolphin/os/src/__ppc_eabi_init.cpp"),
],
),
DolphinLib(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef _NEW_H
#define _NEW_H

#include <size_t.h>
#include <exception.h>
#include <PowerPC_EABI_Support\MSL\MSL_C\MSL_Common\Include\size_t.h>
#include "exception.h"

namespace std
{
Expand Down Expand Up @@ -37,4 +37,4 @@ void operator delete[](void* ptr) throw();
void operator delete[](void* ptr, const std::nothrow_t&) throw();
void operator delete[](void*, void*) throw();

#endif
#endif
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _MSL_CMATH
#define _MSL_CMATH

#include <math.h>

namespace std
{
// TODO: fix inline function ordering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ double floor(double);
}
#endif

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ typedef unsigned long size_t;
typedef __typeof__(sizeof(0)) size_t;
#endif

#endif
#endif

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
extern "C" {
#endif

typedef struct _FILE {
unsigned char pad[0x50];
typedef struct _FILE
{
unsigned char pad[0x50];
} FILE;

extern FILE __files[4];
Expand All @@ -15,9 +16,9 @@ extern FILE __files[4];
#define stdout &(__files[1])
#define stderr &(__files[2])

int sprintf(char *s, const char *format, ...);
void printf(const char *format, ...);
int fprintf(FILE *stream, const char *format, ...);
int sprintf(char* s, const char* format, ...);
void printf(const char* format, ...);
int fprintf(FILE* stream, const char* format, ...);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _MSL_STDLIB
#define _MSL_STDLIB

#include <size_t.h>
#include "size_t.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

typedef char* va_list;

#endif
#endif
42 changes: 42 additions & 0 deletions include/charPipeline/fileCache.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#ifndef _CHARPIPELINE_FILECACHE_H_
#define _CHARPIPELINE_FILECACHE_H_

#include <charPipeline/structures.h>

#ifdef __cplusplus
extern "C" {
#endif

#define DS_AUTO_PURGE 0
#define DS_NO_PURGE 1

typedef struct {
DSLink Link;
void (*Free)(Ptr* data);
char* Name;
Ptr Data;
u16 ReferenceCount;
} DSCacheNode, *DSCacheNodePtr;

typedef struct {
u8 PurgeFlag;
DSList CacheNodeList;
} DSCache, *DSCachePtr;

extern u8 DOCacheInitialized;
extern DSCache DODisplayCache;

DSCacheNodePtr DSAddCacheNode(DSCachePtr cache, char* name, Ptr data, Ptr OSFreeFunc);
void DSEmptyCache(DSCachePtr cache);
Ptr DSGetCacheObj(DSCachePtr cache, char* name);
void DSInitCache(DSCachePtr cache);
void DSPurgeCache(DSCachePtr cache);
void DSReleaseCacheObj(DSCachePtr cache, Ptr data);
void DSSetCachePurgeFlag(DSCachePtr cache, u8 purgeFlag);
void CSHInitDisplayCache(void);

#ifdef __cplusplus
}
#endif

#endif
9 changes: 9 additions & 0 deletions include/charPipeline/structures.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef _CHARPIPELINE_STRUCTURES_H_
#define _CHARPIPELINE_STRUCTURES_H_

#include <charPipeline/structures/List.h>
#include <charPipeline/structures/dolphinString.h>
#include <charPipeline/structures/Tree.h>
#include <charPipeline/structures/HTable.h>

#endif
29 changes: 29 additions & 0 deletions include/charPipeline/structures/HTable.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef _CHARPIPELINE_STRUCTURES_HTABLE_H_
#define _CHARPIPELINE_STRUCTURES_HTABLE_H_

#include <charPipeline/structures/List.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef u16 (DSHashFunc)(Ptr);

typedef struct {
DSList* table;
u16 tableSize;
DSHashFunc* hash;
} DSHashTable;

void DSInitHTable(DSHashTable* hTable, u16 size, DSList* listArray, DSHashFunc* hashFunc, Ptr obj, DSLinkPtr link);
void DSInsertHTableObj(DSHashTable* hTable, Ptr obj);
void DSHTableToList(DSHashTable* hTable, DSList* list);
void* DSNextHTableObj(DSHashTable* hTable, Ptr obj);
s32 DSHTableIndex(DSHashTable* hTable, Ptr obj);
void* DSHTableHead(DSHashTable* hTable, s32 index);

#ifdef __cplusplus
}
#endif

#endif
31 changes: 31 additions & 0 deletions include/charPipeline/structures/List.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef _CHARPIPELINE_STRUCTURES_LIST_H_
#define _CHARPIPELINE_STRUCTURES_LIST_H_

#include <dolphin/types.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
Ptr Prev;
Ptr Next;
} DSLink, *DSLinkPtr;

typedef struct {
u32 Offset;
Ptr Head;
Ptr Tail;
} DSList, *DSListPtr;

void DSInitList(DSListPtr list, Ptr obj, DSLinkPtr link);
void DSInsertListObject(DSListPtr list, Ptr cursor, Ptr obj);
void DSRemoveListObject(DSListPtr list, Ptr obj);
void DSAttachList(DSListPtr baseList, DSListPtr attachList);
void* DSNextListObj(DSListPtr list, Ptr obj);

#ifdef __cplusplus
}
#endif

#endif
Loading
Loading