diff options
author | Max <mparisi@stevens.edu> | 2020-10-29 14:27:37 -0400 |
---|---|---|
committer | Max <mparisi@stevens.edu> | 2020-10-29 14:27:37 -0400 |
commit | 47a1bdea8872c79dd2cd7d75ca7f254b9ed13170 (patch) | |
tree | f254bbac3fde59afbc4abe7f07ea763bed53b20c | |
parent | f13fcff4a5f496e8bc1fa4ff759698d9ac37c478 (diff) |
match up to func_801DCFE4, add string.h and stdlib.h, add types.h to Makefile include path, and move GameSpy under DWC
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | asm/Runtime/__mem.s | 1 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/NATify.s (renamed from asm/GameSpy/NATify.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gbucket.s (renamed from asm/GameSpy/gbucket.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpBuffer.s (renamed from asm/GameSpy/ghttpBuffer.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpCallbacks.s (renamed from asm/GameSpy/ghttpCallbacks.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpCommon.s (renamed from asm/GameSpy/ghttpCommon.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpConnection.s (renamed from asm/GameSpy/ghttpConnection.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpEncryption.s (renamed from asm/GameSpy/ghttpEncryption.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpMain.s (renamed from asm/GameSpy/ghttpMain.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpPost.s (renamed from asm/GameSpy/ghttpPost.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/ghttpProcess.s (renamed from asm/GameSpy/ghttpProcess.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gp.s (renamed from asm/GameSpy/gp.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpi.s (renamed from asm/GameSpy/gpi.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiBuddy.s (renamed from asm/GameSpy/gpiBuddy.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiBuffer.s (renamed from asm/GameSpy/gpiBuffer.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiCallback.s (renamed from asm/GameSpy/gpiCallback.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiConnect.s (renamed from asm/GameSpy/gpiConnect.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiInfo.s (renamed from asm/GameSpy/gpiInfo.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiOperation.s (renamed from asm/GameSpy/gpiOperation.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiPeer.s (renamed from asm/GameSpy/gpiPeer.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiProfile.s (renamed from asm/GameSpy/gpiProfile.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiSearch.s (renamed from asm/GameSpy/gpiSearch.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiTransfer.s (renamed from asm/GameSpy/gpiTransfer.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiUnique.s (renamed from asm/GameSpy/gpiUnique.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gpiUtility.s (renamed from asm/GameSpy/gpiUtility.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gsAvailable.s (renamed from asm/GameSpy/gsAvailable.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gsCrypt.s (renamed from asm/GameSpy/gsCrypt.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gsLargeInt.s (renamed from asm/GameSpy/gsLargeInt.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gsRC4.s (renamed from asm/GameSpy/gsRC4.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gsSHA1.s (renamed from asm/GameSpy/gsSHA1.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gsXML.s (renamed from asm/GameSpy/gsXML.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gstats.s (renamed from asm/GameSpy/gstats.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Auth.s (renamed from asm/GameSpy/gt2Auth.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Buffer.s (renamed from asm/GameSpy/gt2Buffer.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Callback.s (renamed from asm/GameSpy/gt2Callback.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Connection.s (renamed from asm/GameSpy/gt2Connection.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Main.s (renamed from asm/GameSpy/gt2Main.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Message.s (renamed from asm/GameSpy/gt2Message.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Socket.s (renamed from asm/GameSpy/gt2Socket.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/gt2Utility.s (renamed from asm/GameSpy/gt2Utility.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/md5c.s (renamed from asm/GameSpy/md5c.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/natneg.s (renamed from asm/GameSpy/natneg.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/nonport.s (renamed from asm/GameSpy/nonport.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/qr2.s (renamed from asm/GameSpy/qr2.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/qr2regkeys.s (renamed from asm/GameSpy/qr2regkeys.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/sb_crypt.s (renamed from asm/GameSpy/sb_crypt.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/sb_queryengine.s (renamed from asm/GameSpy/sb_queryengine.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/sb_server.s (renamed from asm/GameSpy/sb_server.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/sb_serverbrowsing.s (renamed from asm/GameSpy/sb_serverbrowsing.s) | 0 | ||||
-rw-r--r-- | asm/SDK/DWC/gamespy/sb_serverlist.s (renamed from asm/GameSpy/sb_serverlist.s) | 0 | ||||
-rw-r--r-- | asm/code_801DCE6C_asm.s | 90 | ||||
-rw-r--r-- | include/MSL_C/MSL_Common/qsort.h (renamed from include/libstdc++/qsort.h) | 0 | ||||
-rw-r--r-- | include/MSL_C/stdlib.h | 15 | ||||
-rw-r--r-- | include/MSL_C/string.h | 18 | ||||
-rw-r--r-- | include/Runtime/MWCPlusLib.h (renamed from include/libstdc++/CPlusLib.h) | 0 | ||||
-rw-r--r-- | include/SDK/DVD/dvdfs.h | 15 | ||||
-rw-r--r-- | include/SDK/DWC/gamespy/darray.h (renamed from include/GameSpy/darray.h) | 0 | ||||
-rw-r--r-- | include/SDK/DWC/gamespy/hashtable.h (renamed from include/GameSpy/hashtable.h) | 2 | ||||
-rw-r--r-- | include/SDK/DWC/gamespy/nonport.h (renamed from include/GameSpy/nonport.h) | 0 | ||||
-rw-r--r-- | include/SDK/NAND/NANDOpenClose.h | 19 | ||||
-rw-r--r-- | include/SDK/nand.h | 3 | ||||
-rw-r--r-- | include/code_801DCE6C.h | 12 | ||||
-rw-r--r-- | obj_files.mk | 102 | ||||
-rw-r--r-- | src/Runtime/ptmf.c | 2 | ||||
-rw-r--r-- | src/SDK/DWC/gamespy/darray.c (renamed from src/GameSpy/darray.c) | 11 | ||||
-rw-r--r-- | src/SDK/DWC/gamespy/hashtable.c (renamed from src/GameSpy/hashtable.c) | 5 | ||||
-rw-r--r-- | src/code_801DAA30.cpp | 1 | ||||
-rw-r--r-- | src/code_801DAAE0.cpp | 5 | ||||
-rw-r--r-- | src/code_801DB040.cpp | 5 | ||||
-rw-r--r-- | src/code_801DB81C.cpp | 3 | ||||
-rw-r--r-- | src/code_801DBB3C.cpp | 3 | ||||
-rw-r--r-- | src/code_801DBE90.cpp | 11 | ||||
-rw-r--r-- | src/code_801DCE6C.cpp | 52 |
74 files changed, 196 insertions, 194 deletions
@@ -35,9 +35,9 @@ SRC_DIRS := src src/SDK/OS src/SDK/EXI src/SDK/SI src/SDK/DB src/SDK/VI src/SDK/ src/SDK/SC src/SDK/WENC src/SDK/ARC src/SDK/NCD src/SDK/WD src/SDK/NTR src/SDK/MP src/SDK/MPDL \ src/SDK/NET src/SDK/NHTTP src/SDK/SSL src/SDK/NWC24 src/SDK/VF src/SDK/DWC/dwc_common src/SDK/DWC/dwc_ghttp \ src/SDK/DWC/dwc_lanmatch src/SDK/DWC/dwc_match src/SDK/DWC/dwc_nonport src/SDK/DWC/dwcsec_account \ - src/SDK/DWC/dwcsec_auth src/SDK/DWC/dwcsec_nas src/SDK/SSL src/SDK/SO src/SDK/base src/SDK/HBM src/MSL_C/MSL_Common src/MSL_C/MSL_Common_Embedded \ + src/SDK/DWC/dwcsec_auth src/SDK/DWC/dwcsec_nas asm/SDK/DWC/gamespy src/SDK/SSL src/SDK/SO src/SDK/base src/SDK/HBM src/MSL_C/MSL_Common src/MSL_C/MSL_Common_Embedded \ src/MSL_C/MSL_Common_Embedded/Math src/MSL_C/PPC_EABI src/Runtime \ - src/MetroTRK src/GameSpy src/nw4r/db src/nw4r/ut src/nw4r/snd src/nw4r/ut/detail \ + src/MetroTRK src/nw4r/db src/nw4r/ut src/nw4r/snd src/nw4r/ut/detail \ src/nw4r/snd/detail src/nw4r/math src/nw4r/lyt src/nw4r/lyt/detail ASM_DIRS := asm asm/SDK/OS asm/SDK/EXI asm/SDK/SI asm/SDK/DB asm/SDK/VI asm/SDK/MTX \ asm/SDK/GX asm/SDK/DVD asm/SDK/AI asm/SDK/AX asm/SDK/AXFX asm/SDK/MEM asm/SDK/MIX asm/SDK/DSP \ @@ -46,9 +46,9 @@ ASM_DIRS := asm asm/SDK/OS asm/SDK/EXI asm/SDK/SI asm/SDK/DB asm/SDK/VI asm/SDK/ asm/SDK/SC asm/SDK/WENC asm/SDK/ARC asm/SDK/NCD asm/SDK/WD asm/SDK/NTR asm/SDK/MP asm/SDK/MPDL \ asm/SDK/NET asm/SDK/NHTTP asm/SDK/SSL asm/SDK/NWC24 asm/SDK/VF asm/SDK/DWC/dwc_common asm/SDK/DWC/dwc_ghttp \ asm/SDK/DWC/dwc_lanmatch asm/SDK/DWC/dwc_match asm/SDK/DWC/dwc_nonport asm/SDK/DWC/dwcsec_account \ - asm/SDK/DWC/dwcsec_auth asm/SDK/DWC/dwcsec_nas asm/SDK/SSL asm/SDK/SO asm/SDK/base asm/SDK/HBM asm/MSL_C/MSL_Common asm/MSL_C/MSL_Common_Embedded \ + asm/SDK/DWC/dwcsec_auth asm/SDK/DWC/dwcsec_nas src/SDK/DWC/gamespy asm/SDK/SSL asm/SDK/SO asm/SDK/base asm/SDK/HBM asm/MSL_C/MSL_Common asm/MSL_C/MSL_Common_Embedded \ asm/MSL_C/MSL_Common_Embedded/Math asm/MSL_C/PPC_EABI asm/Runtime \ - asm/MetroTRK asm/GameSpy asm/nw4r/db asm/nw4r/ut asm/nw4r/snd asm/nw4r/ut/detail \ + asm/MetroTRK asm/nw4r/db asm/nw4r/ut asm/nw4r/snd asm/nw4r/ut/detail \ asm/nw4r/snd/detail asm/nw4r/math asm/nw4r/lyt asm/nw4r/lyt/detail # Inputs @@ -87,8 +87,7 @@ PYTHON := python3 POSTPROC := tools/postprocess/postprocess.py # Options -INCLUDES := -i . -I- -i include -i include/SDK -i include/libstdc++ - +INCLUDES := -i . -I- -i include -i include/SDK -i include/MSL_C -include include/types.h ASFLAGS := -mgekko -I include LDFLAGS := -map $(MAP) -fp hard -nodefaults CFLAGS := -Cpp_exceptions off -proc gekko -fp hard -O4,p -nodefaults -msgstyle gcc -ipa file $(INCLUDES) -W all @@ -153,12 +152,10 @@ $(ELF): $(O_FILES) $(LDSCRIPT) $(BUILD_DIR)/%.o: %.s $(AS) $(ASFLAGS) -o $@ $< # resolve escape sequences for C++ mangled names in the .strtab section (assembler workaround). - $(PYTHON) $(POSTPROC) $(PROCFLAGS) $@ -fsymbol-fixup + $(PYTHON) $(POSTPROC) $(PROCFLAGS) $@ $(BUILD_DIR)/%.o: %.cpp $(CC) $(CFLAGS) -lang c++ -c -o $@ $< $(BUILD_DIR)/%.o: %.c $(CC) $(CFLAGS) -lang c99 -c -o $@ $< - -# $(PYTHON) $(POSTPROC) $(PROCFLAGS) $@ diff --git a/asm/Runtime/__mem.s b/asm/Runtime/__mem.s index c138a48..01d9be6 100644 --- a/asm/Runtime/__mem.s +++ b/asm/Runtime/__mem.s @@ -30,7 +30,6 @@ lbl_80004044: /* 80004048 00000148 40 82 FF F4 */ bne lbl_8000403C /* 8000404C 0000014C 4E 80 00 20 */ blr -.global __fill_mem __fill_mem: /* 80004050 00000150 28 05 00 20 */ cmplwi r5, 0x20 /* 80004054 00000154 54 87 06 3E */ clrlwi r7, r4, 0x18 diff --git a/asm/GameSpy/NATify.s b/asm/SDK/DWC/gamespy/NATify.s index fdb9bea..fdb9bea 100644 --- a/asm/GameSpy/NATify.s +++ b/asm/SDK/DWC/gamespy/NATify.s diff --git a/asm/GameSpy/gbucket.s b/asm/SDK/DWC/gamespy/gbucket.s index 139df19..139df19 100644 --- a/asm/GameSpy/gbucket.s +++ b/asm/SDK/DWC/gamespy/gbucket.s diff --git a/asm/GameSpy/ghttpBuffer.s b/asm/SDK/DWC/gamespy/ghttpBuffer.s index ed19e2d..ed19e2d 100644 --- a/asm/GameSpy/ghttpBuffer.s +++ b/asm/SDK/DWC/gamespy/ghttpBuffer.s diff --git a/asm/GameSpy/ghttpCallbacks.s b/asm/SDK/DWC/gamespy/ghttpCallbacks.s index 47dc2d6..47dc2d6 100644 --- a/asm/GameSpy/ghttpCallbacks.s +++ b/asm/SDK/DWC/gamespy/ghttpCallbacks.s diff --git a/asm/GameSpy/ghttpCommon.s b/asm/SDK/DWC/gamespy/ghttpCommon.s index f6b8d38..f6b8d38 100644 --- a/asm/GameSpy/ghttpCommon.s +++ b/asm/SDK/DWC/gamespy/ghttpCommon.s diff --git a/asm/GameSpy/ghttpConnection.s b/asm/SDK/DWC/gamespy/ghttpConnection.s index 9c2685c..9c2685c 100644 --- a/asm/GameSpy/ghttpConnection.s +++ b/asm/SDK/DWC/gamespy/ghttpConnection.s diff --git a/asm/GameSpy/ghttpEncryption.s b/asm/SDK/DWC/gamespy/ghttpEncryption.s index f3c7309..f3c7309 100644 --- a/asm/GameSpy/ghttpEncryption.s +++ b/asm/SDK/DWC/gamespy/ghttpEncryption.s diff --git a/asm/GameSpy/ghttpMain.s b/asm/SDK/DWC/gamespy/ghttpMain.s index 382e22b..382e22b 100644 --- a/asm/GameSpy/ghttpMain.s +++ b/asm/SDK/DWC/gamespy/ghttpMain.s diff --git a/asm/GameSpy/ghttpPost.s b/asm/SDK/DWC/gamespy/ghttpPost.s index 2193e99..2193e99 100644 --- a/asm/GameSpy/ghttpPost.s +++ b/asm/SDK/DWC/gamespy/ghttpPost.s diff --git a/asm/GameSpy/ghttpProcess.s b/asm/SDK/DWC/gamespy/ghttpProcess.s index 493cbb1..493cbb1 100644 --- a/asm/GameSpy/ghttpProcess.s +++ b/asm/SDK/DWC/gamespy/ghttpProcess.s diff --git a/asm/GameSpy/gp.s b/asm/SDK/DWC/gamespy/gp.s index 2ef9eee..2ef9eee 100644 --- a/asm/GameSpy/gp.s +++ b/asm/SDK/DWC/gamespy/gp.s diff --git a/asm/GameSpy/gpi.s b/asm/SDK/DWC/gamespy/gpi.s index a83f3c6..a83f3c6 100644 --- a/asm/GameSpy/gpi.s +++ b/asm/SDK/DWC/gamespy/gpi.s diff --git a/asm/GameSpy/gpiBuddy.s b/asm/SDK/DWC/gamespy/gpiBuddy.s index f920a4c..f920a4c 100644 --- a/asm/GameSpy/gpiBuddy.s +++ b/asm/SDK/DWC/gamespy/gpiBuddy.s diff --git a/asm/GameSpy/gpiBuffer.s b/asm/SDK/DWC/gamespy/gpiBuffer.s index 2d7828e..2d7828e 100644 --- a/asm/GameSpy/gpiBuffer.s +++ b/asm/SDK/DWC/gamespy/gpiBuffer.s diff --git a/asm/GameSpy/gpiCallback.s b/asm/SDK/DWC/gamespy/gpiCallback.s index d7c0c59..d7c0c59 100644 --- a/asm/GameSpy/gpiCallback.s +++ b/asm/SDK/DWC/gamespy/gpiCallback.s diff --git a/asm/GameSpy/gpiConnect.s b/asm/SDK/DWC/gamespy/gpiConnect.s index 9d06f20..9d06f20 100644 --- a/asm/GameSpy/gpiConnect.s +++ b/asm/SDK/DWC/gamespy/gpiConnect.s diff --git a/asm/GameSpy/gpiInfo.s b/asm/SDK/DWC/gamespy/gpiInfo.s index 4c71b08..4c71b08 100644 --- a/asm/GameSpy/gpiInfo.s +++ b/asm/SDK/DWC/gamespy/gpiInfo.s diff --git a/asm/GameSpy/gpiOperation.s b/asm/SDK/DWC/gamespy/gpiOperation.s index 8c6ee78..8c6ee78 100644 --- a/asm/GameSpy/gpiOperation.s +++ b/asm/SDK/DWC/gamespy/gpiOperation.s diff --git a/asm/GameSpy/gpiPeer.s b/asm/SDK/DWC/gamespy/gpiPeer.s index 3879460..3879460 100644 --- a/asm/GameSpy/gpiPeer.s +++ b/asm/SDK/DWC/gamespy/gpiPeer.s diff --git a/asm/GameSpy/gpiProfile.s b/asm/SDK/DWC/gamespy/gpiProfile.s index 4c81980..4c81980 100644 --- a/asm/GameSpy/gpiProfile.s +++ b/asm/SDK/DWC/gamespy/gpiProfile.s diff --git a/asm/GameSpy/gpiSearch.s b/asm/SDK/DWC/gamespy/gpiSearch.s index 55142f3..55142f3 100644 --- a/asm/GameSpy/gpiSearch.s +++ b/asm/SDK/DWC/gamespy/gpiSearch.s diff --git a/asm/GameSpy/gpiTransfer.s b/asm/SDK/DWC/gamespy/gpiTransfer.s index a74da80..a74da80 100644 --- a/asm/GameSpy/gpiTransfer.s +++ b/asm/SDK/DWC/gamespy/gpiTransfer.s diff --git a/asm/GameSpy/gpiUnique.s b/asm/SDK/DWC/gamespy/gpiUnique.s index 7ced259..7ced259 100644 --- a/asm/GameSpy/gpiUnique.s +++ b/asm/SDK/DWC/gamespy/gpiUnique.s diff --git a/asm/GameSpy/gpiUtility.s b/asm/SDK/DWC/gamespy/gpiUtility.s index 5c1fece..5c1fece 100644 --- a/asm/GameSpy/gpiUtility.s +++ b/asm/SDK/DWC/gamespy/gpiUtility.s diff --git a/asm/GameSpy/gsAvailable.s b/asm/SDK/DWC/gamespy/gsAvailable.s index 9d17ec2..9d17ec2 100644 --- a/asm/GameSpy/gsAvailable.s +++ b/asm/SDK/DWC/gamespy/gsAvailable.s diff --git a/asm/GameSpy/gsCrypt.s b/asm/SDK/DWC/gamespy/gsCrypt.s index 336ea8b..336ea8b 100644 --- a/asm/GameSpy/gsCrypt.s +++ b/asm/SDK/DWC/gamespy/gsCrypt.s diff --git a/asm/GameSpy/gsLargeInt.s b/asm/SDK/DWC/gamespy/gsLargeInt.s index 58fbd8a..58fbd8a 100644 --- a/asm/GameSpy/gsLargeInt.s +++ b/asm/SDK/DWC/gamespy/gsLargeInt.s diff --git a/asm/GameSpy/gsRC4.s b/asm/SDK/DWC/gamespy/gsRC4.s index 2e1fad3..2e1fad3 100644 --- a/asm/GameSpy/gsRC4.s +++ b/asm/SDK/DWC/gamespy/gsRC4.s diff --git a/asm/GameSpy/gsSHA1.s b/asm/SDK/DWC/gamespy/gsSHA1.s index bdc93e1..bdc93e1 100644 --- a/asm/GameSpy/gsSHA1.s +++ b/asm/SDK/DWC/gamespy/gsSHA1.s diff --git a/asm/GameSpy/gsXML.s b/asm/SDK/DWC/gamespy/gsXML.s index 288b366..288b366 100644 --- a/asm/GameSpy/gsXML.s +++ b/asm/SDK/DWC/gamespy/gsXML.s diff --git a/asm/GameSpy/gstats.s b/asm/SDK/DWC/gamespy/gstats.s index dc6568f..dc6568f 100644 --- a/asm/GameSpy/gstats.s +++ b/asm/SDK/DWC/gamespy/gstats.s diff --git a/asm/GameSpy/gt2Auth.s b/asm/SDK/DWC/gamespy/gt2Auth.s index 1fa1d3c..1fa1d3c 100644 --- a/asm/GameSpy/gt2Auth.s +++ b/asm/SDK/DWC/gamespy/gt2Auth.s diff --git a/asm/GameSpy/gt2Buffer.s b/asm/SDK/DWC/gamespy/gt2Buffer.s index ab6397e..ab6397e 100644 --- a/asm/GameSpy/gt2Buffer.s +++ b/asm/SDK/DWC/gamespy/gt2Buffer.s diff --git a/asm/GameSpy/gt2Callback.s b/asm/SDK/DWC/gamespy/gt2Callback.s index fbb959a..fbb959a 100644 --- a/asm/GameSpy/gt2Callback.s +++ b/asm/SDK/DWC/gamespy/gt2Callback.s diff --git a/asm/GameSpy/gt2Connection.s b/asm/SDK/DWC/gamespy/gt2Connection.s index 878a4a4..878a4a4 100644 --- a/asm/GameSpy/gt2Connection.s +++ b/asm/SDK/DWC/gamespy/gt2Connection.s diff --git a/asm/GameSpy/gt2Main.s b/asm/SDK/DWC/gamespy/gt2Main.s index e78caed..e78caed 100644 --- a/asm/GameSpy/gt2Main.s +++ b/asm/SDK/DWC/gamespy/gt2Main.s diff --git a/asm/GameSpy/gt2Message.s b/asm/SDK/DWC/gamespy/gt2Message.s index 74737f0..74737f0 100644 --- a/asm/GameSpy/gt2Message.s +++ b/asm/SDK/DWC/gamespy/gt2Message.s diff --git a/asm/GameSpy/gt2Socket.s b/asm/SDK/DWC/gamespy/gt2Socket.s index 8c7b314..8c7b314 100644 --- a/asm/GameSpy/gt2Socket.s +++ b/asm/SDK/DWC/gamespy/gt2Socket.s diff --git a/asm/GameSpy/gt2Utility.s b/asm/SDK/DWC/gamespy/gt2Utility.s index 0667b2a..0667b2a 100644 --- a/asm/GameSpy/gt2Utility.s +++ b/asm/SDK/DWC/gamespy/gt2Utility.s diff --git a/asm/GameSpy/md5c.s b/asm/SDK/DWC/gamespy/md5c.s index ea906fe..ea906fe 100644 --- a/asm/GameSpy/md5c.s +++ b/asm/SDK/DWC/gamespy/md5c.s diff --git a/asm/GameSpy/natneg.s b/asm/SDK/DWC/gamespy/natneg.s index a2ad575..a2ad575 100644 --- a/asm/GameSpy/natneg.s +++ b/asm/SDK/DWC/gamespy/natneg.s diff --git a/asm/GameSpy/nonport.s b/asm/SDK/DWC/gamespy/nonport.s index e9f73a7..e9f73a7 100644 --- a/asm/GameSpy/nonport.s +++ b/asm/SDK/DWC/gamespy/nonport.s diff --git a/asm/GameSpy/qr2.s b/asm/SDK/DWC/gamespy/qr2.s index 5d4c0cc..5d4c0cc 100644 --- a/asm/GameSpy/qr2.s +++ b/asm/SDK/DWC/gamespy/qr2.s diff --git a/asm/GameSpy/qr2regkeys.s b/asm/SDK/DWC/gamespy/qr2regkeys.s index 8e8f896..8e8f896 100644 --- a/asm/GameSpy/qr2regkeys.s +++ b/asm/SDK/DWC/gamespy/qr2regkeys.s diff --git a/asm/GameSpy/sb_crypt.s b/asm/SDK/DWC/gamespy/sb_crypt.s index ebda0e7..ebda0e7 100644 --- a/asm/GameSpy/sb_crypt.s +++ b/asm/SDK/DWC/gamespy/sb_crypt.s diff --git a/asm/GameSpy/sb_queryengine.s b/asm/SDK/DWC/gamespy/sb_queryengine.s index ff0282f..ff0282f 100644 --- a/asm/GameSpy/sb_queryengine.s +++ b/asm/SDK/DWC/gamespy/sb_queryengine.s diff --git a/asm/GameSpy/sb_server.s b/asm/SDK/DWC/gamespy/sb_server.s index e2d9550..e2d9550 100644 --- a/asm/GameSpy/sb_server.s +++ b/asm/SDK/DWC/gamespy/sb_server.s diff --git a/asm/GameSpy/sb_serverbrowsing.s b/asm/SDK/DWC/gamespy/sb_serverbrowsing.s index d88b753..d88b753 100644 --- a/asm/GameSpy/sb_serverbrowsing.s +++ b/asm/SDK/DWC/gamespy/sb_serverbrowsing.s diff --git a/asm/GameSpy/sb_serverlist.s b/asm/SDK/DWC/gamespy/sb_serverlist.s index fab8072..fab8072 100644 --- a/asm/GameSpy/sb_serverlist.s +++ b/asm/SDK/DWC/gamespy/sb_serverlist.s diff --git a/asm/code_801DCE6C_asm.s b/asm/code_801DCE6C_asm.s index 1ee7626..8843140 100644 --- a/asm/code_801DCE6C_asm.s +++ b/asm/code_801DCE6C_asm.s @@ -2,96 +2,6 @@ .section .text, "ax" # 0x80006980 - 0x803E1E60
-.global func_801DCEB4
-func_801DCEB4:
-/* 801DCEB4 001D8B14 94 21 FF E0 */ stwu r1, -0x20(r1)
-/* 801DCEB8 001D8B18 7C 08 02 A6 */ mflr r0
-/* 801DCEBC 001D8B1C 38 A0 00 0C */ li r5, 0xc
-/* 801DCEC0 001D8B20 90 01 00 24 */ stw r0, 0x24(r1)
-/* 801DCEC4 001D8B24 93 E1 00 1C */ stw r31, 0x1c(r1)
-/* 801DCEC8 001D8B28 93 C1 00 18 */ stw r30, 0x18(r1)
-/* 801DCECC 001D8B2C 7C 7E 1B 78 */ mr r30, r3
-/* 801DCED0 001D8B30 38 61 00 08 */ addi r3, r1, 8
-/* 801DCED4 001D8B34 4B E2 71 2D */ bl memcpy
-/* 801DCED8 001D8B38 38 00 00 00 */ li r0, 0
-/* 801DCEDC 001D8B3C 3B E0 00 00 */ li r31, 0
-/* 801DCEE0 001D8B40 98 01 00 14 */ stb r0, 0x14(r1)
-lbl_801DCEE4:
-/* 801DCEE4 001D8B44 88 1E 00 00 */ lbz r0, 0(r30)
-/* 801DCEE8 001D8B48 2C 00 00 00 */ cmpwi r0, 0
-/* 801DCEEC 001D8B4C 41 82 00 30 */ beq lbl_801DCF1C
-/* 801DCEF0 001D8B50 88 1E 00 01 */ lbz r0, 1(r30)
-/* 801DCEF4 001D8B54 2C 00 00 00 */ cmpwi r0, 0
-/* 801DCEF8 001D8B58 40 82 00 24 */ bne lbl_801DCF1C
-/* 801DCEFC 001D8B5C 7F C3 F3 78 */ mr r3, r30
-/* 801DCF00 001D8B60 4B FF FF 6D */ bl func_801DCE6C
-/* 801DCF04 001D8B64 38 81 00 08 */ addi r4, r1, 8
-/* 801DCF08 001D8B68 4B FF 15 45 */ bl strcmp
-/* 801DCF0C 001D8B6C 2C 03 00 00 */ cmpwi r3, 0
-/* 801DCF10 001D8B70 40 82 00 0C */ bne lbl_801DCF1C
-/* 801DCF14 001D8B74 7F C3 F3 78 */ mr r3, r30
-/* 801DCF18 001D8B78 48 00 00 18 */ b lbl_801DCF30
-lbl_801DCF1C:
-/* 801DCF1C 001D8B7C 3B FF 00 01 */ addi r31, r31, 1
-/* 801DCF20 001D8B80 3B DE 01 90 */ addi r30, r30, 0x190
-/* 801DCF24 001D8B84 2C 1F 00 08 */ cmpwi r31, 8
-/* 801DCF28 001D8B88 41 80 FF BC */ blt lbl_801DCEE4
-/* 801DCF2C 001D8B8C 38 60 00 00 */ li r3, 0
-lbl_801DCF30:
-/* 801DCF30 001D8B90 80 01 00 24 */ lwz r0, 0x24(r1)
-/* 801DCF34 001D8B94 83 E1 00 1C */ lwz r31, 0x1c(r1)
-/* 801DCF38 001D8B98 83 C1 00 18 */ lwz r30, 0x18(r1)
-/* 801DCF3C 001D8B9C 7C 08 03 A6 */ mtlr r0
-/* 801DCF40 001D8BA0 38 21 00 20 */ addi r1, r1, 0x20
-/* 801DCF44 001D8BA4 4E 80 00 20 */ blr
-
-.global func_801DCF48
-func_801DCF48:
-/* 801DCF48 001D8BA8 94 21 FF F0 */ stwu r1, -0x10(r1)
-/* 801DCF4C 001D8BAC 7C 08 02 A6 */ mflr r0
-/* 801DCF50 001D8BB0 90 01 00 14 */ stw r0, 0x14(r1)
-/* 801DCF54 001D8BB4 4B FF FF 61 */ bl func_801DCEB4
-/* 801DCF58 001D8BB8 7C 03 00 D0 */ neg r0, r3
-/* 801DCF5C 001D8BBC 7C 00 1B 78 */ or r0, r0, r3
-/* 801DCF60 001D8BC0 54 03 0F FE */ srwi r3, r0, 0x1f
-/* 801DCF64 001D8BC4 80 01 00 14 */ lwz r0, 0x14(r1)
-/* 801DCF68 001D8BC8 7C 08 03 A6 */ mtlr r0
-/* 801DCF6C 001D8BCC 38 21 00 10 */ addi r1, r1, 0x10
-/* 801DCF70 001D8BD0 4E 80 00 20 */ blr
-
-.global func_801DCF74
-func_801DCF74:
-/* 801DCF74 001D8BD4 94 21 FF F0 */ stwu r1, -0x10(r1)
-/* 801DCF78 001D8BD8 7C 08 02 A6 */ mflr r0
-/* 801DCF7C 001D8BDC 90 01 00 14 */ stw r0, 0x14(r1)
-/* 801DCF80 001D8BE0 93 E1 00 0C */ stw r31, 0xc(r1)
-/* 801DCF84 001D8BE4 93 C1 00 08 */ stw r30, 8(r1)
-/* 801DCF88 001D8BE8 7C BE 2B 78 */ mr r30, r5
-/* 801DCF8C 001D8BEC 4B FF FF 29 */ bl func_801DCEB4
-/* 801DCF90 001D8BF0 2C 03 00 00 */ cmpwi r3, 0
-/* 801DCF94 001D8BF4 7C 7F 1B 78 */ mr r31, r3
-/* 801DCF98 001D8BF8 41 82 00 30 */ beq lbl_801DCFC8
-/* 801DCF9C 001D8BFC 4B FF FE D9 */ bl func_801DCE74
-/* 801DCFA0 001D8C00 38 9F 00 48 */ addi r4, r31, 0x48
-/* 801DCFA4 001D8C04 38 A0 00 01 */ li r5, 1
-/* 801DCFA8 001D8C08 48 10 B4 61 */ bl NANDOpen
-/* 801DCFAC 001D8C0C 2C 03 00 00 */ cmpwi r3, 0
-/* 801DCFB0 001D8C10 40 82 00 18 */ bne lbl_801DCFC8
-/* 801DCFB4 001D8C14 38 00 00 01 */ li r0, 1
-/* 801DCFB8 001D8C18 93 FE 00 40 */ stw r31, 0x40(r30)
-/* 801DCFBC 001D8C1C 38 60 00 01 */ li r3, 1
-/* 801DCFC0 001D8C20 98 1E 00 01 */ stb r0, 1(r30)
-/* 801DCFC4 001D8C24 48 00 00 08 */ b lbl_801DCFCC
-lbl_801DCFC8:
-/* 801DCFC8 001D8C28 38 60 00 00 */ li r3, 0
-lbl_801DCFCC:
-/* 801DCFCC 001D8C2C 80 01 00 14 */ lwz r0, 0x14(r1)
-/* 801DCFD0 001D8C30 83 E1 00 0C */ lwz r31, 0xc(r1)
-/* 801DCFD4 001D8C34 83 C1 00 08 */ lwz r30, 8(r1)
-/* 801DCFD8 001D8C38 7C 08 03 A6 */ mtlr r0
-/* 801DCFDC 001D8C3C 38 21 00 10 */ addi r1, r1, 0x10
-/* 801DCFE0 001D8C40 4E 80 00 20 */ blr
-
.global func_801DCFE4
func_801DCFE4:
/* 801DCFE4 001D8C44 94 21 FF F0 */ stwu r1, -0x10(r1)
diff --git a/include/libstdc++/qsort.h b/include/MSL_C/MSL_Common/qsort.h index c13ae0e..c13ae0e 100644 --- a/include/libstdc++/qsort.h +++ b/include/MSL_C/MSL_Common/qsort.h diff --git a/include/MSL_C/stdlib.h b/include/MSL_C/stdlib.h new file mode 100644 index 0000000..bf86bca --- /dev/null +++ b/include/MSL_C/stdlib.h @@ -0,0 +1,15 @@ +#ifndef POKEREVO_STDLIB_H
+#define POKEREVO_STDLIB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void qsort(void *base, u32 nmemb, u32 size,
+ s32 (*compar)(const void *, const void *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_STDLIB_H
diff --git a/include/MSL_C/string.h b/include/MSL_C/string.h new file mode 100644 index 0000000..83b7bd0 --- /dev/null +++ b/include/MSL_C/string.h @@ -0,0 +1,18 @@ +#ifndef POKEREVO_STRING_H
+#define POKEREVO_STRING_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *memset(void *s, int c, size_t n);
+void *memmove(void *dest, const void *src, size_t n);
+void *memcpy(void *dest, const void *src, size_t n);
+int strcmp(const char *s1, const char *s2);
+int strncmp(const char *s1, const char *s2, size_t n);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_STRING_H
diff --git a/include/libstdc++/CPlusLib.h b/include/Runtime/MWCPlusLib.h index 819c0a9..819c0a9 100644 --- a/include/libstdc++/CPlusLib.h +++ b/include/Runtime/MWCPlusLib.h diff --git a/include/SDK/DVD/dvdfs.h b/include/SDK/DVD/dvdfs.h index a5283eb..444ae92 100644 --- a/include/SDK/DVD/dvdfs.h +++ b/include/SDK/DVD/dvdfs.h @@ -5,6 +5,18 @@ extern "C" {
#endif
+// TODO: not a nested class, but a struct from the SDK. Referenced
+// by DVDFileInfo
+struct gUnkClass6
+{
+ u8 unk0;
+ u8 unk1;
+ char unk2[0x5];
+ char unk7[0x41];
+ NANDFileInfo unk48;
+ u8 unkD3[0xBD];
+};
+
typedef struct DVDFileInfo DVDFileInfo;
typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);
@@ -13,7 +25,8 @@ struct DVDFileInfo {
u8 unk0[0x34];
size_t unk34;
- u8 unk38[0x8];
+ u8 unk38[0x4];
+ gUnkClass6* unk3C; // TODO: determine type
void (*unk40)(s32, void*);
void* unk44;
u32 unk48;
diff --git a/include/GameSpy/darray.h b/include/SDK/DWC/gamespy/darray.h index 5c7c170..5c7c170 100644 --- a/include/GameSpy/darray.h +++ b/include/SDK/DWC/gamespy/darray.h diff --git a/include/GameSpy/hashtable.h b/include/SDK/DWC/gamespy/hashtable.h index 26e0b6d..beb4812 100644 --- a/include/GameSpy/hashtable.h +++ b/include/SDK/DWC/gamespy/hashtable.h @@ -5,7 +5,7 @@ extern "C" {
#endif
-#include "GameSpy/darray.h"
+#include <DWC/gamespy/darray.h>
typedef s32 (*HashFunction)(void *, s32);
diff --git a/include/GameSpy/nonport.h b/include/SDK/DWC/gamespy/nonport.h index c1ed0e7..c1ed0e7 100644 --- a/include/GameSpy/nonport.h +++ b/include/SDK/DWC/gamespy/nonport.h diff --git a/include/SDK/NAND/NANDOpenClose.h b/include/SDK/NAND/NANDOpenClose.h new file mode 100644 index 0000000..2a93acd --- /dev/null +++ b/include/SDK/NAND/NANDOpenClose.h @@ -0,0 +1,19 @@ +#ifndef POKEREVO_NANDOPENCLOSE_H
+#define POKEREVO_NANDOPENCLOSE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct NANDFileInfo
+{
+ u8 unk0[0x8B]; // TODO: determine actual size
+} NANDFileInfo;
+
+s32 NANDOpen(const char* path, NANDFileInfo* info, u8 accType);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_NANDOPENCLOSE_H
diff --git a/include/SDK/nand.h b/include/SDK/nand.h index c20ee68..463ef89 100644 --- a/include/SDK/nand.h +++ b/include/SDK/nand.h @@ -5,7 +5,8 @@ extern "C" {
#endif
-#include "SDK/NAND/NANDCore.h"
+#include <SDK/NAND/NANDCore.h>
+#include <SDK/NAND/NANDOpenClose.h>
#ifdef __cplusplus
}
diff --git a/include/code_801DCE6C.h b/include/code_801DCE6C.h index f06b185..de1243f 100644 --- a/include/code_801DCE6C.h +++ b/include/code_801DCE6C.h @@ -5,19 +5,19 @@ extern "C" {
#endif
+#include <SDK/nand.h>
#include "code_801DBE90.h"
+// array of 8 0x190 byte structs
struct gUnkClass4
{
- u8 unk0[0x2];
- char unk2[0x5];
- char unk7[0xC79];
-
+ gUnkClass6 arr[0x8];
+
gUnkClass4(void);
};
-u32 func_801DCF74(gUnkClass4*, const char*, gUnkClass5*);
-u32 func_801DCF48(gUnkClass4*, const char*);
+BOOL func_801DCF74(gUnkClass4*, const char*, gUnkClass5*);
+BOOL func_801DCF48(gUnkClass4*, const char*);
s32 func_801DD084(gUnkClass4* p1, gUnkClass5* p2, void* addr, s32 length, s32 offset);
void* func_801DD220(gUnkClass4*, gUnkClass5*, void*, u32, s32);
u32 func_801DCFE4(gUnkClass4*, gUnkClass5*);
diff --git a/obj_files.mk b/obj_files.mk index 7b81b23..405affe 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -663,57 +663,57 @@ SPLIT_O_FILES := \ $(BUILD_DIR)/asm/SDK/DWC/dwcsec_account/dwc_account.o \ $(BUILD_DIR)/asm/SDK/DWC/dwcsec_auth/dwc_auth_interface.o \ $(BUILD_DIR)/asm/SDK/DWC/dwcsec_nas/dwc_naslogin.o \ - $(BUILD_DIR)/src/GameSpy/darray.o \ - $(BUILD_DIR)/src/GameSpy/hashtable.o \ - $(BUILD_DIR)/asm/GameSpy/md5c.o \ - $(BUILD_DIR)/asm/GameSpy/nonport.o \ - $(BUILD_DIR)/asm/GameSpy/gsAvailable.o \ - $(BUILD_DIR)/asm/GameSpy/gsCrypt.o \ - $(BUILD_DIR)/asm/GameSpy/gsLargeInt.o \ - $(BUILD_DIR)/asm/GameSpy/gsRC4.o \ - $(BUILD_DIR)/asm/GameSpy/gsSHA1.o \ - $(BUILD_DIR)/asm/GameSpy/gsXML.o \ - $(BUILD_DIR)/asm/GameSpy/gp.o \ - $(BUILD_DIR)/asm/GameSpy/gpi.o \ - $(BUILD_DIR)/asm/GameSpy/gpiBuddy.o \ - $(BUILD_DIR)/asm/GameSpy/gpiBuffer.o \ - $(BUILD_DIR)/asm/GameSpy/gpiCallback.o \ - $(BUILD_DIR)/asm/GameSpy/gpiConnect.o \ - $(BUILD_DIR)/asm/GameSpy/gpiInfo.o \ - $(BUILD_DIR)/asm/GameSpy/gpiOperation.o \ - $(BUILD_DIR)/asm/GameSpy/gpiPeer.o \ - $(BUILD_DIR)/asm/GameSpy/gpiProfile.o \ - $(BUILD_DIR)/asm/GameSpy/gpiSearch.o \ - $(BUILD_DIR)/asm/GameSpy/gpiTransfer.o \ - $(BUILD_DIR)/asm/GameSpy/gpiUnique.o \ - $(BUILD_DIR)/asm/GameSpy/gpiUtility.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Auth.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Buffer.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Callback.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Connection.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Main.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Message.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Socket.o \ - $(BUILD_DIR)/asm/GameSpy/gt2Utility.o \ - $(BUILD_DIR)/asm/GameSpy/qr2.o \ - $(BUILD_DIR)/asm/GameSpy/qr2regkeys.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpBuffer.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpCallbacks.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpCommon.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpConnection.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpEncryption.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpMain.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpPost.o \ - $(BUILD_DIR)/asm/GameSpy/ghttpProcess.o \ - $(BUILD_DIR)/asm/GameSpy/gbucket.o \ - $(BUILD_DIR)/asm/GameSpy/gstats.o \ - $(BUILD_DIR)/asm/GameSpy/NATify.o \ - $(BUILD_DIR)/asm/GameSpy/natneg.o \ - $(BUILD_DIR)/asm/GameSpy/sb_crypt.o \ - $(BUILD_DIR)/asm/GameSpy/sb_queryengine.o \ - $(BUILD_DIR)/asm/GameSpy/sb_server.o \ - $(BUILD_DIR)/asm/GameSpy/sb_serverbrowsing.o \ - $(BUILD_DIR)/asm/GameSpy/sb_serverlist.o \ + $(BUILD_DIR)/src/SDK/DWC/gamespy/darray.o \ + $(BUILD_DIR)/src/SDK/DWC/gamespy/hashtable.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/md5c.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/nonport.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gsAvailable.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gsCrypt.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gsLargeInt.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gsRC4.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gsSHA1.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gsXML.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gp.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpi.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiBuddy.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiBuffer.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiCallback.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiConnect.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiInfo.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiOperation.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiPeer.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiProfile.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiSearch.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiTransfer.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiUnique.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gpiUtility.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Auth.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Buffer.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Callback.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Connection.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Main.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Message.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Socket.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gt2Utility.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/qr2.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/qr2regkeys.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpBuffer.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpCallbacks.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpCommon.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpConnection.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpEncryption.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpMain.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpPost.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/ghttpProcess.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gbucket.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/gstats.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/NATify.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/natneg.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/sb_crypt.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/sb_queryengine.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/sb_server.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/sb_serverbrowsing.o \ + $(BUILD_DIR)/asm/SDK/DWC/gamespy/sb_serverlist.o \ $(BUILD_DIR)/asm/nw4r/db/db_console.o \ $(BUILD_DIR)/asm/text_10_2.o \ $(BUILD_DIR)/asm/nw4r/db/db_assert.o \ diff --git a/src/Runtime/ptmf.c b/src/Runtime/ptmf.c index 297039c..c98cd63 100644 --- a/src/Runtime/ptmf.c +++ b/src/Runtime/ptmf.c @@ -1,5 +1,3 @@ -#include "CPlusLib.h" - #pragma internal on asm void __ptmf_scall(...) diff --git a/src/GameSpy/darray.c b/src/SDK/DWC/gamespy/darray.c index 7f84cb0..5259a9f 100644 --- a/src/GameSpy/darray.c +++ b/src/SDK/DWC/gamespy/darray.c @@ -1,13 +1,10 @@ -#include "types.h"
-#include "libstdc++/qsort.h"
-#include "GameSpy/nonport.h"
-#include "GameSpy/darray.h"
+#include <stdlib.h>
+#include <string.h>
+#include <DWC/gamespy/nonport.h>
+#include <DWC/gamespy/darray.h>
#pragma auto_inline on
-extern void *memcpy(void *, const void *, u32);
-extern void *memmove(void *, const void *, u32);
-
static inline void ArrayInsert(DArray *d, void *elem, s32 n)
{
if (d->size == d->capacity) {
diff --git a/src/GameSpy/hashtable.c b/src/SDK/DWC/gamespy/hashtable.c index 0e1c09a..0c6d3c8 100644 --- a/src/GameSpy/hashtable.c +++ b/src/SDK/DWC/gamespy/hashtable.c @@ -1,6 +1,5 @@ -#include "types.h"
-#include "GameSpy/nonport.h"
-#include "GameSpy/hashtable.h"
+#include <DWC/gamespy/nonport.h>
+#include <DWC/gamespy/hashtable.h>
HashTable *TableNew(u32 p1, s32 p2, HashFunction hf, CompareFunction cmp, DtorFunction dtor)
{
diff --git a/src/code_801DAA30.cpp b/src/code_801DAA30.cpp index c8f0756..3b6494b 100644 --- a/src/code_801DAA30.cpp +++ b/src/code_801DAA30.cpp @@ -1,4 +1,3 @@ -#include "types.h"
#include "ctorStruct.h"
#include "code_801DAAE0.h"
diff --git a/src/code_801DAAE0.cpp b/src/code_801DAAE0.cpp index dd5e504..0db2018 100644 --- a/src/code_801DAAE0.cpp +++ b/src/code_801DAAE0.cpp @@ -1,7 +1,6 @@ -#include "types.h"
#include "ctorStruct.h"
-#include "Runtime/__mem.h"
-#include "SDK/mem.h"
+#include <string.h>
+#include <SDK/mem.h>
#include "code_801DAAE0.h"
namespace
diff --git a/src/code_801DB040.cpp b/src/code_801DB040.cpp index ce9740a..d895c88 100644 --- a/src/code_801DB040.cpp +++ b/src/code_801DB040.cpp @@ -1,7 +1,6 @@ -#include "types.h"
#include "ctorStruct.h"
-#include "Runtime/__mem.h"
-#include "SDK/mem.h"
+#include <string.h>
+#include <SDK/mem.h>
#include "code_801DAAE0.h"
#include "code_801DBB3C.h"
#include "code_801DB040.h"
diff --git a/src/code_801DB81C.cpp b/src/code_801DB81C.cpp index 95af182..0bb754c 100644 --- a/src/code_801DB81C.cpp +++ b/src/code_801DB81C.cpp @@ -1,6 +1,5 @@ -#include "types.h"
#include "ctorStruct.h"
-#include "SDK/os.h"
+#include <SDK/os.h>
#include "code_801DB81C.h"
namespace
diff --git a/src/code_801DBB3C.cpp b/src/code_801DBB3C.cpp index 5037b5a..bfaa7cd 100644 --- a/src/code_801DBB3C.cpp +++ b/src/code_801DBB3C.cpp @@ -1,6 +1,5 @@ -#include "types.h"
#include "ctorStruct.h"
-#include "Runtime/__mem.h"
+#include <string.h>
#include "code_801DAAE0.h"
#include "code_801DB040.h"
#include "code_801DBB3C.h"
diff --git a/src/code_801DBE90.cpp b/src/code_801DBE90.cpp index 5184c42..2303bdb 100644 --- a/src/code_801DBE90.cpp +++ b/src/code_801DBE90.cpp @@ -1,10 +1,9 @@ -#include "types.h"
#include "ctorStruct.h"
-#include "Runtime/__mem.h"
-#include "SDK/mem.h"
-#include "SDK/os.h"
-#include "SDK/dvd.h"
-#include "SDK/nand.h"
+#include <string.h>
+#include <SDK/mem.h>
+#include <SDK/os.h>
+#include <SDK/dvd.h>
+#include <SDK/nand.h>
#include "code_801DAAE0.h"
#include "code_801DCE6C.h"
#include "code_80223C54.h"
diff --git a/src/code_801DCE6C.cpp b/src/code_801DCE6C.cpp index 8bf56a7..866f9a9 100644 --- a/src/code_801DCE6C.cpp +++ b/src/code_801DCE6C.cpp @@ -1,16 +1,22 @@ -#include "types.h"
#include "ctorStruct.h"
#include "code_801DCE6C.h"
-#include "Runtime/__mem.h"
+#include <string.h>
+
+// NAND wrapper class
+
extern "C" {
+
+// TODO: convert to class member functions
-char* func_801DCE6C(gUnkClass4* p1)
+//static
+char* func_801DCE6C(gUnkClass6* p1)
{
return p1->unk7;
}
-char* func_801DCE74(gUnkClass4* p1)
+//static
+char* func_801DCE74(gUnkClass6* p1)
{
return p1->unk2;
}
@@ -20,6 +26,42 @@ gUnkClass4::gUnkClass4(void) memset(this, 0, sizeof(gUnkClass4));
}
-// ...
+// search the array
+//static
+gUnkClass6* func_801DCEB4(gUnkClass4* p1, const char* p2)
+{
+ char sp8[13]; // 0xD ~ 0x10 byte struct
+ memcpy(&sp8, p2, 12);
+ sp8[12] = '\0';
+
+ gUnkClass6* p = p1->arr;
+ for (s32 i = 0; i < 8; p++, i++)
+ if (p->unk0 && !p->unk1 && !strcmp(func_801DCE6C(p), sp8))
+ return p;
+
+ return NULL;
+}
+
+// just indicate if search succeeded
+BOOL func_801DCF48(gUnkClass4* p1, const char* p2)
+{
+ return func_801DCEB4(p1, p2) != NULL;
+}
+
+BOOL func_801DCF74(gUnkClass4* p1, const char* fileName, gUnkClass5* fp)
+{
+ gUnkClass6* r31 = func_801DCEB4(p1, fileName);
+ if (r31 && NANDOpen(func_801DCE74(r31), &r31->unk48, 1) == 0) {
+ fp->unk4.unk3C = r31;
+ fp->unk1 = 1;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+
+
+
} //extern "C"
|