06-19-2026, 06:07 AM
(06-19-2026, 12:47 AM)sodthor Wrote: generated asm seems ok, registers saved in stack and restored, no bank 3 register used.
"vgm send data" may take too much time in the interrupt, maybe removing it from vbl and call it after Sleep may help
I have the vgm driver synched to vbl. It transfers an entire frame of sound data for each channel for bgm and/or sfx to shared memory during vbl and triggers the z80 to use it. It could be slowing things down when all channels are in use. I wonder, if it's going to be possible to have it coexist. It would be limiting, but the z80 driver could be configured to use a larger amount of shared memory, and sfx and bgm data gets preloaded, like the snk driver and pgs driver do.
Do we have control over the timing mechanism for serial? Is vbl the best synching interval?
Does serial try to send the full write payload and read full payload within one frame? Can they, or do they alternate each frame? Seems like one system should be the host and the other the guest and the host sends requests and its own data in the request
Hmmm... I'm trying to think about what kind of data the 2 systems would have to synch. At a minimum they may just need to tell each other the current user inputs and each system knows how to handle everything else on its end.
I've worked a lot with serial devices and communication protocols, but less at the bare metal level. Given a guest/host, the baud rate is the same between the 2, and they take turns with the host sending requests and data payloads and the guest sending replies.
I guess I'm not sure on NGPC how much is handled by the hardware vs how much you have to be directly involved in reading bit by bit.
I recall seeing an official snk document on linking at one point, but not sure how helpful it is.

