Fixing the mixing music in SR2

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!

Re: Fixing the mixing music in SR2

Postby Spindizzi » Sat Nov 26, 2016 1:54 pm

question is :
why these values (commands) fluctuate when changing nvram and what are they representing ?

I answer to myself, lol
they fluctuate with the bgm volume level, and as it's saved in nvram...bingo!

Need also to launch other dumps (rapidly see about swt and scud, seem to be OK, no broken musics)
++
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Fixing the mixing music in SR2

Postby terminento » Sat Nov 26, 2016 4:05 pm

I tried the new compilation with the changes in regards to NVRAM data, it worked like a charm! All stage music tracks (training courses as well) worked as they were swupposed to! Thanks a lot!
Since you said you'd be checking other dumps, I don't know if it is related to this or not, but when using this rev both Spikeout games lack music.
Anyhow, awesome work!
User avatar
terminento
 
Posts: 193
Joined: Fri Jun 15, 2012 8:08 am

Re: Fixing the mixing music in SR2

Postby Spindizzi » Sat Nov 26, 2016 11:53 pm

Hi,
My bad, I've totally forgot to init my variable, so if we have call to different register other than ST_GOTB1 or ST_GOTA0, there is no music sound played (stéréo default)
This is exactly the case you report with spikeout
Need more testers, but only game with digital sound board 2
Link updated x32 x64 and sources too (see edited 1st post)
Thanks for all to point me in the right direction :)
++
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Fixing the mixing music in SR2

Postby Ian » Sun Nov 27, 2016 6:42 am

always init your variables >_<
In debug mode the compiler normally puts in special values such as 0xCCCCCC into unitialised variables. But in release mode can be filled with any kind of garbage which can produce some painful bugs in release builds :)

I had a quick question for people who have looked at the audio code.
What sample rates are all the audio parts using? I see the mp2 audio files are using 32khz. What about the rest? Is re-sampling to 41khz really needed ?
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Fixing the mixing music in SR2

Postby terminento » Sun Nov 27, 2016 8:30 am

Spindizzi wrote:Thanks for all to point me in the right direction :)
++


No, thank you for your effort!
I tried it with several games (spikeout included) and music seems to be working fine :)

I wonder, will this fix be added to the official supermodel releases?
User avatar
terminento
 
Posts: 193
Joined: Fri Jun 15, 2012 8:08 am

Re: Fixing the mixing music in SR2

Postby Ian » Sun Nov 27, 2016 10:11 am

make a diff file and i can add the code
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Fixing the mixing music in SR2

Postby Cel_da » Sun Nov 27, 2016 4:21 pm

It´s a litle late but thanks for the 32x exe!
Now it was interesting to see this fix compiled togeather with the next oficial revision and forward! :)
Since i work as a musician the ingame music, sounds and it´s quality are quite important, so It´s good to have someone that have skills to look at it!
Thanks again Spindizzi!
Cel_da
 
Posts: 52
Joined: Thu Apr 16, 2015 2:51 am
Location: Portugal

Re: Fixing the mixing music in SR2

Postby Spindizzi » Mon Nov 28, 2016 4:02 am

Hello,
This is the tortoise patch diff for the mod. Integrate only if you think it's correct of course
https://www.dropbox.com/s/j4360focuhoculp/Model3-sr2musicmod.rar?dl=0

I know about init variable, newbie error :roll:

As I read in comments, It seems only musics are in the 32khz mp2 format, don't know about samples, maybe dumping them and look inside (I've seen a dump function somewhere). Can't say more, I'm not a expert, sorry
++
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Fixing the mixing music in SR2

Postby Spindizzi » Mon Nov 28, 2016 11:53 am

Hello again,
I would like to have your opinion on a possibly very little bug always in the sr2 music
At the end of attract mode, when title sega rally appears, music volume starts to decrease (seems to be OK) but after, new title "http:\\" appears and volume goes up (seems to be bad)

I investigate the command/data
during attract mode (game footage) I get the normal volume data value
during sega rally title screen I get the volume data value that start to decrease
during http:\\ title screen I get a new command I think (0x96) .This can't be a volume data value because based on my findings, volume data value does not exceed value of 0x8d (at least for sr2)
actually, it's processed like a volume data value so volume goes up

If I detect when I get this command (0x96) and if I stop music then it seems to me a bit abrupt

Question is what this new supposed command does
-stop music ?
-fade music ?
-other ?
-does this appear in other games ?
-Where to treat this command ?
ST_GOTB4 actually empty and working if I stop music here
ST_GOTB0 I don't think so, it's for setting volume
ST_GOTA0 I don't think so, it's for choosing audio channel
ST_GOTA4 Actually for specific case daytona2pe advertise tune

Original video attract mode (look at 3:06 and compare with supermodel)
https://www.youtube.com/watch?v=KVut7KrHPVY

the code would be only (dsb.cpp CDSB2::WriteMPEGFIFO())
case ST_GOTB4:
if (byte == 0x96)
{
MPEG_StopPlaying();
playing = 0;
}
mpegState = ST_IDLE;
break;

++
Spindizzi
 
Posts: 196
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: Fixing the mixing music in SR2

Postby Ian » Mon Nov 28, 2016 1:47 pm

I'm really glad someone is working on the audio code. Spindizzi message Bart, maybe he can add you to the svn so you can submit the fixes yourself
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron