mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-04-25 08:07:59 -05:00
LinkRawWireless: inverted ACK wait
This commit is contained in:
parent
4b29529f0a
commit
892f49bf79
BIN
docs/img/wireless/ack-inverted.png
Normal file
BIN
docs/img/wireless/ack-inverted.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
|
|
@ -516,7 +516,7 @@ If we analyze whether a command ID throws an 'invalid command' error (`0x996601e
|
|||
|
||||
- The extra parameter has two bitarrays:
|
||||
- Bits `0-4`: The clients that _received_ data.
|
||||
- Bits `8-11`: The clients marked as _inactive_. This depends on the # of maximum transmissions configured with the [Setup](#setup---0x17) command.
|
||||
- Bits `8-11`: The clients marked as _inactive_. In theory, this depends on the # of maximum transmissions configured with the [Setup](#setup---0x17) command, but it seems to just mark them as inactive after 4 seconds.
|
||||
|
||||
🔗 When the adapter is disconnected from the host, it sends a `0x99660029`.
|
||||
|
||||
|
|
@ -528,12 +528,16 @@ If we analyze whether a command ID throws an 'invalid command' error (`0x996601e
|
|||
|
||||
While the clock is inverted, the acknowledge procedure is 'standard' but with the inverted roles
|
||||
|
||||
1. The adapter goes low as soon as it can.
|
||||
2. The GBA goes high.
|
||||
3. The adapter goes high.
|
||||
4. The GBA goes low _when it’s ready_.
|
||||
5. The adapter goes low when it's ready.
|
||||
6. The adapter starts a transfer, clock starts pulsing, and both sides exchange the next 32 bit value.
|
||||
[](img/wireless/ack-inverted.png)
|
||||
|
||||
1. The adapter goes low as soon as it can.
|
||||
2. The GBA goes high.
|
||||
3. The adapter goes high.
|
||||
4. The GBA goes low _when it’s ready_, but **wait at least 50us**! (\*)
|
||||
5. The adapter goes low when it's ready.
|
||||
6. The adapter starts a transfer, clock starts pulsing, and both sides exchange the next 32 bit value.
|
||||
|
||||
> (\*) Clock inversion is _finicky_. If you don't wait enough time between transfers, the adapter will desync _forever_ (well, until you reset it with _SD=HIGH_). `LinkWireless` doesn't use wait commands and calls the regular `SendData` instead, it's less efficient but way more reliable.
|
||||
|
||||
## Wireless Multiboot
|
||||
|
||||
|
|
|
|||
|
|
@ -1213,6 +1213,10 @@ class LinkRawWireless {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Link::wait(2); // this wait is VERY important to avoid desyncs!
|
||||
// wait at least 40us; monitoring VCOUNT to avoid requiring a timer
|
||||
|
||||
// (normally, this occurs on the next linkSPI.transfer(...) call)
|
||||
if (isLastPart) {
|
||||
linkSPI._setSOLow();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user