update some command notes

This commit is contained in:
Martin Michelsen
2022-09-22 22:52:14 -07:00
parent c43fa7a40d
commit 9524d05279
+32 -32
View File
@@ -301,13 +301,16 @@ struct SC_TextHeader_01_06_11_B0_EE {
// already selected a ship, for example). Command 17 should be used instead for // already selected a ship, for example). Command 17 should be used instead for
// the first connection. // the first connection.
// All commands after this command will be encrypted with PSO V2 encryption on // All commands after this command will be encrypted with PSO V2 encryption on
// PC, or PSO V3 on V3. // DC, PC, and GC Episodes 1&2 Trial Edition, or PSO V3 encryption on other V3
// The client will respond with an (encrypted) 9A or 9E command on V3; on PSO // versions.
// PC, the client will respond with an (encrypted) 9A or 9D command. // DCv1 clients will respond with an (encrypted) 93 command.
// DCv2 and PC clients will respond with an (encrypted) 9A or 9D command.
// V3 clients will respond with an (encrypted) 9A or 9E command, except for GC
// Episodes 1&2 Trial Edition, which behaves like PC.
// The copyright field in the below structure must contain the following text: // The copyright field in the below structure must contain the following text:
// "DreamCast Lobby Server. Copyright SEGA Enterprises. 1999" // "DreamCast Lobby Server. Copyright SEGA Enterprises. 1999"
// (The above text is required on all versions that use this command, including // (The above text is required on all versions that use this command, including
// those versions not running on the DreamCast.) // those versions that don't run on the DreamCast.)
struct S_ServerInit_DC_PC_V3_02_17_91_9B { struct S_ServerInit_DC_PC_V3_02_17_91_9B {
ptext<char, 0x40> copyright; ptext<char, 0x40> copyright;
@@ -339,9 +342,8 @@ struct C_LegacyLogin_PC_V3_03 {
// header.flag specifies if the password was correct. If header.flag is 0, the // header.flag specifies if the password was correct. If header.flag is 0, the
// password saved to the memory card (if any) is deleted and the client is // password saved to the memory card (if any) is deleted and the client is
// disconnected. If header.flag is nonzero, the client responds with an 04 // disconnected. If header.flag is nonzero, the client responds with an 04
// command. On PC/V3, it's likely this command is a relic from earlier versions // command. Curiously, it looks like even DCv1 doesn't use this command in its
// of the login sequence; most servers use the DB/9A/9C/9E commands for logging // standard login sequence, so this may be a relic from very early development.
// in PC/V3 clients.
// No other arguments // No other arguments
// 03 (S->C): Start encryption (BB) // 03 (S->C): Start encryption (BB)
@@ -360,7 +362,8 @@ struct S_ServerInit_BB_03_9B {
// 04 (C->S): Legacy login // 04 (C->S): Legacy login
// See comments on non-BB 03 (S->C). This is likely a relic of an older, // See comments on non-BB 03 (S->C). This is likely a relic of an older,
// now-unused sequence. // now-unused sequence. Like 03, this command isn't used by any PSO version that
// newserv supports.
// header.flag is nonzero, but it's not clear what it's used for. // header.flag is nonzero, but it's not clear what it's used for.
struct C_LegacyLogin_PC_V3_04 { struct C_LegacyLogin_PC_V3_04 {
@@ -394,14 +397,14 @@ struct C_LegacyLogin_BB_04 {
// as Episodes 1&2 Trial Edition. All other V3 clients save it as opaque data to // 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 // be returned in a 9E or 9F command later. newserv sends the client config
// anyway to clients that ignore it. // anyway to clients that ignore it.
// Client will respond with a 96 command, but only the first time it receives // The client will respond with a 96 command, but only the first time it
// this command - for later 04 commands, the client will still update its client // receives this command - for later 04 commands, the client will still update
// config but will not respond. Changing the security data at any time seems ok, // its client config but will not respond. Changing the security data at any
// but changing the guild card number of a client after it's initially set can // time seems ok, but changing the guild card number of a client after it's
// confuse the client, and (on pre-V3 clients) possibly corrupt the character // initially set can confuse the client, and (on pre-V3 clients) possibly
// data. For this reason, newserv tries pretty hard to hide the remote guild // corrupt the character data. For this reason, newserv tries pretty hard to
// card number when clients connect to the proxy server. // hide the remote guild card number when clients connect to the proxy server.
// BB clients have multiple client configs. This command sets the client config // BB clients have multiple client configs; this command sets the client config
// that is returned by the 9E and 9F commands, but does not affect the client // that is returned by the 9E and 9F commands, but does not affect the client
// config set by the E6 command (and returned in the 93 command). In most cases, // config set by the E6 command (and returned in the 93 command). In most cases,
// E6 should be used for BB clients instead of 04. // E6 should be used for BB clients instead of 04.
@@ -413,7 +416,7 @@ struct S_UpdateClientConfig {
// The ClientConfig structure describes how newserv uses this command; other // The ClientConfig structure describes how newserv uses this command; other
// servers do not use the same format for the following 0x20 or 0x28 bytes (or // servers do not use the same format for the following 0x20 or 0x28 bytes (or
// may not use it at all). The cfg field is opaque to the client; it will send // may not use it at all). The cfg field is opaque to the client; it will send
// back the contents verbatim in its next 9E command. // back the contents verbatim in its next 9E command (or on request via 9F).
ClientConfigT cfg; ClientConfigT cfg;
}; };
@@ -607,15 +610,13 @@ struct C_WriteFileConfirmation_V3_BB_13_A7 {
// TODO: Check if this command exists on DC v1/v2. // TODO: Check if this command exists on DC v1/v2.
// 17 (S->C): Start encryption at login server (except on BB) // 17 (S->C): Start encryption at login server (except on BB)
// Same format as 02 command, but a different copyright string. // Same format and usage as 02 command, but a different copyright string:
// All commands after this command will be encrypted with PSO V2 encryption on
// PC, or PSO V3 encryption on V3.
// V3 clients will respond with a DB command the first time they receive a 17
// command in any online session, with the exception of Episodes 1&2 trial
// edition (which responds with a 9A). After the first time, V3 clients will
// respond with a 9E. Non-V3 clients will respond with a 9D.
// The copyright field in the structure must contain the following text:
// "DreamCast Port Map. Copyright SEGA Enterprises. 1999" // "DreamCast Port Map. Copyright SEGA Enterprises. 1999"
// Unlike the 02 command, V3 clients will respond with a DB command the first
// time they receive a 17 command in any online session, with the exception of
// Episodes 1&2 trial edition (which responds with a 9A). After the first time,
// V3 clients will respond with a 9E. DCv1 will respond with a 90. Other non-V3
// clients will respond with a 9A or 9D.
// 18 (S->C): License verification result (PC/V3) // 18 (S->C): License verification result (PC/V3)
// Behaves exactly the same as 9A (S->C). No arguments except header.flag. // Behaves exactly the same as 9A (S->C). No arguments except header.flag.
@@ -700,9 +701,10 @@ struct SC_GameCardCheck_BB_0022 {
}; };
// Command 0122 uses a 4-byte challenge sent in the header.flag field instead. // Command 0122 uses a 4-byte challenge sent in the header.flag field instead.
// This version of the command has no other arguments.
// 23 (S->C): Unknown (BB) // 23 (S->C): Unknown (BB)
// header.flag is used, but command has no other arguments. // header.flag is used, but the command has no other arguments.
// 24 (S->C): Unknown (BB) // 24 (S->C): Unknown (BB)
@@ -751,8 +753,8 @@ struct S_Unknown_BB_25 {
// 3F: Invalid command // 3F: Invalid command
// 40 (C->S): Guild card search // 40 (C->S): Guild card search
// Server should respond with a 41 command if the target is online. If the // The server should respond with a 41 command if the target is online. If the
// target is not online, server doesn't respond at all. // target is not online, the server doesn't respond at all.
struct C_GuildCardSearch_40 { struct C_GuildCardSearch_40 {
le_uint32_t player_tag; le_uint32_t player_tag;
@@ -1088,10 +1090,8 @@ struct S_Unknown_PC_V3_80 {
// online, the server may store it for later delivery, send their auto-reply // online, the server may store it for later delivery, send their auto-reply
// message back to the original sender, or simply drop the message. // message back to the original sender, or simply drop the message.
// On GC (and probably other versions too) the unused space after the text // On GC (and probably other versions too) the unused space after the text
// contains uninitialized memory when the client sends this command. None of the // contains uninitialized memory when the client sends this command. newserv
// unused space appears to contain anything important; newserv clears the // clears the uninitialized data for security reasons before forwarding.
// uninitialized data for security reasons before forwarding and things seem to
// work fine.
template <typename CharT> template <typename CharT>
struct SC_SimpleMail_81 { struct SC_SimpleMail_81 {