diff --git a/README.md b/README.md index f247ca47..7d7e143c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ See TODO.md for a list of known issues and future work I've curated, or go to th * [Item tables and drop modes](#item-tables-and-drop-modes) * [Cross-version play](#cross-version-play) * [Episode 3 features](#episode-3-features) - * [Memory patches and DOL files for GC](#memory-patches-and-dol-files) + * [Memory patches, client functions, and DOL files](#memory-patches-client-functions-and-dol-files) * [Using newserv as a proxy](#using-newserv-as-a-proxy) * [Chat commands](#chat-commands) * [Non-server features](#non-server-features) @@ -291,9 +291,9 @@ There is no public editor for Episode 3 maps and quests, but the format is descr Like quests, Episode 3 card definitions, maps, and quests are cached in memory. If you've changed any of these files, you can run `reload ep3-data` in the interactive shell to make the changes take effect without restarting the server. -## Memory patches and DOL files +## Memory patches, client functions, and DOL files -Everything in this section requires resource_dasm to be installed, so newserv can use the PowerPC assembler and disassembler 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 JP, USA, and EU (not Plus) @@ -301,12 +301,14 @@ In addition, these features are only supported for the following game versions: * 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 memory patches in the system/ppc directory with filenames like PatchName.patch.s and they will appear in the Patches menu for PSO GC clients that support patching. Memory patches are written in PowerPC assembly and are compiled when newserv is started. The PowerPC assembly system's features are documented in the comments in system/ppc/WriteMemory.s - this file is not a memory patch itself, but it describes how memory patches may be written and the restrictions that apply to them. +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 Episodes 1&2 based on AR codes originally made by Ralf at GC-Forever. 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 GC Episodes 1&2 based on AR codes originally made by Ralf at GC-Forever. 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. 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.s, WriteMemory.s, and RunDOL.s must be present in the system/ppc directory. This has been tested on Dolphin but not on a real GameCube, so results may vary. +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. Like other kinds of data, functions and DOL files are cached in memory. If you've changed any of these files, you can run `reload functions` or `reload dol-files` in the interactive shell to make the changes take effect without restarting the server. diff --git a/notes/generate-patches.py b/notes/generate-patches.py index 4a14d58b..d4c60e63 100644 --- a/notes/generate-patches.py +++ b/notes/generate-patches.py @@ -72,7 +72,7 @@ def write_patches_for_code( f.write("reloc0:\n") f.write(" .offsetof start\n") f.write("start:\n") - f.write(" .include WriteCodeBlocks\n") + f.write(" .include WriteCodeBlocksGC\n") for region in write_regions: f.write( f" # region @ {region.address:08X} ({len(region.data) * 4} bytes)\n" diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index dcc1628e..7625d84f 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -555,13 +555,15 @@ static void proxy_command_patch(shared_ptr ses, cons }; auto send_version_detect_or_send_call = [args, ses, send_call]() { - if (is_gc(ses->version()) && + bool is_gc = ::is_gc(ses->version()); + bool is_xb = (ses->version() == Version::XB_V3); + if ((is_gc || is_xb) && ses->config.specific_version == default_specific_version_for_version(ses->version(), -1)) { auto s = ses->require_server_state(); send_function_call( ses->client_channel, ses->config, - s->function_code_index->name_to_function.at("VersionDetect")); + s->function_code_index->name_to_function.at(is_xb ? "VersionDetectXB" : "VersionDetectGC")); ses->function_call_return_handler_queue.emplace_back(send_call); } else { send_call(ses->config.specific_version, 0); diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index 816639c0..84ba6155 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -2177,7 +2177,8 @@ struct S_ServerTime_B1 { // newserv supports exploiting a bug in the USA version of Episode 3, which // re-enables the use of this command on that version of the game. See -// system/ppc/Episode3USAQuestBufferOverflow.s for further details. +// system/client-functions/Episode3USAQuestBufferOverflow.ppc.s for further +// details. struct S_ExecuteCode_B2 { // If code_size == 0, no code is executed, but checksumming may still occur. diff --git a/src/FunctionCompiler.cc b/src/FunctionCompiler.cc index 7a45037a..ab0a7311 100644 --- a/src/FunctionCompiler.cc +++ b/src/FunctionCompiler.cc @@ -10,6 +10,7 @@ #ifdef HAVE_RESOURCE_FILE #include +#include #endif #include "CommandFormats.hh" @@ -133,28 +134,74 @@ shared_ptr compile_function_code( ret->index = 0; ret->hide_from_patches_menu = false; - if (arch == CompiledFunctionCode::Architecture::POWERPC) { - auto assembled = PPC32Emulator::assemble(text, {directory}); - ret->code = std::move(assembled.code); - ret->label_offsets = std::move(assembled.label_offsets); - for (const auto& it : assembled.metadata_keys) { - if (it.first == "hide_from_patches_menu") { - ret->hide_from_patches_menu = true; - } else if (it.first == "index") { - if (it.second.size() != 1) { - throw runtime_error("invalid index value in .meta directive"); - } - ret->index = it.second[0]; - } else if (it.first == "name") { - ret->long_name = it.second; - } else if (it.first == "description") { - ret->description = it.second; - } else { - throw runtime_error("unknown metadata key: " + it.first); - } + unordered_set get_include_stack; + function get_include = [&](const string& name) -> string { + const char* arch_name_token; + switch (arch) { + case CompiledFunctionCode::Architecture::POWERPC: + arch_name_token = "ppc"; + break; + case CompiledFunctionCode::Architecture::X86: + arch_name_token = "x86"; + break; + case CompiledFunctionCode::Architecture::SH4: + arch_name_token = "sh4"; + break; + default: + throw runtime_error("unknown architecture"); } + + string asm_filename = string_printf("%s/%s.%s.inc.s", 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); + } + EmulatorBase::AssembleResult ret; + switch (arch) { + case CompiledFunctionCode::Architecture::POWERPC: + ret = PPC32Emulator::assemble(load_file(asm_filename), get_include); + break; + case CompiledFunctionCode::Architecture::X86: + ret = X86Emulator::assemble(load_file(asm_filename), get_include); + break; + case CompiledFunctionCode::Architecture::SH4: + throw runtime_error("cannot compuile SH-4 assembly"); + default: + throw runtime_error("unknown architecture"); + } + get_include_stack.erase(name); + return ret.code; + } + string bin_filename = directory + "/" + name + ".inc.bin"; + if (isfile(bin_filename)) { + return load_file(bin_filename); + } + throw runtime_error("data not found for include: " + name + " (from " + asm_filename + " or " + bin_filename + ")"); + }; + + EmulatorBase::AssembleResult assembled; + if (arch == CompiledFunctionCode::Architecture::POWERPC) { + assembled = PPC32Emulator::assemble(text, get_include); } else if (arch == CompiledFunctionCode::Architecture::X86) { - throw runtime_error("x86 assembler is not implemented"); + assembled = X86Emulator::assemble(text, get_include); + } + ret->code = std::move(assembled.code); + ret->label_offsets = std::move(assembled.label_offsets); + for (const auto& it : assembled.metadata_keys) { + if (it.first == "hide_from_patches_menu") { + ret->hide_from_patches_menu = true; + } else if (it.first == "index") { + if (it.second.size() != 1) { + throw runtime_error("invalid index value in .meta directive"); + } + ret->index = it.second[0]; + } else if (it.first == "name") { + ret->long_name = it.second; + } else if (it.first == "description") { + ret->description = it.second; + } else { + throw runtime_error("unknown metadata key: " + it.first); + } } set reloc_indexes; @@ -191,31 +238,57 @@ FunctionCodeIndex::FunctionCodeIndex(const string& directory) { } uint32_t next_menu_item_id = 0; - for (const auto& filename : list_directory(directory)) { - if (!ends_with(filename, ".s") || ends_with(filename, ".inc.s")) { - continue; - } - bool is_patch = ends_with(filename, ".patch.s"); - string name = filename.substr(0, filename.size() - (is_patch ? 8 : 2)); - - // Check for specific_version token - uint32_t specific_version = 0; - string short_name = name; - if (is_patch && - (filename.size() >= 13) && - (filename[filename.size() - 13] == '.') && - isdigit(filename[filename.size() - 12]) && - (filename[filename.size() - 11] == 'O' || filename[filename.size() - 11] == 'S') && - (filename[filename.size() - 10] == 'E' || filename[filename.size() - 10] == 'J' || filename[filename.size() - 10] == 'P') && - (isdigit(filename[filename.size() - 9]) || filename[filename.size() - 9] == 'T')) { - specific_version = 0x33000000 | (filename[filename.size() - 11] << 16) | (filename[filename.size() - 10] << 8) | filename[filename.size() - 9]; - short_name = filename.substr(0, filename.size() - 13); - } - + for (const auto& filename : list_directory_sorted(directory)) { try { + if (!ends_with(filename, ".s")) { + continue; + } + + 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; + 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)) { + 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); + } + + 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(CompiledFunctionCode::Architecture::POWERPC, directory, name, text); + 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( @@ -240,7 +313,7 @@ FunctionCodeIndex::FunctionCodeIndex(const string& directory) { 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", name.c_str(), e.what()); + function_compiler_log.warning("Failed to compile function %s: %s", filename.c_str(), e.what()); } } } @@ -252,6 +325,7 @@ shared_ptr FunctionCodeIndex::patch_menu(uint32_t specific_version) ret->items.emplace_back(PatchesMenuItemID::GO_BACK, "Go back", "Return to the\nmain menu", 0); for (const auto& it : this->name_and_specific_version_to_patch_function) { const auto& fn = it.second; + fprintf(stderr, "patch: [%s] vs [%s]\n", it.first.c_str(), suffix.c_str()); if (!fn->hide_from_patches_menu && ends_with(it.first, suffix)) { ret->items.emplace_back( fn->menu_item_id, diff --git a/src/FunctionCompiler.hh b/src/FunctionCompiler.hh index 8332094a..0cfe866a 100644 --- a/src/FunctionCompiler.hh +++ b/src/FunctionCompiler.hh @@ -18,7 +18,8 @@ void set_function_compiler_available(bool is_available); struct CompiledFunctionCode { enum class Architecture { - POWERPC = 0, // GC + UNKNOWN = 0, + POWERPC, // GC X86, // PC, XB, BB SH4, // Dreamcast }; diff --git a/src/Main.cc b/src/Main.cc index af777835..e450bea7 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -1324,10 +1324,10 @@ Action a_assemble_quest_script( Action a_assemble_all_patches( "assemble-all-patches", "\ assemble-all-patches\n\ - Assemble all patches in the system/ppc directory, and produce two compiled\n\ - .bin files for each patch (one unencrypted, for most PSO versions, and one\n\ - encrypted, for PSO JP v1.04, JP Ep3, and Ep3 Trial Edition). The output\n\ - files are written to the system/ppc directory.\n", + Assemble all patches in the system/client-functions directory, and produce\n\ + two compiled .bin files for each patch (one unencrypted, for most PSO\n\ + versions, and one encrypted, for PSO GC JP v1.04, JP Ep3, and Ep3 Trial\n\ + Edition). The output files are saved in system/client-functions.\n", +[](Arguments&) { ServerState s; s.load_objects_and_upstream_dependents("functions"); @@ -1351,7 +1351,11 @@ Action a_assemble_all_patches( process_code(it.second, 0, 0, 0); } try { - process_code(s.function_code_index->name_to_function.at("VersionDetect"), 0, 0, 0); + process_code(s.function_code_index->name_to_function.at("VersionDetectGC"), 0, 0, 0); + } catch (const out_of_range&) { + } + try { + process_code(s.function_code_index->name_to_function.at("VersionDetectXB"), 0, 0, 0); } catch (const out_of_range&) { } try { diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index b2664df3..88bc5fc9 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -240,7 +240,7 @@ 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::GC_ONLY | MenuItem::Flag::REQUIRES_SEND_FUNCTION_CALL); + "Change game\nbehaviors", MenuItem::Flag::INVISIBLE_ON_DC | 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", @@ -877,10 +877,10 @@ static void on_9D_9E(shared_ptr c, uint16_t command, uint32_t, string& d c->channel.language = base_cmd->language; set_console_client_flags(c, base_cmd->sub_version); - // See system/ppc/Episode3USAQuestBufferOverflow.s for where this value gets - // set. We use this to determine if the client has already run the code or - // not; sending it again when the client has already run it will likely cause - // the client to crash. + // See system/client-functions/Episode3USAQuestBufferOverflow.ppc.s for where + // this value gets set. We use this to determine if the client has already run + // the code or not; sending it again when the client has already run it will + // likely cause the client to crash. if (base_cmd->unused1 == 0x5F5CA297) { c->config.clear_flag(Client::Flag::USE_OVERFLOW_FOR_SEND_FUNCTION_CALL); c->config.clear_flag(Client::Flag::NO_SEND_FUNCTION_CALL); diff --git a/src/SendCommands.cc b/src/SendCommands.cc index fe94e1a9..aeace91c 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -322,7 +322,7 @@ void send_update_client_config(shared_ptr c, bool always_send) { void send_quest_buffer_overflow(shared_ptr c) { // PSO Episode 3 USA doesn't natively support the B2 command, but we can add // it back to the game with some tricky commands. For details on how this - // works, see system/ppc/Episode3USAQuestBufferOverflow.s. + // works, see system/client-functions/Episode3USAQuestBufferOverflow.ppc.s. auto fn = c->require_server_state()->function_code_index->name_to_function.at("Episode3USAQuestBufferOverflow"); if (fn->code.size() > 0x400) { throw runtime_error("Episode 3 buffer overflow code must be a single segment"); @@ -355,9 +355,11 @@ void prepare_client_for_patches(shared_ptr c, function on_comple if (!c) { return; } - if (is_gc(c->version()) && + bool is_gc = ::is_gc(c->version()); + bool is_xb = (c->version() == Version::XB_V3); + if ((is_gc || is_xb) && c->config.specific_version == default_specific_version_for_version(c->version(), -1)) { - send_function_call(c, s->function_code_index->name_to_function.at("VersionDetect")); + send_function_call(c, s->function_code_index->name_to_function.at(is_xb ? "VersionDetectXB" : "VersionDetectGC")); c->function_call_response_queue.emplace_back([wc = weak_ptr(c), on_complete](uint32_t specific_version, uint32_t) -> void { auto c = wc.lock(); if (!c) { diff --git a/src/ServerState.cc b/src/ServerState.cc index 2e000cb4..fd9050fa 100644 --- a/src/ServerState.cc +++ b/src/ServerState.cc @@ -1427,7 +1427,7 @@ void ServerState::load_quest_index() { void ServerState::compile_functions() { config_log.info("Compiling client functions"); - this->function_code_index = make_shared("system/ppc"); + this->function_code_index = make_shared("system/client-functions"); } void ServerState::load_dol_files() { diff --git a/src/Version.cc b/src/Version.cc index 6ffeeb66..d82c19b9 100644 --- a/src/Version.cc +++ b/src/Version.cc @@ -204,7 +204,7 @@ uint32_t default_specific_version_for_version(Version version, int64_t sub_versi // to set the specific_version based on sub_version. Fortunately, all // versions that share sub_version values also support send_function_call, // so for those versions we get the specific_version later by sending the - // VersionDetect call. + // VersionDetectGC or VersionDetectXB call. switch (version) { case Version::GC_NTE: return 0x334F4A54; // 3OJT @@ -242,11 +242,52 @@ uint32_t default_specific_version_for_version(Version version, int64_t sub_versi default: return 0x33000000; } + case Version::XB_V3: + return 0x344F0000; + case Version::BB_V4: + return 0x354F3030; default: return 0x00000000; } } +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) { + return false; + } + char game = specific_version >> 16; + if ((game != 'O') && (game != 'S')) { + return false; + } + char region = specific_version >> 8; + if ((region != 'J') && (region != 'E') && (region != 'P')) { + return false; + } + char revision = specific_version; + return (isdigit(revision) || (revision == 'T')); +} + +bool specific_version_is_xb(uint32_t specific_version) { + // XB specific_versions are 4ORV, where R is [JEP], V is [BDU] + if ((specific_version & 0xFFFF0000) != 0x344F0000) { + return false; + } + char region = specific_version >> 8; + if ((region != 'J') && (region != 'E') && (region != 'P')) { + return false; + } + char revision = specific_version; + return ((revision == 'B') || (revision == 'D') || (revision == 'U')); +} + +bool specific_version_is_bb(uint32_t specific_version) { + // TODO: We should actually find a way to determine BB specific_versions, but + // there are so many mods out there, and there's a patch server anyway, so it + // seems not worth the effort + return specific_version == 0x35303030; +} + const char* file_path_token_for_version(Version version) { switch (version) { case Version::PC_PATCH: diff --git a/src/Version.hh b/src/Version.hh index 7243afd1..0839eadb 100644 --- a/src/Version.hh +++ b/src/Version.hh @@ -139,6 +139,9 @@ inline bool uses_utf16(Version version) { } uint32_t default_specific_version_for_version(Version version, int64_t sub_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); enum class ServerBehavior { PC_CONSOLE_DETECT = 0, diff --git a/system/ppc/AllCards.3SE0.patch.s b/system/client-functions/AllCards.3SE0.patch.s similarity index 100% rename from system/ppc/AllCards.3SE0.patch.s rename to system/client-functions/AllCards.3SE0.patch.s diff --git a/system/ppc/BugFixes.3OE0.patch.s b/system/client-functions/BugFixes.3OE0.patch.s similarity index 99% rename from system/ppc/BugFixes.3OE0.patch.s rename to system/client-functions/BugFixes.3OE0.patch.s index 6102511c..8e8d1c93 100644 --- a/system/ppc/BugFixes.3OE0.patch.s +++ b/system/client-functions/BugFixes.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/BugFixes.3OE1.patch.s b/system/client-functions/BugFixes.3OE1.patch.s similarity index 99% rename from system/ppc/BugFixes.3OE1.patch.s rename to system/client-functions/BugFixes.3OE1.patch.s index dd080998..c1ec162a 100644 --- a/system/ppc/BugFixes.3OE1.patch.s +++ b/system/client-functions/BugFixes.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/BugFixes.3OE2.patch.s b/system/client-functions/BugFixes.3OE2.patch.s similarity index 99% rename from system/ppc/BugFixes.3OE2.patch.s rename to system/client-functions/BugFixes.3OE2.patch.s index 70db7bcc..f540a8b2 100644 --- a/system/ppc/BugFixes.3OE2.patch.s +++ b/system/client-functions/BugFixes.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/BugFixes.3OJ2.patch.s b/system/client-functions/BugFixes.3OJ2.patch.s similarity index 99% rename from system/ppc/BugFixes.3OJ2.patch.s rename to system/client-functions/BugFixes.3OJ2.patch.s index 5f92d381..d30fc6e7 100644 --- a/system/ppc/BugFixes.3OJ2.patch.s +++ b/system/client-functions/BugFixes.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/BugFixes.3OJ3.patch.s b/system/client-functions/BugFixes.3OJ3.patch.s similarity index 99% rename from system/ppc/BugFixes.3OJ3.patch.s rename to system/client-functions/BugFixes.3OJ3.patch.s index 9459b522..dab68bb8 100644 --- a/system/ppc/BugFixes.3OJ3.patch.s +++ b/system/client-functions/BugFixes.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/BugFixes.3OJ4.patch.s b/system/client-functions/BugFixes.3OJ4.patch.s similarity index 99% rename from system/ppc/BugFixes.3OJ4.patch.s rename to system/client-functions/BugFixes.3OJ4.patch.s index a55edadc..a46a0523 100644 --- a/system/ppc/BugFixes.3OJ4.patch.s +++ b/system/client-functions/BugFixes.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/BugFixes.3OJ5.patch.s b/system/client-functions/BugFixes.3OJ5.patch.s similarity index 99% rename from system/ppc/BugFixes.3OJ5.patch.s rename to system/client-functions/BugFixes.3OJ5.patch.s index 4960e9dc..63b6b939 100644 --- a/system/ppc/BugFixes.3OJ5.patch.s +++ b/system/client-functions/BugFixes.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/BugFixes.3OP0.patch.s b/system/client-functions/BugFixes.3OP0.patch.s similarity index 99% rename from system/ppc/BugFixes.3OP0.patch.s rename to system/client-functions/BugFixes.3OP0.patch.s index 0236e228..3e0094b7 100644 --- a/system/ppc/BugFixes.3OP0.patch.s +++ b/system/client-functions/BugFixes.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B088 (88 bytes) .data 0x8000B088 # address .data 0x00000058 # size diff --git a/system/ppc/CacheClearFix-Orig.inc.s b/system/client-functions/CacheClearFix-Orig.ppc.inc.s similarity index 97% rename from system/ppc/CacheClearFix-Orig.inc.s rename to system/client-functions/CacheClearFix-Orig.ppc.inc.s index 0426da16..dcf8ab67 100644 --- a/system/ppc/CacheClearFix-Orig.inc.s +++ b/system/client-functions/CacheClearFix-Orig.ppc.inc.s @@ -18,7 +18,7 @@ patch: mfctr r6 mr r3, r6 li r4, 0x7C00 - .include FlushCachedCode + .include FlushCachedCode-GC mtctr r6 bctr patch_end: @@ -67,7 +67,7 @@ location_ok: # r5 = patch size in bytes # r6 = destination location # r7 = saved LR - .include CopyCode + .include CopyCode-GC setup_branch: # Replace the bctrl opcode that led to this call with a bl opcode that diff --git a/system/ppc/CacheClearFix-Phase1.s b/system/client-functions/CacheClearFix-Phase1.ppc.s similarity index 100% rename from system/ppc/CacheClearFix-Phase1.s rename to system/client-functions/CacheClearFix-Phase1.ppc.s diff --git a/system/ppc/CacheClearFix-Phase2.s b/system/client-functions/CacheClearFix-Phase2.ppc.s similarity index 100% rename from system/ppc/CacheClearFix-Phase2.s rename to system/client-functions/CacheClearFix-Phase2.ppc.s diff --git a/system/ppc/CacheClearFix.inc.s b/system/client-functions/CacheClearFix.ppc.inc.s similarity index 100% rename from system/ppc/CacheClearFix.inc.s rename to system/client-functions/CacheClearFix.ppc.inc.s diff --git a/system/ppc/ChatFeatures.3OE0.patch.s b/system/client-functions/ChatFeatures.3OE0.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OE0.patch.s rename to system/client-functions/ChatFeatures.3OE0.patch.s index 422f9182..286722a2 100644 --- a/system/ppc/ChatFeatures.3OE0.patch.s +++ b/system/client-functions/ChatFeatures.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/ChatFeatures.3OE1.patch.s b/system/client-functions/ChatFeatures.3OE1.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OE1.patch.s rename to system/client-functions/ChatFeatures.3OE1.patch.s index 52901b18..13e76dd0 100644 --- a/system/ppc/ChatFeatures.3OE1.patch.s +++ b/system/client-functions/ChatFeatures.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/ChatFeatures.3OE2.patch.s b/system/client-functions/ChatFeatures.3OE2.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OE2.patch.s rename to system/client-functions/ChatFeatures.3OE2.patch.s index 43024535..4f4badc6 100644 --- a/system/ppc/ChatFeatures.3OE2.patch.s +++ b/system/client-functions/ChatFeatures.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/ChatFeatures.3OJ2.patch.s b/system/client-functions/ChatFeatures.3OJ2.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OJ2.patch.s rename to system/client-functions/ChatFeatures.3OJ2.patch.s index 2ccc49ee..005905cf 100644 --- a/system/ppc/ChatFeatures.3OJ2.patch.s +++ b/system/client-functions/ChatFeatures.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/ChatFeatures.3OJ3.patch.s b/system/client-functions/ChatFeatures.3OJ3.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OJ3.patch.s rename to system/client-functions/ChatFeatures.3OJ3.patch.s index bfac660d..85b6d660 100644 --- a/system/ppc/ChatFeatures.3OJ3.patch.s +++ b/system/client-functions/ChatFeatures.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/ChatFeatures.3OJ4.patch.s b/system/client-functions/ChatFeatures.3OJ4.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OJ4.patch.s rename to system/client-functions/ChatFeatures.3OJ4.patch.s index 9cda5d6f..ca97030b 100644 --- a/system/ppc/ChatFeatures.3OJ4.patch.s +++ b/system/client-functions/ChatFeatures.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/ChatFeatures.3OJ5.patch.s b/system/client-functions/ChatFeatures.3OJ5.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OJ5.patch.s rename to system/client-functions/ChatFeatures.3OJ5.patch.s index c9f2c3bf..a6d56bc0 100644 --- a/system/ppc/ChatFeatures.3OJ5.patch.s +++ b/system/client-functions/ChatFeatures.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/ChatFeatures.3OP0.patch.s b/system/client-functions/ChatFeatures.3OP0.patch.s similarity index 97% rename from system/ppc/ChatFeatures.3OP0.patch.s rename to system/client-functions/ChatFeatures.3OP0.patch.s index 31edb1b4..751e457a 100644 --- a/system/ppc/ChatFeatures.3OP0.patch.s +++ b/system/client-functions/ChatFeatures.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000D6A0 (28 bytes) .data 0x8000D6A0 # address .data 0x0000001C # size diff --git a/system/ppc/CommonBank.3OE0.patch.s b/system/client-functions/CommonBank.3OE0.patch.s similarity index 99% rename from system/ppc/CommonBank.3OE0.patch.s rename to system/client-functions/CommonBank.3OE0.patch.s index 2f124f7f..0ac6e686 100644 --- a/system/ppc/CommonBank.3OE0.patch.s +++ b/system/client-functions/CommonBank.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CommonBank.3OE1.patch.s b/system/client-functions/CommonBank.3OE1.patch.s similarity index 99% rename from system/ppc/CommonBank.3OE1.patch.s rename to system/client-functions/CommonBank.3OE1.patch.s index 0b0a8f0f..f8f4ac86 100644 --- a/system/ppc/CommonBank.3OE1.patch.s +++ b/system/client-functions/CommonBank.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CommonBank.3OE2.patch.s b/system/client-functions/CommonBank.3OE2.patch.s similarity index 99% rename from system/ppc/CommonBank.3OE2.patch.s rename to system/client-functions/CommonBank.3OE2.patch.s index b336856d..825434ea 100644 --- a/system/ppc/CommonBank.3OE2.patch.s +++ b/system/client-functions/CommonBank.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CommonBank.3OJ2.patch.s b/system/client-functions/CommonBank.3OJ2.patch.s similarity index 99% rename from system/ppc/CommonBank.3OJ2.patch.s rename to system/client-functions/CommonBank.3OJ2.patch.s index abb92425..6fc24395 100644 --- a/system/ppc/CommonBank.3OJ2.patch.s +++ b/system/client-functions/CommonBank.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CommonBank.3OJ3.patch.s b/system/client-functions/CommonBank.3OJ3.patch.s similarity index 99% rename from system/ppc/CommonBank.3OJ3.patch.s rename to system/client-functions/CommonBank.3OJ3.patch.s index 82b30bd1..7d886db2 100644 --- a/system/ppc/CommonBank.3OJ3.patch.s +++ b/system/client-functions/CommonBank.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CommonBank.3OJ4.patch.s b/system/client-functions/CommonBank.3OJ4.patch.s similarity index 99% rename from system/ppc/CommonBank.3OJ4.patch.s rename to system/client-functions/CommonBank.3OJ4.patch.s index 86527d64..a21f55a5 100644 --- a/system/ppc/CommonBank.3OJ4.patch.s +++ b/system/client-functions/CommonBank.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CommonBank.3OJ5.patch.s b/system/client-functions/CommonBank.3OJ5.patch.s similarity index 99% rename from system/ppc/CommonBank.3OJ5.patch.s rename to system/client-functions/CommonBank.3OJ5.patch.s index c34009cc..d79ae750 100644 --- a/system/ppc/CommonBank.3OJ5.patch.s +++ b/system/client-functions/CommonBank.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CommonBank.3OP0.patch.s b/system/client-functions/CommonBank.3OP0.patch.s similarity index 99% rename from system/ppc/CommonBank.3OP0.patch.s rename to system/client-functions/CommonBank.3OP0.patch.s index a89bb866..3c0a598e 100644 --- a/system/ppc/CommonBank.3OP0.patch.s +++ b/system/client-functions/CommonBank.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BAB4 (156 bytes) .data 0x8000BAB4 # address .data 0x0000009C # size diff --git a/system/ppc/CopyCode.inc.s b/system/client-functions/CopyCode.ppc.inc.s similarity index 100% rename from system/ppc/CopyCode.inc.s rename to system/client-functions/CopyCode.ppc.inc.s diff --git a/system/ppc/DCReticleColors.3OE0.patch.s b/system/client-functions/DCReticleColors.3OE0.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OE0.patch.s rename to system/client-functions/DCReticleColors.3OE0.patch.s index a876bbb9..f430c3fe 100644 --- a/system/ppc/DCReticleColors.3OE0.patch.s +++ b/system/client-functions/DCReticleColors.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802ABDB8 (4 bytes) .data 0x802ABDB8 # address .data 0x00000004 # size diff --git a/system/ppc/DCReticleColors.3OE1.patch.s b/system/client-functions/DCReticleColors.3OE1.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OE1.patch.s rename to system/client-functions/DCReticleColors.3OE1.patch.s index d8422aba..8a50c4b6 100644 --- a/system/ppc/DCReticleColors.3OE1.patch.s +++ b/system/client-functions/DCReticleColors.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802ABDFC (4 bytes) .data 0x802ABDFC # address .data 0x00000004 # size diff --git a/system/ppc/DCReticleColors.3OE2.patch.s b/system/client-functions/DCReticleColors.3OE2.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OE2.patch.s rename to system/client-functions/DCReticleColors.3OE2.patch.s index 4f226f10..1633bcf2 100644 --- a/system/ppc/DCReticleColors.3OE2.patch.s +++ b/system/client-functions/DCReticleColors.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AD338 (4 bytes) .data 0x802AD338 # address .data 0x00000004 # size diff --git a/system/ppc/DCReticleColors.3OJ2.patch.s b/system/client-functions/DCReticleColors.3OJ2.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OJ2.patch.s rename to system/client-functions/DCReticleColors.3OJ2.patch.s index db6bbc4a..ab289947 100644 --- a/system/ppc/DCReticleColors.3OJ2.patch.s +++ b/system/client-functions/DCReticleColors.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AB3FC (4 bytes) .data 0x802AB3FC # address .data 0x00000004 # size diff --git a/system/ppc/DCReticleColors.3OJ3.patch.s b/system/client-functions/DCReticleColors.3OJ3.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OJ3.patch.s rename to system/client-functions/DCReticleColors.3OJ3.patch.s index b8c735d1..2f257e6e 100644 --- a/system/ppc/DCReticleColors.3OJ3.patch.s +++ b/system/client-functions/DCReticleColors.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AC2A4 (4 bytes) .data 0x802AC2A4 # address .data 0x00000004 # size diff --git a/system/ppc/DCReticleColors.3OJ4.patch.s b/system/client-functions/DCReticleColors.3OJ4.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OJ4.patch.s rename to system/client-functions/DCReticleColors.3OJ4.patch.s index 94b6f571..e3b65534 100644 --- a/system/ppc/DCReticleColors.3OJ4.patch.s +++ b/system/client-functions/DCReticleColors.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AD3D0 (4 bytes) .data 0x802AD3D0 # address .data 0x00000004 # size diff --git a/system/ppc/DCReticleColors.3OJ5.patch.s b/system/client-functions/DCReticleColors.3OJ5.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OJ5.patch.s rename to system/client-functions/DCReticleColors.3OJ5.patch.s index a4bc700d..71796d67 100644 --- a/system/ppc/DCReticleColors.3OJ5.patch.s +++ b/system/client-functions/DCReticleColors.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AD184 (4 bytes) .data 0x802AD184 # address .data 0x00000004 # size diff --git a/system/ppc/DCReticleColors.3OP0.patch.s b/system/client-functions/DCReticleColors.3OP0.patch.s similarity index 98% rename from system/ppc/DCReticleColors.3OP0.patch.s rename to system/client-functions/DCReticleColors.3OP0.patch.s index bce17e4b..e7dd1cf0 100644 --- a/system/ppc/DCReticleColors.3OP0.patch.s +++ b/system/client-functions/DCReticleColors.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802ACACC (4 bytes) .data 0x802ACACC # address .data 0x00000004 # size diff --git a/system/ppc/Decoction.3OE0.patch.s b/system/client-functions/Decoction.3OE0.patch.s similarity index 98% rename from system/ppc/Decoction.3OE0.patch.s rename to system/client-functions/Decoction.3OE0.patch.s index d1d60475..9076a77e 100644 --- a/system/ppc/Decoction.3OE0.patch.s +++ b/system/client-functions/Decoction.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 803515F4 (152 bytes) .data 0x803515F4 # address .data 0x00000098 # size diff --git a/system/ppc/Decoction.3OE1.patch.s b/system/client-functions/Decoction.3OE1.patch.s similarity index 98% rename from system/ppc/Decoction.3OE1.patch.s rename to system/client-functions/Decoction.3OE1.patch.s index dd114664..28635e24 100644 --- a/system/ppc/Decoction.3OE1.patch.s +++ b/system/client-functions/Decoction.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80351638 (152 bytes) .data 0x80351638 # address .data 0x00000098 # size diff --git a/system/ppc/Decoction.3OE2.patch.s b/system/client-functions/Decoction.3OE2.patch.s similarity index 98% rename from system/ppc/Decoction.3OE2.patch.s rename to system/client-functions/Decoction.3OE2.patch.s index 678a77b2..490c87bc 100644 --- a/system/ppc/Decoction.3OE2.patch.s +++ b/system/client-functions/Decoction.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80353220 (152 bytes) .data 0x80353220 # address .data 0x00000098 # size diff --git a/system/ppc/Decoction.3OJ2.patch.s b/system/client-functions/Decoction.3OJ2.patch.s similarity index 98% rename from system/ppc/Decoction.3OJ2.patch.s rename to system/client-functions/Decoction.3OJ2.patch.s index f5135be7..a5839012 100644 --- a/system/ppc/Decoction.3OJ2.patch.s +++ b/system/client-functions/Decoction.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80350740 (152 bytes) .data 0x80350740 # address .data 0x00000098 # size diff --git a/system/ppc/Decoction.3OJ3.patch.s b/system/client-functions/Decoction.3OJ3.patch.s similarity index 98% rename from system/ppc/Decoction.3OJ3.patch.s rename to system/client-functions/Decoction.3OJ3.patch.s index f63dadbf..a37d8169 100644 --- a/system/ppc/Decoction.3OJ3.patch.s +++ b/system/client-functions/Decoction.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80351B44 (152 bytes) .data 0x80351B44 # address .data 0x00000098 # size diff --git a/system/ppc/Decoction.3OJ4.patch.s b/system/client-functions/Decoction.3OJ4.patch.s similarity index 98% rename from system/ppc/Decoction.3OJ4.patch.s rename to system/client-functions/Decoction.3OJ4.patch.s index 6e247151..8eae51df 100644 --- a/system/ppc/Decoction.3OJ4.patch.s +++ b/system/client-functions/Decoction.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 803530A0 (152 bytes) .data 0x803530A0 # address .data 0x00000098 # size diff --git a/system/ppc/Decoction.3OJ5.patch.s b/system/client-functions/Decoction.3OJ5.patch.s similarity index 98% rename from system/ppc/Decoction.3OJ5.patch.s rename to system/client-functions/Decoction.3OJ5.patch.s index 67051b5e..f341588a 100644 --- a/system/ppc/Decoction.3OJ5.patch.s +++ b/system/client-functions/Decoction.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80352E54 (152 bytes) .data 0x80352E54 # address .data 0x00000098 # size diff --git a/system/ppc/Decoction.3OP0.patch.s b/system/client-functions/Decoction.3OP0.patch.s similarity index 98% rename from system/ppc/Decoction.3OP0.patch.s rename to system/client-functions/Decoction.3OP0.patch.s index 550d50e0..7a3545d6 100644 --- a/system/ppc/Decoction.3OP0.patch.s +++ b/system/client-functions/Decoction.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80352614 (152 bytes) .data 0x80352614 # address .data 0x00000098 # size diff --git a/system/ppc/DrawDistance.3OE0.patch.s b/system/client-functions/DrawDistance.3OE0.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OE0.patch.s rename to system/client-functions/DrawDistance.3OE0.patch.s index fd5f6c41..f73b4cff 100644 --- a/system/ppc/DrawDistance.3OE0.patch.s +++ b/system/client-functions/DrawDistance.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/DrawDistance.3OE1.patch.s b/system/client-functions/DrawDistance.3OE1.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OE1.patch.s rename to system/client-functions/DrawDistance.3OE1.patch.s index d8ab1119..bda366df 100644 --- a/system/ppc/DrawDistance.3OE1.patch.s +++ b/system/client-functions/DrawDistance.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/DrawDistance.3OE2.patch.s b/system/client-functions/DrawDistance.3OE2.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OE2.patch.s rename to system/client-functions/DrawDistance.3OE2.patch.s index c80ece65..73381e2f 100644 --- a/system/ppc/DrawDistance.3OE2.patch.s +++ b/system/client-functions/DrawDistance.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/DrawDistance.3OJ2.patch.s b/system/client-functions/DrawDistance.3OJ2.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OJ2.patch.s rename to system/client-functions/DrawDistance.3OJ2.patch.s index b1d59f2a..b9fed41d 100644 --- a/system/ppc/DrawDistance.3OJ2.patch.s +++ b/system/client-functions/DrawDistance.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/DrawDistance.3OJ3.patch.s b/system/client-functions/DrawDistance.3OJ3.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OJ3.patch.s rename to system/client-functions/DrawDistance.3OJ3.patch.s index 54329b47..0a204029 100644 --- a/system/ppc/DrawDistance.3OJ3.patch.s +++ b/system/client-functions/DrawDistance.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/DrawDistance.3OJ4.patch.s b/system/client-functions/DrawDistance.3OJ4.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OJ4.patch.s rename to system/client-functions/DrawDistance.3OJ4.patch.s index a22570e1..8d1035bc 100644 --- a/system/ppc/DrawDistance.3OJ4.patch.s +++ b/system/client-functions/DrawDistance.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/DrawDistance.3OJ5.patch.s b/system/client-functions/DrawDistance.3OJ5.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OJ5.patch.s rename to system/client-functions/DrawDistance.3OJ5.patch.s index 2ab27907..f8043a53 100644 --- a/system/ppc/DrawDistance.3OJ5.patch.s +++ b/system/client-functions/DrawDistance.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/DrawDistance.3OP0.patch.s b/system/client-functions/DrawDistance.3OP0.patch.s similarity index 99% rename from system/ppc/DrawDistance.3OP0.patch.s rename to system/client-functions/DrawDistance.3OP0.patch.s index 4386e8c4..02d4fe8c 100644 --- a/system/ppc/DrawDistance.3OP0.patch.s +++ b/system/client-functions/DrawDistance.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000DFA0 (64 bytes) .data 0x8000DFA0 # address .data 0x00000040 # size diff --git a/system/ppc/Editors.3SE0.patch.s b/system/client-functions/Editors.3SE0.patch.s similarity index 100% rename from system/ppc/Editors.3SE0.patch.s rename to system/client-functions/Editors.3SE0.patch.s diff --git a/system/ppc/EnemyHPBars.3OE0.patch.s b/system/client-functions/EnemyHPBars.3OE0.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OE0.patch.s rename to system/client-functions/EnemyHPBars.3OE0.patch.s index 1d65e116..9c0916d0 100644 --- a/system/ppc/EnemyHPBars.3OE0.patch.s +++ b/system/client-functions/EnemyHPBars.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80261B9C (4 bytes) .data 0x80261B9C # address .data 0x00000004 # size diff --git a/system/ppc/EnemyHPBars.3OE1.patch.s b/system/client-functions/EnemyHPBars.3OE1.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OE1.patch.s rename to system/client-functions/EnemyHPBars.3OE1.patch.s index fd9ba40d..53f6399a 100644 --- a/system/ppc/EnemyHPBars.3OE1.patch.s +++ b/system/client-functions/EnemyHPBars.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80261B9C (4 bytes) .data 0x80261B9C # address .data 0x00000004 # size diff --git a/system/ppc/EnemyHPBars.3OE2.patch.s b/system/client-functions/EnemyHPBars.3OE2.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OE2.patch.s rename to system/client-functions/EnemyHPBars.3OE2.patch.s index b79b5309..9983aaf0 100644 --- a/system/ppc/EnemyHPBars.3OE2.patch.s +++ b/system/client-functions/EnemyHPBars.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80262F5C (4 bytes) .data 0x80262F5C # address .data 0x00000004 # size diff --git a/system/ppc/EnemyHPBars.3OJ2.patch.s b/system/client-functions/EnemyHPBars.3OJ2.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OJ2.patch.s rename to system/client-functions/EnemyHPBars.3OJ2.patch.s index ad52dc86..8988dda5 100644 --- a/system/ppc/EnemyHPBars.3OJ2.patch.s +++ b/system/client-functions/EnemyHPBars.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802612C4 (4 bytes) .data 0x802612C4 # address .data 0x00000004 # size diff --git a/system/ppc/EnemyHPBars.3OJ3.patch.s b/system/client-functions/EnemyHPBars.3OJ3.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OJ3.patch.s rename to system/client-functions/EnemyHPBars.3OJ3.patch.s index 287bbeee..cea5cd02 100644 --- a/system/ppc/EnemyHPBars.3OJ3.patch.s +++ b/system/client-functions/EnemyHPBars.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80261E9C (4 bytes) .data 0x80261E9C # address .data 0x00000004 # size diff --git a/system/ppc/EnemyHPBars.3OJ4.patch.s b/system/client-functions/EnemyHPBars.3OJ4.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OJ4.patch.s rename to system/client-functions/EnemyHPBars.3OJ4.patch.s index 9b916dd5..3afe7786 100644 --- a/system/ppc/EnemyHPBars.3OJ4.patch.s +++ b/system/client-functions/EnemyHPBars.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80262EE4 (4 bytes) .data 0x80262EE4 # address .data 0x00000004 # size diff --git a/system/ppc/EnemyHPBars.3OJ5.patch.s b/system/client-functions/EnemyHPBars.3OJ5.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OJ5.patch.s rename to system/client-functions/EnemyHPBars.3OJ5.patch.s index fb82dc3d..dffeabcf 100644 --- a/system/ppc/EnemyHPBars.3OJ5.patch.s +++ b/system/client-functions/EnemyHPBars.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80262C98 (4 bytes) .data 0x80262C98 # address .data 0x00000004 # size diff --git a/system/ppc/EnemyHPBars.3OP0.patch.s b/system/client-functions/EnemyHPBars.3OP0.patch.s similarity index 98% rename from system/ppc/EnemyHPBars.3OP0.patch.s rename to system/client-functions/EnemyHPBars.3OP0.patch.s index fd5bbaf7..4f618b50 100644 --- a/system/ppc/EnemyHPBars.3OP0.patch.s +++ b/system/client-functions/EnemyHPBars.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802627A4 (4 bytes) .data 0x802627A4 # address .data 0x00000004 # size diff --git a/system/ppc/Episode3USAOnly.inc.s b/system/client-functions/Episode3USAOnly.ppc.inc.s similarity index 100% rename from system/ppc/Episode3USAOnly.inc.s rename to system/client-functions/Episode3USAOnly.ppc.inc.s diff --git a/system/ppc/Episode3USAQuestBufferOverflow.s b/system/client-functions/Episode3USAQuestBufferOverflow.ppc.s similarity index 100% rename from system/ppc/Episode3USAQuestBufferOverflow.s rename to system/client-functions/Episode3USAQuestBufferOverflow.ppc.s diff --git a/system/ppc/FlushCachedCode.inc.s b/system/client-functions/FlushCachedCode.ppc.inc.s similarity index 100% rename from system/ppc/FlushCachedCode.inc.s rename to system/client-functions/FlushCachedCode.ppc.inc.s diff --git a/system/ppc/HungryMagSound.3OE0.patch.s b/system/client-functions/HungryMagSound.3OE0.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OE0.patch.s rename to system/client-functions/HungryMagSound.3OE0.patch.s index b9508a91..a04f0204 100644 --- a/system/ppc/HungryMagSound.3OE0.patch.s +++ b/system/client-functions/HungryMagSound.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/HungryMagSound.3OE1.patch.s b/system/client-functions/HungryMagSound.3OE1.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OE1.patch.s rename to system/client-functions/HungryMagSound.3OE1.patch.s index b9508a91..a04f0204 100644 --- a/system/ppc/HungryMagSound.3OE1.patch.s +++ b/system/client-functions/HungryMagSound.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/HungryMagSound.3OE2.patch.s b/system/client-functions/HungryMagSound.3OE2.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OE2.patch.s rename to system/client-functions/HungryMagSound.3OE2.patch.s index d0ae378a..0e373872 100644 --- a/system/ppc/HungryMagSound.3OE2.patch.s +++ b/system/client-functions/HungryMagSound.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/HungryMagSound.3OJ2.patch.s b/system/client-functions/HungryMagSound.3OJ2.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OJ2.patch.s rename to system/client-functions/HungryMagSound.3OJ2.patch.s index bfe614f3..9b4ff005 100644 --- a/system/ppc/HungryMagSound.3OJ2.patch.s +++ b/system/client-functions/HungryMagSound.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/HungryMagSound.3OJ3.patch.s b/system/client-functions/HungryMagSound.3OJ3.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OJ3.patch.s rename to system/client-functions/HungryMagSound.3OJ3.patch.s index 89a695af..19d32e00 100644 --- a/system/ppc/HungryMagSound.3OJ3.patch.s +++ b/system/client-functions/HungryMagSound.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/HungryMagSound.3OJ4.patch.s b/system/client-functions/HungryMagSound.3OJ4.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OJ4.patch.s rename to system/client-functions/HungryMagSound.3OJ4.patch.s index 735fa299..f280852e 100644 --- a/system/ppc/HungryMagSound.3OJ4.patch.s +++ b/system/client-functions/HungryMagSound.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/HungryMagSound.3OJ5.patch.s b/system/client-functions/HungryMagSound.3OJ5.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OJ5.patch.s rename to system/client-functions/HungryMagSound.3OJ5.patch.s index 9030287d..c762b99f 100644 --- a/system/ppc/HungryMagSound.3OJ5.patch.s +++ b/system/client-functions/HungryMagSound.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/HungryMagSound.3OP0.patch.s b/system/client-functions/HungryMagSound.3OP0.patch.s similarity index 97% rename from system/ppc/HungryMagSound.3OP0.patch.s rename to system/client-functions/HungryMagSound.3OP0.patch.s index 81c680d7..3197e5b7 100644 --- a/system/ppc/HungryMagSound.3OP0.patch.s +++ b/system/client-functions/HungryMagSound.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000BF30 (44 bytes) .data 0x8000BF30 # address .data 0x0000002C # size diff --git a/system/ppc/InvisibleMag.3OE0.patch.s b/system/client-functions/InvisibleMag.3OE0.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OE0.patch.s rename to system/client-functions/InvisibleMag.3OE0.patch.s index 19422702..43ee9d85 100644 --- a/system/ppc/InvisibleMag.3OE0.patch.s +++ b/system/client-functions/InvisibleMag.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801151A8 (4 bytes) .data 0x801151A8 # address .data 0x00000004 # size diff --git a/system/ppc/InvisibleMag.3OE1.patch.s b/system/client-functions/InvisibleMag.3OE1.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OE1.patch.s rename to system/client-functions/InvisibleMag.3OE1.patch.s index 19422702..43ee9d85 100644 --- a/system/ppc/InvisibleMag.3OE1.patch.s +++ b/system/client-functions/InvisibleMag.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801151A8 (4 bytes) .data 0x801151A8 # address .data 0x00000004 # size diff --git a/system/ppc/InvisibleMag.3OE2.patch.s b/system/client-functions/InvisibleMag.3OE2.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OE2.patch.s rename to system/client-functions/InvisibleMag.3OE2.patch.s index b377ecbf..df2a1bb9 100644 --- a/system/ppc/InvisibleMag.3OE2.patch.s +++ b/system/client-functions/InvisibleMag.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801150C0 (4 bytes) .data 0x801150C0 # address .data 0x00000004 # size diff --git a/system/ppc/InvisibleMag.3OJ2.patch.s b/system/client-functions/InvisibleMag.3OJ2.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OJ2.patch.s rename to system/client-functions/InvisibleMag.3OJ2.patch.s index 6ace7d8c..81aba4df 100644 --- a/system/ppc/InvisibleMag.3OJ2.patch.s +++ b/system/client-functions/InvisibleMag.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80114F04 (4 bytes) .data 0x80114F04 # address .data 0x00000004 # size diff --git a/system/ppc/InvisibleMag.3OJ3.patch.s b/system/client-functions/InvisibleMag.3OJ3.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OJ3.patch.s rename to system/client-functions/InvisibleMag.3OJ3.patch.s index 085c5ffc..b72ff321 100644 --- a/system/ppc/InvisibleMag.3OJ3.patch.s +++ b/system/client-functions/InvisibleMag.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80115118 (4 bytes) .data 0x80115118 # address .data 0x00000004 # size diff --git a/system/ppc/InvisibleMag.3OJ4.patch.s b/system/client-functions/InvisibleMag.3OJ4.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OJ4.patch.s rename to system/client-functions/InvisibleMag.3OJ4.patch.s index 6554fc93..d93be1e9 100644 --- a/system/ppc/InvisibleMag.3OJ4.patch.s +++ b/system/client-functions/InvisibleMag.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8011521C (4 bytes) .data 0x8011521C # address .data 0x00000004 # size diff --git a/system/ppc/InvisibleMag.3OJ5.patch.s b/system/client-functions/InvisibleMag.3OJ5.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OJ5.patch.s rename to system/client-functions/InvisibleMag.3OJ5.patch.s index f0f74c3a..72ecbbaa 100644 --- a/system/ppc/InvisibleMag.3OJ5.patch.s +++ b/system/client-functions/InvisibleMag.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801150B0 (4 bytes) .data 0x801150B0 # address .data 0x00000004 # size diff --git a/system/ppc/InvisibleMag.3OP0.patch.s b/system/client-functions/InvisibleMag.3OP0.patch.s similarity index 93% rename from system/ppc/InvisibleMag.3OP0.patch.s rename to system/client-functions/InvisibleMag.3OP0.patch.s index 5e1ed2c3..547c30da 100644 --- a/system/ppc/InvisibleMag.3OP0.patch.s +++ b/system/client-functions/InvisibleMag.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 80115298 (4 bytes) .data 0x80115298 # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OE0.patch.s b/system/client-functions/ItemLossPrevention.3OE0.patch.s similarity index 97% rename from system/ppc/ItemLossPrevention.3OE0.patch.s rename to system/client-functions/ItemLossPrevention.3OE0.patch.s index e44a17e0..c834d4ee 100644 --- a/system/ppc/ItemLossPrevention.3OE0.patch.s +++ b/system/client-functions/ItemLossPrevention.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D381C (4 bytes) .data 0x801D381C # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OE1.patch.s b/system/client-functions/ItemLossPrevention.3OE1.patch.s similarity index 97% rename from system/ppc/ItemLossPrevention.3OE1.patch.s rename to system/client-functions/ItemLossPrevention.3OE1.patch.s index 9eb69254..e3b46463 100644 --- a/system/ppc/ItemLossPrevention.3OE1.patch.s +++ b/system/client-functions/ItemLossPrevention.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D381C (4 bytes) .data 0x801D381C # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OE2.patch.s b/system/client-functions/ItemLossPrevention.3OE2.patch.s similarity index 97% rename from system/ppc/ItemLossPrevention.3OE2.patch.s rename to system/client-functions/ItemLossPrevention.3OE2.patch.s index 437d7699..ddab60d8 100644 --- a/system/ppc/ItemLossPrevention.3OE2.patch.s +++ b/system/client-functions/ItemLossPrevention.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D3A1C (4 bytes) .data 0x801D3A1C # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OJ2.patch.s b/system/client-functions/ItemLossPrevention.3OJ2.patch.s similarity index 96% rename from system/ppc/ItemLossPrevention.3OJ2.patch.s rename to system/client-functions/ItemLossPrevention.3OJ2.patch.s index 97ec2f91..19bfc223 100644 --- a/system/ppc/ItemLossPrevention.3OJ2.patch.s +++ b/system/client-functions/ItemLossPrevention.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D33E4 (4 bytes) .data 0x801D33E4 # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OJ3.patch.s b/system/client-functions/ItemLossPrevention.3OJ3.patch.s similarity index 96% rename from system/ppc/ItemLossPrevention.3OJ3.patch.s rename to system/client-functions/ItemLossPrevention.3OJ3.patch.s index d7abda43..d9d5a861 100644 --- a/system/ppc/ItemLossPrevention.3OJ3.patch.s +++ b/system/client-functions/ItemLossPrevention.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D38EC (4 bytes) .data 0x801D38EC # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OJ4.patch.s b/system/client-functions/ItemLossPrevention.3OJ4.patch.s similarity index 97% rename from system/ppc/ItemLossPrevention.3OJ4.patch.s rename to system/client-functions/ItemLossPrevention.3OJ4.patch.s index 9aa384f8..418e3bfc 100644 --- a/system/ppc/ItemLossPrevention.3OJ4.patch.s +++ b/system/client-functions/ItemLossPrevention.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D3CC4 (4 bytes) .data 0x801D3CC4 # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OJ5.patch.s b/system/client-functions/ItemLossPrevention.3OJ5.patch.s similarity index 97% rename from system/ppc/ItemLossPrevention.3OJ5.patch.s rename to system/client-functions/ItemLossPrevention.3OJ5.patch.s index 18a4d750..8e2a7d9b 100644 --- a/system/ppc/ItemLossPrevention.3OJ5.patch.s +++ b/system/client-functions/ItemLossPrevention.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D39B8 (4 bytes) .data 0x801D39B8 # address .data 0x00000004 # size diff --git a/system/ppc/ItemLossPrevention.3OP0.patch.s b/system/client-functions/ItemLossPrevention.3OP0.patch.s similarity index 97% rename from system/ppc/ItemLossPrevention.3OP0.patch.s rename to system/client-functions/ItemLossPrevention.3OP0.patch.s index 7a95a99f..2d3d6373 100644 --- a/system/ppc/ItemLossPrevention.3OP0.patch.s +++ b/system/client-functions/ItemLossPrevention.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D3ED8 (4 bytes) .data 0x801D3ED8 # address .data 0x00000004 # size diff --git a/system/client-functions/ItemLossPrevention.4OED.patch.s b/system/client-functions/ItemLossPrevention.4OED.patch.s new file mode 100644 index 00000000..ccfc0a7c --- /dev/null +++ b/system/client-functions/ItemLossPrevention.4OED.patch.s @@ -0,0 +1,66 @@ + +.meta name="No item loss" +.meta description="Don't lose items if\nyou don't log off\nnormally" +# Original code by Ralf @ GC-Forever; Xbox port by fuzziqersoftware + +entry_ptr: +reloc0: + .offsetof start +start: + .include WriteCodeBlocksXB + .data 0x000D1B85 + .data 0x00000001 + .binary 00 + .data 0x000D1BFC + .data 0x00000002 + .binary EB08 + .data 0x0020E805 + .data 0x00000001 + .binary EB + .data 0x002119CA + .data 0x00000002 + .binary EB74 + .data 0x002291B5 + .data 0x00000002 + .binary 9090 + .data 0x00229237 + .data 0x00000002 + .binary EB08 + .data 0x0022A222 + .data 0x00000002 + .binary 9090 + .data 0x0022A29B + .data 0x00000002 + .binary EB08 + .data 0x0022BF35 + .data 0x00000001 + .binary 00 + .data 0x0022BF6E + .data 0x00000002 + .binary EB08 + .data 0x0022C2E6 + .data 0x00000001 + .binary 00 + .data 0x002418E8 + .data 0x00000001 + .binary 00 + .data 0x0024195C + .data 0x00000002 + .binary EB08 + .data 0x002A2904 + .data 0x00000001 + .binary 00 + .data 0x002A297C + .data 0x00000002 + .binary EB08 + .data 0x002D677A + .data 0x00000001 + .binary 00 + .data 0x002D67ED + .data 0x00000002 + .binary EB08 + .data 0x002F0E1E + .data 0x00000001 + .binary EB + .data 0x00000000 + .data 0x00000000 diff --git a/system/client-functions/ItemLossPrevention.4OEU.patch.s b/system/client-functions/ItemLossPrevention.4OEU.patch.s new file mode 100644 index 00000000..3c61fdb9 --- /dev/null +++ b/system/client-functions/ItemLossPrevention.4OEU.patch.s @@ -0,0 +1,63 @@ + +.meta name="No item loss" +.meta description="Don't lose items if\nyou don't log off\nnormally" +# Original code by Ralf @ GC-Forever; Xbox port by fuzziqersoftware + +entry_ptr: +reloc0: + .offsetof start +start: + .include WriteCodeBlocksXB + .data 0x000D1BD5 + .data 0x00000001 + .binary 00 + .data 0x000D1C4C + .data 0x00000002 + .binary EB08 + .data 0x0020E805 + .data 0x00000001 + .binary EB + .data 0x00211A2A + .data 0x00000002 + .binary EB74 + .data 0x00229255 + .data 0x00000002 + .binary 9090 + .data 0x002292D7 + .data 0x00000002 + .binary EB08 + .data 0x0022A2C2 + .data 0x00000002 + .binary 9090 + .data 0x0022A33B + .data 0x00000002 + .binary EB08 + .data 0x0022BFD5 + .data 0x00000001 + .binary 00 + .data 0x0022C00E + .data 0x00000002 + .binary EB08 + .data 0x0022C386 + .data 0x00000001 + .binary 00 + .data 0x00241A78 + .data 0x00000001 + .binary 00 + .data 0x00241AEC + .data 0x00000002 + .binary EB08 + .data 0x002A2BAC + .data 0x00000002 + .binary EB08 + .data 0x002D6C8A + .data 0x00000001 + .binary 00 + .data 0x002D6CFD + .data 0x00000002 + .binary EB08 + .data 0x002F0FCE + .data 0x00000001 + .binary EB + .data 0x00000000 + .data 0x00000000 diff --git a/system/ppc/Movement.3OE0.patch.s b/system/client-functions/Movement.3OE0.patch.s similarity index 95% rename from system/ppc/Movement.3OE0.patch.s rename to system/client-functions/Movement.3OE0.patch.s index 439f3a79..82f514c3 100644 --- a/system/ppc/Movement.3OE0.patch.s +++ b/system/client-functions/Movement.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801CEBF0 (4 bytes) .data 0x801CEBF0 # address .data 0x00000004 # size diff --git a/system/ppc/Movement.3OE1.patch.s b/system/client-functions/Movement.3OE1.patch.s similarity index 95% rename from system/ppc/Movement.3OE1.patch.s rename to system/client-functions/Movement.3OE1.patch.s index 439f3a79..82f514c3 100644 --- a/system/ppc/Movement.3OE1.patch.s +++ b/system/client-functions/Movement.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801CEBF0 (4 bytes) .data 0x801CEBF0 # address .data 0x00000004 # size diff --git a/system/ppc/Movement.3OE2.patch.s b/system/client-functions/Movement.3OE2.patch.s similarity index 95% rename from system/ppc/Movement.3OE2.patch.s rename to system/client-functions/Movement.3OE2.patch.s index 3bd519e8..9d94ee5a 100644 --- a/system/ppc/Movement.3OE2.patch.s +++ b/system/client-functions/Movement.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801CEDF0 (4 bytes) .data 0x801CEDF0 # address .data 0x00000004 # size diff --git a/system/ppc/Movement.3OJ2.patch.s b/system/client-functions/Movement.3OJ2.patch.s similarity index 95% rename from system/ppc/Movement.3OJ2.patch.s rename to system/client-functions/Movement.3OJ2.patch.s index 9bb9ec03..d5d542df 100644 --- a/system/ppc/Movement.3OJ2.patch.s +++ b/system/client-functions/Movement.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801CE7AC (4 bytes) .data 0x801CE7AC # address .data 0x00000004 # size diff --git a/system/ppc/Movement.3OJ3.patch.s b/system/client-functions/Movement.3OJ3.patch.s similarity index 95% rename from system/ppc/Movement.3OJ3.patch.s rename to system/client-functions/Movement.3OJ3.patch.s index 4e4a262d..feb709f1 100644 --- a/system/ppc/Movement.3OJ3.patch.s +++ b/system/client-functions/Movement.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801CECC0 (4 bytes) .data 0x801CECC0 # address .data 0x00000004 # size diff --git a/system/ppc/Movement.3OJ4.patch.s b/system/client-functions/Movement.3OJ4.patch.s similarity index 95% rename from system/ppc/Movement.3OJ4.patch.s rename to system/client-functions/Movement.3OJ4.patch.s index 202cb8be..7078c0ad 100644 --- a/system/ppc/Movement.3OJ4.patch.s +++ b/system/client-functions/Movement.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801D0D10 (4 bytes) .data 0x801D0D10 # address .data 0x00000004 # size diff --git a/system/ppc/Movement.3OJ5.patch.s b/system/client-functions/Movement.3OJ5.patch.s similarity index 95% rename from system/ppc/Movement.3OJ5.patch.s rename to system/client-functions/Movement.3OJ5.patch.s index 5dd943e3..cbb04344 100644 --- a/system/ppc/Movement.3OJ5.patch.s +++ b/system/client-functions/Movement.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801CED8C (4 bytes) .data 0x801CED8C # address .data 0x00000004 # size diff --git a/system/ppc/Movement.3OP0.patch.s b/system/client-functions/Movement.3OP0.patch.s similarity index 95% rename from system/ppc/Movement.3OP0.patch.s rename to system/client-functions/Movement.3OP0.patch.s index a989083e..427ac78b 100644 --- a/system/ppc/Movement.3OP0.patch.s +++ b/system/client-functions/Movement.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 801CF2AC (4 bytes) .data 0x801CF2AC # address .data 0x00000004 # size diff --git a/system/ppc/PRSDecompress.inc.s b/system/client-functions/PRSDecompress.ppc.inc.s similarity index 100% rename from system/ppc/PRSDecompress.inc.s rename to system/client-functions/PRSDecompress.ppc.inc.s diff --git a/system/ppc/PSOXReticleColors.3OE0.patch.s b/system/client-functions/PSOXReticleColors.3OE0.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OE0.patch.s rename to system/client-functions/PSOXReticleColors.3OE0.patch.s index ad1a3e9d..affaa3bb 100644 --- a/system/ppc/PSOXReticleColors.3OE0.patch.s +++ b/system/client-functions/PSOXReticleColors.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802ABDE0 (4 bytes) .data 0x802ABDE0 # address .data 0x00000004 # size diff --git a/system/ppc/PSOXReticleColors.3OE1.patch.s b/system/client-functions/PSOXReticleColors.3OE1.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OE1.patch.s rename to system/client-functions/PSOXReticleColors.3OE1.patch.s index f6f100b7..69bb5463 100644 --- a/system/ppc/PSOXReticleColors.3OE1.patch.s +++ b/system/client-functions/PSOXReticleColors.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802ABE24 (4 bytes) .data 0x802ABE24 # address .data 0x00000004 # size diff --git a/system/ppc/PSOXReticleColors.3OE2.patch.s b/system/client-functions/PSOXReticleColors.3OE2.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OE2.patch.s rename to system/client-functions/PSOXReticleColors.3OE2.patch.s index 715b2f1b..6dc526d7 100644 --- a/system/ppc/PSOXReticleColors.3OE2.patch.s +++ b/system/client-functions/PSOXReticleColors.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AD360 (4 bytes) .data 0x802AD360 # address .data 0x00000004 # size diff --git a/system/ppc/PSOXReticleColors.3OJ2.patch.s b/system/client-functions/PSOXReticleColors.3OJ2.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OJ2.patch.s rename to system/client-functions/PSOXReticleColors.3OJ2.patch.s index e48a5724..307717d9 100644 --- a/system/ppc/PSOXReticleColors.3OJ2.patch.s +++ b/system/client-functions/PSOXReticleColors.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AB424 (4 bytes) .data 0x802AB424 # address .data 0x00000004 # size diff --git a/system/ppc/PSOXReticleColors.3OJ3.patch.s b/system/client-functions/PSOXReticleColors.3OJ3.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OJ3.patch.s rename to system/client-functions/PSOXReticleColors.3OJ3.patch.s index c4c3fd1e..0fdff016 100644 --- a/system/ppc/PSOXReticleColors.3OJ3.patch.s +++ b/system/client-functions/PSOXReticleColors.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AC2CC (4 bytes) .data 0x802AC2CC # address .data 0x00000004 # size diff --git a/system/ppc/PSOXReticleColors.3OJ4.patch.s b/system/client-functions/PSOXReticleColors.3OJ4.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OJ4.patch.s rename to system/client-functions/PSOXReticleColors.3OJ4.patch.s index 03df3e34..38dee382 100644 --- a/system/ppc/PSOXReticleColors.3OJ4.patch.s +++ b/system/client-functions/PSOXReticleColors.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AD3F8 (4 bytes) .data 0x802AD3F8 # address .data 0x00000004 # size diff --git a/system/ppc/PSOXReticleColors.3OJ5.patch.s b/system/client-functions/PSOXReticleColors.3OJ5.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OJ5.patch.s rename to system/client-functions/PSOXReticleColors.3OJ5.patch.s index c5738274..552ed128 100644 --- a/system/ppc/PSOXReticleColors.3OJ5.patch.s +++ b/system/client-functions/PSOXReticleColors.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802AD1AC (4 bytes) .data 0x802AD1AC # address .data 0x00000004 # size diff --git a/system/ppc/PSOXReticleColors.3OP0.patch.s b/system/client-functions/PSOXReticleColors.3OP0.patch.s similarity index 95% rename from system/ppc/PSOXReticleColors.3OP0.patch.s rename to system/client-functions/PSOXReticleColors.3OP0.patch.s index ef3eaf19..802302c4 100644 --- a/system/ppc/PSOXReticleColors.3OP0.patch.s +++ b/system/client-functions/PSOXReticleColors.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 802ACAF4 (4 bytes) .data 0x802ACAF4 # address .data 0x00000004 # size diff --git a/system/ppc/Palette.3OE0.patch.s b/system/client-functions/Palette.3OE0.patch.s similarity index 99% rename from system/ppc/Palette.3OE0.patch.s rename to system/client-functions/Palette.3OE0.patch.s index e828e87e..9c05a587 100644 --- a/system/ppc/Palette.3OE0.patch.s +++ b/system/client-functions/Palette.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/Palette.3OE1.patch.s b/system/client-functions/Palette.3OE1.patch.s similarity index 99% rename from system/ppc/Palette.3OE1.patch.s rename to system/client-functions/Palette.3OE1.patch.s index b6bc3de2..95199909 100644 --- a/system/ppc/Palette.3OE1.patch.s +++ b/system/client-functions/Palette.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/Palette.3OE2.patch.s b/system/client-functions/Palette.3OE2.patch.s similarity index 99% rename from system/ppc/Palette.3OE2.patch.s rename to system/client-functions/Palette.3OE2.patch.s index cb0265e1..452483f2 100644 --- a/system/ppc/Palette.3OE2.patch.s +++ b/system/client-functions/Palette.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/Palette.3OJ2.patch.s b/system/client-functions/Palette.3OJ2.patch.s similarity index 99% rename from system/ppc/Palette.3OJ2.patch.s rename to system/client-functions/Palette.3OJ2.patch.s index 74275ebc..d2e6a5a1 100644 --- a/system/ppc/Palette.3OJ2.patch.s +++ b/system/client-functions/Palette.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/Palette.3OJ3.patch.s b/system/client-functions/Palette.3OJ3.patch.s similarity index 99% rename from system/ppc/Palette.3OJ3.patch.s rename to system/client-functions/Palette.3OJ3.patch.s index 86766b20..7e1d04a0 100644 --- a/system/ppc/Palette.3OJ3.patch.s +++ b/system/client-functions/Palette.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/Palette.3OJ4.patch.s b/system/client-functions/Palette.3OJ4.patch.s similarity index 99% rename from system/ppc/Palette.3OJ4.patch.s rename to system/client-functions/Palette.3OJ4.patch.s index ec35d516..068a6ce6 100644 --- a/system/ppc/Palette.3OJ4.patch.s +++ b/system/client-functions/Palette.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/Palette.3OJ5.patch.s b/system/client-functions/Palette.3OJ5.patch.s similarity index 99% rename from system/ppc/Palette.3OJ5.patch.s rename to system/client-functions/Palette.3OJ5.patch.s index 86ac5dcd..86de70fb 100644 --- a/system/ppc/Palette.3OJ5.patch.s +++ b/system/client-functions/Palette.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/Palette.3OP0.patch.s b/system/client-functions/Palette.3OP0.patch.s similarity index 99% rename from system/ppc/Palette.3OP0.patch.s rename to system/client-functions/Palette.3OP0.patch.s index 73e66dbc..6ae5a5e9 100644 --- a/system/ppc/Palette.3OP0.patch.s +++ b/system/client-functions/Palette.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000B958 (136 bytes) .data 0x8000B958 # address .data 0x00000088 # size diff --git a/system/ppc/RareDropNotifications.3OE0.patch.s b/system/client-functions/RareDropNotifications.3OE0.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OE0.patch.s rename to system/client-functions/RareDropNotifications.3OE0.patch.s index 7b1f8f4f..5bd76f08 100644 --- a/system/ppc/RareDropNotifications.3OE0.patch.s +++ b/system/client-functions/RareDropNotifications.3OE0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/RareDropNotifications.3OE1.patch.s b/system/client-functions/RareDropNotifications.3OE1.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OE1.patch.s rename to system/client-functions/RareDropNotifications.3OE1.patch.s index 7b1f8f4f..5bd76f08 100644 --- a/system/ppc/RareDropNotifications.3OE1.patch.s +++ b/system/client-functions/RareDropNotifications.3OE1.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/RareDropNotifications.3OE2.patch.s b/system/client-functions/RareDropNotifications.3OE2.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OE2.patch.s rename to system/client-functions/RareDropNotifications.3OE2.patch.s index 904c13f6..f16f459a 100644 --- a/system/ppc/RareDropNotifications.3OE2.patch.s +++ b/system/client-functions/RareDropNotifications.3OE2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/RareDropNotifications.3OJ2.patch.s b/system/client-functions/RareDropNotifications.3OJ2.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OJ2.patch.s rename to system/client-functions/RareDropNotifications.3OJ2.patch.s index 9e29740e..ab6ca7fd 100644 --- a/system/ppc/RareDropNotifications.3OJ2.patch.s +++ b/system/client-functions/RareDropNotifications.3OJ2.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/RareDropNotifications.3OJ3.patch.s b/system/client-functions/RareDropNotifications.3OJ3.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OJ3.patch.s rename to system/client-functions/RareDropNotifications.3OJ3.patch.s index 7e78a48c..d083c802 100644 --- a/system/ppc/RareDropNotifications.3OJ3.patch.s +++ b/system/client-functions/RareDropNotifications.3OJ3.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/RareDropNotifications.3OJ4.patch.s b/system/client-functions/RareDropNotifications.3OJ4.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OJ4.patch.s rename to system/client-functions/RareDropNotifications.3OJ4.patch.s index 978239f0..af17e99a 100644 --- a/system/ppc/RareDropNotifications.3OJ4.patch.s +++ b/system/client-functions/RareDropNotifications.3OJ4.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/RareDropNotifications.3OJ5.patch.s b/system/client-functions/RareDropNotifications.3OJ5.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OJ5.patch.s rename to system/client-functions/RareDropNotifications.3OJ5.patch.s index 3118b83e..59f8cb8c 100644 --- a/system/ppc/RareDropNotifications.3OJ5.patch.s +++ b/system/client-functions/RareDropNotifications.3OJ5.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/RareDropNotifications.3OP0.patch.s b/system/client-functions/RareDropNotifications.3OP0.patch.s similarity index 98% rename from system/ppc/RareDropNotifications.3OP0.patch.s rename to system/client-functions/RareDropNotifications.3OP0.patch.s index c4f939f2..d7d8f1c7 100644 --- a/system/ppc/RareDropNotifications.3OP0.patch.s +++ b/system/client-functions/RareDropNotifications.3OP0.patch.s @@ -6,7 +6,7 @@ entry_ptr: reloc0: .offsetof start start: - .include WriteCodeBlocks + .include WriteCodeBlocksGC # region @ 8000C660 (40 bytes) .data 0x8000C660 # address .data 0x00000028 # size diff --git a/system/ppc/ReadMemoryWord.s b/system/client-functions/ReadMemoryWord.ppc.s similarity index 100% rename from system/ppc/ReadMemoryWord.s rename to system/client-functions/ReadMemoryWord.ppc.s diff --git a/system/ppc/RunDOL.s b/system/client-functions/RunDOL.ppc.s similarity index 100% rename from system/ppc/RunDOL.s rename to system/client-functions/RunDOL.ppc.s diff --git a/system/ppc/VIPCard.3SE0.patch.s b/system/client-functions/VIPCard.3SE0.patch.s similarity index 100% rename from system/ppc/VIPCard.3SE0.patch.s rename to system/client-functions/VIPCard.3SE0.patch.s diff --git a/system/ppc/VersionDetect.s b/system/client-functions/VersionDetectGC.ppc.s similarity index 98% rename from system/ppc/VersionDetect.s rename to system/client-functions/VersionDetectGC.ppc.s index 986c1dd2..c09b51b8 100644 --- a/system/ppc/VersionDetect.s +++ b/system/client-functions/VersionDetectGC.ppc.s @@ -11,8 +11,6 @@ # of the above information. This value is called specific_version in the places # where it's used by the server. -.meta index=E3 - entry_ptr: reloc0: .offsetof start diff --git a/system/client-functions/VersionDetectWithPatchFunctionsXB.x86.inc.s b/system/client-functions/VersionDetectWithPatchFunctionsXB.x86.inc.s new file mode 100644 index 00000000..5af1cb65 --- /dev/null +++ b/system/client-functions/VersionDetectWithPatchFunctionsXB.x86.inc.s @@ -0,0 +1,54 @@ +# Returns the client specific_version in eax and the address of the +# MmSetAddressProtect function pointer in ecx, which is immediately followed by +# the MmQueryAddressProtect function pointer. + +start: + mov ecx, 0x61657244 + + # JP beta + mov eax, 0x344F4A42 + mov edx, 0x00400578 + cmp [0x0043D460], ecx + je done + + # JP disc + mov eax, 0x344F4A44 + mov edx, 0x00400918 + cmp [0x0043D7D0], ecx + je done + + # JP title update + mov eax, 0x344F4A55 + mov edx, 0x00403E3C + cmp [0x00440FE0], ecx + je done + + # US disc + mov eax, 0x344F4544 + mov edx, 0x00404518 + cmp [0x0044174C], ecx + je done + + # US title update + mov eax, 0x344F4555 + mov edx, 0x00403E3C + cmp [0x00440FEC], ecx + je done + + # EU disc + mov eax, 0x344F5044 + mov edx, 0x00404538 + cmp [0x00441768], ecx + je done + + # EU title update + mov eax, 0x344F5055 + mov edx, 0x0040491C + cmp [0x00441AF8], ecx + je done + + # Unknown version + mov eax, 0x344F0000 + xor edx, edx + +done: diff --git a/system/client-functions/VersionDetectXB.x86.s b/system/client-functions/VersionDetectXB.x86.s new file mode 100644 index 00000000..a4d75216 --- /dev/null +++ b/system/client-functions/VersionDetectXB.x86.s @@ -0,0 +1,18 @@ +# This function returns the game version, with values more specific than can be +# detected by the sub_version field in the various login commands (e.g. 9D/9E). + +# The returned value has the format SSSSRRVV, where: +# S = 344F (which represents PSO Xbox) +# R = region (45 (E), 4A (J), or 50 (P)) +# V = version (42 (B) for beta, 44 (D) for disc, 55 (U) for title update) +# This results in a 4-character ASCII-printable version code which encodes all +# of the above information. This value is called specific_version in the places +# where it's used by the server. + +entry_ptr: +reloc0: + .offsetof start + +start: + .include VersionDetectWithPatchFunctionsXB + ret diff --git a/system/ppc/WriteCodeBlocks.inc.s b/system/client-functions/WriteCodeBlocksGC.ppc.inc.s similarity index 100% rename from system/ppc/WriteCodeBlocks.inc.s rename to system/client-functions/WriteCodeBlocksGC.ppc.inc.s diff --git a/system/client-functions/WriteCodeBlocksXB.x86.inc.s b/system/client-functions/WriteCodeBlocksXB.x86.inc.s new file mode 100644 index 00000000..c6ab123e --- /dev/null +++ b/system/client-functions/WriteCodeBlocksXB.x86.inc.s @@ -0,0 +1,56 @@ +start: + .include VersionDetectWithPatchFunctionsXB + + xor eax, eax + cmp edx, 0 + jne can_patch + ret +can_patch: + + push esi + push edi + push ebx + mov edi, edx # edi = ptr to useful kernel function ptrs + jmp get_patch_data_ptr +get_patch_data_ptr_ret: + pop ebx # ebx = patch header + +apply_next_patch: + cmp dword [ebx + 4], 0 + jne copy_code_and_apply_again + pop ebx + pop edi + pop esi + mov eax, 1 + ret + +copy_code_and_apply_again: + push dword [ebx] # dest addr + call [edi + 4] # MmQueryAddressProtect + mov esi, eax # esi = prev protection flags + + push 4 # new protection flags + push dword [ebx + 4] # size + push dword [ebx] # base address + call [edi] # MmSetAddressProtect + + xor ecx, ecx # ecx = offset + mov edx, [ebx] # edx = dest addr +copy_next_byte: + mov al, [ebx + ecx + 8] # copy one byte to dest + mov [edx + ecx], al + inc ecx # offset++ + cmp [ebx + 4], ecx # check if all bytes have been copied + jne copy_next_byte + + push esi # new protection flags + push dword [ebx + 4] # size + push dword [ebx] # base address + lea ebx, [ebx + ecx + 8] # advance to next block + call [edi] # MmSetAddressProtect + jmp apply_next_patch + +get_patch_data_ptr: + call get_patch_data_ptr_ret + +first_patch_header: diff --git a/system/ppc/WriteMemory.s b/system/client-functions/WriteMemory.ppc.s similarity index 90% rename from system/ppc/WriteMemory.s rename to system/client-functions/WriteMemory.ppc.s index 3d13bde0..0d18f667 100644 --- a/system/ppc/WriteMemory.s +++ b/system/client-functions/WriteMemory.ppc.s @@ -15,15 +15,16 @@ # be made available in the Patches menu or via the $patch command. Patches # should be named like PATCHNAME.VXLS.patch.s, where V, X, L, and S denote which # specific game version the patch is for. Specifically: -# V should be 3 for PSO GameCube -# X should be O for Episodes 1 & 2, and S for Episode 3 +# V should be 3 for PSO GameCube, 4 for PSO Xbox, 5 for PSO BB +# X should be O for GC Episodes 1 & 2, S for GC Episode 3, 0 for Xbox # L should be E, J, or P for USA, Japanese, or Europe -# S should be 0, 1, 2, etc. for the disc version (0 = v1.00, 1 = v1.01, etc.) +# S should be 0, 1, 2, etc. for the GC disc version (0 = 1.00, 1 = 1.01, etc.) +# On Xbox, S is B (beta), D (disc), or U (title update) # (For the curious, these four-character version codes directly match the -# values returned by the VersionDetect function - see VersionDetect.s.) For -# example, the patch that gives the player a VIP card in Episode 3 USA is in -# the file VIPCard.3SE0.patch.s. (If there were a Japanese version of that -# patch, it would be in VIPCard.3SJ0.patch.s.) +# values returned by the VersionDetectGC or VersionDetectXB functions; see +# those files for more details.) For example, the patch that gives the player a +# VIP card in Episode 3 USA is in the file VIPCard.3SE0.patch.s. (If there were +# a Japanese version of that patch, it would be in VIPCard.3SJ0.patch.s.) # For example, to use this function to write the bytes 38 00 00 05 to the # address 8010521C, send_function_call could be called like this: diff --git a/tests/XB-ForestGame.test.txt b/tests/XB-ForestGame.test.txt index ff6f8c63..762764c3 100644 --- a/tests/XB-ForestGame.test.txt +++ b/tests/XB-ForestGame.test.txt @@ -52,7 +52,7 @@ I 16496 2023-11-08 01:54:08 - [Commands] Received from C-1 (version=XB command=9 0020 | 00 00 00 00 | I 16496 2023-11-08 01:54:08 - [Commands] Sending to C-1 (version=XB command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 E2 D4 45 39 32 AC 99 83 | , E92 -0010 | 00 00 00 00 00 81 00 40 20 00 00 00 00 00 00 00 | 4 B` +0010 | 00 00 4F 34 00 81 00 40 20 00 00 00 00 00 00 00 | 4 B` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 16496 2023-11-08 01:54:08 - [Commands] Sending to C-1 (version=XB command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -62,7 +62,7 @@ I 16496 2023-11-08 01:54:09 - [Commands] Received from C-1 (version=XB command=9 0000 | 96 00 0C 00 7C 9C DA 2C 62 00 00 00 | | ,b I 16496 2023-11-08 01:54:09 - [Commands] Sending to C-1 (version=XB command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 E2 D4 45 39 32 AC 99 83 | , E92 -0010 | 00 00 00 00 00 81 00 40 20 00 04 00 00 00 00 00 | 4 @` +0010 | 00 00 4F 34 00 81 00 40 20 00 04 00 00 00 00 00 | 4 @` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 16496 2023-11-08 01:54:09 - [Commands] Sending to C-1 (version=XB command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 31 31 3A 30 38 3A 20 | 2023:11:08: @@ -87,7 +87,7 @@ I 16496 2023-11-08 01:54:15 - [Commands] Sending to C-1 (version=XB command=97 f 0000 | 97 01 04 00 | I 16496 2023-11-08 01:54:15 - [Commands] Sending to C-1 (version=XB command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 E2 D4 45 39 32 AC 99 83 | , E92 -0010 | 00 00 00 00 00 81 00 44 20 00 00 00 00 00 00 00 | 4 D` +0010 | 00 00 4F 34 00 81 00 44 20 00 00 00 00 00 00 00 | 4 D` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 16496 2023-11-08 01:54:16 - [Commands] Received from C-1 (version=XB command=B1 flag=00) 0000 | B1 00 04 00 | @@ -149,12 +149,12 @@ I 16496 2023-11-08 01:54:17 - [Commands] Received from C-2 (version=XB command=9 I 16496 2023-11-08 01:54:17 - [Commands] Sending to C-2 (version=XB command=9F flag=00) 0000 | 9F 00 04 00 | I 16496 2023-11-08 01:54:18 - [Commands] Received from C-2 (version=XB command=9F flag=00) -0000 | 9F 00 24 00 32 AC 99 83 00 00 00 00 00 81 00 44 | $ 2 4 D +0000 | 9F 00 24 00 32 AC 99 83 00 00 4F 34 00 81 00 44 | $ 2 4 D 0010 | 20 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF | ` 0020 | 80 FF FF FF | I 16496 2023-11-08 01:54:18 - [Commands] Sending to C-2 (version=XB command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 E2 D4 45 39 32 AC 99 83 | , E92 -0010 | 00 00 00 00 00 81 00 44 20 00 00 00 00 00 00 00 | 4 D` +0010 | 00 00 4F 34 00 81 00 44 20 00 00 00 00 00 00 00 | 4 D` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 16496 2023-11-08 01:54:18 - [Commands] Sending to C-2 (version=XB command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 @@ -371,7 +371,7 @@ I 16496 2023-11-08 01:54:18 - [Commands] Sending to C-2 (Tali) (version=XB comma 0480 | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF | I 16496 2023-11-08 01:54:18 - [Commands] Sending to C-2 (Tali) (version=XB command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 E2 D4 45 39 32 AC 99 83 | , E92 -0010 | 00 00 00 00 00 83 00 44 20 00 00 00 00 00 00 00 | 4 D` +0010 | 00 00 4F 34 00 83 00 44 20 00 00 00 00 00 00 00 | 4 D` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 16496 2023-11-08 01:54:19 - [Commands] Received from C-2 (Tali) (version=XB command=60 flag=00) 0000 | 60 00 1C 00 3F 06 00 00 00 00 00 80 0F 00 FF FF | ` ?