Run with reduced frame rate in warp mode
dirkwhoffmann opened this issue · comments
VirtualC64 has the option to run the VICII backend in warp mode with a lower frequency:
![Bildschirmfoto 2024-01-29 um 18 47 21](https://private-user-images.githubusercontent.com/12561945/300556465-642eae6f-9ad9-4c64-a4ed-5b8e2f49319a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIyMTg0OTgsIm5iZiI6MTcyMjIxODE5OCwicGF0aCI6Ii8xMjU2MTk0NS8zMDA1NTY0NjUtNjQyZWFlNmYtOWFkOS00YzY0LWE0ZWQtNWI4ZTJmNDkzMTlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI5VDAxNTYzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMzMjgyMTI5OWFkZGIzYTliOTU1ZGZkNDBmY2UxMzA4YjIwOGY4MmMzZDg1MDU1MTk1OTkyZmE5YzY0MWE2ZTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mR-24OEFHRvCVJcxGs9GHzsX7B_CSthaZ7v0HSixKbM)
It should be easy to implement something similar for Denise. Replacing
// Check if we are below the VBLANK area
if (vpos >= 26) {
with something like the following should do the trick:
// Check if we are below the VBLANK area
if (vpos >= 26 && (!amiga.isWarping() || agnus.pos.frame % 16 == 0)) {
A minor issue remains. If a frame is skipped, swapping the working buffer with the stable buffer must be disabled (i.e., PixelEngine::swapBuffers()
must not be executed). Otherwise, the display may flicker because swapping the buffer would replace a newer texture with an older one every other frame.