From 741456d1daf82061c11548582c0b9a769f86bab5 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 20 Apr 2024 10:08:00 -0700 Subject: [PATCH] organize system/client-functions --- README.md | 54 ++++-- src/FunctionCompiler.cc | 165 ++++++++++-------- src/ProxyCommands.cc | 1 + src/ProxyServer.cc | 11 ++ src/ReceiveCommands.cc | 35 +++- src/Version.cc | 53 ++++-- src/Version.hh | 23 +++ .../{ => BugFixes}/BugFixes.3OE0.patch.s | 0 .../{ => BugFixes}/BugFixes.3OE1.patch.s | 0 .../{ => BugFixes}/BugFixes.3OE2.patch.s | 0 .../{ => BugFixes}/BugFixes.3OJ2.patch.s | 0 .../{ => BugFixes}/BugFixes.3OJ3.patch.s | 0 .../{ => BugFixes}/BugFixes.3OJ4.patch.s | 0 .../{ => BugFixes}/BugFixes.3OJ5.patch.s | 0 .../{ => BugFixes}/BugFixes.3OP0.patch.s | 0 .../{ => BugFixes}/BugFixesWIP.4OEU.patch.s | 0 .../CallProtectedHandler.3OE0.patch.s | 0 .../CallProtectedHandler.3OE1.patch.s | 0 .../CallProtectedHandler.3OE2.patch.s | 0 .../CallProtectedHandler.3OJ2.patch.s | 0 .../CallProtectedHandler.3OJ3.patch.s | 0 .../CallProtectedHandler.3OJ4.patch.s | 0 .../CallProtectedHandler.3OJ5.patch.s | 0 .../CallProtectedHandler.3OP0.patch.s | 0 .../CallProtectedHandler.4OED.patch.s | 0 .../CallProtectedHandler.4OEU.patch.s | 0 .../CallProtectedHandler.4OJB.patch.s | 0 .../CallProtectedHandler.4OJD.patch.s | 0 .../CallProtectedHandler.4OJU.patch.s | 0 .../CallProtectedHandler.4OPD.patch.s | 0 .../CallProtectedHandler.4OPU.patch.s | 0 .../CallProtectedHandlerGC.ppc.inc.s | 0 .../CallProtectedHandlerXB.x86.inc.s | 0 .../ChatFeatures.3OE0.patch.s | 0 .../ChatFeatures.3OE1.patch.s | 0 .../ChatFeatures.3OE2.patch.s | 0 .../ChatFeatures.3OJ2.patch.s | 0 .../ChatFeatures.3OJ3.patch.s | 0 .../ChatFeatures.3OJ4.patch.s | 0 .../ChatFeatures.3OJ5.patch.s | 0 .../ChatFeatures.3OP0.patch.s | 0 .../{ => CommonBank}/CommonBank.3OE0.patch.s | 0 .../{ => CommonBank}/CommonBank.3OE1.patch.s | 0 .../{ => CommonBank}/CommonBank.3OE2.patch.s | 0 .../{ => CommonBank}/CommonBank.3OJ2.patch.s | 0 .../{ => CommonBank}/CommonBank.3OJ3.patch.s | 0 .../{ => CommonBank}/CommonBank.3OJ4.patch.s | 0 .../{ => CommonBank}/CommonBank.3OJ5.patch.s | 0 .../{ => CommonBank}/CommonBank.3OP0.patch.s | 0 .../{ => Decoction}/Decoction.3OE0.patch.s | 0 .../{ => Decoction}/Decoction.3OE1.patch.s | 0 .../{ => Decoction}/Decoction.3OE2.patch.s | 0 .../{ => Decoction}/Decoction.3OJ2.patch.s | 0 .../{ => Decoction}/Decoction.3OJ3.patch.s | 0 .../{ => Decoction}/Decoction.3OJ4.patch.s | 0 .../{ => Decoction}/Decoction.3OJ5.patch.s | 0 .../{ => Decoction}/Decoction.3OP0.patch.s | 0 .../{ => Decoction}/Decoction.4OED.patch.s | 0 .../{ => Decoction}/Decoction.4OEU.patch.s | 0 .../{ => Decoction}/Decoction.4OJB.patch.s | 0 .../{ => Decoction}/Decoction.4OJD.patch.s | 0 .../{ => Decoction}/Decoction.4OJU.patch.s | 0 .../{ => Decoction}/Decoction.4OPD.patch.s | 0 .../{ => Decoction}/Decoction.4OPU.patch.s | 0 .../{ => Decoction}/DecoctionXB.x86.inc.s | 0 .../DisableIdleDisconnect.3OE0.patch.s | 0 .../DisableIdleDisconnect.3OE1.patch.s | 0 .../DisableIdleDisconnect.3OE2.patch.s | 0 .../DisableIdleDisconnect.3OJ2.patch.s | 0 .../DisableIdleDisconnect.3OJ3.patch.s | 0 .../DisableIdleDisconnect.3OJ4.patch.s | 0 .../DisableIdleDisconnect.3OJ5.patch.s | 0 .../DisableIdleDisconnect.3OP0.patch.s | 0 .../DisableIdleDisconnect.3SE0.patch.s | 0 .../DisableIdleDisconnect.3SJ0.patch.s | 0 .../DisableIdleDisconnect.3SJT.patch.s | 0 .../DisableIdleDisconnect.3SP0.patch.s | 0 .../DisableIdleDisconnect.4OED.patch.s | 0 .../DisableIdleDisconnect.4OEU.patch.s | 0 .../DisableIdleDisconnect.4OJB.patch.s | 0 .../DisableIdleDisconnect.4OJD.patch.s | 0 .../DisableIdleDisconnect.4OJU.patch.s | 0 .../DisableIdleDisconnect.4OPD.patch.s | 0 .../DisableIdleDisconnect.4OPU.patch.s | 0 .../DrawDistance.3OE0.patch.s | 0 .../DrawDistance.3OE1.patch.s | 0 .../DrawDistance.3OE2.patch.s | 0 .../DrawDistance.3OJ2.patch.s | 0 .../DrawDistance.3OJ3.patch.s | 0 .../DrawDistance.3OJ4.patch.s | 0 .../DrawDistance.3OJ5.patch.s | 0 .../DrawDistance.3OP0.patch.s | 0 .../EnemyHPBars.3OE0.patch.s | 0 .../EnemyHPBars.3OE1.patch.s | 0 .../EnemyHPBars.3OE2.patch.s | 0 .../EnemyHPBars.3OJ2.patch.s | 0 .../EnemyHPBars.3OJ3.patch.s | 0 .../EnemyHPBars.3OJ4.patch.s | 0 .../EnemyHPBars.3OJ5.patch.s | 0 .../EnemyHPBars.3OP0.patch.s | 0 .../EnemyHPBars.4OED.patch.s | 0 .../EnemyHPBars.4OEU.patch.s | 0 .../EnemyHPBars.4OJB.patch.s | 0 .../EnemyHPBars.4OJD.patch.s | 0 .../EnemyHPBars.4OJU.patch.s | 0 .../EnemyHPBars.4OPD.patch.s | 0 .../EnemyHPBars.4OPU.patch.s | 0 .../{ => Episode3}/AllCards.3SE0.patch.s | 0 .../{ => Episode3}/AllCards.3SJT.patch.s | 0 .../{ => Episode3}/Editors.3SE0.patch.s | 0 .../{ => Episode3}/VIPCard.3SE0.patch.s | 0 .../{ => Episode3}/VIPCard.3SJ0.patch.s | 0 .../{ => Episode3}/VIPCard.3SJT.patch.s | 0 .../{ => Episode3}/VIPCard.3SP0.patch.s | 0 .../Episode3USAOnly.ppc.inc.s | 7 - .../GetExtendedPlayerInfo.3OE0.patch.s | 0 .../GetExtendedPlayerInfo.3OE1.patch.s | 0 .../GetExtendedPlayerInfo.3OE2.patch.s | 0 .../GetExtendedPlayerInfo.3OJ2.patch.s | 0 .../GetExtendedPlayerInfo.3OJ3.patch.s | 0 .../GetExtendedPlayerInfo.3OJ4.patch.s | 0 .../GetExtendedPlayerInfo.3OJ5.patch.s | 0 .../GetExtendedPlayerInfo.3OP0.patch.s | 0 .../GetExtendedPlayerInfoGC.ppc.inc.s | 0 .../HungryMagSound.3OE0.patch.s | 0 .../HungryMagSound.3OE1.patch.s | 0 .../HungryMagSound.3OE2.patch.s | 0 .../HungryMagSound.3OJ2.patch.s | 0 .../HungryMagSound.3OJ3.patch.s | 0 .../HungryMagSound.3OJ4.patch.s | 0 .../HungryMagSound.3OJ5.patch.s | 0 .../HungryMagSound.3OP0.patch.s | 0 .../HungryMagSound.4OED.patch.s | 0 .../HungryMagSound.4OEU.patch.s | 0 .../HungryMagSound.4OJB.patch.s | 0 .../HungryMagSound.4OJD.patch.s | 0 .../HungryMagSound.4OJU.patch.s | 0 .../HungryMagSound.4OPD.patch.s | 0 .../HungryMagSound.4OPU.patch.s | 0 .../InvisibleMag.3OE0.patch.s | 0 .../InvisibleMag.3OE1.patch.s | 0 .../InvisibleMag.3OE2.patch.s | 0 .../InvisibleMag.3OJ2.patch.s | 0 .../InvisibleMag.3OJ3.patch.s | 0 .../InvisibleMag.3OJ4.patch.s | 0 .../InvisibleMag.3OJ5.patch.s | 0 .../InvisibleMag.3OP0.patch.s | 0 .../InvisibleMag.4OED.patch.s | 0 .../InvisibleMag.4OEU.patch.s | 0 .../InvisibleMag.4OJB.patch.s | 0 .../InvisibleMag.4OJD.patch.s | 0 .../InvisibleMag.4OJU.patch.s | 0 .../InvisibleMag.4OPD.patch.s | 0 .../InvisibleMag.4OPU.patch.s | 0 .../ItemLossPrevention.3OE0.patch.s | 0 .../ItemLossPrevention.3OE1.patch.s | 0 .../ItemLossPrevention.3OE2.patch.s | 0 .../ItemLossPrevention.3OJ2.patch.s | 0 .../ItemLossPrevention.3OJ3.patch.s | 0 .../ItemLossPrevention.3OJ4.patch.s | 0 .../ItemLossPrevention.3OJ5.patch.s | 0 .../ItemLossPrevention.3OP0.patch.s | 0 .../ItemLossPrevention.4OED.patch.s | 0 .../ItemLossPrevention.4OEU.patch.s | 0 .../ItemLossPrevention.4OJB.patch.s | 0 .../ItemLossPrevention.4OJD.patch.s | 0 .../ItemLossPrevention.4OJU.patch.s | 0 .../ItemLossPrevention.4OPD.patch.s | 0 .../ItemLossPrevention.4OPU.patch.s | 0 .../{ => Movement}/Movement.3OE0.patch.s | 0 .../{ => Movement}/Movement.3OE1.patch.s | 0 .../{ => Movement}/Movement.3OE2.patch.s | 0 .../{ => Movement}/Movement.3OJ2.patch.s | 0 .../{ => Movement}/Movement.3OJ3.patch.s | 0 .../{ => Movement}/Movement.3OJ4.patch.s | 0 .../{ => Movement}/Movement.3OJ5.patch.s | 0 .../{ => Movement}/Movement.3OP0.patch.s | 0 .../{ => Movement}/Movement.4OED.patch.s | 0 .../{ => Movement}/Movement.4OEU.patch.s | 0 .../{ => Movement}/Movement.4OJB.patch.s | 0 .../{ => Movement}/Movement.4OJD.patch.s | 0 .../{ => Movement}/Movement.4OJU.patch.s | 0 .../{ => Movement}/Movement.4OPD.patch.s | 0 .../{ => Movement}/Movement.4OPU.patch.s | 0 .../{ => Movement}/MovementXB.x86.inc.s | 0 .../{ => Palette}/Palette.3OE0.patch.s | 0 .../{ => Palette}/Palette.3OE1.patch.s | 0 .../{ => Palette}/Palette.3OE2.patch.s | 0 .../{ => Palette}/Palette.3OJ2.patch.s | 0 .../{ => Palette}/Palette.3OJ3.patch.s | 0 .../{ => Palette}/Palette.3OJ4.patch.s | 0 .../{ => Palette}/Palette.3OJ5.patch.s | 0 .../{ => Palette}/Palette.3OP0.patch.s | 0 .../RareDropNotifications.3OE0.patch.s | 0 .../RareDropNotifications.3OE1.patch.s | 0 .../RareDropNotifications.3OE2.patch.s | 0 .../RareDropNotifications.3OJ2.patch.s | 0 .../RareDropNotifications.3OJ3.patch.s | 0 .../RareDropNotifications.3OJ4.patch.s | 0 .../RareDropNotifications.3OJ5.patch.s | 0 .../RareDropNotifications.3OP0.patch.s | 0 .../DCReticleColors.3OE0.patch.s | 0 .../DCReticleColors.3OE1.patch.s | 0 .../DCReticleColors.3OE2.patch.s | 0 .../DCReticleColors.3OJ2.patch.s | 0 .../DCReticleColors.3OJ3.patch.s | 0 .../DCReticleColors.3OJ4.patch.s | 0 .../DCReticleColors.3OJ5.patch.s | 0 .../DCReticleColors.3OP0.patch.s | 0 .../DCReticleColors.4OED.patch.s | 0 .../DCReticleColors.4OEU.patch.s | 0 .../DCReticleColors.4OJB.patch.s | 0 .../DCReticleColors.4OJD.patch.s | 0 .../DCReticleColors.4OJU.patch.s | 0 .../DCReticleColors.4OPD.patch.s | 0 .../DCReticleColors.4OPU.patch.s | 0 .../GCReticleColors.4OED.patch.s | 0 .../GCReticleColors.4OEU.patch.s | 0 .../GCReticleColors.4OJB.patch.s | 0 .../GCReticleColors.4OJD.patch.s | 0 .../GCReticleColors.4OJU.patch.s | 0 .../GCReticleColors.4OPD.patch.s | 0 .../GCReticleColors.4OPU.patch.s | 0 .../PSOXReticleColors.3OE0.patch.s | 0 .../PSOXReticleColors.3OE1.patch.s | 0 .../PSOXReticleColors.3OE2.patch.s | 0 .../PSOXReticleColors.3OJ2.patch.s | 0 .../PSOXReticleColors.3OJ3.patch.s | 0 .../PSOXReticleColors.3OJ4.patch.s | 0 .../PSOXReticleColors.3OJ5.patch.s | 0 .../PSOXReticleColors.3OP0.patch.s | 0 .../{ => System}/CacheClearFix-Orig.ppc.inc.s | 0 .../{ => System}/CacheClearFix-Phase1.ppc.s | 0 .../{ => System}/CacheClearFix-Phase2.ppc.s | 0 .../{ => System}/CacheClearFix.ppc.inc.s | 0 .../{ => System}/CopyCode.ppc.inc.s | 0 .../{ => System}/CopyDataWords.ppc.inc.s | 0 .../Episode3USAQuestBufferOverflow.ppc.s | 0 .../{ => System}/FlushCachedCode.ppc.inc.s | 0 .../{ => System}/PRSDecompress.ppc.inc.s | 0 .../{ => System}/ReadMemoryWord.ppc.s | 0 .../{ => System}/RunDOL.ppc.s | 0 .../{ => System}/VersionDetectDC.sh4.s | 0 .../{ => System}/VersionDetectGC.ppc.s | 0 ...ersionDetectWithPatchFunctionsXB.x86.inc.s | 0 .../{ => System}/VersionDetectXB.x86.s | 0 .../{ => System}/WriteCodeBlocksGC.ppc.inc.s | 0 .../{ => System}/WriteCodeBlocksXB.x86.inc.s | 0 .../{ => System}/WriteMemory.ppc.s | 0 tests/GC-Episode2PrivateDrops2P.test.txt | 10 +- tests/GC-Episode3BattleWithSpectator.test.txt | 4 +- ...pisode3TrialEditionLobbySmokeTest.test.txt | 4 +- tests/GC-PoisonRoom.test.txt | 10 +- 253 files changed, 247 insertions(+), 130 deletions(-) rename system/client-functions/{ => BugFixes}/BugFixes.3OE0.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixes.3OE1.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixes.3OE2.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixes.3OJ2.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixes.3OJ3.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixes.3OJ4.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixes.3OJ5.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixes.3OP0.patch.s (100%) rename system/client-functions/{ => BugFixes}/BugFixesWIP.4OEU.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OE0.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OE1.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OE2.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OJ2.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OJ3.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OJ4.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OJ5.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.3OP0.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.4OED.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.4OEU.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.4OJB.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.4OJD.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.4OJU.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.4OPD.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandler.4OPU.patch.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandlerGC.ppc.inc.s (100%) rename system/client-functions/{ => CallProtectedHandler}/CallProtectedHandlerXB.x86.inc.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OE0.patch.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OE1.patch.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OE2.patch.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OJ2.patch.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OJ3.patch.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OJ4.patch.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OJ5.patch.s (100%) rename system/client-functions/{ => ChatFeatures}/ChatFeatures.3OP0.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OE0.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OE1.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OE2.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OJ2.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OJ3.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OJ4.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OJ5.patch.s (100%) rename system/client-functions/{ => CommonBank}/CommonBank.3OP0.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OE0.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OE1.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OE2.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OJ2.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OJ3.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OJ4.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OJ5.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.3OP0.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.4OED.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.4OEU.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.4OJB.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.4OJD.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.4OJU.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.4OPD.patch.s (100%) rename system/client-functions/{ => Decoction}/Decoction.4OPU.patch.s (100%) rename system/client-functions/{ => Decoction}/DecoctionXB.x86.inc.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OE0.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OE1.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OE2.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OJ2.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OJ3.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OJ4.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OJ5.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3OP0.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3SE0.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3SJ0.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3SJT.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.3SP0.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.4OED.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.4OEU.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.4OJB.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.4OJD.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.4OJU.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.4OPD.patch.s (100%) rename system/client-functions/{ => DisableIdleDisconnect}/DisableIdleDisconnect.4OPU.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OE0.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OE1.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OE2.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OJ2.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OJ3.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OJ4.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OJ5.patch.s (100%) rename system/client-functions/{ => DrawDistance}/DrawDistance.3OP0.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OE0.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OE1.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OE2.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OJ2.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OJ3.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OJ4.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OJ5.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.3OP0.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.4OED.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.4OEU.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.4OJB.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.4OJD.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.4OJU.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.4OPD.patch.s (100%) rename system/client-functions/{ => EnemyHPBars}/EnemyHPBars.4OPU.patch.s (100%) rename system/client-functions/{ => Episode3}/AllCards.3SE0.patch.s (100%) rename system/client-functions/{ => Episode3}/AllCards.3SJT.patch.s (100%) rename system/client-functions/{ => Episode3}/Editors.3SE0.patch.s (100%) rename system/client-functions/{ => Episode3}/VIPCard.3SE0.patch.s (100%) rename system/client-functions/{ => Episode3}/VIPCard.3SJ0.patch.s (100%) rename system/client-functions/{ => Episode3}/VIPCard.3SJT.patch.s (100%) rename system/client-functions/{ => Episode3}/VIPCard.3SP0.patch.s (100%) delete mode 100644 system/client-functions/Episode3USAOnly.ppc.inc.s rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OE0.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OE1.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OE2.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OJ2.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OJ3.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OJ4.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OJ5.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfo.3OP0.patch.s (100%) rename system/client-functions/{ => GetExtendedPlayerInfo}/GetExtendedPlayerInfoGC.ppc.inc.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OE0.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OE1.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OE2.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OJ2.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OJ3.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OJ4.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OJ5.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.3OP0.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.4OED.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.4OEU.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.4OJB.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.4OJD.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.4OJU.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.4OPD.patch.s (100%) rename system/client-functions/{ => HungryMagSound}/HungryMagSound.4OPU.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OE0.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OE1.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OE2.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OJ2.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OJ3.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OJ4.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OJ5.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.3OP0.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.4OED.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.4OEU.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.4OJB.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.4OJD.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.4OJU.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.4OPD.patch.s (100%) rename system/client-functions/{ => InvisibleMag}/InvisibleMag.4OPU.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OE0.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OE1.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OE2.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OJ2.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OJ3.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OJ4.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OJ5.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.3OP0.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.4OED.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.4OEU.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.4OJB.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.4OJD.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.4OJU.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.4OPD.patch.s (100%) rename system/client-functions/{ => ItemLossPrevention}/ItemLossPrevention.4OPU.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OE0.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OE1.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OE2.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OJ2.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OJ3.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OJ4.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OJ5.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.3OP0.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.4OED.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.4OEU.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.4OJB.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.4OJD.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.4OJU.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.4OPD.patch.s (100%) rename system/client-functions/{ => Movement}/Movement.4OPU.patch.s (100%) rename system/client-functions/{ => Movement}/MovementXB.x86.inc.s (100%) rename system/client-functions/{ => Palette}/Palette.3OE0.patch.s (100%) rename system/client-functions/{ => Palette}/Palette.3OE1.patch.s (100%) rename system/client-functions/{ => Palette}/Palette.3OE2.patch.s (100%) rename system/client-functions/{ => Palette}/Palette.3OJ2.patch.s (100%) rename system/client-functions/{ => Palette}/Palette.3OJ3.patch.s (100%) rename system/client-functions/{ => Palette}/Palette.3OJ4.patch.s (100%) rename system/client-functions/{ => Palette}/Palette.3OJ5.patch.s (100%) rename system/client-functions/{ => Palette}/Palette.3OP0.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OE0.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OE1.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OE2.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OJ2.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OJ3.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OJ4.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OJ5.patch.s (100%) rename system/client-functions/{ => RareDropNotifications}/RareDropNotifications.3OP0.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OE0.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OE1.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OE2.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OJ2.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OJ3.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OJ4.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OJ5.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.3OP0.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.4OED.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.4OEU.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.4OJB.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.4OJD.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.4OJU.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.4OPD.patch.s (100%) rename system/client-functions/{ => ReticleColors}/DCReticleColors.4OPU.patch.s (100%) rename system/client-functions/{ => ReticleColors}/GCReticleColors.4OED.patch.s (100%) rename system/client-functions/{ => ReticleColors}/GCReticleColors.4OEU.patch.s (100%) rename system/client-functions/{ => ReticleColors}/GCReticleColors.4OJB.patch.s (100%) rename system/client-functions/{ => ReticleColors}/GCReticleColors.4OJD.patch.s (100%) rename system/client-functions/{ => ReticleColors}/GCReticleColors.4OJU.patch.s (100%) rename system/client-functions/{ => ReticleColors}/GCReticleColors.4OPD.patch.s (100%) rename system/client-functions/{ => ReticleColors}/GCReticleColors.4OPU.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OE0.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OE1.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OE2.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OJ2.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OJ3.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OJ4.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OJ5.patch.s (100%) rename system/client-functions/{ => ReticleColors}/PSOXReticleColors.3OP0.patch.s (100%) rename system/client-functions/{ => System}/CacheClearFix-Orig.ppc.inc.s (100%) rename system/client-functions/{ => System}/CacheClearFix-Phase1.ppc.s (100%) rename system/client-functions/{ => System}/CacheClearFix-Phase2.ppc.s (100%) rename system/client-functions/{ => System}/CacheClearFix.ppc.inc.s (100%) rename system/client-functions/{ => System}/CopyCode.ppc.inc.s (100%) rename system/client-functions/{ => System}/CopyDataWords.ppc.inc.s (100%) rename system/client-functions/{ => System}/Episode3USAQuestBufferOverflow.ppc.s (100%) rename system/client-functions/{ => System}/FlushCachedCode.ppc.inc.s (100%) rename system/client-functions/{ => System}/PRSDecompress.ppc.inc.s (100%) rename system/client-functions/{ => System}/ReadMemoryWord.ppc.s (100%) rename system/client-functions/{ => System}/RunDOL.ppc.s (100%) rename system/client-functions/{ => System}/VersionDetectDC.sh4.s (100%) rename system/client-functions/{ => System}/VersionDetectGC.ppc.s (100%) rename system/client-functions/{ => System}/VersionDetectWithPatchFunctionsXB.x86.inc.s (100%) rename system/client-functions/{ => System}/VersionDetectXB.x86.s (100%) rename system/client-functions/{ => System}/WriteCodeBlocksGC.ppc.inc.s (100%) rename system/client-functions/{ => System}/WriteCodeBlocksXB.x86.inc.s (100%) rename system/client-functions/{ => System}/WriteMemory.ppc.s (100%) diff --git a/README.md b/README.md index 238d98f0..42ccfce8 100644 --- a/README.md +++ b/README.md @@ -365,23 +365,51 @@ Like quests, Episode 3 card definitions, maps, and quests are cached in memory. ## Memory patches, client functions, and DOL files -Everything in this section requires resource_dasm to be installed, so newserv can use the assemblers and disassemblers from its libresource_file library. If resource_dasm is not installed, newserv will still build and run, but these features will not be available. +*Everything in this section requires resource_dasm to be installed, so newserv can use the assemblers and disassemblers from its libresource_file library. If resource_dasm is not installed, newserv will still build and run, but these features will not be available.* -In addition, these features are only supported for the following game versions: -* PSO GameCube Episodes 1&2 Trial Edition -* PSO GameCube Episodes 1&2 JP, USA, and EU but not Plus -* PSO GameCube Episodes 1&2 Plus JP v1.4 but not v1.5 -* PSO GameCube Episode 3 Trial Edition -* PSO GameCube Episode 3 JP -* PSO GameCube Episode 3 USA (experimental; must be manually enabled in config.json) -* PSO Xbox (all versions) -* PSO BB +You can put assembly files in the system/client-functions directory with filenames like PatchName.VERS.patch.s and they will appear in the Patches menu for clients that support client functions. Client functions are written in SH-4, PowerPC, or x86 assembly and are compiled when newserv is started. The assembly system's features are documented in the comments in system/client-functions/System/WriteMemory.ppc.s. +The VERS token in client function filenames refers to the specific version of the game that the client function applies to. Some versions do not support receiving client functions at all. The specific versions are: + +| Game | VERS | Supported | +|-------------------|------|-----------| +| PSO DC NTE | 1OJ1 | No | +| PSO DC 11/2000 | 1OJ2 | No | +| PSO DC 12/2000 | 1OJ3 | No | +| PSO DC 01/2001 | 1OJ4 | No | +| PSO DC v1 JP | 1OJF | No | +| PSO DC v1 US | 1OEF | No | +| PSO DC v1 EU | 1OPF | No | +| PSO DC 08/2001 | 2OJ5 | Yes | +| PSO DC v2 JP | 2OJF | Yes | +| PSO DC v2 US | 2OEF | Yes | +| PSO DC v2 EU | 2OPF | Yes | +| PSO PC (v2) | 2OJW | No | +| PSO GC NTE | 3OJT | Yes | +| PSO GC v1.2 JP | 3OJ2 | Yes | +| PSO GC v1.3 JP | 3OJ3 | Yes | +| PSO GC v1.4 JP | 3OJ4 | Yes | +| PSO GC v1.5 JP | 3OJ5 | No | +| PSO GC v1.0 US | 3OE0 | Yes | +| PSO GC v1.1 US | 3OE1 | Yes | +| PSO GC v1.2 US | 3OE2 | No | +| PSO GC v1.0 EU | 3OP0 | Yes | +| PSO GC Ep3 NTE | 3SJT | Yes | +| PSO GC Ep3 JP | 3SJ0 | Yes | +| PSO GC Ep3 US | 3SE0 | No | +| PSO GC Ep3 EU | 3SP0 | No | +| PSO Xbox Beta | 4OJB | Yes | +| PSO Xbox JP Disc | 4OJD | Yes | +| PSO Xbox JP TU | 4OJU | Yes | +| PSO Xbox US Disc | 4OED | Yes | +| PSO Xbox US TU | 4OEU | Yes | +| PSO Xbox EU Disc | 4OPD | Yes | +| PSO Xbox EU TU | 4OPU | Yes | +| PSO BB JP 1.25.13 | 51OC | Yes | +| PSO BB Tethealla | 51OC | Yes | *Note: newserv uses the shorter GameCube versioning convention, where discs labeled DOL-XXXX-0-0Y are version 1.Y. The PSO community seems to use the convention 1.0Y in some places instead, but these are the same version. For example, the version that newserv calls v1.4 is the same as v1.04, and is labeled DOL-GPOJ-0-04 on the underside of the disc.* -You can put memory patches in the system/client-functions directory with filenames like PatchName.patch.s and they will appear in the Patches menu for PSO GC, XB, and BB clients that support patching. Memory patches are written in PowerPC or x86 assembly and are compiled when newserv is started. The assembly system's features are documented in the comments in system/client-functions/WriteMemory.ppc.s. - -newserv comes with a set of patches for GC Episodes 1&2 based on AR codes originally made by Ralf at GC-Forever and Aleron Ives. Many of them were originally posted in [this thread](https://www.gc-forever.com/forums/viewtopic.php?f=38&t=2050). +newserv comes with a set of patches for some of the above versions, based on AR codes originally made by Ralf at GC-Forever and Aleron Ives. Many of them were originally posted in [this thread](https://www.gc-forever.com/forums/viewtopic.php?f=38&t=2050). You can also put DOL files in the system/dol directory, and they will appear in the Programs menu for GC clients. Selecting a DOL file there will load the file into the GameCube's memory and run it, just like the old homebrew loaders (PSUL and PSOload) did. For this to work, ReadMemoryWord.ppc.s, WriteMemory.ppc.s, and RunDOL.ppc.s must be present in the system/client-functions directory. This has been tested on Dolphin but not on a real GameCube, so results may vary. diff --git a/src/FunctionCompiler.cc b/src/FunctionCompiler.cc index bf1e964e..1c729dfe 100644 --- a/src/FunctionCompiler.cc +++ b/src/FunctionCompiler.cc @@ -120,12 +120,14 @@ bool CompiledFunctionCode::is_big_endian() const { shared_ptr compile_function_code( CompiledFunctionCode::Architecture arch, - const string& directory, + const string& function_directory, + const string& system_directory, const string& name, const string& text) { #ifndef HAVE_RESOURCE_FILE (void)arch; - (void)directory; + (void)function_directory; + (void)system_directory; (void)name; (void)text; throw runtime_error("function compiler is not available"); @@ -154,7 +156,11 @@ shared_ptr compile_function_code( throw runtime_error("unknown architecture"); } - string asm_filename = string_printf("%s/%s.%s.inc.s", directory.c_str(), name.c_str(), arch_name_token); + // Look in the function directory first, then the system directory + string asm_filename = string_printf("%s/%s.%s.inc.s", function_directory.c_str(), name.c_str(), arch_name_token); + if (!isfile(asm_filename)) { + asm_filename = string_printf("%s/%s.%s.inc.s", system_directory.c_str(), name.c_str(), arch_name_token); + } if (isfile(asm_filename)) { if (!get_include_stack.emplace(name).second) { throw runtime_error("mutual recursion between includes: " + name); @@ -176,7 +182,12 @@ shared_ptr compile_function_code( get_include_stack.erase(name); return ret.code; } - string bin_filename = directory + "/" + name + ".inc.bin"; + + string bin_filename = function_directory + "/" + name + ".inc.bin"; + if (isfile(bin_filename)) { + return load_file(bin_filename); + } + bin_filename = system_directory + "/" + name + ".inc.bin"; if (isfile(bin_filename)) { return load_file(bin_filename); } @@ -245,83 +256,95 @@ FunctionCodeIndex::FunctionCodeIndex(const string& directory) { return; } - uint32_t next_menu_item_id = 0; - for (const auto& filename : list_directory_sorted(directory)) { - try { - if (!ends_with(filename, ".s")) { - continue; - } + string system_dir_path = ends_with(directory, "/") ? (directory + "System") : (directory + "/System"); - string name = filename.substr(0, filename.size() - 2); - if (ends_with(name, ".inc")) { - continue; - } + uint32_t next_menu_item_id = 1; + for (const auto& subdir_name : list_directory_sorted(directory)) { + string subdir_path = ends_with(directory, "/") ? (directory + subdir_name) : (directory + "/" + subdir_name); + if (!isdir(subdir_path)) { + function_compiler_log.warning("Skipping %s (not a directory)", subdir_name.c_str()); + continue; + } - bool is_patch = ends_with(name, ".patch"); - if (is_patch) { - name.resize(name.size() - 6); - } + for (const auto& filename : list_directory_sorted(subdir_path)) { + try { + if (!ends_with(filename, ".s")) { + continue; + } - // Figure out the version or specific_version - CompiledFunctionCode::Architecture arch = CompiledFunctionCode::Architecture::UNKNOWN; - uint32_t specific_version = 0; - string short_name = name; - if (ends_with(name, ".ppc")) { - arch = CompiledFunctionCode::Architecture::POWERPC; - name.resize(name.size() - 4); - short_name = name; - } else if (ends_with(name, ".x86")) { - arch = CompiledFunctionCode::Architecture::X86; - name.resize(name.size() - 4); - short_name = name; - } else if (ends_with(name, ".sh4")) { - arch = CompiledFunctionCode::Architecture::SH4; - name.resize(name.size() - 4); - short_name = name; - } else if (is_patch && (name.size() >= 5) && (name[name.size() - 5] == '.')) { - specific_version = (name[name.size() - 4] << 24) | (name[name.size() - 3] << 16) | (name[name.size() - 2] << 8) | name[name.size() - 1]; - if (specific_version_is_gc(specific_version)) { + string name = filename.substr(0, filename.size() - 2); + if (ends_with(name, ".inc")) { + continue; + } + + bool is_patch = ends_with(name, ".patch"); + if (is_patch) { + name.resize(name.size() - 6); + } + + // Figure out the version or specific_version + CompiledFunctionCode::Architecture arch = CompiledFunctionCode::Architecture::UNKNOWN; + uint32_t specific_version = 0; + string short_name = name; + if (ends_with(name, ".ppc")) { arch = CompiledFunctionCode::Architecture::POWERPC; - } else if (specific_version_is_xb(specific_version) || specific_version_is_bb(specific_version)) { + name.resize(name.size() - 4); + short_name = name; + } else if (ends_with(name, ".x86")) { arch = CompiledFunctionCode::Architecture::X86; - } else { - throw runtime_error("unable to determine architecture from specific_version"); + name.resize(name.size() - 4); + short_name = name; + } else if (ends_with(name, ".sh4")) { + arch = CompiledFunctionCode::Architecture::SH4; + name.resize(name.size() - 4); + short_name = name; + } else if (is_patch && (name.size() >= 5) && (name[name.size() - 5] == '.')) { + specific_version = (name[name.size() - 4] << 24) | (name[name.size() - 3] << 16) | (name[name.size() - 2] << 8) | name[name.size() - 1]; + if (specific_version_is_dc(specific_version)) { + arch = CompiledFunctionCode::Architecture::SH4; + } else if (specific_version_is_gc(specific_version)) { + arch = CompiledFunctionCode::Architecture::POWERPC; + } else if (specific_version_is_xb(specific_version) || specific_version_is_bb(specific_version)) { + arch = CompiledFunctionCode::Architecture::X86; + } else { + throw runtime_error("unable to determine architecture from specific_version"); + } + short_name = name.substr(0, name.size() - 5); } - short_name = name.substr(0, name.size() - 5); - } - if (arch == CompiledFunctionCode::Architecture::UNKNOWN) { - throw runtime_error("unable to determine architecture"); - } - - string path = directory + "/" + filename; - string text = load_file(path); - auto code = compile_function_code(arch, directory, name, text); - if (code->index != 0) { - if (!this->index_to_function.emplace(code->index, code).second) { - throw runtime_error(string_printf( - "duplicate function index: %08" PRIX32, code->index)); + if (arch == CompiledFunctionCode::Architecture::UNKNOWN) { + throw runtime_error("unable to determine architecture"); } - } - code->specific_version = specific_version; - code->source_path = path; - code->short_name = short_name; - this->name_to_function.emplace(name, code); - if (is_patch) { - code->menu_item_id = next_menu_item_id++; - this->menu_item_id_and_specific_version_to_patch_function.emplace( - static_cast(code->menu_item_id) << 32 | specific_version, code); - this->name_and_specific_version_to_patch_function.emplace( - string_printf("%s-%08" PRIX32, short_name.c_str(), specific_version), code); - } - string index_prefix = code->index ? string_printf("%02X => ", code->index) : ""; - string patch_prefix = is_patch ? string_printf("[%08" PRIX32 "/%08" PRIX32 "] ", code->menu_item_id, code->specific_version) : ""; - function_compiler_log.info("Compiled function %s%s%s (%s)", - index_prefix.c_str(), patch_prefix.c_str(), name.c_str(), name_for_architecture(code->arch)); + string path = subdir_path + "/" + filename; + string text = load_file(path); + auto code = compile_function_code(arch, subdir_path, system_dir_path, name, text); + if (code->index != 0) { + if (!this->index_to_function.emplace(code->index, code).second) { + throw runtime_error(string_printf( + "duplicate function index: %08" PRIX32, code->index)); + } + } + code->specific_version = specific_version; + code->source_path = path; + code->short_name = short_name; + this->name_to_function.emplace(name, code); + if (is_patch) { + code->menu_item_id = next_menu_item_id++; + this->menu_item_id_and_specific_version_to_patch_function.emplace( + static_cast(code->menu_item_id) << 32 | specific_version, code); + this->name_and_specific_version_to_patch_function.emplace( + string_printf("%s-%08" PRIX32, short_name.c_str(), specific_version), code); + } - } catch (const exception& e) { - function_compiler_log.warning("Failed to compile function %s: %s", filename.c_str(), e.what()); + string index_prefix = code->index ? string_printf("%02X => ", code->index) : ""; + string patch_prefix = is_patch ? string_printf("[%08" PRIX32 "/%08" PRIX32 "] ", code->menu_item_id, code->specific_version) : ""; + function_compiler_log.info("Compiled function %s%s%s (%s)", + index_prefix.c_str(), patch_prefix.c_str(), name.c_str(), name_for_architecture(code->arch)); + + } catch (const exception& e) { + function_compiler_log.warning("Failed to compile function %s: %s", filename.c_str(), e.what()); + } } } } diff --git a/src/ProxyCommands.cc b/src/ProxyCommands.cc index bb326ff3..c6bad4bb 100644 --- a/src/ProxyCommands.cc +++ b/src/ProxyCommands.cc @@ -1221,6 +1221,7 @@ static HandlerResult C_GXB_61(shared_ptr ses, uint16 if (is_ep3(ses->version()) && (ses->version() != Version::GC_EP3_NTE)) { ses->log.info("Version changed to GC_EP3_NTE"); ses->set_version(Version::GC_EP3_NTE); + ses->config.specific_version = SPECIFIC_VERSION_GC_EP3_NTE; } pd = &check_size_t(data, 0xFFFF); } diff --git a/src/ProxyServer.cc b/src/ProxyServer.cc index 6d59e4cb..871ae4fb 100644 --- a/src/ProxyServer.cc +++ b/src/ProxyServer.cc @@ -277,6 +277,7 @@ void ProxyServer::UnlinkedSession::on_input(Channel& ch, uint16_t command, uint3 if (command == 0x8B) { ses->channel.version = Version::DC_NTE; ses->log.info("Version changed to DC_NTE"); + ses->config.specific_version = SPECIFIC_VERSION_DC_NTE; const auto& cmd = check_size_t(data, sizeof(C_LoginExtended_DCNTE_8B)); ses->login = s->account_index->from_dc_nte_credentials(cmd.serial_number.decode(), cmd.access_key.decode(), false); ses->sub_version = cmd.sub_version; @@ -286,6 +287,9 @@ void ProxyServer::UnlinkedSession::on_input(Channel& ch, uint16_t command, uint3 } else if (command == 0x93) { // 11/2000 proto through DC V1 ses->channel.version = Version::DC_V1; ses->log.info("Version changed to DC_V1"); + if (specific_version_is_indeterminate(ses->config.specific_version)) { + ses->config.specific_version = SPECIFIC_VERSION_DC_V1_INDETERMINATE; + } const auto& cmd = check_size_t(data); ses->login = s->account_index->from_dc_credentials( stoul(cmd.serial_number.decode(), nullptr, 16), cmd.access_key.decode(), cmd.name.decode(), false); @@ -298,11 +302,15 @@ void ProxyServer::UnlinkedSession::on_input(Channel& ch, uint16_t command, uint3 if (cmd.sub_version >= 0x30) { ses->log.info("Version changed to GC_NTE"); ses->channel.version = Version::GC_NTE; + ses->config.specific_version = SPECIFIC_VERSION_GC_NTE; ses->login = s->account_index->from_gc_credentials( stoul(cmd.serial_number.decode(), nullptr, 16), cmd.access_key.decode(), nullptr, cmd.name.decode(), false); } else { // DC V2 ses->log.info("Version changed to DC_V2"); ses->channel.version = Version::DC_V2; + if (specific_version_is_indeterminate(ses->config.specific_version)) { + ses->config.specific_version = SPECIFIC_VERSION_DC_V2_INDETERMINATE; + } ses->login = s->account_index->from_dc_credentials( stoul(cmd.serial_number.decode(), nullptr, 16), cmd.access_key.decode(), cmd.name.decode(), false); } @@ -345,6 +353,9 @@ void ProxyServer::UnlinkedSession::on_input(Channel& ch, uint16_t command, uint3 if (cmd.sub_version >= 0x40) { ses->log.info("Version changed to GC_EP3"); ses->channel.version = Version::GC_EP3; + if (specific_version_is_indeterminate(ses->config.specific_version)) { + ses->config.specific_version = SPECIFIC_VERSION_GC_EP3_INDETERMINATE; + } } } else { throw runtime_error("command is not 9D or 9E"); diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 9b5bcab1..df330a58 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -341,9 +341,9 @@ static void send_main_menu(shared_ptr c) { if (!s->is_replay) { if (!s->function_code_index->patch_menu_empty(c->config.specific_version)) { main_menu->items.emplace_back(MainMenuItemID::PATCHES, "Patches", - "Change game\nbehaviors", MenuItem::Flag::INVISIBLE_ON_DC | MenuItem::Flag::INVISIBLE_ON_PC | MenuItem::Flag::REQUIRES_SEND_FUNCTION_CALL); + "Change game\nbehaviors", MenuItem::Flag::INVISIBLE_ON_PC | MenuItem::Flag::REQUIRES_SEND_FUNCTION_CALL); main_menu->items.emplace_back(MainMenuItemID::PATCH_SWITCHES, "Patch switches", - "Automatically\napply patches every\ntime you connect", MenuItem::Flag::INVISIBLE_ON_DC | MenuItem::Flag::INVISIBLE_ON_PC | MenuItem::Flag::REQUIRES_SEND_FUNCTION_CALL); + "Automatically\napply patches every\ntime you connect", MenuItem::Flag::INVISIBLE_ON_PC | MenuItem::Flag::REQUIRES_SEND_FUNCTION_CALL); } if (!s->dol_file_index->empty()) { main_menu->items.emplace_back(MainMenuItemID::PROGRAMS, "Programs", @@ -480,22 +480,32 @@ static void set_console_client_flags(shared_ptr c, uint32_t sub_version) if (sub_version <= 0x24) { c->channel.version = Version::DC_V1; c->log.info("Game version changed to DC_V1"); + if (specific_version_is_indeterminate(c->config.specific_version) || c->config.specific_version == SPECIFIC_VERSION_DC_11_2000_PROTOTYPE) { + c->config.specific_version = SPECIFIC_VERSION_DC_V1_INDETERMINATE; + } } else if (sub_version <= 0x28) { c->channel.version = Version::DC_V2; c->log.info("Game version changed to DC_V2"); + if (specific_version_is_indeterminate(c->config.specific_version)) { + c->config.specific_version = SPECIFIC_VERSION_DC_V2_INDETERMINATE; + } } else if (is_v3(c->version())) { c->channel.version = Version::GC_NTE; c->log.info("Game version changed to GC_NTE"); + c->config.specific_version = SPECIFIC_VERSION_GC_NTE; } } else { if (sub_version >= 0x40 && !is_ep3(c->version())) { c->channel.version = Version::GC_EP3; c->log.info("Game version changed to GC_EP3"); + if (specific_version_is_indeterminate(c->config.specific_version)) { + c->config.specific_version = SPECIFIC_VERSION_GC_EP3_INDETERMINATE; + } } } c->config.set_flags_for_version(c->version(), sub_version); c->sub_version = sub_version; - if (c->config.specific_version == default_specific_version_for_version(c->version(), -1)) { + if (specific_version_is_indeterminate(c->config.specific_version)) { c->config.specific_version = default_specific_version_for_version(c->version(), sub_version); } } @@ -534,6 +544,7 @@ static void on_88_DCNTE(shared_ptr c, uint16_t, uint32_t, string& data) auto s = c->require_server_state(); c->channel.version = Version::DC_NTE; + c->config.specific_version = SPECIFIC_VERSION_DC_NTE; c->config.set_flags_for_version(c->version(), -1); c->log.info("Game version changed to DC_NTE"); @@ -560,6 +571,7 @@ static void on_8B_DCNTE(shared_ptr c, uint16_t, uint32_t, string& data) c->channel.version = Version::DC_NTE; c->channel.language = cmd.language; c->config.set_flags_for_version(c->version(), -1); + c->config.specific_version = SPECIFIC_VERSION_DC_NTE; c->log.info("Game version changed to DC_NTE"); try { @@ -592,6 +604,9 @@ static void on_90_DC(shared_ptr c, uint16_t, uint32_t, string& data) { c->channel.version = Version::DC_V1; c->config.set_flags_for_version(c->version(), -1); + if (specific_version_is_indeterminate(c->config.specific_version) || c->config.specific_version == SPECIFIC_VERSION_DC_11_2000_PROTOTYPE) { + c->config.specific_version = SPECIFIC_VERSION_DC_V1_INDETERMINATE; + } c->log.info("Game version changed to DC_V1"); string serial_number_str = cmd.serial_number.decode(); @@ -624,6 +639,9 @@ static void on_92_DC(shared_ptr c, uint16_t, uint32_t, string& data) { // client is actually DCv1 and not the prototype. c->config.set_flag(Client::Flag::CHECKED_FOR_DC_V1_PROTOTYPE); c->channel.version = Version::DC_V1; + if (specific_version_is_indeterminate(c->config.specific_version) || c->config.specific_version == SPECIFIC_VERSION_DC_11_2000_PROTOTYPE) { + c->config.specific_version = SPECIFIC_VERSION_DC_V1_INDETERMINATE; + } c->log.info("Game version changed to DC_V1"); send_command(c, 0x92, 0x01); } @@ -680,6 +698,9 @@ static void on_93_DC(shared_ptr c, uint16_t, uint32_t, string& data) { send_command(c, 0x90, 0x01); c->config.set_flag(Client::Flag::CHECKED_FOR_DC_V1_PROTOTYPE); c->channel.version = Version::DC_V1_11_2000_PROTOTYPE; + if (specific_version_is_indeterminate(c->config.specific_version)) { + c->config.specific_version = SPECIFIC_VERSION_DC_11_2000_PROTOTYPE; + } c->log.info("Game version changed to DC_V1_11_2000_PROTOTYPE (will be changed to V1 if 92 is received)"); } else { on_login_complete(c); @@ -3006,16 +3027,16 @@ static void on_61_98(shared_ptr c, uint16_t command, uint32_t flag, stri const auto* cmd3 = &check_size_t(data); c->ep3_config = make_shared(cmd3->ep3_config); cmd = reinterpret_cast(cmd3); - if (c->config.specific_version == 0x00000000) { - c->config.specific_version = 0x33534A30; // 3SJ0 + if (specific_version_is_indeterminate(c->config.specific_version)) { + c->config.specific_version = SPECIFIC_VERSION_GC_EP3_JP; // 3SJ0 } } else { if (is_ep3(c->version())) { c->channel.version = Version::GC_EP3_NTE; c->log.info("Game version changed to GC_EP3_NTE"); c->config.clear_flag(Client::Flag::ENCRYPTED_SEND_FUNCTION_CALL); - if (c->config.specific_version == default_specific_version_for_version(Version::GC_EP3, -1)) { - c->config.specific_version = 0x33534A54; // 3SJT + if (specific_version_is_indeterminate(c->config.specific_version)) { + c->config.specific_version = SPECIFIC_VERSION_GC_EP3_NTE; } c->convert_account_to_temporary_if_nte(); } diff --git a/src/Version.cc b/src/Version.cc index f0dc15b4..b2ae240f 100644 --- a/src/Version.cc +++ b/src/Version.cc @@ -207,56 +207,73 @@ uint32_t default_specific_version_for_version(Version version, int64_t sub_versi // VersionDetectDC, VersionDetectGC, or VersionDetectXB call. switch (version) { case Version::DC_NTE: - return 0x314F4A31; + return SPECIFIC_VERSION_DC_NTE; case Version::DC_V1_11_2000_PROTOTYPE: - return 0x314F4A32; + return SPECIFIC_VERSION_DC_11_2000_PROTOTYPE; case Version::DC_V1: - return 0x00000000; // Need to send VersionDetectDC (but can't on V1; rip) + return SPECIFIC_VERSION_DC_V1_INDETERMINATE; // Need to send VersionDetectDC (but can't on V1; rip) + case Version::DC_V2: + return SPECIFIC_VERSION_DC_V2_INDETERMINATE; // Need to send VersionDetectDC + case Version::PC_V2: + return SPECIFIC_VERSION_PC_V2; case Version::GC_NTE: - return 0x334F4A54; // 3OJT + return SPECIFIC_VERSION_GC_NTE; // 3OJT case Version::GC_V3: switch (sub_version) { case 0x32: // GC Ep1&2 EU 50Hz case 0x33: // GC Ep1&2 EU 60Hz - return 0x334F5030; // 3OP0 + return SPECIFIC_VERSION_GC_V3_EU; // 3OP0 case 0x36: // GC Ep1&2 US v1.2 (Plus) - return 0x334F4532; // 3OE2 - case 0x39: // GC Ep1&2 JP v1.5 (Plus) - return 0x334F4A35; // 3OJ5 + return SPECIFIC_VERSION_GC_V3_US_12; // 3OE2 case 0x34: // GC Ep1&2 JP v1.3 - return 0x334F4A33; // 3OJ3 + return SPECIFIC_VERSION_GC_V3_JP_13; // 3OJ3 case 0x35: // GC Ep1&2 JP v1.4 (Plus) - return 0x334F4A34; // 3OJ4 + return SPECIFIC_VERSION_GC_V3_JP_14; // 3OJ4 + case 0x39: // GC Ep1&2 JP v1.5 (Plus) + return SPECIFIC_VERSION_GC_V3_JP_15; // 3OJ5 case -1: // Initial check (before sub_version recognition) case 0x30: // GC Ep1&2 GameJam demo, GC Ep1&2 Trial Edition, GC Ep1&2 JP v1.2, at least one version of PSO XB case 0x31: // GC Ep1&2 US v1.0, GC US v1.1, XB US default: - return 0x00000000; // Need to send VersionDetectGC + return SPECIFIC_VERSION_GC_V3_INDETERMINATE; // Need to send VersionDetectGC } throw logic_error("this should be impossible"); case Version::GC_EP3_NTE: - return 0x33534A54; // 3SJT + return SPECIFIC_VERSION_GC_EP3_NTE; // 3SJT case Version::GC_EP3: switch (sub_version) { case 0x41: // GC Ep3 US - return 0x33534530; // 3SE0 + return SPECIFIC_VERSION_GC_EP3_US; // 3SE0 case 0x42: // GC Ep3 EU 50Hz case 0x43: // GC Ep3 EU 60Hz - return 0x33535030; // 3SP0 + return SPECIFIC_VERSION_GC_EP3_EU; // 3SP0 case -1: // Initial check (before sub_version recognition) case 0x40: // GC Ep3 trial and GC Ep3 JP default: - return 0x00000000; // Need to send VersionDetectGC + return SPECIFIC_VERSION_GC_EP3_INDETERMINATE; // Need to send VersionDetectGC } case Version::XB_V3: - return 0x344F0000; + return SPECIFIC_VERSION_XB_V3_INDETERMINATE; case Version::BB_V4: - return 0x354F3030; + return SPECIFIC_VERSION_BB_V4_INDETERMINATE; default: - return 0x00000000; + return SPECIFIC_VERSION_INDETERMINATE; } } +bool specific_version_is_indeterminate(uint32_t specific_version) { + return ((specific_version & 0x000000FF) == 0); +} + +bool specific_version_is_dc(uint32_t specific_version) { + // All v1 and v2 specific_versions are DC except 324F4A57 (2OJW), which is PC + uint8_t major_version = specific_version >> 24; + if (major_version < 0x31 || major_version > 0x32) { + return false; + } + return (specific_version != 0x324F4A57); +} + bool specific_version_is_gc(uint32_t specific_version) { // GC specific_versions are 3GRV, where G is [OE], R is [JEP], V is [0-9T] if ((specific_version & 0xFF000000) != 0x33000000) { diff --git a/src/Version.hh b/src/Version.hh index 5580414e..13d3328f 100644 --- a/src/Version.hh +++ b/src/Version.hh @@ -140,7 +140,30 @@ inline bool uses_utf16(Version version) { (version == Version::BB_V4); } +constexpr uint32_t SPECIFIC_VERSION_DC_NTE = 0x314F4A31; // 1OJ1 +constexpr uint32_t SPECIFIC_VERSION_DC_11_2000_PROTOTYPE = 0x314F4A32; // 1OJ2 +constexpr uint32_t SPECIFIC_VERSION_DC_V1_INDETERMINATE = 0x31000000; // 1___ +constexpr uint32_t SPECIFIC_VERSION_DC_V2_INDETERMINATE = 0x32000000; // 2___ +constexpr uint32_t SPECIFIC_VERSION_PC_V2 = 0x324F4A57; // 2OJW +constexpr uint32_t SPECIFIC_VERSION_GC_NTE = 0x334F4A54; // 3OJT +constexpr uint32_t SPECIFIC_VERSION_GC_V3_EU = 0x334F5030; // 3OP0 +constexpr uint32_t SPECIFIC_VERSION_GC_V3_US_12 = 0x334F4532; // 3OE2 +constexpr uint32_t SPECIFIC_VERSION_GC_V3_JP_13 = 0x334F4A33; // 3OJ3 +constexpr uint32_t SPECIFIC_VERSION_GC_V3_JP_14 = 0x334F4A34; // 3OJ4 +constexpr uint32_t SPECIFIC_VERSION_GC_V3_JP_15 = 0x334F4A35; // 3OJ5 +constexpr uint32_t SPECIFIC_VERSION_GC_V3_INDETERMINATE = 0x334F0000; // 3O__ +constexpr uint32_t SPECIFIC_VERSION_GC_EP3_INDETERMINATE = 0x33534A00; // 3SJ_ +constexpr uint32_t SPECIFIC_VERSION_GC_EP3_NTE = 0x33534A54; // 3SJT +constexpr uint32_t SPECIFIC_VERSION_GC_EP3_JP = 0x33534A30; // 3SJ0 +constexpr uint32_t SPECIFIC_VERSION_GC_EP3_US = 0x33534530; // 3SE0 +constexpr uint32_t SPECIFIC_VERSION_GC_EP3_EU = 0x33535030; // 3SP0 +constexpr uint32_t SPECIFIC_VERSION_XB_V3_INDETERMINATE = 0x344F0000; // 4O__ +constexpr uint32_t SPECIFIC_VERSION_BB_V4_INDETERMINATE = 0x35000000; // 5___ +constexpr uint32_t SPECIFIC_VERSION_INDETERMINATE = 0x00000000; // ____ + uint32_t default_specific_version_for_version(Version version, int64_t sub_version); +bool specific_version_is_indeterminate(uint32_t specific_version); +bool specific_version_is_dc(uint32_t specific_version); bool specific_version_is_gc(uint32_t specific_version); bool specific_version_is_xb(uint32_t specific_version); bool specific_version_is_bb(uint32_t specific_version); diff --git a/system/client-functions/BugFixes.3OE0.patch.s b/system/client-functions/BugFixes/BugFixes.3OE0.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OE0.patch.s rename to system/client-functions/BugFixes/BugFixes.3OE0.patch.s diff --git a/system/client-functions/BugFixes.3OE1.patch.s b/system/client-functions/BugFixes/BugFixes.3OE1.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OE1.patch.s rename to system/client-functions/BugFixes/BugFixes.3OE1.patch.s diff --git a/system/client-functions/BugFixes.3OE2.patch.s b/system/client-functions/BugFixes/BugFixes.3OE2.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OE2.patch.s rename to system/client-functions/BugFixes/BugFixes.3OE2.patch.s diff --git a/system/client-functions/BugFixes.3OJ2.patch.s b/system/client-functions/BugFixes/BugFixes.3OJ2.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OJ2.patch.s rename to system/client-functions/BugFixes/BugFixes.3OJ2.patch.s diff --git a/system/client-functions/BugFixes.3OJ3.patch.s b/system/client-functions/BugFixes/BugFixes.3OJ3.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OJ3.patch.s rename to system/client-functions/BugFixes/BugFixes.3OJ3.patch.s diff --git a/system/client-functions/BugFixes.3OJ4.patch.s b/system/client-functions/BugFixes/BugFixes.3OJ4.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OJ4.patch.s rename to system/client-functions/BugFixes/BugFixes.3OJ4.patch.s diff --git a/system/client-functions/BugFixes.3OJ5.patch.s b/system/client-functions/BugFixes/BugFixes.3OJ5.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OJ5.patch.s rename to system/client-functions/BugFixes/BugFixes.3OJ5.patch.s diff --git a/system/client-functions/BugFixes.3OP0.patch.s b/system/client-functions/BugFixes/BugFixes.3OP0.patch.s similarity index 100% rename from system/client-functions/BugFixes.3OP0.patch.s rename to system/client-functions/BugFixes/BugFixes.3OP0.patch.s diff --git a/system/client-functions/BugFixesWIP.4OEU.patch.s b/system/client-functions/BugFixes/BugFixesWIP.4OEU.patch.s similarity index 100% rename from system/client-functions/BugFixesWIP.4OEU.patch.s rename to system/client-functions/BugFixes/BugFixesWIP.4OEU.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OE0.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OE0.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OE0.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OE0.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OE1.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OE1.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OE1.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OE1.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OE2.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OE2.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OE2.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OE2.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OJ2.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ2.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OJ2.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ2.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OJ3.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ3.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OJ3.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ3.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OJ4.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ4.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OJ4.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ4.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OJ5.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ5.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OJ5.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OJ5.patch.s diff --git a/system/client-functions/CallProtectedHandler.3OP0.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.3OP0.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.3OP0.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.3OP0.patch.s diff --git a/system/client-functions/CallProtectedHandler.4OED.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.4OED.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.4OED.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.4OED.patch.s diff --git a/system/client-functions/CallProtectedHandler.4OEU.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.4OEU.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.4OEU.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.4OEU.patch.s diff --git a/system/client-functions/CallProtectedHandler.4OJB.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.4OJB.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.4OJB.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.4OJB.patch.s diff --git a/system/client-functions/CallProtectedHandler.4OJD.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.4OJD.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.4OJD.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.4OJD.patch.s diff --git a/system/client-functions/CallProtectedHandler.4OJU.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.4OJU.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.4OJU.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.4OJU.patch.s diff --git a/system/client-functions/CallProtectedHandler.4OPD.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.4OPD.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.4OPD.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.4OPD.patch.s diff --git a/system/client-functions/CallProtectedHandler.4OPU.patch.s b/system/client-functions/CallProtectedHandler/CallProtectedHandler.4OPU.patch.s similarity index 100% rename from system/client-functions/CallProtectedHandler.4OPU.patch.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandler.4OPU.patch.s diff --git a/system/client-functions/CallProtectedHandlerGC.ppc.inc.s b/system/client-functions/CallProtectedHandler/CallProtectedHandlerGC.ppc.inc.s similarity index 100% rename from system/client-functions/CallProtectedHandlerGC.ppc.inc.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandlerGC.ppc.inc.s diff --git a/system/client-functions/CallProtectedHandlerXB.x86.inc.s b/system/client-functions/CallProtectedHandler/CallProtectedHandlerXB.x86.inc.s similarity index 100% rename from system/client-functions/CallProtectedHandlerXB.x86.inc.s rename to system/client-functions/CallProtectedHandler/CallProtectedHandlerXB.x86.inc.s diff --git a/system/client-functions/ChatFeatures.3OE0.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OE0.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OE0.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OE0.patch.s diff --git a/system/client-functions/ChatFeatures.3OE1.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OE1.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OE1.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OE1.patch.s diff --git a/system/client-functions/ChatFeatures.3OE2.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OE2.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OE2.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OE2.patch.s diff --git a/system/client-functions/ChatFeatures.3OJ2.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OJ2.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OJ2.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OJ2.patch.s diff --git a/system/client-functions/ChatFeatures.3OJ3.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OJ3.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OJ3.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OJ3.patch.s diff --git a/system/client-functions/ChatFeatures.3OJ4.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OJ4.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OJ4.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OJ4.patch.s diff --git a/system/client-functions/ChatFeatures.3OJ5.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OJ5.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OJ5.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OJ5.patch.s diff --git a/system/client-functions/ChatFeatures.3OP0.patch.s b/system/client-functions/ChatFeatures/ChatFeatures.3OP0.patch.s similarity index 100% rename from system/client-functions/ChatFeatures.3OP0.patch.s rename to system/client-functions/ChatFeatures/ChatFeatures.3OP0.patch.s diff --git a/system/client-functions/CommonBank.3OE0.patch.s b/system/client-functions/CommonBank/CommonBank.3OE0.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OE0.patch.s rename to system/client-functions/CommonBank/CommonBank.3OE0.patch.s diff --git a/system/client-functions/CommonBank.3OE1.patch.s b/system/client-functions/CommonBank/CommonBank.3OE1.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OE1.patch.s rename to system/client-functions/CommonBank/CommonBank.3OE1.patch.s diff --git a/system/client-functions/CommonBank.3OE2.patch.s b/system/client-functions/CommonBank/CommonBank.3OE2.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OE2.patch.s rename to system/client-functions/CommonBank/CommonBank.3OE2.patch.s diff --git a/system/client-functions/CommonBank.3OJ2.patch.s b/system/client-functions/CommonBank/CommonBank.3OJ2.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OJ2.patch.s rename to system/client-functions/CommonBank/CommonBank.3OJ2.patch.s diff --git a/system/client-functions/CommonBank.3OJ3.patch.s b/system/client-functions/CommonBank/CommonBank.3OJ3.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OJ3.patch.s rename to system/client-functions/CommonBank/CommonBank.3OJ3.patch.s diff --git a/system/client-functions/CommonBank.3OJ4.patch.s b/system/client-functions/CommonBank/CommonBank.3OJ4.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OJ4.patch.s rename to system/client-functions/CommonBank/CommonBank.3OJ4.patch.s diff --git a/system/client-functions/CommonBank.3OJ5.patch.s b/system/client-functions/CommonBank/CommonBank.3OJ5.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OJ5.patch.s rename to system/client-functions/CommonBank/CommonBank.3OJ5.patch.s diff --git a/system/client-functions/CommonBank.3OP0.patch.s b/system/client-functions/CommonBank/CommonBank.3OP0.patch.s similarity index 100% rename from system/client-functions/CommonBank.3OP0.patch.s rename to system/client-functions/CommonBank/CommonBank.3OP0.patch.s diff --git a/system/client-functions/Decoction.3OE0.patch.s b/system/client-functions/Decoction/Decoction.3OE0.patch.s similarity index 100% rename from system/client-functions/Decoction.3OE0.patch.s rename to system/client-functions/Decoction/Decoction.3OE0.patch.s diff --git a/system/client-functions/Decoction.3OE1.patch.s b/system/client-functions/Decoction/Decoction.3OE1.patch.s similarity index 100% rename from system/client-functions/Decoction.3OE1.patch.s rename to system/client-functions/Decoction/Decoction.3OE1.patch.s diff --git a/system/client-functions/Decoction.3OE2.patch.s b/system/client-functions/Decoction/Decoction.3OE2.patch.s similarity index 100% rename from system/client-functions/Decoction.3OE2.patch.s rename to system/client-functions/Decoction/Decoction.3OE2.patch.s diff --git a/system/client-functions/Decoction.3OJ2.patch.s b/system/client-functions/Decoction/Decoction.3OJ2.patch.s similarity index 100% rename from system/client-functions/Decoction.3OJ2.patch.s rename to system/client-functions/Decoction/Decoction.3OJ2.patch.s diff --git a/system/client-functions/Decoction.3OJ3.patch.s b/system/client-functions/Decoction/Decoction.3OJ3.patch.s similarity index 100% rename from system/client-functions/Decoction.3OJ3.patch.s rename to system/client-functions/Decoction/Decoction.3OJ3.patch.s diff --git a/system/client-functions/Decoction.3OJ4.patch.s b/system/client-functions/Decoction/Decoction.3OJ4.patch.s similarity index 100% rename from system/client-functions/Decoction.3OJ4.patch.s rename to system/client-functions/Decoction/Decoction.3OJ4.patch.s diff --git a/system/client-functions/Decoction.3OJ5.patch.s b/system/client-functions/Decoction/Decoction.3OJ5.patch.s similarity index 100% rename from system/client-functions/Decoction.3OJ5.patch.s rename to system/client-functions/Decoction/Decoction.3OJ5.patch.s diff --git a/system/client-functions/Decoction.3OP0.patch.s b/system/client-functions/Decoction/Decoction.3OP0.patch.s similarity index 100% rename from system/client-functions/Decoction.3OP0.patch.s rename to system/client-functions/Decoction/Decoction.3OP0.patch.s diff --git a/system/client-functions/Decoction.4OED.patch.s b/system/client-functions/Decoction/Decoction.4OED.patch.s similarity index 100% rename from system/client-functions/Decoction.4OED.patch.s rename to system/client-functions/Decoction/Decoction.4OED.patch.s diff --git a/system/client-functions/Decoction.4OEU.patch.s b/system/client-functions/Decoction/Decoction.4OEU.patch.s similarity index 100% rename from system/client-functions/Decoction.4OEU.patch.s rename to system/client-functions/Decoction/Decoction.4OEU.patch.s diff --git a/system/client-functions/Decoction.4OJB.patch.s b/system/client-functions/Decoction/Decoction.4OJB.patch.s similarity index 100% rename from system/client-functions/Decoction.4OJB.patch.s rename to system/client-functions/Decoction/Decoction.4OJB.patch.s diff --git a/system/client-functions/Decoction.4OJD.patch.s b/system/client-functions/Decoction/Decoction.4OJD.patch.s similarity index 100% rename from system/client-functions/Decoction.4OJD.patch.s rename to system/client-functions/Decoction/Decoction.4OJD.patch.s diff --git a/system/client-functions/Decoction.4OJU.patch.s b/system/client-functions/Decoction/Decoction.4OJU.patch.s similarity index 100% rename from system/client-functions/Decoction.4OJU.patch.s rename to system/client-functions/Decoction/Decoction.4OJU.patch.s diff --git a/system/client-functions/Decoction.4OPD.patch.s b/system/client-functions/Decoction/Decoction.4OPD.patch.s similarity index 100% rename from system/client-functions/Decoction.4OPD.patch.s rename to system/client-functions/Decoction/Decoction.4OPD.patch.s diff --git a/system/client-functions/Decoction.4OPU.patch.s b/system/client-functions/Decoction/Decoction.4OPU.patch.s similarity index 100% rename from system/client-functions/Decoction.4OPU.patch.s rename to system/client-functions/Decoction/Decoction.4OPU.patch.s diff --git a/system/client-functions/DecoctionXB.x86.inc.s b/system/client-functions/Decoction/DecoctionXB.x86.inc.s similarity index 100% rename from system/client-functions/DecoctionXB.x86.inc.s rename to system/client-functions/Decoction/DecoctionXB.x86.inc.s diff --git a/system/client-functions/DisableIdleDisconnect.3OE0.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OE0.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OE0.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OE0.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3OE1.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OE1.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OE1.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OE1.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3OE2.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OE2.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OE2.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OE2.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3OJ2.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ2.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OJ2.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ2.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3OJ3.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ3.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OJ3.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ3.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3OJ4.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ4.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OJ4.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ4.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3OJ5.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ5.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OJ5.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OJ5.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3OP0.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OP0.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3OP0.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3OP0.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3SE0.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SE0.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3SE0.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SE0.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3SJ0.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SJ0.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3SJ0.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SJ0.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3SJT.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SJT.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3SJT.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SJT.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.3SP0.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SP0.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.3SP0.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.3SP0.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.4OED.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OED.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.4OED.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OED.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.4OEU.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OEU.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.4OEU.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OEU.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.4OJB.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OJB.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.4OJB.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OJB.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.4OJD.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OJD.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.4OJD.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OJD.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.4OJU.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OJU.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.4OJU.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OJU.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.4OPD.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OPD.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.4OPD.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OPD.patch.s diff --git a/system/client-functions/DisableIdleDisconnect.4OPU.patch.s b/system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OPU.patch.s similarity index 100% rename from system/client-functions/DisableIdleDisconnect.4OPU.patch.s rename to system/client-functions/DisableIdleDisconnect/DisableIdleDisconnect.4OPU.patch.s diff --git a/system/client-functions/DrawDistance.3OE0.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OE0.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OE0.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OE0.patch.s diff --git a/system/client-functions/DrawDistance.3OE1.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OE1.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OE1.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OE1.patch.s diff --git a/system/client-functions/DrawDistance.3OE2.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OE2.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OE2.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OE2.patch.s diff --git a/system/client-functions/DrawDistance.3OJ2.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OJ2.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OJ2.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OJ2.patch.s diff --git a/system/client-functions/DrawDistance.3OJ3.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OJ3.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OJ3.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OJ3.patch.s diff --git a/system/client-functions/DrawDistance.3OJ4.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OJ4.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OJ4.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OJ4.patch.s diff --git a/system/client-functions/DrawDistance.3OJ5.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OJ5.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OJ5.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OJ5.patch.s diff --git a/system/client-functions/DrawDistance.3OP0.patch.s b/system/client-functions/DrawDistance/DrawDistance.3OP0.patch.s similarity index 100% rename from system/client-functions/DrawDistance.3OP0.patch.s rename to system/client-functions/DrawDistance/DrawDistance.3OP0.patch.s diff --git a/system/client-functions/EnemyHPBars.3OE0.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OE0.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OE0.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OE0.patch.s diff --git a/system/client-functions/EnemyHPBars.3OE1.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OE1.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OE1.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OE1.patch.s diff --git a/system/client-functions/EnemyHPBars.3OE2.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OE2.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OE2.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OE2.patch.s diff --git a/system/client-functions/EnemyHPBars.3OJ2.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OJ2.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OJ2.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OJ2.patch.s diff --git a/system/client-functions/EnemyHPBars.3OJ3.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OJ3.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OJ3.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OJ3.patch.s diff --git a/system/client-functions/EnemyHPBars.3OJ4.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OJ4.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OJ4.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OJ4.patch.s diff --git a/system/client-functions/EnemyHPBars.3OJ5.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OJ5.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OJ5.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OJ5.patch.s diff --git a/system/client-functions/EnemyHPBars.3OP0.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.3OP0.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.3OP0.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.3OP0.patch.s diff --git a/system/client-functions/EnemyHPBars.4OED.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.4OED.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.4OED.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.4OED.patch.s diff --git a/system/client-functions/EnemyHPBars.4OEU.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.4OEU.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.4OEU.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.4OEU.patch.s diff --git a/system/client-functions/EnemyHPBars.4OJB.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.4OJB.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.4OJB.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.4OJB.patch.s diff --git a/system/client-functions/EnemyHPBars.4OJD.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.4OJD.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.4OJD.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.4OJD.patch.s diff --git a/system/client-functions/EnemyHPBars.4OJU.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.4OJU.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.4OJU.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.4OJU.patch.s diff --git a/system/client-functions/EnemyHPBars.4OPD.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.4OPD.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.4OPD.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.4OPD.patch.s diff --git a/system/client-functions/EnemyHPBars.4OPU.patch.s b/system/client-functions/EnemyHPBars/EnemyHPBars.4OPU.patch.s similarity index 100% rename from system/client-functions/EnemyHPBars.4OPU.patch.s rename to system/client-functions/EnemyHPBars/EnemyHPBars.4OPU.patch.s diff --git a/system/client-functions/AllCards.3SE0.patch.s b/system/client-functions/Episode3/AllCards.3SE0.patch.s similarity index 100% rename from system/client-functions/AllCards.3SE0.patch.s rename to system/client-functions/Episode3/AllCards.3SE0.patch.s diff --git a/system/client-functions/AllCards.3SJT.patch.s b/system/client-functions/Episode3/AllCards.3SJT.patch.s similarity index 100% rename from system/client-functions/AllCards.3SJT.patch.s rename to system/client-functions/Episode3/AllCards.3SJT.patch.s diff --git a/system/client-functions/Editors.3SE0.patch.s b/system/client-functions/Episode3/Editors.3SE0.patch.s similarity index 100% rename from system/client-functions/Editors.3SE0.patch.s rename to system/client-functions/Episode3/Editors.3SE0.patch.s diff --git a/system/client-functions/VIPCard.3SE0.patch.s b/system/client-functions/Episode3/VIPCard.3SE0.patch.s similarity index 100% rename from system/client-functions/VIPCard.3SE0.patch.s rename to system/client-functions/Episode3/VIPCard.3SE0.patch.s diff --git a/system/client-functions/VIPCard.3SJ0.patch.s b/system/client-functions/Episode3/VIPCard.3SJ0.patch.s similarity index 100% rename from system/client-functions/VIPCard.3SJ0.patch.s rename to system/client-functions/Episode3/VIPCard.3SJ0.patch.s diff --git a/system/client-functions/VIPCard.3SJT.patch.s b/system/client-functions/Episode3/VIPCard.3SJT.patch.s similarity index 100% rename from system/client-functions/VIPCard.3SJT.patch.s rename to system/client-functions/Episode3/VIPCard.3SJT.patch.s diff --git a/system/client-functions/VIPCard.3SP0.patch.s b/system/client-functions/Episode3/VIPCard.3SP0.patch.s similarity index 100% rename from system/client-functions/VIPCard.3SP0.patch.s rename to system/client-functions/Episode3/VIPCard.3SP0.patch.s diff --git a/system/client-functions/Episode3USAOnly.ppc.inc.s b/system/client-functions/Episode3USAOnly.ppc.inc.s deleted file mode 100644 index 9bae75bd..00000000 --- a/system/client-functions/Episode3USAOnly.ppc.inc.s +++ /dev/null @@ -1,7 +0,0 @@ - lis r4, 0x4750 - ori r4, r4, 0x5345 # 'GPSE' - lis r5, 0x8000 - lwz r5, [r5] - li r3, -1 - cmp r4, r5 - bnelr diff --git a/system/client-functions/GetExtendedPlayerInfo.3OE0.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OE0.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OE0.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OE0.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfo.3OE1.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OE1.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OE1.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OE1.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfo.3OE2.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OE2.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OE2.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OE2.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfo.3OJ2.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ2.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OJ2.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ2.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfo.3OJ3.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ3.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OJ3.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ3.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfo.3OJ4.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ4.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OJ4.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ4.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfo.3OJ5.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ5.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OJ5.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OJ5.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfo.3OP0.patch.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OP0.patch.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfo.3OP0.patch.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfo.3OP0.patch.s diff --git a/system/client-functions/GetExtendedPlayerInfoGC.ppc.inc.s b/system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfoGC.ppc.inc.s similarity index 100% rename from system/client-functions/GetExtendedPlayerInfoGC.ppc.inc.s rename to system/client-functions/GetExtendedPlayerInfo/GetExtendedPlayerInfoGC.ppc.inc.s diff --git a/system/client-functions/HungryMagSound.3OE0.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OE0.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OE0.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OE0.patch.s diff --git a/system/client-functions/HungryMagSound.3OE1.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OE1.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OE1.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OE1.patch.s diff --git a/system/client-functions/HungryMagSound.3OE2.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OE2.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OE2.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OE2.patch.s diff --git a/system/client-functions/HungryMagSound.3OJ2.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OJ2.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OJ2.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OJ2.patch.s diff --git a/system/client-functions/HungryMagSound.3OJ3.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OJ3.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OJ3.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OJ3.patch.s diff --git a/system/client-functions/HungryMagSound.3OJ4.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OJ4.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OJ4.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OJ4.patch.s diff --git a/system/client-functions/HungryMagSound.3OJ5.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OJ5.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OJ5.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OJ5.patch.s diff --git a/system/client-functions/HungryMagSound.3OP0.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.3OP0.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.3OP0.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.3OP0.patch.s diff --git a/system/client-functions/HungryMagSound.4OED.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.4OED.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.4OED.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.4OED.patch.s diff --git a/system/client-functions/HungryMagSound.4OEU.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.4OEU.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.4OEU.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.4OEU.patch.s diff --git a/system/client-functions/HungryMagSound.4OJB.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.4OJB.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.4OJB.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.4OJB.patch.s diff --git a/system/client-functions/HungryMagSound.4OJD.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.4OJD.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.4OJD.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.4OJD.patch.s diff --git a/system/client-functions/HungryMagSound.4OJU.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.4OJU.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.4OJU.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.4OJU.patch.s diff --git a/system/client-functions/HungryMagSound.4OPD.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.4OPD.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.4OPD.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.4OPD.patch.s diff --git a/system/client-functions/HungryMagSound.4OPU.patch.s b/system/client-functions/HungryMagSound/HungryMagSound.4OPU.patch.s similarity index 100% rename from system/client-functions/HungryMagSound.4OPU.patch.s rename to system/client-functions/HungryMagSound/HungryMagSound.4OPU.patch.s diff --git a/system/client-functions/InvisibleMag.3OE0.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OE0.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OE0.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OE0.patch.s diff --git a/system/client-functions/InvisibleMag.3OE1.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OE1.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OE1.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OE1.patch.s diff --git a/system/client-functions/InvisibleMag.3OE2.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OE2.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OE2.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OE2.patch.s diff --git a/system/client-functions/InvisibleMag.3OJ2.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OJ2.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OJ2.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OJ2.patch.s diff --git a/system/client-functions/InvisibleMag.3OJ3.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OJ3.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OJ3.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OJ3.patch.s diff --git a/system/client-functions/InvisibleMag.3OJ4.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OJ4.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OJ4.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OJ4.patch.s diff --git a/system/client-functions/InvisibleMag.3OJ5.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OJ5.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OJ5.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OJ5.patch.s diff --git a/system/client-functions/InvisibleMag.3OP0.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.3OP0.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.3OP0.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.3OP0.patch.s diff --git a/system/client-functions/InvisibleMag.4OED.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.4OED.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.4OED.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.4OED.patch.s diff --git a/system/client-functions/InvisibleMag.4OEU.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.4OEU.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.4OEU.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.4OEU.patch.s diff --git a/system/client-functions/InvisibleMag.4OJB.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.4OJB.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.4OJB.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.4OJB.patch.s diff --git a/system/client-functions/InvisibleMag.4OJD.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.4OJD.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.4OJD.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.4OJD.patch.s diff --git a/system/client-functions/InvisibleMag.4OJU.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.4OJU.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.4OJU.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.4OJU.patch.s diff --git a/system/client-functions/InvisibleMag.4OPD.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.4OPD.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.4OPD.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.4OPD.patch.s diff --git a/system/client-functions/InvisibleMag.4OPU.patch.s b/system/client-functions/InvisibleMag/InvisibleMag.4OPU.patch.s similarity index 100% rename from system/client-functions/InvisibleMag.4OPU.patch.s rename to system/client-functions/InvisibleMag/InvisibleMag.4OPU.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OE0.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OE0.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OE0.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OE0.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OE1.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OE1.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OE1.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OE1.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OE2.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OE2.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OE2.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OE2.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OJ2.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ2.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OJ2.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ2.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OJ3.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ3.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OJ3.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ3.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OJ4.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ4.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OJ4.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ4.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OJ5.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ5.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OJ5.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OJ5.patch.s diff --git a/system/client-functions/ItemLossPrevention.3OP0.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.3OP0.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.3OP0.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.3OP0.patch.s diff --git a/system/client-functions/ItemLossPrevention.4OED.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.4OED.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.4OED.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.4OED.patch.s diff --git a/system/client-functions/ItemLossPrevention.4OEU.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.4OEU.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.4OEU.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.4OEU.patch.s diff --git a/system/client-functions/ItemLossPrevention.4OJB.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.4OJB.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.4OJB.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.4OJB.patch.s diff --git a/system/client-functions/ItemLossPrevention.4OJD.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.4OJD.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.4OJD.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.4OJD.patch.s diff --git a/system/client-functions/ItemLossPrevention.4OJU.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.4OJU.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.4OJU.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.4OJU.patch.s diff --git a/system/client-functions/ItemLossPrevention.4OPD.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.4OPD.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.4OPD.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.4OPD.patch.s diff --git a/system/client-functions/ItemLossPrevention.4OPU.patch.s b/system/client-functions/ItemLossPrevention/ItemLossPrevention.4OPU.patch.s similarity index 100% rename from system/client-functions/ItemLossPrevention.4OPU.patch.s rename to system/client-functions/ItemLossPrevention/ItemLossPrevention.4OPU.patch.s diff --git a/system/client-functions/Movement.3OE0.patch.s b/system/client-functions/Movement/Movement.3OE0.patch.s similarity index 100% rename from system/client-functions/Movement.3OE0.patch.s rename to system/client-functions/Movement/Movement.3OE0.patch.s diff --git a/system/client-functions/Movement.3OE1.patch.s b/system/client-functions/Movement/Movement.3OE1.patch.s similarity index 100% rename from system/client-functions/Movement.3OE1.patch.s rename to system/client-functions/Movement/Movement.3OE1.patch.s diff --git a/system/client-functions/Movement.3OE2.patch.s b/system/client-functions/Movement/Movement.3OE2.patch.s similarity index 100% rename from system/client-functions/Movement.3OE2.patch.s rename to system/client-functions/Movement/Movement.3OE2.patch.s diff --git a/system/client-functions/Movement.3OJ2.patch.s b/system/client-functions/Movement/Movement.3OJ2.patch.s similarity index 100% rename from system/client-functions/Movement.3OJ2.patch.s rename to system/client-functions/Movement/Movement.3OJ2.patch.s diff --git a/system/client-functions/Movement.3OJ3.patch.s b/system/client-functions/Movement/Movement.3OJ3.patch.s similarity index 100% rename from system/client-functions/Movement.3OJ3.patch.s rename to system/client-functions/Movement/Movement.3OJ3.patch.s diff --git a/system/client-functions/Movement.3OJ4.patch.s b/system/client-functions/Movement/Movement.3OJ4.patch.s similarity index 100% rename from system/client-functions/Movement.3OJ4.patch.s rename to system/client-functions/Movement/Movement.3OJ4.patch.s diff --git a/system/client-functions/Movement.3OJ5.patch.s b/system/client-functions/Movement/Movement.3OJ5.patch.s similarity index 100% rename from system/client-functions/Movement.3OJ5.patch.s rename to system/client-functions/Movement/Movement.3OJ5.patch.s diff --git a/system/client-functions/Movement.3OP0.patch.s b/system/client-functions/Movement/Movement.3OP0.patch.s similarity index 100% rename from system/client-functions/Movement.3OP0.patch.s rename to system/client-functions/Movement/Movement.3OP0.patch.s diff --git a/system/client-functions/Movement.4OED.patch.s b/system/client-functions/Movement/Movement.4OED.patch.s similarity index 100% rename from system/client-functions/Movement.4OED.patch.s rename to system/client-functions/Movement/Movement.4OED.patch.s diff --git a/system/client-functions/Movement.4OEU.patch.s b/system/client-functions/Movement/Movement.4OEU.patch.s similarity index 100% rename from system/client-functions/Movement.4OEU.patch.s rename to system/client-functions/Movement/Movement.4OEU.patch.s diff --git a/system/client-functions/Movement.4OJB.patch.s b/system/client-functions/Movement/Movement.4OJB.patch.s similarity index 100% rename from system/client-functions/Movement.4OJB.patch.s rename to system/client-functions/Movement/Movement.4OJB.patch.s diff --git a/system/client-functions/Movement.4OJD.patch.s b/system/client-functions/Movement/Movement.4OJD.patch.s similarity index 100% rename from system/client-functions/Movement.4OJD.patch.s rename to system/client-functions/Movement/Movement.4OJD.patch.s diff --git a/system/client-functions/Movement.4OJU.patch.s b/system/client-functions/Movement/Movement.4OJU.patch.s similarity index 100% rename from system/client-functions/Movement.4OJU.patch.s rename to system/client-functions/Movement/Movement.4OJU.patch.s diff --git a/system/client-functions/Movement.4OPD.patch.s b/system/client-functions/Movement/Movement.4OPD.patch.s similarity index 100% rename from system/client-functions/Movement.4OPD.patch.s rename to system/client-functions/Movement/Movement.4OPD.patch.s diff --git a/system/client-functions/Movement.4OPU.patch.s b/system/client-functions/Movement/Movement.4OPU.patch.s similarity index 100% rename from system/client-functions/Movement.4OPU.patch.s rename to system/client-functions/Movement/Movement.4OPU.patch.s diff --git a/system/client-functions/MovementXB.x86.inc.s b/system/client-functions/Movement/MovementXB.x86.inc.s similarity index 100% rename from system/client-functions/MovementXB.x86.inc.s rename to system/client-functions/Movement/MovementXB.x86.inc.s diff --git a/system/client-functions/Palette.3OE0.patch.s b/system/client-functions/Palette/Palette.3OE0.patch.s similarity index 100% rename from system/client-functions/Palette.3OE0.patch.s rename to system/client-functions/Palette/Palette.3OE0.patch.s diff --git a/system/client-functions/Palette.3OE1.patch.s b/system/client-functions/Palette/Palette.3OE1.patch.s similarity index 100% rename from system/client-functions/Palette.3OE1.patch.s rename to system/client-functions/Palette/Palette.3OE1.patch.s diff --git a/system/client-functions/Palette.3OE2.patch.s b/system/client-functions/Palette/Palette.3OE2.patch.s similarity index 100% rename from system/client-functions/Palette.3OE2.patch.s rename to system/client-functions/Palette/Palette.3OE2.patch.s diff --git a/system/client-functions/Palette.3OJ2.patch.s b/system/client-functions/Palette/Palette.3OJ2.patch.s similarity index 100% rename from system/client-functions/Palette.3OJ2.patch.s rename to system/client-functions/Palette/Palette.3OJ2.patch.s diff --git a/system/client-functions/Palette.3OJ3.patch.s b/system/client-functions/Palette/Palette.3OJ3.patch.s similarity index 100% rename from system/client-functions/Palette.3OJ3.patch.s rename to system/client-functions/Palette/Palette.3OJ3.patch.s diff --git a/system/client-functions/Palette.3OJ4.patch.s b/system/client-functions/Palette/Palette.3OJ4.patch.s similarity index 100% rename from system/client-functions/Palette.3OJ4.patch.s rename to system/client-functions/Palette/Palette.3OJ4.patch.s diff --git a/system/client-functions/Palette.3OJ5.patch.s b/system/client-functions/Palette/Palette.3OJ5.patch.s similarity index 100% rename from system/client-functions/Palette.3OJ5.patch.s rename to system/client-functions/Palette/Palette.3OJ5.patch.s diff --git a/system/client-functions/Palette.3OP0.patch.s b/system/client-functions/Palette/Palette.3OP0.patch.s similarity index 100% rename from system/client-functions/Palette.3OP0.patch.s rename to system/client-functions/Palette/Palette.3OP0.patch.s diff --git a/system/client-functions/RareDropNotifications.3OE0.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OE0.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OE0.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OE0.patch.s diff --git a/system/client-functions/RareDropNotifications.3OE1.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OE1.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OE1.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OE1.patch.s diff --git a/system/client-functions/RareDropNotifications.3OE2.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OE2.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OE2.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OE2.patch.s diff --git a/system/client-functions/RareDropNotifications.3OJ2.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OJ2.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OJ2.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OJ2.patch.s diff --git a/system/client-functions/RareDropNotifications.3OJ3.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OJ3.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OJ3.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OJ3.patch.s diff --git a/system/client-functions/RareDropNotifications.3OJ4.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OJ4.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OJ4.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OJ4.patch.s diff --git a/system/client-functions/RareDropNotifications.3OJ5.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OJ5.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OJ5.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OJ5.patch.s diff --git a/system/client-functions/RareDropNotifications.3OP0.patch.s b/system/client-functions/RareDropNotifications/RareDropNotifications.3OP0.patch.s similarity index 100% rename from system/client-functions/RareDropNotifications.3OP0.patch.s rename to system/client-functions/RareDropNotifications/RareDropNotifications.3OP0.patch.s diff --git a/system/client-functions/DCReticleColors.3OE0.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OE0.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OE0.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OE0.patch.s diff --git a/system/client-functions/DCReticleColors.3OE1.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OE1.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OE1.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OE1.patch.s diff --git a/system/client-functions/DCReticleColors.3OE2.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OE2.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OE2.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OE2.patch.s diff --git a/system/client-functions/DCReticleColors.3OJ2.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OJ2.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OJ2.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OJ2.patch.s diff --git a/system/client-functions/DCReticleColors.3OJ3.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OJ3.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OJ3.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OJ3.patch.s diff --git a/system/client-functions/DCReticleColors.3OJ4.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OJ4.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OJ4.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OJ4.patch.s diff --git a/system/client-functions/DCReticleColors.3OJ5.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OJ5.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OJ5.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OJ5.patch.s diff --git a/system/client-functions/DCReticleColors.3OP0.patch.s b/system/client-functions/ReticleColors/DCReticleColors.3OP0.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.3OP0.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.3OP0.patch.s diff --git a/system/client-functions/DCReticleColors.4OED.patch.s b/system/client-functions/ReticleColors/DCReticleColors.4OED.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.4OED.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.4OED.patch.s diff --git a/system/client-functions/DCReticleColors.4OEU.patch.s b/system/client-functions/ReticleColors/DCReticleColors.4OEU.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.4OEU.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.4OEU.patch.s diff --git a/system/client-functions/DCReticleColors.4OJB.patch.s b/system/client-functions/ReticleColors/DCReticleColors.4OJB.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.4OJB.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.4OJB.patch.s diff --git a/system/client-functions/DCReticleColors.4OJD.patch.s b/system/client-functions/ReticleColors/DCReticleColors.4OJD.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.4OJD.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.4OJD.patch.s diff --git a/system/client-functions/DCReticleColors.4OJU.patch.s b/system/client-functions/ReticleColors/DCReticleColors.4OJU.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.4OJU.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.4OJU.patch.s diff --git a/system/client-functions/DCReticleColors.4OPD.patch.s b/system/client-functions/ReticleColors/DCReticleColors.4OPD.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.4OPD.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.4OPD.patch.s diff --git a/system/client-functions/DCReticleColors.4OPU.patch.s b/system/client-functions/ReticleColors/DCReticleColors.4OPU.patch.s similarity index 100% rename from system/client-functions/DCReticleColors.4OPU.patch.s rename to system/client-functions/ReticleColors/DCReticleColors.4OPU.patch.s diff --git a/system/client-functions/GCReticleColors.4OED.patch.s b/system/client-functions/ReticleColors/GCReticleColors.4OED.patch.s similarity index 100% rename from system/client-functions/GCReticleColors.4OED.patch.s rename to system/client-functions/ReticleColors/GCReticleColors.4OED.patch.s diff --git a/system/client-functions/GCReticleColors.4OEU.patch.s b/system/client-functions/ReticleColors/GCReticleColors.4OEU.patch.s similarity index 100% rename from system/client-functions/GCReticleColors.4OEU.patch.s rename to system/client-functions/ReticleColors/GCReticleColors.4OEU.patch.s diff --git a/system/client-functions/GCReticleColors.4OJB.patch.s b/system/client-functions/ReticleColors/GCReticleColors.4OJB.patch.s similarity index 100% rename from system/client-functions/GCReticleColors.4OJB.patch.s rename to system/client-functions/ReticleColors/GCReticleColors.4OJB.patch.s diff --git a/system/client-functions/GCReticleColors.4OJD.patch.s b/system/client-functions/ReticleColors/GCReticleColors.4OJD.patch.s similarity index 100% rename from system/client-functions/GCReticleColors.4OJD.patch.s rename to system/client-functions/ReticleColors/GCReticleColors.4OJD.patch.s diff --git a/system/client-functions/GCReticleColors.4OJU.patch.s b/system/client-functions/ReticleColors/GCReticleColors.4OJU.patch.s similarity index 100% rename from system/client-functions/GCReticleColors.4OJU.patch.s rename to system/client-functions/ReticleColors/GCReticleColors.4OJU.patch.s diff --git a/system/client-functions/GCReticleColors.4OPD.patch.s b/system/client-functions/ReticleColors/GCReticleColors.4OPD.patch.s similarity index 100% rename from system/client-functions/GCReticleColors.4OPD.patch.s rename to system/client-functions/ReticleColors/GCReticleColors.4OPD.patch.s diff --git a/system/client-functions/GCReticleColors.4OPU.patch.s b/system/client-functions/ReticleColors/GCReticleColors.4OPU.patch.s similarity index 100% rename from system/client-functions/GCReticleColors.4OPU.patch.s rename to system/client-functions/ReticleColors/GCReticleColors.4OPU.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OE0.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OE0.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OE0.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OE0.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OE1.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OE1.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OE1.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OE1.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OE2.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OE2.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OE2.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OE2.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OJ2.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OJ2.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OJ2.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OJ2.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OJ3.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OJ3.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OJ3.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OJ3.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OJ4.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OJ4.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OJ4.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OJ4.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OJ5.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OJ5.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OJ5.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OJ5.patch.s diff --git a/system/client-functions/PSOXReticleColors.3OP0.patch.s b/system/client-functions/ReticleColors/PSOXReticleColors.3OP0.patch.s similarity index 100% rename from system/client-functions/PSOXReticleColors.3OP0.patch.s rename to system/client-functions/ReticleColors/PSOXReticleColors.3OP0.patch.s diff --git a/system/client-functions/CacheClearFix-Orig.ppc.inc.s b/system/client-functions/System/CacheClearFix-Orig.ppc.inc.s similarity index 100% rename from system/client-functions/CacheClearFix-Orig.ppc.inc.s rename to system/client-functions/System/CacheClearFix-Orig.ppc.inc.s diff --git a/system/client-functions/CacheClearFix-Phase1.ppc.s b/system/client-functions/System/CacheClearFix-Phase1.ppc.s similarity index 100% rename from system/client-functions/CacheClearFix-Phase1.ppc.s rename to system/client-functions/System/CacheClearFix-Phase1.ppc.s diff --git a/system/client-functions/CacheClearFix-Phase2.ppc.s b/system/client-functions/System/CacheClearFix-Phase2.ppc.s similarity index 100% rename from system/client-functions/CacheClearFix-Phase2.ppc.s rename to system/client-functions/System/CacheClearFix-Phase2.ppc.s diff --git a/system/client-functions/CacheClearFix.ppc.inc.s b/system/client-functions/System/CacheClearFix.ppc.inc.s similarity index 100% rename from system/client-functions/CacheClearFix.ppc.inc.s rename to system/client-functions/System/CacheClearFix.ppc.inc.s diff --git a/system/client-functions/CopyCode.ppc.inc.s b/system/client-functions/System/CopyCode.ppc.inc.s similarity index 100% rename from system/client-functions/CopyCode.ppc.inc.s rename to system/client-functions/System/CopyCode.ppc.inc.s diff --git a/system/client-functions/CopyDataWords.ppc.inc.s b/system/client-functions/System/CopyDataWords.ppc.inc.s similarity index 100% rename from system/client-functions/CopyDataWords.ppc.inc.s rename to system/client-functions/System/CopyDataWords.ppc.inc.s diff --git a/system/client-functions/Episode3USAQuestBufferOverflow.ppc.s b/system/client-functions/System/Episode3USAQuestBufferOverflow.ppc.s similarity index 100% rename from system/client-functions/Episode3USAQuestBufferOverflow.ppc.s rename to system/client-functions/System/Episode3USAQuestBufferOverflow.ppc.s diff --git a/system/client-functions/FlushCachedCode.ppc.inc.s b/system/client-functions/System/FlushCachedCode.ppc.inc.s similarity index 100% rename from system/client-functions/FlushCachedCode.ppc.inc.s rename to system/client-functions/System/FlushCachedCode.ppc.inc.s diff --git a/system/client-functions/PRSDecompress.ppc.inc.s b/system/client-functions/System/PRSDecompress.ppc.inc.s similarity index 100% rename from system/client-functions/PRSDecompress.ppc.inc.s rename to system/client-functions/System/PRSDecompress.ppc.inc.s diff --git a/system/client-functions/ReadMemoryWord.ppc.s b/system/client-functions/System/ReadMemoryWord.ppc.s similarity index 100% rename from system/client-functions/ReadMemoryWord.ppc.s rename to system/client-functions/System/ReadMemoryWord.ppc.s diff --git a/system/client-functions/RunDOL.ppc.s b/system/client-functions/System/RunDOL.ppc.s similarity index 100% rename from system/client-functions/RunDOL.ppc.s rename to system/client-functions/System/RunDOL.ppc.s diff --git a/system/client-functions/VersionDetectDC.sh4.s b/system/client-functions/System/VersionDetectDC.sh4.s similarity index 100% rename from system/client-functions/VersionDetectDC.sh4.s rename to system/client-functions/System/VersionDetectDC.sh4.s diff --git a/system/client-functions/VersionDetectGC.ppc.s b/system/client-functions/System/VersionDetectGC.ppc.s similarity index 100% rename from system/client-functions/VersionDetectGC.ppc.s rename to system/client-functions/System/VersionDetectGC.ppc.s diff --git a/system/client-functions/VersionDetectWithPatchFunctionsXB.x86.inc.s b/system/client-functions/System/VersionDetectWithPatchFunctionsXB.x86.inc.s similarity index 100% rename from system/client-functions/VersionDetectWithPatchFunctionsXB.x86.inc.s rename to system/client-functions/System/VersionDetectWithPatchFunctionsXB.x86.inc.s diff --git a/system/client-functions/VersionDetectXB.x86.s b/system/client-functions/System/VersionDetectXB.x86.s similarity index 100% rename from system/client-functions/VersionDetectXB.x86.s rename to system/client-functions/System/VersionDetectXB.x86.s diff --git a/system/client-functions/WriteCodeBlocksGC.ppc.inc.s b/system/client-functions/System/WriteCodeBlocksGC.ppc.inc.s similarity index 100% rename from system/client-functions/WriteCodeBlocksGC.ppc.inc.s rename to system/client-functions/System/WriteCodeBlocksGC.ppc.inc.s diff --git a/system/client-functions/WriteCodeBlocksXB.x86.inc.s b/system/client-functions/System/WriteCodeBlocksXB.x86.inc.s similarity index 100% rename from system/client-functions/WriteCodeBlocksXB.x86.inc.s rename to system/client-functions/System/WriteCodeBlocksXB.x86.inc.s diff --git a/system/client-functions/WriteMemory.ppc.s b/system/client-functions/System/WriteMemory.ppc.s similarity index 100% rename from system/client-functions/WriteMemory.ppc.s rename to system/client-functions/System/WriteMemory.ppc.s diff --git a/tests/GC-Episode2PrivateDrops2P.test.txt b/tests/GC-Episode2PrivateDrops2P.test.txt index 61ff0c34..0f8ee4f3 100644 --- a/tests/GC-Episode2PrivateDrops2P.test.txt +++ b/tests/GC-Episode2PrivateDrops2P.test.txt @@ -467,7 +467,7 @@ I 94381 2023-12-29 15:36:19 - [Commands] Received from C-4 (version=GC_V3 comman 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 40 20 00 00 00 00 00 00 00 | 3 B +0010 | 00 00 4F 33 00 00 00 40 20 00 00 00 00 00 00 00 | 3 B 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -477,7 +477,7 @@ I 94381 2023-12-29 15:36:19 - [Commands] Received from C-4 (version=GC_V3 comman 0000 | 96 00 0C 00 7B 9E 17 2C 1D 00 00 00 | { , I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 40 20 00 04 00 00 00 00 00 | 3 B +0010 | 00 00 4F 33 00 00 00 40 20 00 04 00 00 00 00 00 | 3 B 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 31 32 3A 32 39 3A 20 | 2023:12:29: @@ -506,7 +506,7 @@ I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=9 0000 | 97 01 04 00 | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:19 - [Commands] Received from C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 04 00 | @@ -555,11 +555,11 @@ I 94381 2023-12-29 15:36:20 - [Commands] Received from C-5 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4A 6F 6E 61 | Jona 00C0 | 68 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | h 2 -00D0 | 00 00 00 00 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +00D0 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:20 - [Commands] Sending to C-5 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:20 - [Commands] Sending to C-5 (version=GC_V3 command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 diff --git a/tests/GC-Episode3BattleWithSpectator.test.txt b/tests/GC-Episode3BattleWithSpectator.test.txt index f0cfad4a..ef52bd71 100644 --- a/tests/GC-Episode3BattleWithSpectator.test.txt +++ b/tests/GC-Episode3BattleWithSpectator.test.txt @@ -5867,7 +5867,7 @@ I 17097 2023-09-19 21:53:53 - [Commands] Received from C-3 (version=GC command=9 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 17097 2023-09-19 21:53:53 - [Commands] Sending to C-3 (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 22 22 22 22 32 AC 99 83 | , """"2 -0010 | 00 00 00 00 00 A1 00 40 20 00 00 00 00 00 00 00 | 3@ ` +0010 | 00 4A 53 33 00 A1 00 40 20 00 00 00 00 00 00 00 | 3@ ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 17097 2023-09-19 21:53:53 - [Commands] Sending to C-3 (version=GC command=B7 flag=00) 0000 | B7 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 | @@ -5882,7 +5882,7 @@ I 17097 2023-09-19 21:53:53 - [Commands] Received from C-3 (version=GC command=9 0000 | 96 00 0C 00 30 AA 74 2C 27 00 00 00 | 0 t,' I 17097 2023-09-19 21:53:53 - [Commands] Sending to C-3 (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 22 22 22 22 32 AC 99 83 | , """"2 -0010 | 00 00 00 00 00 A1 00 40 20 00 04 00 00 00 00 00 | 3@ ` +0010 | 00 4A 53 33 00 A1 00 40 20 00 04 00 00 00 00 00 | 3@ ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 17097 2023-09-19 21:53:53 - [Commands] Sending to C-3 (version=GC command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 30 39 3A 32 30 3A 20 | 2023:09:20: diff --git a/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt b/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt index da7618d0..eaddc69e 100644 --- a/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt +++ b/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt @@ -62,7 +62,7 @@ I 25793 2023-11-24 23:03:38 - [Commands] Received from C-4 (version=GC_EP3 comma 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 A1 00 40 20 00 00 00 00 00 00 00 | 3 B` +0010 | 00 4A 53 33 00 A1 00 40 20 00 00 00 00 00 00 00 | 3 B` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=B7 flag=00) 0000 | B7 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 | @@ -77,7 +77,7 @@ I 25793 2023-11-24 23:03:38 - [Commands] Received from C-4 (version=GC_EP3 comma 0000 | 96 00 0C 00 5C E6 6B 2C 3B 00 00 00 | \ k,; I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 A1 00 40 20 00 04 00 00 00 00 00 | 3 B` +0010 | 00 4A 53 33 00 A1 00 40 20 00 04 00 00 00 00 00 | 3 B` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 31 31 3A 32 35 3A 20 | 2023:11:25: diff --git a/tests/GC-PoisonRoom.test.txt b/tests/GC-PoisonRoom.test.txt index 0be4b0c0..7e744196 100644 --- a/tests/GC-PoisonRoom.test.txt +++ b/tests/GC-PoisonRoom.test.txt @@ -23206,7 +23206,7 @@ I 56327 2024-03-03 23:56:37 - [Commands] Received from C-4 (version=GC_V3 comman 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 40 20 00 00 00 00 00 00 00 | 3 @ +0010 | 00 00 4F 33 00 00 00 40 20 00 00 00 00 00 00 00 | 3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -23216,7 +23216,7 @@ I 56327 2024-03-03 23:56:37 - [Commands] Received from C-4 (version=GC_V3 comman 0000 | 96 00 0C 00 28 59 6C 2B 08 01 00 00 | (Yl+ I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 40 20 00 04 00 00 00 00 00 | 3 @ +0010 | 00 00 4F 33 00 00 00 40 20 00 04 00 00 00 00 00 | 3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 34 3A 30 33 3A 30 34 3A 20 | 2024:03:04: @@ -23245,7 +23245,7 @@ I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-4 (version=GC_V3 command=9 0000 | 97 01 04 00 | I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:38 - [Commands] Received from C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 04 00 | @@ -23294,11 +23294,11 @@ I 56327 2024-03-03 23:56:38 - [Commands] Received from C-5 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4E 4F 20 44 | NO D 00C0 | 41 54 41 20 00 00 00 00 00 00 00 00 32 AC 99 83 | ATA 2 -00D0 | 00 00 00 00 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +00D0 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-5 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 00 00 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-5 (version=GC_V3 command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3