MiSTer-devel / BBCMicro_MiSTer

BBC Micro B and Master 128K for MiSTer
24 stars 16 forks source link

Fix timing for Elite #5

Closed sharpie7 closed 3 years ago

sharpie7 commented 3 years ago

These small changes seem to fix the timing so that Elite runs OK. They do fix a rare situation in the Videoproc. Oddly this case doesn't seem to be directly relevatn to Elite so I think the fact is now works is due to some odd timing problem when Videoproc registers are changed on the fly. I suspect my code structure is just a little more robust which makes it work.

sorgelig commented 3 years ago

You brake pixel rate and therefore break scandoubler FX modes. I can't accept this change.

sorgelig commented 3 years ago

what problem is fixed by removing clken_pixel? It's logically incorrect as shiftreg must be reloaded at pixel clock.

sorgelig commented 3 years ago

new version supports Elite and doesn't affect other games.

sharpie7 commented 3 years ago

what problem is fixed by removing clken_pixel? It's logically incorrect as shiftreg must be reloaded at pixel clock.

According to this, the vidproc will do shift register loads even if there is no pixel (ie the fetch timer just causes fetches independently of the pixel timer). "If 10 columns are selected and the video clock rate is 2 MHz, only the odd bits of each byte will affect the display". My change aligns the model to that behaviour.

It might not be logical, but if I was designing the hardware I would keep that simplicity too!

You brake pixel rate and therefore break scandoubler FX modes.

I make a consistent set of "virtual pixels" which is what the scandoubler sees. In some modes the real pixels span two or four virtual pixels horizontally, but what's the problem with that? As I recall the scandoubler features worked fine, but I will check again. If you know one that doesn't I would be interested to know what it is.