From 4a2b31c2915de7583dbe9134bdcfba3b5d5391ff Mon Sep 17 00:00:00 2001 From: alexisbalbachan Date: Sat, 6 Jan 2024 00:29:42 -0300 Subject: [PATCH] Update 2023-09-23-Pokemon-GEN-I-and-II-Link-Cable-Protocol.md Edited 0xFE explanation --- _posts/2023-09-23-Pokemon-GEN-I-and-II-Link-Cable-Protocol.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2023-09-23-Pokemon-GEN-I-and-II-Link-Cable-Protocol.md b/_posts/2023-09-23-Pokemon-GEN-I-and-II-Link-Cable-Protocol.md index e26b6d4..95cc21f 100644 --- a/_posts/2023-09-23-Pokemon-GEN-I-and-II-Link-Cable-Protocol.md +++ b/_posts/2023-09-23-Pokemon-GEN-I-and-II-Link-Cable-Protocol.md @@ -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**.