Difference between revisions of "Protocol:Packet 0x07"

From Sylverant
Jump to navigationJump to search
m (Grammar)
m (BlueCrab moved page Packet 0x07 to Protocol:Packet 0x07)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{| align="right"
 +
| __TOC__
 +
|}
 
The server sends Packets 0x07 and 0xA0 to communicate either a ship or block list to the client. The Sylverant Login Server always sends Packet 0x07 for the purpose of communicating the ship list, but the Ship Server uses 0xA0 for this purpose. This seems to be how other PSO servers implement the functionality, so I went for uniformity (either packet will probably work in either situation). Block lists (only communicated by the Ship Server) always use type 0x07.
 
The server sends Packets 0x07 and 0xA0 to communicate either a ship or block list to the client. The Sylverant Login Server always sends Packet 0x07 for the purpose of communicating the ship list, but the Ship Server uses 0xA0 for this purpose. This seems to be how other PSO servers implement the functionality, so I went for uniformity (either packet will probably work in either situation). Block lists (only communicated by the Ship Server) always use type 0x07.
  
==Dreamcast Packet Format==
+
The lobby information desk item list sent to clients by the ship server is sent as Packet 0x1F, and follows this same format.
 +
 
 +
The clients send Packet type 0xA0 to request the ship list when already on a ship. The server will then respond with a Packet 0xA0 generally (as mentioned above).
 +
 
 +
==Dreamcast Packet Format (Server->Client)==
 
{| border="1"
 
{| border="1"
 
! Bytes !! Meaning
 
! Bytes !! Meaning
 
|-
 
|-
| 0x00 || Packet Type (0x07 or 0xA0)
+
| 0x00 || Packet Type (0x07, 0x1F, or 0xA0)
 
|-
 
|-
 
| 0x01 || Flags (Number of Entries)
 
| 0x01 || Flags (Number of Entries)
Line 11: Line 18:
 
| 0x02-0x03 || Packet Size (Variable)
 
| 0x02-0x03 || Packet Size (Variable)
 
|-
 
|-
| 0x04... || Ship/Block Information (see below for format)
+
| 0x04... || Ship/Block/Item Information (see below for format)
 
|}
 
|}
  
  
The ship information field is populated as follows (offsets are relative):
+
===Information Format===
 +
The information field is populated as follows (offsets are relative):
 
{| border="1"
 
{| border="1"
 
! Bytes !! Meaning
 
! Bytes !! Meaning
 
|-
 
|-
| 0x00-0x03 || Menu ID (0x00000005 on Sylverant)
+
| 0x00-0x03 || Menu ID (0x00000005 for Ship select, 0x00000001 for Block Select, 0x00000000 for the lobby list)
 
|-
 
|-
 
| 0x04-0x07 || Item ID (The item in the list)
 
| 0x04-0x07 || Item ID (The item in the list)
Line 25: Line 33:
 
| 0x08-0x09 || Flags (0x0004 for the phantom ship entry, 0x0000 for all others)
 
| 0x08-0x09 || Flags (0x0004 for the phantom ship entry, 0x0000 for all others)
 
|-
 
|-
| 0x0A-0x1B || Ship/Block Name
+
| 0x0A-0x1B || Ship/Block/Info Desk Item Name
 
|}
 
|}
  
  
In addition, for a ship select there is always a phantom ship in front of the list that is populated as follows:
+
===Phantom Ship Entry===
 +
For a ship select, the phantom entry is as follows:
 
{| border="1"
 
{| border="1"
 
| Menu ID || 0x00000005
 
| Menu ID || 0x00000005
Line 37: Line 46:
 
| Flags || 0x0004 (make invisible?)
 
| Flags || 0x0004 (make invisible?)
 
|-
 
|-
| Ship/Block Name || "DATABASE/JP" (and set the last byte of the field to 0x08)
+
| Ship/Block/Info Name || "DATABASE/JP" (and set the last byte of the field to 0x08)
 
|}
 
|}
  
  
 +
===Phantom Block Entry===
 
For a block select, the phantom entry is as follows:
 
For a block select, the phantom entry is as follows:
 
{| border="1"
 
{| border="1"
Line 49: Line 59:
 
| Flags || 0x0000
 
| Flags || 0x0000
 
|-
 
|-
| Ship/Block Name || The name of the Ship (with the second to last byte set to 0x08)
+
| Ship/Block/Info Name || The name of the Ship (with the second to last byte set to 0x08)
 +
|}
 +
 
 +
 
 +
===Phantom Info Desk Entry===
 +
For the info desk list, the phantom entry is as follows:
 +
{| border="1"
 +
| Menu ID || 0x00040000
 +
|-
 +
| Item ID || 0x00000000
 +
|-
 +
| Flags || 0x0000
 +
|-
 +
| Ship/Block/Info Name || The name of the Ship (with the second to last byte set to 0x08)
 +
|}
 +
 
 +
 
 +
==Dreamcast Packet Format (Client->Server)==
 +
{| border="1"
 +
! Bytes !! Meaning
 +
|-
 +
| 0x00 || Packet Type (0xA0)
 +
|-
 +
| 0x01 || Flags (0x00)
 +
|-
 +
| 0x02-0x03 || Packet Size (0x0004)
 
|}
 
|}
  
 
[[Category:PSO Server Protocol]]
 
[[Category:PSO Server Protocol]]

Latest revision as of 05:13, 13 December 2021

The server sends Packets 0x07 and 0xA0 to communicate either a ship or block list to the client. The Sylverant Login Server always sends Packet 0x07 for the purpose of communicating the ship list, but the Ship Server uses 0xA0 for this purpose. This seems to be how other PSO servers implement the functionality, so I went for uniformity (either packet will probably work in either situation). Block lists (only communicated by the Ship Server) always use type 0x07.

The lobby information desk item list sent to clients by the ship server is sent as Packet 0x1F, and follows this same format.

The clients send Packet type 0xA0 to request the ship list when already on a ship. The server will then respond with a Packet 0xA0 generally (as mentioned above).

Dreamcast Packet Format (Server->Client)

Bytes Meaning
0x00 Packet Type (0x07, 0x1F, or 0xA0)
0x01 Flags (Number of Entries)
0x02-0x03 Packet Size (Variable)
0x04... Ship/Block/Item Information (see below for format)


Information Format

The information field is populated as follows (offsets are relative):

Bytes Meaning
0x00-0x03 Menu ID (0x00000005 for Ship select, 0x00000001 for Block Select, 0x00000000 for the lobby list)
0x04-0x07 Item ID (The item in the list)
0x08-0x09 Flags (0x0004 for the phantom ship entry, 0x0000 for all others)
0x0A-0x1B Ship/Block/Info Desk Item Name


Phantom Ship Entry

For a ship select, the phantom entry is as follows:

Menu ID 0x00000005
Item ID 0x00000000
Flags 0x0004 (make invisible?)
Ship/Block/Info Name "DATABASE/JP" (and set the last byte of the field to 0x08)


Phantom Block Entry

For a block select, the phantom entry is as follows:

Menu ID 0x00000001
Item ID 0x00000000
Flags 0x0000
Ship/Block/Info Name The name of the Ship (with the second to last byte set to 0x08)


Phantom Info Desk Entry

For the info desk list, the phantom entry is as follows:

Menu ID 0x00040000
Item ID 0x00000000
Flags 0x0000
Ship/Block/Info Name The name of the Ship (with the second to last byte set to 0x08)


Dreamcast Packet Format (Client->Server)

Bytes Meaning
0x00 Packet Type (0xA0)
0x01 Flags (0x00)
0x02-0x03 Packet Size (0x0004)