Audio Timing

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!

Audio Timing

Postby Jiterdomer » Mon Nov 11, 2019 9:57 am

While me, Ian, and Conversus Vans were discussing about using MAME's SCSP code in Discord, I'd just let you share with you here that is it a good idea to use MAME's code to fix some problems like Scud Race's SCSP music speed and Harley Davidson's reverb?
Last edited by Jiterdomer on Wed Dec 04, 2019 5:34 pm, edited 1 time in total.
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 627
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, California

Re: SCSP Patch

Postby Ian » Mon Nov 11, 2019 3:04 pm

it would probably make sense to just port mames code over
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: SCSP Patch

Postby Conversus W. Vans » Wed Dec 04, 2019 5:09 pm

Over the past week, I spent some time figuring out why the timers were so off on games like Scud Race and others. Many of the timer functions were set to use only one SCSP chip, where Model 3 is supposed to use two. I ported a handful of code from MAME and Audio Overload as well (like EG fixes), which has fixed many musical keyoff problems.

Also I removed a lot of code that seemed useless, like the REVERB_DIF stuff and functions such as TimersAddTicks2. The music in most games should now play close to what is heard on real arcade hardware! Unfortunately, there is still the one issue with VF3 where there's too much reverb on some songs, and apparently the intro in L.A. Machineguns doesn't quite play quite in sync with the intro (but I haven't tested that game yet). Here's my current modified code in the attached zip (haven't really done much with the DSP file yet):
Attachments
SCSP.zip
(18.55 KiB) Downloaded 26 times
"We're cowboys on the freeway." - Masanori Takeuchi, 1997
User avatar
Conversus W. Vans
 
Posts: 277
Joined: Sun Apr 27, 2014 3:27 pm
Location: Grubnatraps, South Carolina

Re: Audio Timing

Postby Jiterdomer » Wed Dec 04, 2019 5:33 pm

Thanks, maybe I should rename this topic Audio Timing. Aside from SCSP board, there are a lot of audio issues within the DSP code like the MP2 music doesn't fade out and stop when transitioning to a different scene.
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 627
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, California

Re: Audio Timing

Postby sonic32 » Thu Dec 05, 2019 11:43 pm

Well thank you ConversusVans :shock:

The music in Scud Race sounds beautiful.
It's a big change in the sound emulation and I think the code can be added to the official lineup, it's a big improvement.
User avatar
sonic32
 
Posts: 169
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia

Re: Audio Timing

Postby Conversus W. Vans » Fri Dec 06, 2019 9:09 am

sonic32 wrote:Well thank you ConversusVans :shock:

The music in Scud Race sounds beautiful.
It's a big change in the sound emulation and I think the code can be added to the official lineup, it's a big improvement.


You're welcome! :D Fixing the timers wasn't horribly difficult, but I had to comment out certain commands in SCSPUpdateReg, AND modify many functions to use "SCSPs->" instead of "SCSPs[0]".The audio code was written by ElSemi and I believe was used for his Nebula Jukebox sound emulator that can play sound from Model 2 and 3. It played Model 2 music at the correct speed, but Model 3 SCSP games played way too slow, and I'm sure it's because the Model 3 timers weren't being emulated properly.

You have no idea how grateful I am that this emulator is open-source, especially since I used to get so overly-excited back in the day (2011) about playing Harley-Davidson, looking back at my ancient GambitRogue777 account. :P I have Bart to thank for that. Ian and Harry Tuttle for the amazing graphical improvements too. ;)
"We're cowboys on the freeway." - Masanori Takeuchi, 1997
User avatar
Conversus W. Vans
 
Posts: 277
Joined: Sun Apr 27, 2014 3:27 pm
Location: Grubnatraps, South Carolina

Re: Audio Timing

Postby Jiterdomer » Fri Dec 06, 2019 1:18 pm

In other note if you have some time, will you take a look at Shekel's DSB code to implement custom music onto my build?
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 627
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, California

Re: Audio Timing

Postby Conversus W. Vans » Fri Dec 06, 2019 5:08 pm

Jiterdomer wrote:In other note if you have some time, will you take a look at Shekel's DSB code to implement custom music onto my build?


I might could do that in the future, but I've been working and I really want to square away that VF3 DSP bug first. On real hardware/official OST, there actually is that "echo" effect, but currently there's too much of it in Supermodel. I was somehow able to get rid of the echo completely in SCSP_DoMasterSamples, but then there weren't anymore guitar solos in the fish fight music on Sega Bass Fishing (which also appears to rely on DSP).
"We're cowboys on the freeway." - Masanori Takeuchi, 1997
User avatar
Conversus W. Vans
 
Posts: 277
Joined: Sun Apr 27, 2014 3:27 pm
Location: Grubnatraps, South Carolina

Re: Audio Timing

Postby Jiterdomer » Fri Dec 06, 2019 11:52 pm

Nice progress you're having there!
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 627
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, California

Re: Audio Timing

Postby njz3 » Tue May 12, 2020 2:55 pm

Hi,
I was comparing a real Le mans 24 cab with supermodel r793 freshly compiled and noticed a difference in the tempo of the music.
Since supermodel runs at 60fps (Hz), and real hardware is a little bit slower (something like 57.6Hz I believe ?), I tried to change the number of cycles of the SCSP emulation and I saw that there was a SysFPS variable set to 60.0fps.
I changed it to 57.6Hz and the music tempo now play very close to the real hardware. So, I added a configurable variable to tune it, just in case, but it seems ok.
Do you know if changing this value will break something else in the sound emulation?
Best,
Benjamin
Last edited by njz3 on Wed May 27, 2020 2:36 am, edited 1 time in total.
njz3
 
Posts: 23
Joined: Mon Mar 30, 2020 7:04 am
Location: France

Next

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 0 guests

cron