keirf / flashfloppy-osd

On Screen Display and keyboard controller for FlashFloppy
The Unlicense
58 stars 15 forks source link

Fix disappearing notify display for SPI1 w/ 36 MHz clock (VGA hires mode) and implement Amiga-centric videoswitch functionality #47

Open tkurbad opened 2 years ago

tkurbad commented 2 years ago

Did some cleanup in comparison to PR #46 and added the basics of the videoswitch functionality. Slave OSD output on I2C2 is next in line...

tkurbad commented 2 years ago

Btw., resetting the SPI peripheral also helped with the videoswitch functionality. The OSD is returning consistently now after switching away from and back to the Amiga graphics input. This works even if I flip the flicker fixer switch while the Amiga input is not active, i.e. for the following switch sequence: Amiga input -> switch to RTG input -> (de-)activate flicker fixer for the Amiga input -> switch back to Amiga input

tkurbad commented 2 years ago

@keirf This is now ready for testing. Nothing fancy needed. Just compile it using my branch, flash it to two blue pills. Connect the first to a Gotek and to one Amiga's display, Connect the second to the I2C2 ports of the first (don't forget to add pull-ups as well) and the output to a second Amiga (or something FF-OSD capable). Both need to have the A0-A1 jumper set.

The second FF-OSD will now mirror what's on the first except for the flash config menu and will respect the "OSD Off" hotkey.

Todo: I want to reorder the code in i2c.c to better separate the two I2C ports from one another. Also, interrupt priority for I2C2 is probably suboptimal. Setting it to 0 was hunting a bug in my code. The STM errata seemed to suggest that this should be done. It makes the Amiga keyboard input a bit sluggish, however. All this I'll probably do tonight...

Edit: Done!