-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allow Device to attach Serial/Link Cable #21
Comments
This can be done by hooking a In the current implementation, the transfer of data happens instantly. In a real gameboy, it would take several clock cycles. When implementing such a function, this might also be useful since you can keep the emulator running while waiting for the network. |
I'm using rboy in Godot. My gameboys are pickup-able object and they update with they physics update. But they update 60 times per sec in order, not at the same time. I should re-implement that as simultaneous updates. The challenge will be multi threading that to be somewhat lockstep (so that no one My object currently uses |
|
I think this is right? I'm not great with lifetimes yet, this will work, but I'm not sure it's the best way to handle this. And I'm only 60% that read address is correct.
Let me know if there is anything I should change or if I can PR that as-is. |
I do not think that the devices need to be in perfect sync. Normal gameboys probably would not be either. They do sync a clock for transferring data, but that is handled by the callback mechanism. Using I do not think |
You're right that they don't need to be "perfectly" in sync, but they should definitely be more in sync than I'm doing. I'm only updating them in order 60x per sec. Every single frame, they'll go one or two frame, 70k-140k cycles, out of sync before catching up. I think I need move my cycler to a separate thread that pushes all the The callback is reading from the This is what I spun up for audio using
|
The callback is a function is a function that has an u8 argument that returns an Option. |
I'd like to be able to connect Serial/Link Cables.
I'm imagining something like syncing this similarly to how the audio system works (you
impl SerialConnection for LinkCable {
?)I can imagine if you don't have both of the Device's
do_cycle
's in sync this can cause some problems, since there doesn't seem to be a "buffer" system in the system.At minimum, I'd like to make the printer output data buffers instead of to files. Device->Device connections might be too hard to be worth the time.
The text was updated successfully, but these errors were encountered: