-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a timeout to the EverDrive side of the library #85
Comments
Paging @rasky and @anacierdem, since this could concern libdragon. |
Found the original reason why this was added. It was taken from krikzz's repo to fix "something" that I don't remember. But I remember isolating that function as the source of the issue, comparing it to the reference code and this change was fixing the problem for me. Also note that I am using libdragon with this change for a very long time without any issues. I suspect it might have something to do with threading for the original sdk? |
After @rasky's reminder I remember this was to fix N64 side waiting too long if the PC is not listening and emptying the usb buffer. Also probably it was not waiting indefinitely but was slowing down the code too much. I will check how exactly it behaves. |
That's a perfectly valid reason, the function just needs to be modified to output either error (on timeout) or zero on success, and subsequent calls to the function need to be modified to take the return value into account and branch accordingly, to prevent pushing data to the USB when it is still busy 😄 |
Fixed in b716f17 |
anacierdem added 24d404e to the library, and it seemed to work fine with the samples, however a user was having trouble where his homebrew was failing to print. Later, we isolated a single sample which presented the same issue, being nu5 from libultra. We tried tweaking the function but we could not get it to work, so I undid the commit. See issue #83 for more information.
So unfortunately the solution proposed in the commit might not work well in a practical sense. Some alternative solution is needed, that is if the risk of the USB stalling permanantly is possible.
Hopefully this issue can be looked into by someone who owns an EverDrive?
The text was updated successfully, but these errors were encountered: