Skip to content

Commit

Permalink
Update 2023-09-23-Pokemon-GEN-I-and-II-Link-Cable-Protocol.md
Browse files Browse the repository at this point in the history
Edited 0xFE explanation
  • Loading branch information
alexisbalbachan authored Jan 6, 2024
1 parent 55ca8e2 commit 4a2b31c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ This step is almost exactly the same as the seed exchange but with a bigger payl

The exchange will start after the first non 0xFD byte appears and a total of **415 bytes** will be exchanged.

There's only one restriction: **The payload must not contain 0xFE**. 0xFE means that there is no more data to be exchanged, i'm not exactly sure how it works internally, but once the exchange ends the other side will just ignore everything after that byte (it's like an end of buffer marker or something like that).
There's only one restriction: **The payload must not contain 0xFE**. 0xFE means that there is no more data to be exchanged, i'm not exactly sure how it works internally, but once the exchange ends the other side will just ignore that byte and the rest of the payload will be shifted by one, messing up everything after that 0xFE.

What happens when 0xFE is part of the payload? It needs to be patched (see [Patch Section](#patch-section)). To keep it simple for now: **Each 0xFE byte is replaced with 0xFF before being sent**.

Expand Down

0 comments on commit 4a2b31c

Please sign in to comment.