diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index 65b9b44c..d2b165d8 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -1538,7 +1538,7 @@ static void server_command_loadchar(shared_ptr c, const std::string& arg (c->version() == Version::XB_V3)) { // TODO: Support extended player info on other versions auto s = c->require_server_state(); - if (c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL) || + if (!c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL) || c->config.check_flag(Client::Flag::SEND_FUNCTION_CALL_CHECKSUM_ONLY)) { send_text_message_printf(c, "Can\'t load character\ndata on this game\nversion"); return; diff --git a/src/Client.cc b/src/Client.cc index 5b233812..30fb4557 100644 --- a/src/Client.cc +++ b/src/Client.cc @@ -37,36 +37,47 @@ void Client::Config::set_flags_for_version(Version version, int64_t sub_version) switch (sub_version) { case -1: // Initial check (before sub_version recognition) + // Note: BB does not appear here because we always get its sub_version in + // the very first command; there is no way to get here for a BB client + // before we know the client's sub_version. switch (version) { case Version::PC_PATCH: case Version::BB_PATCH: this->set_flag(Flag::NO_D6); - this->set_flag(Flag::NO_SEND_FUNCTION_CALL); break; case Version::DC_NTE: case Version::DC_V1_11_2000_PROTOTYPE: case Version::DC_V1: this->set_flag(Flag::NO_D6); - this->set_flag(Flag::NO_SEND_FUNCTION_CALL); break; case Version::DC_V2: this->set_flag(Flag::NO_D6); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); break; case Version::PC_NTE: case Version::PC_V2: this->set_flag(Flag::NO_D6); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_CHECKSUM_ONLY); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); break; case Version::GC_NTE: - case Version::GC_V3: + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); + break; case Version::GC_EP3_NTE: + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); + this->set_flag(Flag::ENCRYPTED_SEND_FUNCTION_CALL); + break; + case Version::GC_V3: case Version::GC_EP3: + // Some of these versions have send_function_call and some don't; we + // have to set these flags later when we get sub_version break; case Version::XB_V3: // TODO: Do all versions of XB need this flag? US does, at least. this->set_flag(Flag::NO_D6_AFTER_LOBBY); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); break; default: @@ -77,35 +88,38 @@ void Client::Config::set_flags_for_version(Version version, int64_t sub_version) case 0x20: // DCNTE, possibly also DCv1 JP case 0x21: // DCv1 US this->set_flag(Flag::NO_D6); - this->set_flag(Flag::NO_SEND_FUNCTION_CALL); break; case 0x22: // DCv1 EU 50Hz (presumably) case 0x23: // DCv1 EU 60Hz (presumably) this->set_flag(Flag::NO_D6); - this->set_flag(Flag::NO_SEND_FUNCTION_CALL); break; case 0x25: // DCv2 JP case 0x26: // DCv2 US case 0x27: // DCv2 EU 50Hz (presumably) case 0x28: // DCv2 EU 60Hz (presumably) this->set_flag(Flag::NO_D6); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); break; case 0x29: // PC this->set_flag(Flag::NO_D6); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_CHECKSUM_ONLY); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); break; case 0x30: // GC Ep1&2 GameJam demo, GC Ep1&2 Trial Edition, GC Ep1&2 JP v1.2, at least one version of XB case 0x31: // GC Ep1&2 US v1.0, GC US v1.1, XB US + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); break; case 0x32: // GC Ep1&2 EU 50Hz case 0x33: // GC Ep1&2 EU 60Hz case 0x34: // GC Ep1&2 JP v1.3 this->set_flag(Flag::NO_D6_AFTER_LOBBY); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); break; case 0x35: // GC Ep1&2 JP v1.4 (Plus) this->set_flag(Flag::NO_D6_AFTER_LOBBY); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); this->set_flag(Flag::ENCRYPTED_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); break; @@ -113,12 +127,14 @@ void Client::Config::set_flags_for_version(Version version, int64_t sub_version) this->set_flag(Flag::IS_CLIENT_CUSTOMIZATION); [[fallthrough]]; case 0x36: // GC Ep1&2 US v1.2 (Plus) + this->set_flag(Flag::CAN_RECEIVE_ENABLE_B2_QUEST); + [[fallthrough]]; case 0x39: // GC Ep1&2 JP v1.5 (Plus) this->set_flag(Flag::NO_D6_AFTER_LOBBY); - this->set_flag(Flag::NO_SEND_FUNCTION_CALL); break; case 0x40: // GC Ep3 JP and Trial Edition (and BB) this->set_flag(Flag::NO_D6_AFTER_LOBBY); + this->set_flag(Flag::HAS_SEND_FUNCTION_CALL); this->set_flag(Flag::ENCRYPTED_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); // sub_version can't be used to tell JP final and Trial Edition apart; we @@ -132,7 +148,6 @@ void Client::Config::set_flags_for_version(Version version, int64_t sub_version) case 0x42: // GC Ep3 EU 50Hz case 0x43: // GC Ep3 EU 60Hz this->set_flag(Flag::NO_D6_AFTER_LOBBY); - this->set_flag(Flag::NO_SEND_FUNCTION_CALL); break; default: throw runtime_error(string_printf("unknown sub_version %" PRIX64, sub_version)); diff --git a/src/Client.hh b/src/Client.hh index e9df1cff..36fe30f5 100644 --- a/src/Client.hh +++ b/src/Client.hh @@ -35,7 +35,7 @@ public: // TODO: It'd be nice to use a pattern here (e.g. all server-side flags are // in the high bits) but that would require re-recording or manually // rewriting all the tests - CLIENT_SIDE_MASK = 0xFF3CFFFF7C0FFFFB, + CLIENT_SIDE_MASK = 0xFF3CFFFF7C0BFFFB, // Version-related flags CHECKED_FOR_DC_V1_PROTOTYPE = 0x0000000000000002, @@ -44,11 +44,13 @@ public: FORCE_ENGLISH_LANGUAGE_BB = 0x0000000000000400, // Flags describing the behavior for send_function_call - NO_SEND_FUNCTION_CALL = 0x0000000000001000, + HAS_SEND_FUNCTION_CALL = 0x0000000000001000, ENCRYPTED_SEND_FUNCTION_CALL = 0x0000000000002000, SEND_FUNCTION_CALL_CHECKSUM_ONLY = 0x0000000000004000, SEND_FUNCTION_CALL_NO_CACHE_PATCH = 0x0000000000008000, USE_OVERFLOW_FOR_SEND_FUNCTION_CALL = 0x0000000000010000, + CAN_RECEIVE_ENABLE_B2_QUEST = 0x0000000000020000, + AWAITING_ENABLE_B2_QUEST = 0x0000000000040000, // Server-side only // State flags LOADING = 0x0000000000100000, // Server-side only diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index 41b414a8..19c25a93 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -430,8 +430,7 @@ struct C_LegacyLogin_BB_04 { // Any other nonzero value = Generic failure (101) // The client config field in this command is ignored by pre-V3 clients as well // as Episodes 1&2 Trial Edition. All other V3 clients save it as opaque data to -// be returned in a 9E or 9F command later. newserv sends the client config -// anyway to clients that ignore it. +// be returned in a 9E or 9F command later. // The client will respond with a 96 command, but only the first time it // receives this command - for later 04 commands, the client will still update // its client config but will not respond. Changing the security data at any diff --git a/src/Quest.cc b/src/Quest.cc index c2262339..e8b62ce2 100644 --- a/src/Quest.cc +++ b/src/Quest.cc @@ -588,8 +588,6 @@ QuestIndex::QuestIndex( throw runtime_error("qst file contains unsupported file type: " + it.first); } } - } else { - static_game_data_log.warning("(%s) Skipping file (unsupported format)", filename.c_str()); } } catch (const exception& e) { diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 8d276883..71c93e5e 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -128,7 +128,7 @@ void send_first_pre_lobby_commands(shared_ptr c, std::function o if (function_compiler_available() && !c->config.check_flag(Client::Flag::HAS_AUTO_PATCHES) && - !c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { prepare_client_for_patches(c, [wc = weak_ptr(c), on_complete = std::move(on_complete)]() -> void { auto c = wc.lock(); if (!c) { @@ -242,7 +242,7 @@ static bool send_enable_send_function_call_if_applicable(shared_ptr c) { if (s->ep3_send_function_call_enabled) { send_quest_buffer_overflow(c); } else { - c->config.set_flag(Client::Flag::NO_SEND_FUNCTION_CALL); + c->config.clear_flag(Client::Flag::HAS_SEND_FUNCTION_CALL); } c->config.clear_flag(Client::Flag::USE_OVERFLOW_FOR_SEND_FUNCTION_CALL); return true; @@ -363,6 +363,30 @@ static void send_main_menu(shared_ptr c) { send_menu(c, main_menu); } +void on_login_server_login_complete(shared_ptr c) { + auto s = c->require_server_state(); + + if (s->pre_lobby_event && (!is_ep3(c->version()) || s->ep3_menu_song < 0)) { + send_change_event(c, s->pre_lobby_event); + } + + if (is_ep3(c->version())) { + send_ep3_rank_update(c); + send_get_player_info(c); + } + + if (s->welcome_message.empty() || + c->config.check_flag(Client::Flag::NO_D6) || + !c->config.check_flag(Client::Flag::AT_WELCOME_MESSAGE)) { + c->config.clear_flag(Client::Flag::AT_WELCOME_MESSAGE); + send_enable_send_function_call_if_applicable(c); + send_update_client_config(c, false); + send_main_menu(c); + } else { + send_message_box(c, s->welcome_message.c_str()); + } +} + void on_login_complete(shared_ptr c) { c->convert_account_to_temporary_if_nte(); @@ -372,24 +396,32 @@ void on_login_complete(shared_ptr c) { case ServerBehavior::LOGIN_SERVER: { auto s = c->require_server_state(); - if (s->pre_lobby_event && (!is_ep3(c->version()) || s->ep3_menu_song < 0)) { - send_change_event(c, s->pre_lobby_event); + if (c->config.check_flag(Client::Flag::CAN_RECEIVE_ENABLE_B2_QUEST) && + !c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL) && + (s->ep12_plus_send_function_call_quest_num >= 0)) { + auto q = s->quest_index(c->version())->get(s->ep12_plus_send_function_call_quest_num); + if (q) { + auto vq = q->version(c->version(), (c->sub_version == 0x39 ? 0 : 1)); + if (vq) { + c->config.set_flag(Client::Flag::HAS_SEND_FUNCTION_CALL); + c->config.set_flag(Client::Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); + c->config.set_flag(Client::Flag::AWAITING_ENABLE_B2_QUEST); + send_update_client_config(c, false); + + c->log.info("Sending %c version of quest \"%s\"", char_for_language_code(vq->language), vq->name.c_str()); + string bin_filename = vq->bin_filename(); + string dat_filename = vq->dat_filename(); + string xb_filename = vq->xb_filename(); + send_open_quest_file(c, bin_filename, bin_filename, xb_filename, vq->quest_number, QuestFileType::ONLINE, vq->bin_contents); + send_open_quest_file(c, dat_filename, dat_filename, xb_filename, vq->quest_number, QuestFileType::ONLINE, vq->dat_contents); + + send_command(c, 0xAC, 0x00); + } + } } - if (is_ep3(c->version())) { - send_ep3_rank_update(c); - send_get_player_info(c); - } - - if (s->welcome_message.empty() || - c->config.check_flag(Client::Flag::NO_D6) || - !c->config.check_flag(Client::Flag::AT_WELCOME_MESSAGE)) { - c->config.clear_flag(Client::Flag::AT_WELCOME_MESSAGE); - send_enable_send_function_call_if_applicable(c); - send_update_client_config(c, false); - send_main_menu(c); - } else { - send_message_box(c, s->welcome_message.c_str()); + if (!c->config.check_flag(Client::Flag::AWAITING_ENABLE_B2_QUEST)) { + on_login_server_login_complete(c); } break; } @@ -882,10 +914,10 @@ static void on_9D_9E(shared_ptr c, uint16_t command, uint32_t, string& d // 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); + c->config.set_flag(Client::Flag::HAS_SEND_FUNCTION_CALL); } else if (!s->ep3_send_function_call_enabled && c->config.check_flag(Client::Flag::USE_OVERFLOW_FOR_SEND_FUNCTION_CALL)) { c->config.clear_flag(Client::Flag::USE_OVERFLOW_FOR_SEND_FUNCTION_CALL); - c->config.set_flag(Client::Flag::NO_SEND_FUNCTION_CALL); + c->config.clear_flag(Client::Flag::HAS_SEND_FUNCTION_CALL); } try { @@ -2195,7 +2227,7 @@ static void on_10(shared_ptr c, uint16_t, uint32_t, string& data) { if (!function_compiler_available()) { throw runtime_error("function compiler not available"); } - if (c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + if (!c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { throw runtime_error("client does not support send_function_call"); } prepare_client_for_patches(c, [c]() -> void { @@ -2207,7 +2239,7 @@ static void on_10(shared_ptr c, uint16_t, uint32_t, string& data) { if (!function_compiler_available()) { throw runtime_error("function compiler not available"); } - if (c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + if (!c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { throw runtime_error("client does not support send_function_call"); } // We have to prepare the client for patches here, even though we @@ -2222,7 +2254,7 @@ static void on_10(shared_ptr c, uint16_t, uint32_t, string& data) { if (!function_compiler_available()) { throw runtime_error("function compiler not available"); } - if (c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + if (!c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { throw runtime_error("client does not support send_function_call"); } prepare_client_for_patches(c, [c]() -> void { @@ -2577,7 +2609,7 @@ static void on_10(shared_ptr c, uint16_t, uint32_t, string& data) { send_main_menu(c); } else { - if (c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + if (!c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { throw runtime_error("client does not support send_function_call"); } @@ -2595,7 +2627,7 @@ static void on_10(shared_ptr c, uint16_t, uint32_t, string& data) { send_main_menu(c); } else { - if (c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + if (!c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { throw runtime_error("client does not support send_function_call"); } @@ -2615,7 +2647,7 @@ static void on_10(shared_ptr c, uint16_t, uint32_t, string& data) { send_main_menu(c); } else { - if (c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + if (!c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { throw runtime_error("client does not support send_function_call"); } @@ -2700,6 +2732,13 @@ static void on_84(shared_ptr c, uint16_t, uint32_t, string& data) { const auto& cmd = check_size_t(data); auto s = c->require_server_state(); + if ((c->server_behavior == ServerBehavior::LOGIN_SERVER) && + c->config.check_flag(Client::Flag::AWAITING_ENABLE_B2_QUEST)) { + on_login_server_login_complete(c); + c->config.clear_flag(Client::Flag::AWAITING_ENABLE_B2_QUEST); + return; + } + if (cmd.menu_id != MenuID::LOBBY) { send_message_box(c, "Incorrect menu ID"); return; diff --git a/src/SendCommands.cc b/src/SendCommands.cc index 54d958b4..4971f7b1 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -474,7 +474,7 @@ void send_function_call( uint32_t checksum_addr, uint32_t checksum_size, uint32_t override_relocations_offset) { - if (client_config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL)) { + if (!client_config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL)) { throw logic_error("client does not support function calls"); } if (code.get() && client_config.check_flag(Client::Flag::SEND_FUNCTION_CALL_CHECKSUM_ONLY)) { @@ -511,7 +511,7 @@ bool send_protected_command(std::shared_ptr c, const void* data, size_t case Version::BB_V4: { auto s = c->require_server_state(); if (!s->enable_v3_v4_protected_subcommands || - c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL) || + !c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL) || c->config.check_flag(Client::Flag::SEND_FUNCTION_CALL_CHECKSUM_ONLY)) { return false; } @@ -1429,7 +1429,7 @@ void send_menu_t(shared_ptr c, shared_ptr menu, bool is_info is_visible &= !c->config.check_flag(Client::Flag::NO_D6); } if (item.flags & MenuItem::Flag::REQUIRES_SEND_FUNCTION_CALL) { - is_visible &= !c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL); + is_visible &= c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL); } if (item.flags & MenuItem::Flag::REQUIRES_SAVE_DISABLED) { is_visible &= !c->config.check_flag(Client::Flag::SAVE_ENABLED); @@ -2407,7 +2407,7 @@ void send_get_player_info(shared_ptr c, bool request_extended) { } if (request_extended && - !c->config.check_flag(Client::Flag::NO_SEND_FUNCTION_CALL) && + c->config.check_flag(Client::Flag::HAS_SEND_FUNCTION_CALL) && !c->config.check_flag(Client::Flag::SEND_FUNCTION_CALL_CHECKSUM_ONLY)) { auto s = c->require_server_state(); prepare_client_for_patches(c, [wc = weak_ptr(c)]() { diff --git a/src/ServerState.cc b/src/ServerState.cc index f5600e11..4d62eca9 100644 --- a/src/ServerState.cc +++ b/src/ServerState.cc @@ -793,6 +793,7 @@ void ServerState::load_config_early() { this->default_rare_notifs_enabled_v3_v4 = this->default_rare_notifs_enabled_v1_v2; this->default_rare_notifs_enabled_v1_v2 = this->config_json->get_bool("RareNotificationsEnabledByDefaultV1V2", this->default_rare_notifs_enabled_v1_v2); this->default_rare_notifs_enabled_v3_v4 = this->config_json->get_bool("RareNotificationsEnabledByDefaultV3V4", this->default_rare_notifs_enabled_v3_v4); + this->ep12_plus_send_function_call_quest_num = this->config_json->get_int("PSOPlusSendFunctionCallQuestNumber", -1); this->ep3_send_function_call_enabled = this->config_json->get_bool("EnableEpisode3SendFunctionCall", false); this->enable_v3_v4_protected_subcommands = this->config_json->get_bool("EnableV3V4ProtectedSubcommands", false); this->catch_handler_exceptions = this->config_json->get_bool("CatchHandlerExceptions", true); diff --git a/src/ServerState.hh b/src/ServerState.hh index 19e8b12c..b34767a4 100644 --- a/src/ServerState.hh +++ b/src/ServerState.hh @@ -120,6 +120,7 @@ struct ServerState : public std::enable_shared_from_this { std::unordered_map quest_flag_rewrites_v4; std::unordered_map> quest_counter_fields; // For $qfread command uint64_t persistent_game_idle_timeout_usecs = 0; + int64_t ep12_plus_send_function_call_quest_num = -1; bool ep3_send_function_call_enabled = false; bool enable_v3_v4_protected_subcommands = false; bool catch_handler_exceptions = true; diff --git a/system/config.example.json b/system/config.example.json index 55eb9823..7ab02de9 100644 --- a/system/config.example.json +++ b/system/config.example.json @@ -677,6 +677,7 @@ // category_name: what appears in the quest menu on the client. // description: what appears in the category description window (may // contain color escape codes like $C6). + [0x000, "hidden", "Hidden", "$E$C6Quests that do not\nappear in any menu"], [0x081, "government-console-ep1", "Hero in Red", "$E$CG-Red Ring Rico-\n$C6Quests that follow\nthe Episode 1\nstoryline"], [0x081, "government-console-ep2", "The Military's Hero", "$E$CG-Heathcliff Flowen-\n$C6Quests that follow\nthe Episode 2\nstoryline"], [0x081, "retrieval", "Retrieval", "$E$C6Quests that involve\nretrieving an object"], @@ -1045,6 +1046,19 @@ // (100 on v1, 200 on other versions, or 999 on Episode 3). "NotifyServerForMaxLevelAchieved": false, + // If this number is nonnegative, it specifies a quest which is automatically + // sent to clients using Episodes 1&2 Plus USA when they connect. This is + // intended to be used for enabling server-side patches at connection time. + // This is not enabled by default because it has not yet been tested on real + // hardware, and it also increases the loading time considerably - the player + // has to wait for the initial server connection, then wait for the quest to + // load, then wait for the client to leave the "game", before even getting to + // the welcome message. + // This quest is not intended to be localized since it should not contain any + // user-visible text, so the server sends the English version for PSO USA + // v1.2, and the Japanese version for PSO JP v1.5, regardless of the client's + // language setting. The quest is not used on any other PSO version. + "PSOPlusSendFunctionCallQuestNumber": -1, // Whether to enable patches on Episode 3 USA. This functionality depends on // exploiting a bug in Episode 3, and while it seems to work reliably on // Dolphin, it hasn't been tested on a real GameCube. So, newserv doesn't diff --git a/system/quests/hidden/q88500-gc-e.bin.txt b/system/quests/hidden/q88500-gc-e.bin.txt new file mode 100644 index 00000000..bed35b66 --- /dev/null +++ b/system/quests/hidden/q88500-gc-e.bin.txt @@ -0,0 +1,59 @@ +.version GC_V3 +.quest_num 88500 +.language 1 +.episode Episode1 +.name "GC v1.2 USA patch enabler" +.short_desc "" +.long_desc "" + +start: + // Create quest opcode handlers for F9FE to call flush_code and F9FF to call + // the copied code. Fortunately, quest_call_l leaved the byteswapped value of + // the opcode argument in r4, so as long as the address ends with 00, it will + // be valid as the size argument to flush_code. We'll end up flushing many + // more bytes than needed, but this isn't a problem. + leti r3, 0x80004000 // dest addr + write4 0x804C81C8, 0x801F2A14 // quest_call_l + write4 0x804C81CC, 0x8000C274 // flush_code + write4 0x804C81D0, r3 // written code ptr + + read4 r0, 0x805D5E70 // quest_script_base + leto r4, code + read4 r4, r4 + add r4, r0 // r4 = address of code label + leto r5, code_end + read4 r5, r5 + add r5, r0 // r5 = address of code_end label + + // Copy all data from [code, code_end) to 80004000 +copy_byte: + jmp_eq r4, r5, copy_done + read1 r0, r4 + write1 r3, r0 + addi r3, 1 + addi r4, 1 + jmp copy_byte + +copy_done: + // Call flush_code(0x80004000, 0x00400080) to commit it to memory + .data F9FE00400080 + // Call the copied native code + .data F9FF + + // This script runs on the first frame during the quest loading procedure, + // but this procedure is started from the lobby overview, not from a game! + // To make the result of loading a quest sane, we need to set some extra + // state that will take effect when loading is done. + ba_initial_floor 17 // Make player spawn in lobby (for one frame) + write2 0x805D5CE8, 1 // Leave "game" immediately (sends 98) + + // Clean up quest handler table + write4 0x804C81C8, 0 + write4 0x804C81CC, 0 + write4 0x804C81D0, 0 + + ret + +code: + .include_native q88500-gc.s +code_end: diff --git a/system/quests/hidden/q88500-gc-j.bin.txt b/system/quests/hidden/q88500-gc-j.bin.txt new file mode 100644 index 00000000..c4cdbf83 --- /dev/null +++ b/system/quests/hidden/q88500-gc-j.bin.txt @@ -0,0 +1,50 @@ +.version GC_V3 +.quest_num 88500 +.language 0 +.episode Episode1 +.name "GC v1.5 JP patch enabler" +.short_desc "" +.long_desc "" + +start: + // This script is identical to q88500-gc-e.bin.txt, except the addresses are + // changed to be suitable for JP v1.5. + leti r3, 0x80004000 + + write4 0x804C88F0, 0x801F29C0 + write4 0x804C88F4, 0x8000C274 + write4 0x804C88F8, r3 + + read4 r0, 0x805D6560 + leto r4, code + read4 r4, r4 + add r4, r0 + leto r5, code_end + read4 r5, r5 + add r5, r0 + +copy_byte: + jmp_eq r4, r5, copy_done + read1 r0, r4 + write1 r3, r0 + addi r3, 1 + addi r4, 1 + jmp copy_byte + +copy_done: + .data F9FE00400080 + .data F9FF + + ba_initial_floor 17 + write2 0x805D63D8, 1 + + // Clean up quest handler table + write4 0x804C88F0, 0 + write4 0x804C88F4, 0 + write4 0x804C88F8, 0 + + ret + +code: + .include_native q88500-gc.s +code_end: diff --git a/system/quests/hidden/q88500-gc.dat b/system/quests/hidden/q88500-gc.dat new file mode 100755 index 00000000..fbcbc148 Binary files /dev/null and b/system/quests/hidden/q88500-gc.dat differ diff --git a/system/quests/hidden/q88500-gc.s b/system/quests/hidden/q88500-gc.s new file mode 100644 index 00000000..cd843aec --- /dev/null +++ b/system/quests/hidden/q88500-gc.s @@ -0,0 +1,189 @@ +// This function copies an inline handler for the B2 command (function call) +// to an unused area of memory, and inserts it into the game's command handler +// table, thus making the B2 command fully functional as it is on most other +// versions of the game. + +// We could do the code copy and callsite modification directly in the quest +// script, but that would restrict us to only using addresses that end in 00. +// Furthermore, doing it this way provides an example of how to embed native +// code in a quest script and run it from within the script. + +start: + mflr r11 + bl get_handle_B2_ptr + +handle_B2: + # Arguments: + # r3 = TProtocol* proto (we use this to call the send function) + # r4 = void* data + # Returns: void + + mflr r0 + stwu [r1 - 0x40], r1 + stw [r1 + 0x44], r0 + + # Stack: + # [r1+08] = B3 XX 0C 00 + # [r1+0C] = code section's return value + # [r1+10] = checksum + # [r1+14] = saved ctx argument + # [r1+18] = saved data argument + stw [r1 + 0x14], r3 + stw [r1 + 0x18], r4 + + # Set up the reply header (B3 XX 0C 00, where XX comes from the B2 command) + lbz r5, [r4 + 1] + rlwinm r5, r5, 16, 8, 15 + oris r5, r5, 0xB300 + ori r5, r5, 0x0C00 + stw [r1 + 0x08], r5 + + # If there's no code section, skip it. We also write the code section size to + # the return value field (which will be overwritten later if the size is not + # zero). This is because I'm lazy and this gives the behavior we want: the + # code return value is always zero if the code section size is zero. + li r6, 4 + lwbrx r5, [r4 + r6] # r5 = code_size + stw [r1 + 0x0C], r5 # response.code_return_value = code_size + cmplwi r5, 0 + beq handle_B2_skip_code + + # Get the code section base and footer addresses + addi r6, r4, 0x10 # r6 = code base address + add r7, r6, r5 + subi r7, r7, 0x20 # r7 = footer address (code base + code size - 0x20) + + # Check if there are relocations to do + lwz r8, [r7 + 4] # r8 = num relocations + cmplwi r8, 0 + beq handle_B2_skip_relocations + + # Execute the relocations + mtctr r8 + lwz r8, [r7] # r8 = relocations list offset + add r8, r8, r6 # r8 = relocations list address + subi r8, r8, 2 # Back up one space so we can use lhzu in the loop + mr r10, r6 # relocation pointer = code base address +handle_B2_relocate_again: + lhzu r9, [r8 + 2] + rlwinm r9, r9, 2, 0, 29 # r9 = next_relocation_offset * 4 + add r10, r10, r9 # relocation pointer += next_relocation_offset * 4 + lwz r9, [r10] + add r9, r9, r6 + stw [r10], r9 # (*relocation pointer) += code base address + bdnz handle_B2_relocate_again +handle_B2_skip_relocations: + + # Invalidate the caches appropriately for the newly-copied code + lis r0, 0x8000 + ori r0, r0, 0xC274 + mr r3, r6 + mr r4, r5 + mtctr r0 + bctrl # flush_code(code_base_addr, code_section_size) + + # Call the code section and put the return value (byteswapped) on the stack + # Note: flush_code only uses r3, r4, and r5, so we don't need to reload r7 + # after the above call + lwz r8, [r7 + 0x10] + lwzx r8, [r8 + r6] + mtctr r8 + bctrl + li r8, 0x0C + stwbrx [r1 + r8], r3 +handle_B2_skip_code: + + # Get the checksum function args + lwz r4, [r1 + 0x18] + li r5, 0x08 + lwbrx r3, [r4 + r5] # checksum addr + li r5, 0x0C + lwbrx r4, [r4 + r5] # checksum size + bl crc32 # crc32(checksum_addr, checksum_size) + li r8, 0x10 + stwbrx [r1 + r8], r3 + + # Send the response (B3 command) + lwz r3, [r1 + 0x14] + lwz r4, [r3 + 0x18] + lwz r4, [r4 + 0x28] + mtctr r4 + addi r4, r1, 0x08 + li r5, 0x0C + bctrl # TProtocol::send_command(ctx, &reply_data, 0x0C) + + # Clean up stack and return + lwz r0, [r1 + 0x44] + addi r1, r1, 0x40 + mtlr r0 + blr + +crc32: + subi r3, r3, 1 # So we can use lbzu + add r4, r3, r4 # r4 = end ptr (also adjusted for lbzu, implicitly) + li r5, -1 # r5 = result value (0xFFFFFFFF initially) + lis r7, 0xEDB8 + ori r7, r7, 0x8320 # 1-bit xor value + li r8, 8 # Number of bits per byte + +crc32_again: + cmpl r3, r4 + beq crc32_done + + lbzu r9, [r3 + 1] + xor r5, r5, r9 # result ^= next_input_value + + mtctr r8 +crc32_next_bit: + rlwinm r6, r5, 0, 31, 31 # r6 = low bit of result + rlwinm r5, r5, 31, 1, 31 # result >>= 1 + neg r6, r6 + and r6, r6, r7 + xor r5, r5, r6 # result ^= (0xEDB88320 if low bit was 1, else 0) + bdnz crc32_next_bit + b crc32_again + +crc32_done: + xoris r3, r5, 0xFFFF + xori r3, r3, 0xFFFF + blr # return (result ^ 0xFFFFFFFF) + + +get_handle_B2_ptr: + mflr r9 # r9 = &handle_B2 + bl get_handle_B2_end_ptr +get_handle_B2_end_ptr: + mflr r10 + subi r10, r10, 8 # r10 = pointer to end of handle_B2 + + # Copy handle_B2 to 8000B0E0, which is normally unused by the game + lis r12, 0x8000 + ori r12, r12, 0xB0E0 # r12 = 0x8000B0E0 + sub r7, r10, r9 + rlwinm r7, r7, 30, 2, 31 # r7 = number of words to copy + mtctr r7 + subi r8, r12, 4 # r8 = r12 - 4 (so we can use stwu) + subi r9, r9, 4 # r9 = r9 - 4 (so we can use lwzu) +copy_handle_B2_word_again: + lwzu r0, [r9 + 4] + stwu [r8 + 4], r0 + bdnz copy_handle_B2_word_again + + # Invalidate the caches appropriately for the newly-copied code + lis r9, 0x8000 + ori r9, r9, 0xC274 + mtctr r9 + mr r3, r12 + rlwinm r4, r7, 30, 2, 31 + bctrl # flush_code(copied_B2_handler, copied_B2_handler_bytes) + + # Replace the command handler table entry for command 0E (which is an unused + # legacy command and has very broken behavior) with our B2 implementation + lis r5, 0x804C + ori r5, r5, 0x4E08 + li r0, 0x00B2 + stw [r5], r0 + stw [r5 + 0x0C], r12 + + mtlr r11 + blr diff --git a/tests/GC-Episode2PrivateDrops2P.test.txt b/tests/GC-Episode2PrivateDrops2P.test.txt index 0f8ee4f3..c9c513ad 100644 --- a/tests/GC-Episode2PrivateDrops2P.test.txt +++ b/tests/GC-Episode2PrivateDrops2P.test.txt @@ -61,7 +61,7 @@ I 94381 2023-12-29 15:36:14 - [Commands] Received from C-1 (version=GC_V3 comman 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 94381 2023-12-29 15:36:14 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 00 00 00 00 00 00 | 0PO3 B +0010 | 30 50 4F 33 00 11 00 40 20 00 00 00 00 00 00 00 | 0PO3 B 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:14 - [Commands] Sending to C-1 (version=GC_V3 command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -71,7 +71,7 @@ I 94381 2023-12-29 15:36:14 - [Commands] Received from C-1 (version=GC_V3 comman 0000 | 96 00 0C 00 C7 32 CE 2A 63 02 00 00 | 2 *c I 94381 2023-12-29 15:36:14 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 04 00 00 00 00 00 | 0PO3 B +0010 | 30 50 4F 33 00 11 00 40 20 00 04 00 00 00 00 00 | 0PO3 B 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:14 - [Commands] Sending to C-1 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 31 32 3A 32 39 3A 20 | 2023:12:29: @@ -100,7 +100,7 @@ I 94381 2023-12-29 15:36:15 - [Commands] Sending to C-1 (version=GC_V3 command=9 0000 | 97 01 04 00 | I 94381 2023-12-29 15:36:15 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:15 - [Commands] Received from C-1 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 04 00 | @@ -149,11 +149,11 @@ I 94381 2023-12-29 15:36:15 - [Commands] Received from C-2 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4A 65 73 73 | Jess 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | 2 -00D0 | 30 50 4F 33 00 01 00 40 20 00 00 00 00 00 00 00 | 0PO3 D +00D0 | 30 50 4F 33 00 11 00 40 20 00 00 00 00 00 00 00 | 0PO3 D 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:15 - [Commands] Sending to C-2 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 11 00 40 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:15 - [Commands] Sending to C-2 (version=GC_V3 command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 @@ -374,7 +374,7 @@ I 94381 2023-12-29 15:36:15 - [Commands] Sending to C-2 (Jess) (version=GC_V3 co 0440 | 0D FF 05 04 03 01 00 07 00 FF FF FF | I 94381 2023-12-29 15:36:15 - [Commands] Sending to C-2 (Jess) (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 03 00 40 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 13 00 40 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:15 - [Commands] Received from C-2 (Jess) (version=GC_V3 command=60 flag=00) 0000 | 60 00 1C 00 3F 06 00 00 00 00 00 80 0F 00 FF FF | ` ? @@ -467,7 +467,7 @@ I 94381 2023-12-29 15:36:19 - [Commands] Received from C-4 (version=GC_V3 comman 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 40 20 00 00 00 00 00 00 00 | 3 B +0010 | 00 00 4F 33 00 10 00 40 20 00 00 00 00 00 00 00 | 3 B 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -477,7 +477,7 @@ I 94381 2023-12-29 15:36:19 - [Commands] Received from C-4 (version=GC_V3 comman 0000 | 96 00 0C 00 7B 9E 17 2C 1D 00 00 00 | { , I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 40 20 00 04 00 00 00 00 00 | 3 B +0010 | 00 00 4F 33 00 10 00 40 20 00 04 00 00 00 00 00 | 3 B 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 31 32 3A 32 39 3A 20 | 2023:12:29: @@ -506,7 +506,7 @@ I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=9 0000 | 97 01 04 00 | I 94381 2023-12-29 15:36:19 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 10 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:19 - [Commands] Received from C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 04 00 | @@ -555,11 +555,11 @@ I 94381 2023-12-29 15:36:20 - [Commands] Received from C-5 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4A 6F 6E 61 | Jona 00C0 | 68 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | h 2 -00D0 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +00D0 | 00 00 4F 33 00 10 00 44 20 00 00 00 00 00 00 00 | 3 D 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:20 - [Commands] Sending to C-5 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 10 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:20 - [Commands] Sending to C-5 (version=GC_V3 command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 diff --git a/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt b/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt index eaddc69e..b5996341 100644 --- a/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt +++ b/tests/GC-Episode3TrialEditionLobbySmokeTest.test.txt @@ -62,7 +62,7 @@ I 25793 2023-11-24 23:03:38 - [Commands] Received from C-4 (version=GC_EP3 comma 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 00 4A 53 33 00 A1 00 40 20 00 00 00 00 00 00 00 | 3 B` +0010 | 00 4A 53 33 00 B1 00 40 20 00 00 00 00 00 00 00 | 3 B` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=B7 flag=00) 0000 | B7 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 | @@ -77,7 +77,7 @@ I 25793 2023-11-24 23:03:38 - [Commands] Received from C-4 (version=GC_EP3 comma 0000 | 96 00 0C 00 5C E6 6B 2C 3B 00 00 00 | \ k,; I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 00 4A 53 33 00 A1 00 40 20 00 04 00 00 00 00 00 | 3 B` +0010 | 00 4A 53 33 00 B1 00 40 20 00 04 00 00 00 00 00 | 3 B` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 31 31 3A 32 35 3A 20 | 2023:11:25: @@ -2134,7 +2134,7 @@ I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3_NTE comm 7940 | 00 00 00 00 | I 25793 2023-11-24 23:03:38 - [Commands] Sending to C-4 (version=GC_EP3_NTE command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 54 4A 53 33 00 81 00 48 20 00 04 00 00 00 00 00 | TJS3 J` +0010 | 54 4A 53 33 00 91 00 48 20 00 04 00 00 00 00 00 | TJS3 J` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:38 - [Commands] Received from C-4 (Tali) (version=GC_EP3_NTE command=99 flag=00) 0000 | 99 00 04 00 | @@ -2170,7 +2170,7 @@ I 25793 2023-11-24 23:03:41 - [Commands] Sending to C-4 (Tali) (version=GC_EP3_N 0000 | 97 01 04 00 | I 25793 2023-11-24 23:03:41 - [Commands] Sending to C-4 (Tali) (version=GC_EP3_NTE command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 54 4A 53 33 00 81 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` +0010 | 54 4A 53 33 00 91 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:42 - [Commands] Received from C-4 (Tali) (version=GC_EP3_NTE command=B1 flag=00) 0000 | B1 00 04 00 | @@ -2219,12 +2219,12 @@ I 25793 2023-11-24 23:03:44 - [Commands] Received from C-5 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 54 61 6C 69 | Tali 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | 2 -00D0 | 54 4A 53 33 00 81 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` +00D0 | 54 4A 53 33 00 91 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:44 - [C-5] Game version changed to GC_EP3 I 25793 2023-11-24 23:03:44 - [Commands] Sending to C-5 (version=GC_EP3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 54 4A 53 33 00 A1 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` +0010 | 54 4A 53 33 00 B1 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:44 - [Commands] Sending to C-5 (version=GC_EP3 command=B7 flag=00) 0000 | B7 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 | @@ -2358,7 +2358,7 @@ I 25793 2023-11-24 23:03:44 - [Commands] Received from C-5 (version=GC_EP3 comma I 25793 2023-11-24 23:03:44 - [C-5] Game version changed to GC_EP3_NTE I 25793 2023-11-24 23:03:44 - [Commands] Sending to C-5 (Tali) (version=GC_EP3_NTE command=C5 flag=01) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 54 4A 53 33 00 81 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` +0010 | 54 4A 53 33 00 91 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:44 - [Commands] Sending to C-5 (Tali) (version=GC_EP3_NTE command=C5 flag=01) 0000 | C5 01 20 01 00 00 00 00 FF 7F 00 00 00 00 00 00 | @@ -2451,7 +2451,7 @@ I 25793 2023-11-24 23:03:44 - [Commands] Sending to C-5 (Tali) (version=GC_EP3_N 0440 | FF FF FF FF FF FF FF FF FF FF FF FF | I 25793 2023-11-24 23:03:44 - [Commands] Sending to C-5 (Tali) (version=GC_EP3_NTE command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 54 4A 53 33 00 83 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` +0010 | 54 4A 53 33 00 93 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:03:45 - [Commands] Received from C-5 (Tali) (version=GC_EP3_NTE command=60 flag=00) 0000 | 60 00 1C 00 3F 06 00 00 00 00 00 00 0F 00 FF FF | ` ? @@ -2683,7 +2683,7 @@ I 25793 2023-11-24 23:04:08 - [Commands] Received from C-6 (version=GC_EP3 comma 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 54 61 6C 69 | Tali 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | 2 -00D0 | 54 4A 53 33 00 83 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` +00D0 | 54 4A 53 33 00 93 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF 00 00 00 00 | 00F0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | @@ -2693,7 +2693,7 @@ I 25793 2023-11-24 23:04:08 - [Commands] Received from C-6 (version=GC_EP3 comma 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 25793 2023-11-24 23:04:08 - [Commands] Sending to C-6 (version=GC_EP3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 54 4A 53 33 00 A3 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` +0010 | 54 4A 53 33 00 B3 00 4C 20 00 00 00 00 00 00 00 | TJS3 L` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 25793 2023-11-24 23:04:08 - [Commands] Sending to C-6 (version=GC_EP3 command=B7 flag=00) 0000 | B7 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 | diff --git a/tests/GC-ForestGame.test.txt b/tests/GC-ForestGame.test.txt index de566705..6f62dc11 100644 --- a/tests/GC-ForestGame.test.txt +++ b/tests/GC-ForestGame.test.txt @@ -58,7 +58,7 @@ I 49108 2023-05-26 16:18:01 - [Commands] Received from C-1 (version=GC command=9 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 49108 2023-05-26 16:18:01 - [Commands] Sending to C-1 (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 00 00 00 00 00 00 | 3 ` +0010 | 30 50 4F 33 00 11 00 40 20 00 00 00 00 00 00 00 | 3 ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 49108 2023-05-26 16:18:01 - [Commands] Sending to C-1 (version=GC command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -68,7 +68,7 @@ I 49108 2023-05-26 16:18:01 - [Commands] Received from C-1 (version=GC command=9 0000 | 96 00 0C 00 C7 32 CE 2A 57 00 00 00 | 2 *W I 49108 2023-05-26 16:18:01 - [Commands] Sending to C-1 (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 04 00 00 00 00 00 | 3 ` +0010 | 30 50 4F 33 00 11 00 40 20 00 04 00 00 00 00 00 | 3 ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 49108 2023-05-26 16:18:01 - [Commands] Sending to C-1 (version=GC command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 33 3A 30 35 3A 32 36 3A 20 | 2023:05:26: @@ -97,7 +97,7 @@ I 49108 2023-05-26 16:18:06 - [Commands] Sending to C-1 (version=GC command=97 f 0000 | 97 01 04 00 | I 49108 2023-05-26 16:18:06 - [Commands] Sending to C-1 (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 3 ` +0010 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 3 ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 49108 2023-05-26 16:18:06 - [Commands] Received from C-1 (version=GC command=B1 flag=00) 0000 | B1 00 04 00 | @@ -148,11 +148,11 @@ I 49108 2023-05-26 16:18:08 - [Commands] Received from C-2 (version=GC command=9 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4A 65 73 73 | Jess 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | , 2 -00D0 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 3 ` +00D0 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 3 ` 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 49108 2023-05-26 16:18:08 - [Commands] Sending to C-2 (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 3 ` +0010 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 3 ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 49108 2023-05-26 16:18:08 - [Commands] Sending to C-2 (version=GC command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 @@ -365,7 +365,7 @@ I 49108 2023-05-26 16:18:08 - [Commands] Sending to C-2 (Jess) (version=GC comma 0440 | 0D FF 05 03 01 01 00 04 00 FF FF FF | I 49108 2023-05-26 16:18:08 - [Commands] Sending to C-2 (Jess) (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 03 00 44 20 00 00 00 00 00 00 00 | 3 ` +0010 | 30 50 4F 33 00 13 00 44 20 00 00 00 00 00 00 00 | 3 ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 49108 2023-05-26 16:18:08 - [Commands] Received from C-2 (Jess) (version=GC command=60 flag=00) 0000 | 60 00 1C 00 3F 06 00 00 00 00 00 80 0F 00 FF FF | ` ? @@ -10001,7 +10001,7 @@ I 49108 2023-05-26 16:28:29 - [Commands] Received from C-3 (version=GC command=9 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4A 65 73 73 | Jess 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | , 2 -00D0 | 30 50 4F 33 00 03 00 44 20 00 00 00 00 00 00 00 | 3 ` +00D0 | 30 50 4F 33 00 13 00 44 20 00 00 00 00 00 00 00 | 3 ` 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF 00 00 00 00 | 00F0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | @@ -10011,7 +10011,7 @@ I 49108 2023-05-26 16:28:29 - [Commands] Received from C-3 (version=GC command=9 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 49108 2023-05-26 16:28:29 - [Commands] Sending to C-3 (version=GC command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 11 11 11 11 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 03 00 44 20 00 00 00 00 00 00 00 | 3 ` +0010 | 30 50 4F 33 00 13 00 44 20 00 00 00 00 00 00 00 | 3 ` 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 49108 2023-05-26 16:28:29 - [Commands] Sending to C-3 (version=GC command=07 flag=06) 0000 | 07 05 AC 00 11 00 00 11 FF FF FF FF 04 00 41 6C | Al diff --git a/tests/GC-HeartSymbol.test.txt b/tests/GC-HeartSymbol.test.txt index ff1cd81d..f06d76a1 100644 --- a/tests/GC-HeartSymbol.test.txt +++ b/tests/GC-HeartSymbol.test.txt @@ -59,7 +59,7 @@ I 23921 2024-03-03 21:20:43 - [Commands] Received from C-1 (version=GC_V3 comman 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 23921 2024-03-03 21:20:43 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 00 00 00 00 00 00 | 0PO3 @ +0010 | 30 50 4F 33 00 11 00 40 20 00 00 00 00 00 00 00 | 0PO3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 23921 2024-03-03 21:20:43 - [Commands] Sending to C-1 (version=GC_V3 command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -69,7 +69,7 @@ I 23921 2024-03-03 21:20:43 - [Commands] Received from C-1 (version=GC_V3 comman 0000 | 96 00 0C 00 C7 32 CE 2A 4B 03 00 00 | 2 *K I 23921 2024-03-03 21:20:43 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 04 00 00 00 00 00 | 0PO3 @ +0010 | 30 50 4F 33 00 11 00 40 20 00 04 00 00 00 00 00 | 0PO3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 23921 2024-03-03 21:20:43 - [Commands] Sending to C-1 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 34 3A 30 33 3A 30 34 3A 20 | 2024:03:04: @@ -98,7 +98,7 @@ I 23921 2024-03-03 21:20:43 - [Commands] Sending to C-1 (version=GC_V3 command=9 0000 | 97 01 04 00 | I 23921 2024-03-03 21:20:43 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 23921 2024-03-03 21:20:43 - [Commands] Received from C-1 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 04 00 | @@ -147,11 +147,11 @@ I 23921 2024-03-03 21:20:44 - [Commands] Received from C-2 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4A 65 73 73 | Jess 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | 2 -00D0 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +00D0 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 23921 2024-03-03 21:20:44 - [Commands] Sending to C-2 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 23921 2024-03-03 21:20:44 - [Commands] Sending to C-2 (version=GC_V3 command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 @@ -373,7 +373,7 @@ I 23921 2024-03-03 21:20:44 - [Commands] Sending to C-2 (Jess) (version=GC_V3 co 0440 | 0D FF 05 06 04 03 00 09 00 FF FF FF | I 23921 2024-03-03 21:20:44 - [Commands] Sending to C-2 (Jess) (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 03 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 13 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 23921 2024-03-03 21:20:44 - [Commands] Received from C-2 (Jess) (version=GC_V3 command=60 flag=00) 0000 | 60 00 1C 00 3F 06 00 00 00 00 00 80 0F 00 FF FF | ` ? diff --git a/tests/GC-PoisonRoom.test.txt b/tests/GC-PoisonRoom.test.txt index 7e744196..8a776f33 100644 --- a/tests/GC-PoisonRoom.test.txt +++ b/tests/GC-PoisonRoom.test.txt @@ -59,7 +59,7 @@ I 56327 2024-03-03 23:38:31 - [Commands] Received from C-1 (version=GC_V3 comman 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 56327 2024-03-03 23:38:31 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 00 00 00 00 00 00 | 0PO3 @ +0010 | 30 50 4F 33 00 11 00 40 20 00 00 00 00 00 00 00 | 0PO3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:38:31 - [Commands] Sending to C-1 (version=GC_V3 command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -69,7 +69,7 @@ I 56327 2024-03-03 23:38:31 - [Commands] Received from C-1 (version=GC_V3 comman 0000 | 96 00 0C 00 C7 32 CE 2A 67 03 00 00 | 2 *g I 56327 2024-03-03 23:38:31 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 40 20 00 04 00 00 00 00 00 | 0PO3 @ +0010 | 30 50 4F 33 00 11 00 40 20 00 04 00 00 00 00 00 | 0PO3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:38:31 - [Commands] Sending to C-1 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 34 3A 30 33 3A 30 34 3A 20 | 2024:03:04: @@ -98,7 +98,7 @@ I 56327 2024-03-03 23:38:32 - [Commands] Sending to C-1 (version=GC_V3 command=9 0000 | 97 01 04 00 | I 56327 2024-03-03 23:38:32 - [Commands] Sending to C-1 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:38:32 - [Commands] Received from C-1 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 04 00 | @@ -147,11 +147,11 @@ I 56327 2024-03-03 23:38:32 - [Commands] Received from C-2 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4A 65 73 73 | Jess 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 32 AC 99 83 | 2 -00D0 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +00D0 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:38:32 - [Commands] Sending to C-2 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 01 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 11 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:38:32 - [Commands] Sending to C-2 (version=GC_V3 command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 @@ -373,7 +373,7 @@ I 56327 2024-03-03 23:38:32 - [Commands] Sending to C-2 (Jess) (version=GC_V3 co 0440 | 0D FF 05 06 04 03 00 09 00 FF FF FF | I 56327 2024-03-03 23:38:32 - [Commands] Sending to C-2 (Jess) (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 30 50 4F 33 00 03 00 44 20 00 00 00 00 00 00 00 | 0PO3 D +0010 | 30 50 4F 33 00 13 00 44 20 00 00 00 00 00 00 00 | 0PO3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:38:33 - [Commands] Received from C-2 (Jess) (version=GC_V3 command=60 flag=00) 0000 | 60 00 1C 00 3F 06 00 00 00 00 00 80 0F 00 FF FF | ` ? @@ -23206,7 +23206,7 @@ I 56327 2024-03-03 23:56:37 - [Commands] Received from C-4 (version=GC_V3 comman 0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 40 20 00 00 00 00 00 00 00 | 3 @ +0010 | 00 00 4F 33 00 10 00 40 20 00 00 00 00 00 00 00 | 3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=D5 flag=00) 0000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn @@ -23216,7 +23216,7 @@ I 56327 2024-03-03 23:56:37 - [Commands] Received from C-4 (version=GC_V3 comman 0000 | 96 00 0C 00 28 59 6C 2B 08 01 00 00 | (Yl+ I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 40 20 00 04 00 00 00 00 00 | 3 @ +0010 | 00 00 4F 33 00 10 00 40 20 00 04 00 00 00 00 00 | 3 @ 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:37 - [Commands] Sending to C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 20 00 32 30 32 34 3A 30 33 3A 30 34 3A 20 | 2024:03:04: @@ -23245,7 +23245,7 @@ I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-4 (version=GC_V3 command=9 0000 | 97 01 04 00 | I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-4 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 10 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:38 - [Commands] Received from C-4 (version=GC_V3 command=B1 flag=00) 0000 | B1 00 04 00 | @@ -23294,11 +23294,11 @@ I 56327 2024-03-03 23:56:38 - [Commands] Received from C-5 (version=GC_V3 comman 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 4E 4F 20 44 | NO D 00C0 | 41 54 41 20 00 00 00 00 00 00 00 00 32 AC 99 83 | ATA 2 -00D0 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +00D0 | 00 00 4F 33 00 10 00 44 20 00 00 00 00 00 00 00 | 3 D 00E0 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-5 (version=GC_V3 command=04 flag=00) 0000 | 04 00 2C 00 00 00 01 00 1E B1 05 17 32 AC 99 83 | , 2 -0010 | 00 00 4F 33 00 00 00 44 20 00 00 00 00 00 00 00 | 3 D +0010 | 00 00 4F 33 00 10 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 56327 2024-03-03 23:56:38 - [Commands] Sending to C-5 (version=GC_V3 command=83 flag=0F) 0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 diff --git a/tests/XB-ForestGame.test.txt b/tests/XB-ForestGame.test.txt index 762764c3..2f3d1c33 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 4F 34 00 81 00 40 20 00 00 00 00 00 00 00 | 4 B` +0010 | 00 00 4F 34 00 91 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 4F 34 00 81 00 40 20 00 04 00 00 00 00 00 | 4 @` +0010 | 00 00 4F 34 00 91 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 4F 34 00 81 00 44 20 00 00 00 00 00 00 00 | 4 D` +0010 | 00 00 4F 34 00 91 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 4F 34 00 81 00 44 | $ 2 4 D +0000 | 9F 00 24 00 32 AC 99 83 00 00 4F 34 00 91 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 4F 34 00 81 00 44 20 00 00 00 00 00 00 00 | 4 D` +0010 | 00 00 4F 34 00 91 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 4F 34 00 83 00 44 20 00 00 00 00 00 00 00 | 4 D` +0010 | 00 00 4F 34 00 93 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 | ` ? diff --git a/tests/config.json b/tests/config.json index 3934663d..3d229031 100644 --- a/tests/config.json +++ b/tests/config.json @@ -49,6 +49,7 @@ "HTTPListen": [], "BannedIPV4Ranges": [], "Episode3BehaviorFlags": 0xFA, + "PSOPlusSendFunctionCallQuestNumber": -1, "EnableEpisode3SendFunctionCall": false, "EnableV3V4ProtectedSubcommands": false, @@ -192,6 +193,7 @@ }, "QuestCategories": [ + [0x000, "hidden", "Hidden", "$E$C6Quests that do not\nappear in any menu"], [0x081, "government-console-ep1", "Hero in Red", "$E$CG-Red Ring Rico-\n$C6Quests that follow\nthe Episode 1\nstoryline"], [0x081, "government-console-ep2", "The Military's Hero", "$E$CG-Heathcliff Flowen-\n$C6Quests that follow\nthe Episode 2\nstoryline"], [0x081, "retrieval", "Retrieval", "$E$C6Quests that involve\nretrieving an object"],