Running Supermodel at 57.5 Hz

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Running Supermodel at 57.5 Hz

Postby Apples555 » Wed Jun 14, 2017 1:50 pm

I've compiled Supermodel to run at 57.5 Hz (because of the speed issues), and it runs very well. However, the sound is bad and pops, particularly on the MPEG sound.

I went through Model3.cpp, Soundboard.cpp, and DSB.cpp and changed every reference I saw from 60 to 57.5. This had no effect on the issue. Has anyone else had this issue?
Last edited by Apples555 on Fri Jun 16, 2017 8:06 pm, edited 1 time in total.
Apples555
 
Posts: 6
Joined: Tue Jun 13, 2017 7:29 pm

Re: Running Supermodel at 57.5 Hz

Postby Apples555 » Wed Jun 14, 2017 9:57 pm

I've done some more testing, specifically comparing against the original arcade board, and have found that the closest refresh rate to the original is ~55Hz. 56 is too fast, and 54 is too slow. 55 is still too slow, but closest.

To achieve this, I modified this line in main.cpp.

UINT32 frameTime = (UINT32)(1000 / 55.f); // 60 fps, we could roll with 57.5? that would be a jerk fest on 60hz screens though


As well as SUPERMODEL_FPS in Audio.cpp.

There must be some setting for the poor MPEG sound, perhaps a sampling frequency optimized for 60Hz.
Apples555
 
Posts: 6
Joined: Tue Jun 13, 2017 7:29 pm

Re: Running Supermodel at 57.5 Hz

Postby Ian » Thu Jun 15, 2017 12:57 am

Disable v-sync.. and let supermodel run. What exact frame rate do you get? It maybe under of over 57.5 because the timers aren't that high resolution. That's not going to help
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Running Supermodel at 57.5 Hz

Postby Apples555 » Thu Jun 15, 2017 5:30 am

I will try this tonight, Ian.

Thank you for making such an excellent emulator. I have enjoyed it greatly.
Apples555
 
Posts: 6
Joined: Tue Jun 13, 2017 7:29 pm

Re: Running Supermodel at 57.5 Hz

Postby Apples555 » Thu Jun 15, 2017 11:40 pm

At the most accurate setting (compiled for 55Hz), Supermodel reports running at 55.5-55.6 fps. I've found this is closest to the arcade board's timing.

I've uploaded the executable here if you want to see for yourself, and to also hear the audio popping. The only modifications I did to the code are listed above. I only tested Sega Super GT.
Apples555
 
Posts: 6
Joined: Tue Jun 13, 2017 7:29 pm

Re: Running Supermodel at 57.5 Hz

Postby Ian » Sat Jun 17, 2017 2:37 am

Audio plays at a fixed speed of X samples per second. If the emulator is running too slow and only hitting say 55 fps, you will drop/skip audio. It needs to be exactly 57.5 fps or faster to keep up. There are probably some other things I've overlooked that Bart could give better details on.

An emulator running at lower FPS is different to a pc game running at lower fps. In a PC game the physics will match the frame rate. In an emulator, it still draws 60 frames or 57.5. But you might only be displaying them as say 40fps. In this situation the audio should be stretch or slowed down to match the display rate, otherwise it will run out before new audio has arrived.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Running Supermodel at 57.5 Hz

Postby Apples555 » Sat Jun 17, 2017 6:56 pm

I see. In my testing, the only refresh rate that works with good audio is 60. Anything under will produce the effects you mentioned.

Compiled for 55Hz the emulator runs at almost the exact speed as the arcade board, so a little popping in the audio is completely fine, though I will keep my eyes open for something that could remedy this without rewriting the software.
Apples555
 
Posts: 6
Joined: Tue Jun 13, 2017 7:29 pm

Re: Running Supermodel at 57.5 Hz

Postby Abelardator2 » Fri Oct 19, 2018 1:26 pm

Mi OSSC said 57.60Hz on ScudRacePLUS

Image
User avatar
Abelardator2
 
Posts: 244
Joined: Fri Sep 02, 2011 1:43 pm
Location: Spain

Re: Running Supermodel at 57.5 Hz

Postby model123 » Fri Oct 19, 2018 4:42 pm

With the information I found on the Internet
It seems it is running at 57.50 Hz

It seems that the resolution is rising because I'm upscanning

Image

Google Translation
model123
 
Posts: 108
Joined: Wed Mar 08, 2017 8:34 am

Re: Running Supermodel at 57.5 Hz

Postby trap15 » Tue May 12, 2020 7:53 am

I've made a patch (actually, I didn't think to look at this forum until posting this...) that makes the refresh rate configurable in Supermodel.ini and command line, and defaults to what seems to be the correct refresh rate (the same rate as Model2). Is there a reason this isn't normally an option? I primarily use Supermodel for Spikeout, and the 2.5fps difference is rather significant as far as difficulty is concerned.

I only modified the throttle limiter as that seemed to work without any audio hiccups. I did have to change the implementation of the throttle though, the old throttler would not get precise enough, at least on Windows (SDL ticks limitation?).

http://daifukkat.su/files/supermodel_framerate.diff

Thanks for all the hard work, it's great to be able to play this in emulation.
trap15
 
Posts: 2
Joined: Wed Apr 15, 2020 7:53 am

Next

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest