-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Serial comm update #1820
Serial comm update #1820
Conversation
Never mind. This seems to be the same weirdness I've experienced in the past where the DreamConn doesn't seem to be created until after the configuration file is fully setup, and then flycast is restarted. I wasn't experiencing this on my local build because I wasn't deleting the config files before rerunning tests. I'll dig into why that is later. Also, I think I'd like to argue for a separate thread to handle the serial context. There really isn't any guarantee that data will be sent on async_wrie until the context is run. With what's in there, that may not happen until the next write. Are there any restrictions this project makes toward spinning up another thread? |
No problem adding a new thread to handle serial communication. |
…ed serial timeouts; process serial in thread; removed crc from DreamcastControllerUsb sdl definition
085fb52
to
09a5231
Compare
@Tails86 Verified on MacOS 15.2, Ubuntu 20.04, Windows 11 23h2 |
@flyinghead this should be good to go then |
Hey guys, somewhat unrelated but I'm looking for the actual maple bus speed, so I can set the maple DMA timer correctly in Flycast. Some games are very sensitive to this. |
I came up with these maximum estimates based on the timing I was seeing.
If I recall correctly, I generally noticed that communication happens at 60 Hz (I assume it would be 50 Hz for 50 Hz systems though). It always polls the controller at that frequency, and communication to the VMU would happen at that frequency too. I'll parse through some of the data I have saved in a few hours. |
But I guess with that data, you could roll with 0.5 mbps since I assume you're tied to the game's driver anyway for the frequency in which data is requested from the device. I had computed 1.3 mbps as an upper end because I didn't always see that 64-bit train delay for some things the controller was communicating. I think that gap was mainly caused by memory access delay. |
Oh, but I did create my client-side driver without that gap, and I didn't see any issues from the games I played on a real Dreamcast. What games are being touchy with that? |
Apparently I was off by a factor of 2 since it's 128-bit trains (4 words), not 64. So that translates to a speed of 740 Kb/s, presumably from a VMU, which is in line with your findings. |
Yep, you're right. I was also just thinking 16 bit words for some reason. I think I computed that lower ~0.5 mbps from |
asio::buffer()
references the string given to it, and the string given to it was potentially going out of context before the asynchronous write operation completedI only did testing on Windows. @kosekmi do you mind checking on Linux and Mac?