starrhorne / chip8-rust

Yet another rust chip8 emulator
The Unlicense
142 stars 20 forks source link

Wrong sound and delay timer frequency #3

Open theobori opened 2 years ago

theobori commented 2 years ago

You decrement the delay and the sound timer in Processor::tick.

But the function is managed by only one clock that you have set to 2 milliseconds, it means the has a 500hz clock. But according to this document http://devernay.free.fr/hacks/chip8/C8TECH10.HTM#2.5 it is supposed to have a 60hz clock.

It impacts the gameplay on some games like Space Invaders, the player moves too slowy compared to the ennemies.