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: 5
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: 5
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: 1126
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: 5
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: 5
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: 1126
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: 5
Joined: Tue Jun 13, 2017 7:29 pm


Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 2 guests