Previous Thread
Next Thread
Print Thread
Page 2 of 3 1 2 3
Re: Let's have fun with DSPs! [Re: Vas Crabb] #112883
03/15/18 10:17 AM
03/15/18 10:17 AM
Joined: May 2009
Posts: 1,712
J
Just Desserts Offline
Very Senior Member
Just Desserts  Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,712
So, yeah, there are definitely still issues. In test mode, music track 001E (Stone Man's stage, incidentally) in megaman2 starts out fine, but about 5-10 seconds in, starts playing sound effects as instrument samples.

Re: Let's have fun with DSPs! [Re: Vas Crabb] #112884
03/15/18 03:42 PM
03/15/18 03:42 PM
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
Vas Crabb Offline OP
Very Senior Member
Vas Crabb  Offline OP
Very Senior Member
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
The remaining known issue is a communication breakdown between the DSP and the Z80 caused by MAME's timeslicing. It's too late to fix it tonight, I'll work around it another day.

Re: Let's have fun with DSPs! [Re: Vas Crabb] #112915
03/20/18 12:02 PM
03/20/18 12:02 PM
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
Vas Crabb Offline OP
Very Senior Member
Vas Crabb  Offline OP
Very Senior Member
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
I did a write-up on the most prominent effect provided by the QSound DSP, and the one that's most obviously missing from the old simulation: https://rants.vastheman.com/2018/03/20/qfactor/

Re: Let's have fun with DSPs! [Re: Vas Crabb] #112916
03/20/18 12:47 PM
03/20/18 12:47 PM
Joined: Mar 2001
Posts: 16,020
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,020
USA
Nice writeup! That explains the PS1 implementation, which simply cross-faded between dry and pre-processed (presumably with that filter) versions of each sample on each stereo channel. To my ears it didn't work as well as the realtime implementation on the Saturn's SCSP DSP.

Re: Let's have fun with DSPs! [Re: Vas Crabb] #112917
03/20/18 03:59 PM
03/20/18 03:59 PM
Joined: May 2004
Posts: 1,521
H
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,521
vsav2 seems to have an instrumentation problem on the first loop of attract mode

compare 28 seconds in
https://youtu.be/KWl3EX5QniE?t=0m28s
with 8m16 seconds in
https://youtu.be/KWl3EX5QniE?t=8m16s

this is with code from last night

doesn't happen with the HLE, only happens the first time after boot, like something is uninitialized or initialized to the wrong value at that point.

Re: Let's have fun with DSPs! [Re: R. Belmont] #112921
03/20/18 05:53 PM
03/20/18 05:53 PM
Joined: Jun 2001
Posts: 390
somewhere else entirely
O
Olivier Galibert Offline
Senior Member
Olivier Galibert  Offline
Senior Member
O
Joined: Jun 2001
Posts: 390
somewhere else entirely
Originally Posted by R. Belmont
Nice writeup! That explains the PS1 implementation, which simply cross-faded between dry and pre-processed (presumably with that filter) versions of each sample on each stereo channel. To my ears it didn't work as well as the realtime implementation on the Saturn's SCSP DSP.


For great justice, you also need the inter-ear delay (both ears don't get the sound at the exact same time), and I suspect the ps1 implementation didn't have the trigger precision for that (we're talking up to 15 samples difference at 24KHz).

Re: Let's have fun with DSPs! [Re: Haze] #112925
03/20/18 10:30 PM
03/20/18 10:30 PM
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
Vas Crabb Offline OP
Very Senior Member
Vas Crabb  Offline OP
Very Senior Member
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
Originally Posted by Haze
vsav2 seems to have an instrumentation problem on the first loop of attract mode

compare 28 seconds in
https://youtu.be/KWl3EX5QniE?t=0m28s
with 8m16 seconds in
https://youtu.be/KWl3EX5QniE?t=8m16s

this is with code from last night

doesn't happen with the HLE, only happens the first time after boot, like something is uninitialized or initialized to the wrong value at that point.


The DSP zeroes its RAM on start, so I'd say it's pretty hard for it to be something uninitialised there. The sample bank is set for every sample ROM read. I'd say the game is neglecting to set something the first time through.

Re: Let's have fun with DSPs! [Re: Vas Crabb] #112926
03/20/18 10:49 PM
03/20/18 10:49 PM
Joined: May 2004
Posts: 1,521
H
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,521
I guess I'll poke Smit / TDU then

the only source material I can find that appears to from original PCBs does not have this problem, but I'll see if I can confirm it.

Re: Let's have fun with DSPs! [Re: Vas Crabb] #112927
03/20/18 11:20 PM
03/20/18 11:20 PM
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
Vas Crabb Offline OP
Very Senior Member
Vas Crabb  Offline OP
Very Senior Member
Joined: Feb 2004
Posts: 1,993
Sydney, Australia
If you want to make it easier, do the following:
  • Run with debugger enabled with DSP emulation
  • While bad music is playing, dump low 128 (0x80) words of DSP "ram" address space (AS_DATA)
  • While good music is playing, dump low 128 (0x80) words of DSP "ram" address space (AS_DATA)
  • The sample banks are at addresses 0x00, 0x08, 0x10, 0x18, ..., 0x70, 0x78 so identify the bad ones
  • Edit src/devices/sound/qsound.cpp to put "#define VERBOSE (LOG_COMMAND)" in the appropriate sport near the top and rebuild
  • Run with logging until the bad music plays and then stop it
  • Filter the log for lines matching the pattern "QSound: DSP command @[0-7][08] = " to see the Z80 setting sample banks
  • See if any of the sample banks in the RAM dump don't match what the most recent command Z80 command tried to set

Re: Let's have fun with DSPs! [Re: Vas Crabb] #113027
04/01/18 11:15 AM
04/01/18 11:15 AM
Joined: May 2004
Posts: 1,521
H
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,521
well we have confirmation that it doens't happen on hardware, using same ROMs as MAME
https://www.youtube.com/watch?v=RWZAAHMnJ4M

So assuming none of the rejigging in MAME has changed anything already, I'll see if I can provide any more information with the above steps next time I get a chance.

Page 2 of 3 1 2 3

Who's Online Now
1 registered members (ted), 39 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,587
Posts112,169
Members4,817
Most Online283
Oct 11th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.067s Queries: 14 (0.015s) Memory: 5.7252 MB (Peak: 5.9475 MB) Zlib enabled. Server Time: 2018-10-18 01:45:22 UTC