Skip to content

Handle Everdrive header offset in libflashcart when receiving data > 504 bytes#141

Merged
buu342 merged 1 commit into
buu342:masterfrom
mracsys:everdrive_large_receive
Mar 9, 2026
Merged

Handle Everdrive header offset in libflashcart when receiving data > 504 bytes#141
buu342 merged 1 commit into
buu342:masterfrom
mracsys:everdrive_large_receive

Conversation

@mracsys

@mracsys mracsys commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Description

As discussed in #140, this accounts for the header bytes in the first chunk when receiving messages larger than 504 bytes from Everdrives. Subsequent loops for large messages read the full 512 byte chunk size.

Related Issue

#140

Motivation and Context

Fixes #140. Reading from Everdrive for messages larger than 504 bytes would always fail with error DEVICEERR_READFAIL. To isolate the specific cause in the function, as there were multiple locations this could be thrown, I modified the error codes in an offline branch. This pointed to the call in the while loop reading the main payload.

How Has This Been Tested?

Tested on both X7 and V3 Everdrives on OS 3.10 and 3.06, respectively, with the library's protocol set to V2. I'm using the library in my own client at
https://github.com/mracsys/n64usb
with the randomizer branch
https://github.com/mracsys/OoT-Randomizer/tree/summercart_mw_support

Screenshots (if appropriate):

N/A

@buu342

buu342 commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Seems to all be building and working. Thanks for the PR! 😄

@buu342
buu342 merged commit 3adfc66 into buu342:master Mar 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Everdrive header offset in libflashcart when receiving data > 504 bytes

2 participants