Skip to content

Commit

Permalink
Updating slot docs
Browse files Browse the repository at this point in the history
  • Loading branch information
afska committed Jan 14, 2024
1 parent 65e7f28 commit 396ac8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/wireless_adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Both Pokemon games and the multiboot ROM that the adapter sends when no cartridg
* `0b11`: If you join this room, your `clientNumber` will be 3.
* `0xff`: The server is full. You cannot join this room.
* Although `LinkWireless` uses this to know the number of connected players, that only works because -by design- rooms are closed when a player disconnects. The hardware allows disconnecting specific clients, so if the next available slot is e.g. 2, it can mean that there are 3 connected players (1 host + 2 clients) or that there are more players, but the third client (`clientNumber` = 2) has disconnected and the slot is now free.
* The number of available slots depends on `maxPlayers` (see [Setup](#setup---0x17)).
* The number of available slots depends on `maxPlayers` (see [Setup](#setup---0x17)) and/or [EndHost](#endhost---0x1b).
* 4th byte: Zero.

🆔 IDs are randomly generated. Each time you broadcast or connect, the adapter assigns you a new id.
Expand Down Expand Up @@ -465,7 +465,7 @@ Both Pokemon games and the multiboot ROM that the adapter sends when no cartridg

* Returns some information about the current connection and device state. The returned word contains:
- Bits `0-15`: The device ID (or zero if the device is not connected nor hosting).
- Bits `16-23`: A 4-bit array indicating which slots are being used.
- Bits `16-23`: A 4-bit array with slots. If the console is a client, it'll have a 1 in the position assigned to that slot (e.g. the one with `clientNumber` 3 will have `0100`). The host will always have `0000` here.
- Bits `24-31`: A number indicating the state of the adapter
- `0` = idle
- `1`/`2` = serving (host)
Expand All @@ -479,7 +479,7 @@ Both Pokemon games and the multiboot ROM that the adapter sends when no cartridg

* It's returns a list of the connected adapters, similar to what `AcceptConnections` responds, but also:

- `SlotStatus` has an extra word at the start of the response, indicating the `clientNumber` that the next connection will have (or `0xFF` if there are already 4 connected clients).
- `SlotStatus` has an extra word at the start of the response, indicating the `clientNumber` that the next connection will have (or `0xFF` if the room is not accepting new clients).
- `SlotStatus` can be called after `EndHost`, while `AcceptConnections` fails.

#### ConfigStatus - `0x15`
Expand Down

0 comments on commit 396ac8b

Please sign in to comment.