OpenSpand v0.1.0 has a composite video out connector. I made some test-code already on the previous version which mostly worked, but lacked the /HALT signal to be properly completed. Now that the signal is available, it is possible to do everything needed.
To be able to construct a video signal, most of the ULA functionality has to be replicated.
I've struggled several days with this, and it boils down to me missing 1 critical fact and also too much complexity in the PIO code.
I had missed that the sync-generator is free running until it either wraps around or gets an interrupt acknowledge. I really thought it was reset every vsync as well. Easy to fix when I had read about it.
The PIO code was stranger. I tried to make 2 state machines, one to count cycles and generate syncs as well as tell the pixel generator when to operate. The pixel generator is a separate state machine. Synchronization between them was done via a PIO-interrupt. It didn't work very well for some reason, I could get it to work mostly in text mode but not in other modes. The fix was to remove the interrupt synchronization, simplifying the code dramatically! Now everything works as expected, in all modes.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.