-
Notifications
You must be signed in to change notification settings - Fork 58
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
Tube ULA: 2-byte R3 transfers misbehaving #216
Comments
Sam, Is it possible to share the source code for the tests, so that we can see what they are doing which would really help with debugging? I also recently wrote some tube R3 tests which were posted here: Do you mind if I ask what your motivation for writing the tests is? Dave |
Steve, I think this is the bug that is breaking two-byte mode in Sam's test: It's in tube.c line 83:
An extra set of parenthesis is needed:
BTW, there are lots of other minor issues that show up with my R3 test case. Dave |
Hiya. The motivation for writing the tests is to save me time putting SD cards in and out, or constantly loading/unloading disc images whilst I'm developing a game (Chuckie Egg was a nightmare until I found a release of b-em that didn't break with a way of doing transfers - VDFS to the rescue). Also, two people have said they are experiencing problems with CE2023 and their PiTubeDirect so, whilst my physical machines are packed away over Christmas, I thought I'd create some tests to get to the bottom of that. Main code in the test is this:
I can fill in the gaps if the naming doesn't make values and addresses clear. |
If it helps, here's a reference implementation of the Tube ULA I wrote for jsBeeb. It certainly doesn't cover things like the magic numbers when R3 is empty or writing even though R3 is in one byte mode and only has one byte in it - didn't actually think to try those. :) https://github.com/mattgodbolt/jsbeeb/blob/main/tube.js With an oops! here |
I have put Dave's fix on a new branch, sf/issue216, and pushed this to GitHub. This passes Sam's test case. I will look at the other issues found by Dave's tests. If you need a Windows built before I have finished that do let me know. |
Hey Steve, a Windows build would be very useful, yes please, for checking I can get through that route for faster game loading with the next one. And thank you muchly. :) |
Windows build as a pre-release: https://github.com/stardot/b-em/releases/tag/issue216%231 |
Yep. Now working as expected. Again, thank you very much. |
I have now pushed a series of further commits which fix the rest of the discrepancies found by Hoglet's test cases. The only parts of the output I cannot get identical are when a random byte is loaded into parasite to host FIFO on reset (short of hard-coding the value). |
I'm writing a suite of Tube ULA tests and have noticed, with the Music 5000 (filt) release at least, that 2-byte transfers using R3 is causing all kinds of issues.
Gradually evolving Tube tests SSD is here: https://samskivington.com/public/beeb-discs/tubeTests.ssd
Expected: Second test in the boot menu loads and runs the test to completion
Actual: Test hangs after writing two bytes to R3 (Tube action code 3).
The text was updated successfully, but these errors were encountered: