GithubHelp home page GithubHelp logo

60 Hz refresh rate about pico-zxspectrum HOT 1 OPEN

fruit-bat avatar fruit-bat commented on July 20, 2024
60 Hz refresh rate

from pico-zxspectrum.

Comments (1)

ikjordan avatar ikjordan commented on July 20, 2024

Apologies for the late reply. I've had similar issues with my Pico ZX81 emulator (https://github.com/ikjordan/picozx81)
The approach I took was:

  • To run with a 50Hz system interrupt, but keep the display refresh at 60Hz.
  • I use triple memory buffers for the display (easier on memory in black and white!). With double buffering there were rare cases of the emulator code zeroing the swapped buffer whilst it was still to be processed in the scanline buffers
  • When the ZX81 emulator code has generated a full display the buffer is immediately used by the VGA or DVI scanline routines. This ensures minimal lag, but can result in some tearing if the display is rapidly scrolling.
  • I use an AY emulator that stores timestamped AY register changes triggered during the frame and then uses those changes to create a sound frame when the display is swapped into the scanline. This is my attempt to keep sound and display in sync, and also to avoid jitter in the sound due to variations in compute time for the Z80 and ULA emulators.
  • The 50Hz interrupt was derived from the PWM or I2S sound interrupt rate

Incidentally, many thanks to @fruit-bat for inspiring me to start the ZX81 emulator, and for the usb hub code :-)

from pico-zxspectrum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.