Parabellum's Projects Tracker - ParaJVE
Viewing Issue Advanced Details
26 Emulation > Timings major always 2009-11-04 20:37 2011-01-02 18:23
parabellum ALL  
parabellum -  
urgent -  
resolved Release 0.6.0  
none Release 0.7.0  
Scramble, Pole Position, Web Wars
0000026: Most games are runnning too fast
Although there has been a fix regarding the emulation speed (cf. issue 0000025), most of the games are still running too fast on the emulator.

For instance, the first level of Scramble is scrolled in 25 seconds in the emulator, while the same area takes 40 seconds on the real Vectrex.

There are other games that are obviously still running too fast. Good examples are Web Wars, or Pole Position.
Not platform dependant
Issue History
2009-11-04 20:37 parabellum New Issue
2009-11-04 20:37 parabellum Status new => assigned
2009-11-04 20:37 parabellum Assigned To => parabellum
2009-11-04 20:37 parabellum Cartridge => Scramble, PolePosition, WebWars
2009-11-04 20:40 parabellum Cartridge Scramble, PolePosition, WebWars => Scramble, Pole Position, Web Wars
2009-12-15 12:51 parabellum Note Added: 0000027
2009-12-15 12:51 parabellum Status assigned => resolved
2009-12-15 12:51 parabellum Fixed in Version => Beta 0.7.0
2009-12-15 12:51 parabellum Resolution open => fixed
2009-12-15 15:20 parabellum Note Edited: 0000027
2011-01-02 18:23 parabellum Fixed in Version => Release 0.7.0

2009-12-15 12:51   
(edited on: 2009-12-15 15:20)
These games were running too fast on the emulator because the execution of their code for one frame took much more than the value set into the T2 timer.

The value set in the T2 timer is used to ensure that a frame will always take at least this amount of time to execute (since the next frame will not start before the T2 delay has elapsed). So this effectively provides a constant framerate, if and only if the loop execution is too fast and takes less time than the specified T2 value.

However, this does not prevent the game loop from executing in more than the allocated time in T2. In fact, some games take roughly 2 times the delay set in T2 to process a frame (for instance, Web-Wars).
ParaJVE did not take this fact into account, and had its timing synchronized as if only T2 milliseconds had ellapsed (while it could be 2 times more!). Hence the emulated framerate was much too fast.

Now that this issue is fixed, ParaJVE waits for the exact delay of each game loop, so the emulated speed is exactly the same as the one on a real vectrex! But as a side effect, the slowdowns are now emulated too, and this often mean that 'slow' vectrex games will only run at 20-30 FPS instead of the optimal 50 FPS...