Neotron-Compute / Neotron-Pico-BIOS

BIOS for the Neotron Pico
GNU General Public License v3.0
11 stars 5 forks source link

Add vertical blanking interrupt, and other timers. #92

Open thejpster opened 8 months ago

thejpster commented 8 months ago

Applications often want to do things synchronized to the vertical blanking interval, such as drawing to the framebuffer. The BIOS should expose a mechanism where the OS can do things during that period.

  1. The BIOS could take a callback function and call it in interrupt context on Core 0 when the Vertical Blanking Interval begins.
  2. The BIOS could expose a function called wait_for_vbi which just spins until the VBI occurs.

We'd need to think a bit about what the OS will do if there is no vertical blanking interval - e.g. with the QEMU BIOS. We also need to explain when it's 60 Hz and when it's 70 Hz.