diff --git a/README.md b/README.md index 7d7e143c..3409bce7 100644 --- a/README.md +++ b/README.md @@ -293,11 +293,14 @@ Like quests, Episode 3 card definitions, maps, and quests are cached in memory. ## Memory patches, client functions, and DOL files +*Note: newserv uses the shorter GameCube versioning convention, where discs labeled DOL-XXXX-0-0Y are version 1.Y. The PSO community seems to use the convention 1.0Y in some places instead, but these are the same version. For example, the version that newserv calls v1.4 is the same as v1.04, and is labeled DOL-GPOJ-0-04 on the underside of the disc.* + 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) -* PSO GameCube Episodes 1&2 Plus JP v1.04 (not v1.05) +* PSO GameCube Episodes 1&2 Trial Edition +* PSO GameCube Episodes 1&2 JP, USA, and EU but not Plus +* PSO GameCube Episodes 1&2 Plus JP v1.4 but not v1.5 * PSO GameCube Episode 3 Trial Edition * PSO GameCube Episode 3 JP * PSO GameCube Episode 3 USA (experimental; must be manually enabled in config.json) diff --git a/notes/ar-codes.txt b/notes/ar-codes.txt index 9c6c6cb0..9fb5a9fe 100644 --- a/notes/ar-codes.txt +++ b/notes/ar-codes.txt @@ -3,7 +3,7 @@ 04368960 38600001 04368964 4E800020 -(Ep1&2 USA v1.01) Play lobby (and event) music on Pioneer 2 also +(Ep1&2 USA v1.1) Play lobby (and event) music on Pioneer 2 also 0417E0F0 60000000 (Ep3 USA) Play lobby (and event) music in Morgue also @@ -11,12 +11,12 @@ (Ep3 USA) Skip white logo screens during startup 0409D774 38000007 -(Episodes 1&2 USA v1.01) Skip white logo screens during startup +(Episodes 1&2 USA v1.1) Skip white logo screens during startup 0413F190 38000007 (Ep3 USA) Skip agreement prompts before online game 041B50C8 38000003 -(Episodes 1&2 USA v1.01) Skip agreement prompt before online game +(Episodes 1&2 USA v1.1) Skip agreement prompt before online game 04327D80 38000003 (Ep3 USA) Disable rate limit for pressing A during loading screens @@ -155,7 +155,7 @@ 0400BEAC 7C0803A6 0400BEB0 482E9FC0 -(Episodes 1&2 USA v1.01) Press L for enemy debug; enable various other debug messages +(Episodes 1&2 USA v1.1) Press L for enemy debug; enable various other debug messages 040FD9D8 38600001 # Various enemy debug messages 00153E53 00000001 # Poison fog debug 1 00153E4B 00000001 # Poison fog debug 2 diff --git a/notes/ep3-text-color-codes.txt b/notes/ep3-text-color-codes.txt index 3cdcb9e3..3cd4b40d 100644 --- a/notes/ep3-text-color-codes.txt +++ b/notes/ep3-text-color-codes.txt @@ -81,7 +81,7 @@ blr -Ep1&2 v1.01 version of the above code +Ep1&2 v1.1 version of the above code send_D9 ./m68kdasm --assemble-ppc32 --ppc32 --start-address=801DA398 diff --git a/src/Client.cc b/src/Client.cc index 6530dc2d..71641c56 100644 --- a/src/Client.cc +++ b/src/Client.cc @@ -91,9 +91,9 @@ void Client::Config::set_flags_for_version(Version version, int64_t sub_version) 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.02, at least one version of XB - case 0x31: // GC Ep1&2 US v1.00, GC US v1.01, XB US - case 0x34: // GC Ep1&2 JP v1.03 + 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 + case 0x34: // GC Ep1&2 JP v1.3 // In the case of GC Trial Edition, the IS_GC_TRIAL_EDITION flag is // already set when we get here (because the client has used V2 encryption // instead of V3) @@ -102,13 +102,13 @@ void Client::Config::set_flags_for_version(Version version, int64_t sub_version) case 0x33: // GC Ep1&2 EU 60Hz this->set_flag(Flag::NO_D6_AFTER_LOBBY); break; - case 0x35: // GC Ep1&2 JP v1.04 (Plus) + case 0x35: // GC Ep1&2 JP v1.4 (Plus) this->set_flag(Flag::NO_D6_AFTER_LOBBY); this->set_flag(Flag::ENCRYPTED_SEND_FUNCTION_CALL); this->set_flag(Flag::SEND_FUNCTION_CALL_NO_CACHE_PATCH); break; - case 0x36: // GC Ep1&2 US v1.02 (Plus) - case 0x39: // GC Ep1&2 JP v1.05 (Plus) + case 0x36: // GC Ep1&2 US v1.2 (Plus) + 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; diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index f76301c3..f1c8d117 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -2168,10 +2168,10 @@ struct S_ServerTime_B1 { // resulting B3 command is always 0. The checksum functionality does work on PSO // PC, just like the other versions. // This command doesn't work on some PSO GC versions, namely the later JP PSO -// Plus (v1.05), US PSO Plus (v1.02), or US/EU Episode 3. Sega presumably -// removed it after taking heat from Nintendo about enabling homebrew on the -// GameCube. On the earlier JP PSO Plus (v1.04) and JP Episode 3, this command -// is implemented as described here, with some additional compression and +// Plus (v1.5), US PSO Plus (v1.2), or US/EU Episode 3. Sega presumably removed +// it after taking heat from Nintendo about enabling homebrew on the GameCube. +// On the earlier JP PSO Plus (v1.4) and JP Episode 3, this command is +// implemented as described here, with some additional compression and // encryption steps added, similarly to how download quests are encoded. See // send_function_call in SendCommands.cc for more details on how this works. @@ -2656,8 +2656,8 @@ struct SC_TradeItems_D0_D3 { // D0 when sent by client, D3 when sent by server // D6 (C->S): Large message box closed (V3) // No arguments -// DC, PC, and BB do not send this command at all. GC US v1.00 and v1.01 will -// send this command when any large message box (1A/D5) is closed; GC Plus and +// DC, PC, and BB do not send this command at all. GC US v1.0 and v1.1 will send +// this command when any large message box (1A/D5) is closed; GC Plus and // Episode 3 will send D6 only for large message boxes that occur before the // client has joined a lobby. (After joining a lobby, large message boxes will // still be displayed if sent by the server, but the client won't send a D6 when diff --git a/src/Main.cc b/src/Main.cc index 7886afe3..73f1203f 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -1326,7 +1326,7 @@ Action a_assemble_all_patches( assemble-all-patches\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\ + versions, and one encrypted, for PSO GC JP v1.4, JP Ep3, and Ep3 Trial\n\ Edition). The output files are saved in system/client-functions.\n", +[](Arguments&) { ServerState s; diff --git a/src/Version.cc b/src/Version.cc index d82c19b9..91069400 100644 --- a/src/Version.cc +++ b/src/Version.cc @@ -213,17 +213,17 @@ uint32_t default_specific_version_for_version(Version version, int64_t sub_versi case 0x32: // GC Ep1&2 EU 50Hz case 0x33: // GC Ep1&2 EU 60Hz return 0x334F5030; // 3OP0 - case 0x36: // GC Ep1&2 US v1.02 (Plus) + case 0x36: // GC Ep1&2 US v1.2 (Plus) return 0x334F4532; // 3OE2 - case 0x39: // GC Ep1&2 JP v1.05 (Plus) + case 0x39: // GC Ep1&2 JP v1.5 (Plus) return 0x334F4A35; // 3OJ5 - case 0x34: // GC Ep1&2 JP v1.03 + case 0x34: // GC Ep1&2 JP v1.3 return 0x334F4A33; // 3OJ3 - case 0x35: // GC Ep1&2 JP v1.04 (Plus) + case 0x35: // GC Ep1&2 JP v1.4 (Plus) return 0x334F4A34; // 3OJ4 case -1: // Initial check (before sub_version recognition) - case 0x30: // GC Ep1&2 GameJam demo, GC Ep1&2 Trial Edition, GC Ep1&2 JP v1.02, at least one version of PSO XB - case 0x31: // GC Ep1&2 US v1.00, GC US v1.01, XB US + case 0x30: // GC Ep1&2 GameJam demo, GC Ep1&2 Trial Edition, GC Ep1&2 JP v1.2, at least one version of PSO XB + case 0x31: // GC Ep1&2 US v1.0, GC US v1.1, XB US default: return 0x33000000; } diff --git a/system/client-functions/VersionDetectGC.ppc.s b/system/client-functions/VersionDetectGC.ppc.s index c09b51b8..83fbe0e2 100644 --- a/system/client-functions/VersionDetectGC.ppc.s +++ b/system/client-functions/VersionDetectGC.ppc.s @@ -5,8 +5,7 @@ # S = 33 (which represents PSO GC) # G = game (4F (O) = Ep1&2, 53 (S) = Ep3) # R = region (45 (E), 4A (J), or 50 (P)) -# V = minor version | 30 (30 = 1.00, 31 = 1.01, 32 = 1.02, etc.), or 54 for -# Trial Edition +# V = minor version | 30 (30 = 1.0, 31 = 1.1, 32 = 1.2, etc.), or 54 for NTE # 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. diff --git a/system/client-functions/WriteMemory.ppc.s b/system/client-functions/WriteMemory.ppc.s index 0d18f667..5dedc318 100644 --- a/system/client-functions/WriteMemory.ppc.s +++ b/system/client-functions/WriteMemory.ppc.s @@ -18,7 +18,7 @@ # 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 GC disc version (0 = 1.00, 1 = 1.01, etc.) +# S should be 0, 1, 2, etc. for the GC disc version (0 = 1.0, 1 = 1.1, 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 VersionDetectGC or VersionDetectXB functions; see