diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-06-26 11:36:45 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-06-26 11:36:45 -0500 |
commit | aaec1327c178ae951a0b19a8150a69fc00eb3011 (patch) | |
tree | 7d979ff369f412604ba75def8d58f17c7827a06d | |
parent | 86b23638c773f42f1b7c56adb31eb16d1c417913 (diff) | |
parent | 673484e580337cd1ab14bfd43c770f004494b9a4 (diff) | |
download | kamek-aaec1327c178ae951a0b19a8150a69fc00eb3011.tar.gz kamek-aaec1327c178ae951a0b19a8150a69fc00eb3011.zip |
Merge branch 'level-select' of treeki:newergit/Kamek into level-select
Conflicts:
NewerProject.yaml
kamek_pal.x
Diffstat (limited to '')
-rw-r--r-- | NewerProject.yaml | 4 | ||||
-rw-r--r-- | compression.yaml | 18 | ||||
-rw-r--r-- | kamek_ntsc.x | 63 | ||||
-rw-r--r-- | kamek_ntsc2.x | 63 | ||||
-rw-r--r-- | kamek_pal2.x | 63 | ||||
-rw-r--r-- | src/compression.S | 127 |
6 files changed, 335 insertions, 3 deletions
diff --git a/NewerProject.yaml b/NewerProject.yaml index 4f95d8d..acfa899 100644 --- a/NewerProject.yaml +++ b/NewerProject.yaml @@ -18,5 +18,9 @@ modules: # - processed/replay.yaml
- processed/growup.yaml
- processed/levelspecial.yaml
+<<<<<<< HEAD - processed/eventlooper.yaml
- processed/spritespawner.yaml
+======= + - processed/compression.yaml
+>>>>>>> 673484e580337cd1ab14bfd43c770f004494b9a4 diff --git a/compression.yaml b/compression.yaml new file mode 100644 index 0000000..9d3a058 --- /dev/null +++ b/compression.yaml @@ -0,0 +1,18 @@ +--- +source_files: [../src/compression.S] +hooks: + - name: InitialiseEverything + type: branch_insn + branch_type: b + src_addr_pal: 0x8015BC70 + target_func: 'InitCompression' + + - name: GetFileEntrynumNew + type: branch_insn + branch_type: b + src_addr_pal: 0x8016BD70 + target_func: 'GetFileEntrynumNew' + + - name: FixStreamingLHDecompression + type: nop_insn + area_pal: 0x801D7884 diff --git a/kamek_ntsc.x b/kamek_ntsc.x index e93be35..f9a3800 100644 --- a/kamek_ntsc.x +++ b/kamek_ntsc.x @@ -5,6 +5,18 @@ OUTPUT_FORMAT ("binary") }*/ SECTIONS { + GetSpecificPlayerActor = 0x8005F900; + TimeStopFlag = 0x80429CFA; + TimerBranch = 0x800E39C8; + MarioDescentRate = 0x8042B864; + MarioJumpArc = 0x802F561C; + MarioJumpMax = 0x8042B848; + MiniMarioJumpArc = 0x802F5664; + MarioSize = 0x8042B874; + AlwaysDrawFlag = 0x80064540; + AlwaysDrawBranch = 0x80064544; + + _savefpr_14 = 0x802DCCA8; _savefpr_15 = 0x802DCCAC; _savefpr_16 = 0x802DCCB0; @@ -173,9 +185,18 @@ SECTIONS { DrawAllLayoutsAfterX__Fi = 0x80163390; DrawAllLayoutsAfterXandBeforeY__Fii = 0x80163420; + findPaneByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007300; + findTextBoxByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007320; + findPictureByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x800073D0; + findWindowByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007470; __ct__Q23m2d13EmbedLayout_cFv = 0x800C8950; __dt__Q23m2d13EmbedLayout_cFv = 0x800C89A0; loadArc__Q23m2d13EmbedLayout_cFPCcb = 0x800C8CB0; + loadAnimations__Q23m2d13EmbedLayout_cFPPCci = 0x800C8FB0; + loadGroups__Q23m2d13EmbedLayout_cFPPCcPii = 0x800C90F0; + enableNonLoopAnim__Q23m2d13EmbedLayout_cFib = 0x800C92F0; + enableLoopAnim__Q23m2d13EmbedLayout_cFi = 0x800C9380; + disableAllAnimations__Q23m2d13EmbedLayout_cFv = 0x800C9500; free__Q23m2d13EmbedLayout_cFv = 0x800C9930; execAnimations__Q23m2d13EmbedLayout_cFv = 0x800C9560; scheduleForDrawing__Q23m2d6Base_cFv = 0x80163850; @@ -200,14 +221,30 @@ SECTIONS { Init__Q34nw4r3g3d7ResFileFv = 0x8023A590; Bind__Q34nw4r3g3d7ResFileFQ34nw4r3g3d7ResFile = 0x8023A350; GetResMdl__Q34nw4r3g3d7ResFileCFPCc = 0x80239E30; + GetResTex__Q34nw4r3g3d7ResFileCFPCc = 0x80239F20; g3dMemAllocator__Q24nw4r3g3d = 0x8042A3C8; __ScnMdl__Construct__Q24nw4r3g3dFPvPUiPvUii = 0x8025CA20; __ScnMdlSimple__Construct__Q24nw4r3g3dFPvPUiPvi = 0x8025A380; InsertIntoScene__Q24nw4r3g3dFPv = 0x80164E50; + GetResMat__Q34nw4r3g3d6ResMdlCFPCc = 0x8023B760; + + DisableIndirectTexturing__3m3dFv = 0x80164F50; + InitTexObjWithResTex__3m3dFP9_GXTexObjPv14_GXTexWrapMode14_GXTexWrapMode12_GXTexFilter12_GXTexFilter = 0x802C7C70; + + /* This is preliminary and kinda strange, most of these just point to ScnLeaf for now */ + setup__Q23m3d6proc_cFPvPUi = 0x80164FD0; + __ct__Q23m3d6proc_cFv = 0x8016A010; + __dt__Q23m3d6proc_cFv = 0x8016A030; + free__Q23m3d6proc_cFv = 0x8016A090; + scheduleForDrawing__Q23m3d6proc_cFv = 0x8016A0E0; + getViewMatrix__Q23m3d6proc_cFPA3_A4_f = 0x8016A190; + returnUnknown__Q23m3d6proc_cFv = 0x8000F720; + /* End preliminary section */ + __ct__Q23m3d5mdl_cFv = 0x80169CD0; __dt__Q23m3d5mdl_cFv = 0x80169D20; - setup__Q23m3d5mdl_cFPvPvUiiPUi = 0x80169D90; + setup__Q23m3d5mdl_cFQ34nw4r3g3d6ResMdlPvUiiPUi = 0x80169D90; oneSetupType__Q23m3d5mdl_cFv = 0x80064C10; sub_80064BF0__Q23m3d5mdl_cFv = 0x80064BF0; setDrawMatrix__Q23m3d5mdl_cFPA4_Cf = 0x8016A170; @@ -231,6 +268,12 @@ SECTIONS { allocateBuffer__10mTexture_cFPv = 0x802C11E0; plotPixel__10mTexture_cFUsUs8_GXColor = 0x802C1280; + SetFontSize__Q34nw4r2ut10CharWriterFff = 0x8022D2F0; + + __ct__Q34nw4r2ut10TextWriterFv = 0x80230780; + __dt__Q34nw4r2ut10TextWriterFv = 0x802307E0; + CalcStringWidth__Q34nw4r2ut10TextWriterCFPCwi = 0x802310D0; + GameHeaps = 0x80377C48; BGDatClass = 0x80429DF0; @@ -300,6 +343,16 @@ SECTIONS { load__12dDvdLoader_cFPCcUcPv = 0x8008F1B0; unload__12dDvdLoader_cFv = 0x8008F310; + SZSDecompClass = 0x80377AE4; + LZDecompClass = 0x80377AF0; + LHDecompClass = 0x80377AFC; + LRCDecompClass = 0x80377B08; + RLDecompClass = 0x80377B14; + StoreCompressionClassList = 0x8016B090; + DecompBufferPointer = 0x80429460; + + TryAndFindCompressedFile = 0x8016BAA0; + _Z22BgTexMng__LoadAnimTilePvisPcS0_c = 0x80087B60; /* same for ntsc */ BgTexMng__LoadAnimTile__FPvisPcPcc = 0x80087B60; /* same for ntsc */ @@ -373,6 +426,8 @@ SECTIONS { AllocFromGameHeap1__FUi = 0x801628C0; FreeFromGameHeap1__FPv = 0x80162920; + AllocFromGameHeap1 = 0x801628C0; + _Z19lyt__Layout__LayoutPv = 0x802ACB40; _Z15lyt__Layout__dtPvi = 0x802ACB80; _Z18lyt__Layout__BuildPvPKvS_ = 0x802ACCB0; @@ -403,6 +458,8 @@ SECTIONS { DVDReadPrio__FP9DVDHandlePviii = 0x801CAB20; DVDClose__FP9DVDHandle = 0x801CAA00; + DVDConvertPathToEntrynum = 0x801CA680; + _ZN8SaveFile8GetBlockEi = 0x800E0380; _ZN8SaveFile10GetQSBlockEi = 0x800E03B0; @@ -492,6 +549,7 @@ SECTIONS { _Z6memsetPvij = 0x800046B4; sprintf__FPcPCce = 0x802E17DC; snprintf__FPciPCce = 0x802E16E8; + memcmp__FPCvPCvUi = 0x802DF098; _Z6strcatPKcS0_ = 0x802E1A3C; _Znaj = 0x802B9210; @@ -580,12 +638,15 @@ SECTIONS { GXSetTevKAlphaSel = 0x801C85B0; GXSetTevSwapMode = 0x801C8600; GXSetTevSwapModeTable = 0x801C8640; + GXSetAlphaCompare = 0x801C86C0; GXSetTevOrder = 0x801C8790; GXSetNumTevStages = 0x801C88F0; GXSetFog = 0x801C8920; + GXSetFogRangeAdj = 0x801C8CB0; GXSetBlendMode = 0x801C8DC0; GXSetZMode = 0x801C8E70; GXSetZCompLoc = 0x801C8EB0; + GXSetDither = 0x801C8F90; GXCallDisplayList = 0x801C95E0; GXSetProjection = 0x801C9840; GXLoadPosMtxImm = 0x801C9940; diff --git a/kamek_ntsc2.x b/kamek_ntsc2.x index 2d48f72..8af9cc3 100644 --- a/kamek_ntsc2.x +++ b/kamek_ntsc2.x @@ -5,6 +5,18 @@ OUTPUT_FORMAT ("binary") }*/ SECTIONS { + GetSpecificPlayerActor = 0x8005F900; + TimeStopFlag = 0x80429CFA; + TimerBranch = 0x800E39C8; + MarioDescentRate = 0x8042B864; + MarioJumpArc = 0x802F561C; + MarioJumpMax = 0x8042B848; + MiniMarioJumpArc = 0x802F5664; + MarioSize = 0x8042B874; + AlwaysDrawFlag = 0x80064540; + AlwaysDrawBranch = 0x80064544; + + _savefpr_14 = 0x802DCCA8; _savefpr_15 = 0x802DCCAC; _savefpr_16 = 0x802DCCB0; @@ -173,9 +185,18 @@ SECTIONS { DrawAllLayoutsAfterX__Fi = 0x80163390; DrawAllLayoutsAfterXandBeforeY__Fii = 0x80163420; + findPaneByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007300; + findTextBoxByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007320; + findPictureByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x800073D0; + findWindowByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0x80007470; __ct__Q23m2d13EmbedLayout_cFv = 0x800C8950; __dt__Q23m2d13EmbedLayout_cFv = 0x800C89A0; loadArc__Q23m2d13EmbedLayout_cFPCcb = 0x800C8CB0; + loadAnimations__Q23m2d13EmbedLayout_cFPPCci = 0x800C8FB0; + loadGroups__Q23m2d13EmbedLayout_cFPPCcPii = 0x800C90F0; + enableNonLoopAnim__Q23m2d13EmbedLayout_cFib = 0x800C92F0; + enableLoopAnim__Q23m2d13EmbedLayout_cFi = 0x800C9380; + disableAllAnimations__Q23m2d13EmbedLayout_cFv = 0x800C9500; free__Q23m2d13EmbedLayout_cFv = 0x800C9930; execAnimations__Q23m2d13EmbedLayout_cFv = 0x800C9560; scheduleForDrawing__Q23m2d6Base_cFv = 0x80163850; @@ -200,14 +221,30 @@ SECTIONS { Init__Q34nw4r3g3d7ResFileFv = 0x8023A590; Bind__Q34nw4r3g3d7ResFileFQ34nw4r3g3d7ResFile = 0x8023A350; GetResMdl__Q34nw4r3g3d7ResFileCFPCc = 0x80239E30; + GetResTex__Q34nw4r3g3d7ResFileCFPCc = 0x80239F20; g3dMemAllocator__Q24nw4r3g3d = 0x8042A3C8; __ScnMdl__Construct__Q24nw4r3g3dFPvPUiPvUii = 0x8025CA20; __ScnMdlSimple__Construct__Q24nw4r3g3dFPvPUiPvi = 0x8025A380; InsertIntoScene__Q24nw4r3g3dFPv = 0x80164E50; + GetResMat__Q34nw4r3g3d6ResMdlCFPCc = 0x8023B760; + + DisableIndirectTexturing__3m3dFv = 0x80164F50; + InitTexObjWithResTex__3m3dFP9_GXTexObjPv14_GXTexWrapMode14_GXTexWrapMode12_GXTexFilter12_GXTexFilter = 0x802C7C70; + + /* This is preliminary and kinda strange, most of these just point to ScnLeaf for now */ + setup__Q23m3d6proc_cFPvPUi = 0x80164FD0; + __ct__Q23m3d6proc_cFv = 0x8016A010; + __dt__Q23m3d6proc_cFv = 0x8016A030; + free__Q23m3d6proc_cFv = 0x8016A090; + scheduleForDrawing__Q23m3d6proc_cFv = 0x8016A0E0; + getViewMatrix__Q23m3d6proc_cFPA3_A4_f = 0x8016A190; + returnUnknown__Q23m3d6proc_cFv = 0x8000F720; + /* End preliminary section */ + __ct__Q23m3d5mdl_cFv = 0x80169CD0; __dt__Q23m3d5mdl_cFv = 0x80169D20; - setup__Q23m3d5mdl_cFPvPvUiiPUi = 0x80169D90; + setup__Q23m3d5mdl_cFQ34nw4r3g3d6ResMdlPvUiiPUi = 0x80169D90; oneSetupType__Q23m3d5mdl_cFv = 0x80064C10; sub_80064BF0__Q23m3d5mdl_cFv = 0x80064BF0; setDrawMatrix__Q23m3d5mdl_cFPA4_Cf = 0x8016A170; @@ -231,6 +268,12 @@ SECTIONS { allocateBuffer__10mTexture_cFPv = 0x802C11E0; plotPixel__10mTexture_cFUsUs8_GXColor = 0x802C1280; + SetFontSize__Q34nw4r2ut10CharWriterFff = 0x8022D2F0; + + __ct__Q34nw4r2ut10TextWriterFv = 0x80230780; + __dt__Q34nw4r2ut10TextWriterFv = 0x802307E0; + CalcStringWidth__Q34nw4r2ut10TextWriterCFPCwi = 0x802310D0; + GameHeaps = 0x80377C48; BGDatClass = 0x80429DF0; @@ -300,6 +343,16 @@ SECTIONS { load__12dDvdLoader_cFPCcUcPv = 0x8008F1B0; unload__12dDvdLoader_cFv = 0x8008F310; + SZSDecompClass = 0x80377AE4; + LZDecompClass = 0x80377AF0; + LHDecompClass = 0x80377AFC; + LRCDecompClass = 0x80377B08; + RLDecompClass = 0x80377B14; + StoreCompressionClassList = 0x8016B090; + DecompBufferPointer = 0x80429460; + + TryAndFindCompressedFile = 0x8016BAA0; + _Z22BgTexMng__LoadAnimTilePvisPcS0_c = 0x80087B60; /* same for ntsc */ BgTexMng__LoadAnimTile__FPvisPcPcc = 0x80087B60; /* same for ntsc */ @@ -373,6 +426,8 @@ SECTIONS { AllocFromGameHeap1__FUi = 0x801628C0; FreeFromGameHeap1__FPv = 0x80162920; + AllocFromGameHeap1 = 0x801628C0; + _Z19lyt__Layout__LayoutPv = 0x802ACB40; _Z15lyt__Layout__dtPvi = 0x802ACB80; _Z18lyt__Layout__BuildPvPKvS_ = 0x802ACCB0; @@ -403,6 +458,8 @@ SECTIONS { DVDReadPrio__FP9DVDHandlePviii = 0x801CAB20; DVDClose__FP9DVDHandle = 0x801CAA00; + DVDConvertPathToEntrynum = 0x801CA680; + _ZN8SaveFile8GetBlockEi = 0x800E0380; _ZN8SaveFile10GetQSBlockEi = 0x800E03B0; @@ -492,6 +549,7 @@ SECTIONS { _Z6memsetPvij = 0x800046B4; sprintf__FPcPCce = 0x802E17DC; snprintf__FPciPCce = 0x802E16E8; + memcmp__FPCvPCvUi = 0x802DF098; _Z6strcatPKcS0_ = 0x802E1A3C; _Znaj = 0x802B9210; @@ -580,12 +638,15 @@ SECTIONS { GXSetTevKAlphaSel = 0x801C85B0; GXSetTevSwapMode = 0x801C8600; GXSetTevSwapModeTable = 0x801C8640; + GXSetAlphaCompare = 0x801C86C0; GXSetTevOrder = 0x801C8790; GXSetNumTevStages = 0x801C88F0; GXSetFog = 0x801C8920; + GXSetFogRangeAdj = 0x801C8CB0; GXSetBlendMode = 0x801C8DC0; GXSetZMode = 0x801C8E70; GXSetZCompLoc = 0x801C8EB0; + GXSetDither = 0x801C8F90; GXCallDisplayList = 0x801C95E0; GXSetProjection = 0x801C9840; GXLoadPosMtxImm = 0x801C9940; diff --git a/kamek_pal2.x b/kamek_pal2.x index c18de20..8f6ff14 100644 --- a/kamek_pal2.x +++ b/kamek_pal2.x @@ -5,6 +5,18 @@ OUTPUT_FORMAT ("binary") }*/ SECTIONS { + GetSpecificPlayerActor = 0xDEADBEEF; + TimeStopFlag = 0xDEADBEEF; + TimerBranch = 0xDEADBEEF; + MarioDescentRate = 0xDEADBEEF; + MarioJumpArc = 0xDEADBEEF; + MarioJumpMax = 0xDEADBEEF; + MiniMarioJumpArc = 0xDEADBEEF; + MarioSize = 0xDEADBEEF; + AlwaysDrawFlag = 0xDEADBEEF; + AlwaysDrawBranch = 0xDEADBEEF; + + _savefpr_14 = 0xDEADBEEF; _savefpr_15 = 0xDEADBEEF; _savefpr_16 = 0xDEADBEEF; @@ -173,9 +185,18 @@ SECTIONS { DrawAllLayoutsAfterX__Fi = 0xDEADBEEF; DrawAllLayoutsAfterXandBeforeY__Fii = 0xDEADBEEF; + findPaneByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0xDEADBEEF; + findTextBoxByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0xDEADBEEF; + findPictureByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0xDEADBEEF; + findWindowByName__Q23m2d17EmbedLayoutBase_cCFPCc = 0xDEADBEEF; __ct__Q23m2d13EmbedLayout_cFv = 0xDEADBEEF; __dt__Q23m2d13EmbedLayout_cFv = 0xDEADBEEF; loadArc__Q23m2d13EmbedLayout_cFPCcb = 0xDEADBEEF; + loadAnimations__Q23m2d13EmbedLayout_cFPPCci = 0xDEADBEEF; + loadGroups__Q23m2d13EmbedLayout_cFPPCcPii = 0xDEADBEEF; + enableNonLoopAnim__Q23m2d13EmbedLayout_cFib = 0xDEADBEEF; + enableLoopAnim__Q23m2d13EmbedLayout_cFi = 0xDEADBEEF; + disableAllAnimations__Q23m2d13EmbedLayout_cFv = 0xDEADBEEF; free__Q23m2d13EmbedLayout_cFv = 0xDEADBEEF; execAnimations__Q23m2d13EmbedLayout_cFv = 0xDEADBEEF; scheduleForDrawing__Q23m2d6Base_cFv = 0xDEADBEEF; @@ -200,14 +221,30 @@ SECTIONS { Init__Q34nw4r3g3d7ResFileFv = 0xDEADBEEF; Bind__Q34nw4r3g3d7ResFileFQ34nw4r3g3d7ResFile = 0xDEADBEEF; GetResMdl__Q34nw4r3g3d7ResFileCFPCc = 0xDEADBEEF; + GetResTex__Q34nw4r3g3d7ResFileCFPCc = 0xDEADBEEF; g3dMemAllocator__Q24nw4r3g3d = 0xDEADBEEF; __ScnMdl__Construct__Q24nw4r3g3dFPvPUiPvUii = 0xDEADBEEF; __ScnMdlSimple__Construct__Q24nw4r3g3dFPvPUiPvi = 0xDEADBEEF; InsertIntoScene__Q24nw4r3g3dFPv = 0xDEADBEEF; + GetResMat__Q34nw4r3g3d6ResMdlCFPCc = 0xDEADBEEF; + + DisableIndirectTexturing__3m3dFv = 0xDEADBEEF; + InitTexObjWithResTex__3m3dFP9_GXTexObjPv14_GXTexWrapMode14_GXTexWrapMode12_GXTexFilter12_GXTexFilter = 0xDEADBEEF; + + /* This is preliminary and kinda strange, most of these just point to ScnLeaf for now */ + setup__Q23m3d6proc_cFPvPUi = 0xDEADBEEF; + __ct__Q23m3d6proc_cFv = 0xDEADBEEF; + __dt__Q23m3d6proc_cFv = 0xDEADBEEF; + free__Q23m3d6proc_cFv = 0xDEADBEEF; + scheduleForDrawing__Q23m3d6proc_cFv = 0xDEADBEEF; + getViewMatrix__Q23m3d6proc_cFPA3_A4_f = 0xDEADBEEF; + returnUnknown__Q23m3d6proc_cFv = 0xDEADBEEF; + /* End preliminary section */ + __ct__Q23m3d5mdl_cFv = 0xDEADBEEF; __dt__Q23m3d5mdl_cFv = 0xDEADBEEF; - setup__Q23m3d5mdl_cFPvPvUiiPUi = 0xDEADBEEF; + setup__Q23m3d5mdl_cFQ34nw4r3g3d6ResMdlPvUiiPUi = 0xDEADBEEF; oneSetupType__Q23m3d5mdl_cFv = 0xDEADBEEF; sub_80064BF0__Q23m3d5mdl_cFv = 0xDEADBEEF; setDrawMatrix__Q23m3d5mdl_cFPA4_Cf = 0xDEADBEEF; @@ -231,6 +268,12 @@ SECTIONS { allocateBuffer__10mTexture_cFPv = 0xDEADBEEF; plotPixel__10mTexture_cFUsUs8_GXColor = 0xDEADBEEF; + SetFontSize__Q34nw4r2ut10CharWriterFff = 0xDEADBEEF; + + __ct__Q34nw4r2ut10TextWriterFv = 0xDEADBEEF; + __dt__Q34nw4r2ut10TextWriterFv = 0xDEADBEEF; + CalcStringWidth__Q34nw4r2ut10TextWriterCFPCwi = 0xDEADBEEF; + GameHeaps = 0xDEADBEEF; BGDatClass = 0xDEADBEEF; @@ -300,6 +343,16 @@ SECTIONS { load__12dDvdLoader_cFPCcUcPv = 0xDEADBEEF; unload__12dDvdLoader_cFv = 0xDEADBEEF; + SZSDecompClass = 0xDEADBEEF; + LZDecompClass = 0xDEADBEEF; + LHDecompClass = 0xDEADBEEF; + LRCDecompClass = 0xDEADBEEF; + RLDecompClass = 0xDEADBEEF; + StoreCompressionClassList = 0xDEADBEEF; + DecompBufferPointer = 0xDEADBEEF; + + TryAndFindCompressedFile = 0xDEADBEEF; + _Z22BgTexMng__LoadAnimTilePvisPcS0_c = 0xDEADBEEF; /* same for ntsc */ BgTexMng__LoadAnimTile__FPvisPcPcc = 0xDEADBEEF; /* same for ntsc */ @@ -373,6 +426,8 @@ SECTIONS { AllocFromGameHeap1__FUi = 0xDEADBEEF; FreeFromGameHeap1__FPv = 0xDEADBEEF; + AllocFromGameHeap1 = 0xDEADBEEF; + _Z19lyt__Layout__LayoutPv = 0xDEADBEEF; _Z15lyt__Layout__dtPvi = 0xDEADBEEF; _Z18lyt__Layout__BuildPvPKvS_ = 0xDEADBEEF; @@ -403,6 +458,8 @@ SECTIONS { DVDReadPrio__FP9DVDHandlePviii = 0xDEADBEEF; DVDClose__FP9DVDHandle = 0xDEADBEEF; + DVDConvertPathToEntrynum = 0xDEADBEEF; + _ZN8SaveFile8GetBlockEi = 0xDEADBEEF; _ZN8SaveFile10GetQSBlockEi = 0xDEADBEEF; @@ -492,6 +549,7 @@ SECTIONS { _Z6memsetPvij = 0xDEADBEEF; sprintf__FPcPCce = 0xDEADBEEF; snprintf__FPciPCce = 0xDEADBEEF; + memcmp__FPCvPCvUi = 0xDEADBEEF; _Z6strcatPKcS0_ = 0xDEADBEEF; _Znaj = 0xDEADBEEF; @@ -580,12 +638,15 @@ SECTIONS { GXSetTevKAlphaSel = 0xDEADBEEF; GXSetTevSwapMode = 0xDEADBEEF; GXSetTevSwapModeTable = 0xDEADBEEF; + GXSetAlphaCompare = 0xDEADBEEF; GXSetTevOrder = 0xDEADBEEF; GXSetNumTevStages = 0xDEADBEEF; GXSetFog = 0xDEADBEEF; + GXSetFogRangeAdj = 0xDEADBEEF; GXSetBlendMode = 0xDEADBEEF; GXSetZMode = 0xDEADBEEF; GXSetZCompLoc = 0xDEADBEEF; + GXSetDither = 0xDEADBEEF; GXCallDisplayList = 0xDEADBEEF; GXSetProjection = 0xDEADBEEF; GXLoadPosMtxImm = 0xDEADBEEF; diff --git a/src/compression.S b/src/compression.S new file mode 100644 index 0000000..dfa2894 --- /dev/null +++ b/src/compression.S @@ -0,0 +1,127 @@ +.text +.align 4 +.set sp, 1 + +#ifndef __MWERKS__ +.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29 +.set r30,30; .set r31,31; .set f0,0; .set f2,2; .set f3,3 +.set f1,1; .set f30,30; .set f31,31 +#endif + +.extern StoreCompressionClassList + +.extern SZSDecompClass +.extern LZDecompClass +.extern LHDecompClass +.extern LRCDecompClass +.extern RLDecompClass + +.extern DecompBufferPointer + +.extern AllocFromGameHeap1 +.extern OSReport + +.extern TryAndFindCompressedFile +.extern DVDConvertPathToEntrynum + +.global InitCompression +InitCompression: + stwu sp, -0x10(sp) + mflr r0 + stw r0, 0x14(sp) + # -- Prolog + + lis r3, CMsg@h + ori r3, r3, CMsg@l + crclr 4*cr1+eq + bl OSReport + + lis r3, CCCL@h + ori r3, r3, CCCL@l + lis r4, CCCL_End@h + ori r4, r4, CCCL_End@l + bl StoreCompressionClassList + + # Allocate a buffer for decompression stuff + li r3, 0x8B4 + bl AllocFromGameHeap1 + lis r4, DecompBufferPointer@h + ori r4, r4, DecompBufferPointer@l + stw r3, 0(r4) + + mr r4, r3 + lis r3, CMsg2@h + ori r3, r3, CMsg2@l + crclr 4*cr1+eq + bl OSReport + + # -- Epilog + li r3, 1 + lwz r0, 0x14(sp) + mtlr r0 + addi sp, sp, 0x10 + blr + + +.global GetFileEntrynumNew +GetFileEntrynumNew: + stwu sp, -0x20(sp) + mflr r0 + stw r0, 0x24(sp) + stw r31, 0x1C(sp) + stw r30, 0x18(sp) + stw r29, 0x14(sp) + # Compression Type pointer (byte*) + mr r30, r4 + # Filename + mr r29, r3 + + # first, try compression + # don't bother checking 5278, it's always on in NSMBW anyway + bl TryAndFindCompressedFile + cmpwi r3, -1 + bne returnEntrynum + + # didn't find it, so try the normal version + mr r3, r29 + bl DVDConvertPathToEntrynum + # return value gets passed through + + cmpwi r30, 0 + beq returnEntrynum + li r0, 0 + stb r0, 0(r30) + +returnEntrynum: + lwz r31, 0x1C(sp) + lwz r30, 0x18(sp) + lwz r29, 0x14(sp) + lwz r0, 0x24(sp) + mtlr r0 + addi sp, sp, 0x20 + blr + + +.data +CCCL: + .long LHDecompClass + .long LZDecompClass +CCCL_End: + .long 0 + +CMsg: + .string "Setting up fancy decompression!\n" + +CMsg2: + .string "Buffer: %p\n" + +.align 4 + + + + |