SPC player from bsnes

Anything else related to bsnes goes there.
Locked
blargg
Regular
Posts: 327
Joined: Thu Jun 30, 2005 1:54 pm
Location: USA
Contact:

Post by blargg »

Hmmm, that track requires the accurate DSP, and fails on the fast one (just tested). I'll have to examine the DSP writes it makes and see if I can make the fast one work with it too.
h4tred

Post by h4tred »

Nice, so I guess when the next GME comes around, you'll add your newest SPC fixes, as well as updating the MAME patches for GME? :)
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Or you can just rebuild the existing GME with the accurate DSP.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

Easier to rebuild with the entire snes_spc library in place of the existing files, since there are numerous case changes in the class names. That way, you only have to change a few lines in Spc_Emu.(cpp|h). The only thing missing from snes_spc is the gain function, so that's one commented line, then all references to Snes_Spc changed to SNES_SPC. (I've already done this with foo_gep until the fast core is updated.)

Interesting enough, the original OpenSPC also drops those same notes. I wonder what the problem could be?
byuu

Post by byuu »

I fully get the benefits of the fast core, I really do. Especially for a program that should, in theory, not consume any resources at all.

But blargg's accurate S-DSP core doesn't even show up when profiling my emulator. It seems more suited for use in full-fledged emulators for handhelds that need all the speed they can get. A last resort when 100% resources are already pegged. Are you guys noticing it eating more than an extra 1% CPU time with the accurate vs the fast DSP core? Even on an older processor?

If not, I would imagine most people would prefer better sound quality. Especially dual core owners.

But if it is getting total CPU usage above 5%, then I concede.
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

You mean to tell me that the core in spc plugins is a castrated version? What the heck for?
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

FitzRoy wrote:You mean to tell me that the core in spc plugins is a castrated version? What the heck for?
The original Game_Music_Emu SPC core is the equivalent of the fast core. Snes_spc defaults to the accurate core, including the fast core as an option. The fast core predates the accurate core, so it would make sense that the original library didn't use it.

In foo_gep, the difference between the original and the accurate core is a difference of 23x vs 8x real-time on my system. I may not actually switch, however, unless there's anyone on an old enough system to notice the difference as sub-real-time performance.

Oh yeah, SNESAPU / SNESAMP can play What the Heck? without dropping notes, and I don't think that core is cycle accurate, so it's probably not a problem with the cycle accuracy.
byuu

Post by byuu »

In foo_gep, the difference between the original and the accurate core is a difference of 23x vs 8x real-time on my system.
Holy crap! 12.5% CPU usage for just the SMP+DSP, and no CPU+PPU (the slowest parts of SNES emulation)?? Time to upgrade your IBM PC Jr, there :P

Seriously, wow. I had no idea it was that demanding. Anyway, I like that you have it as an option. That gives the best of both worlds.
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

byuu wrote:Time to upgrade your IBM PC Jr, there :P
Athlon 64 "ClawHammer" 3200+. Yeah, it's pushing on almost 5 years old now.
Anyway, I like that you have it as an option. That gives the best of both worlds.
Actually, that was just a comparison from before I replaced the core. I could probably make it configurable, though.
blargg
Regular
Posts: 327
Joined: Thu Jun 30, 2005 1:54 pm
Location: USA
Contact:

Post by blargg »

kode54 wrote:
FitzRoy wrote:You mean to tell me that the core in spc plugins is a castrated version? What the heck for?
The original Game_Music_Emu SPC core is the equivalent of the fast core. Snes_spc defaults to the accurate core, including the fast core as an option. The fast core predates the accurate core, so it would make sense that the original library didn't use it.
Actually, I made the fast DSP based on the accurate one, by slowly transforming it to do 32 clocks at a time rather than individually (like the old OpenSPC-based one). The SMP emulator makes up for this inaccuracy somewhat by examining which DSP register is being accessed and adjusting the claimed timestamp before running the DSP. This allows the fast DSP to pass most of my test suite, unlike the old OpenSPC-based one. But apparently some games do some writes really close together in a way that this can't compensate.
In foo_gep, the difference between the original and the accurate core is a difference of 23x vs 8x real-time on my system.
Or in byuu's terms, 4% versus 13% CPU usage. Since in a music player this is all the work being done, no PPU or CPU emulator, and one wants to play music while doing other things, the usage is more of an issue. In a full emulator, one mostly just cares about running fast enough to not drop any frames/audio.
Oh yeah, SNESAPU / SNESAMP can play What the Heck? without dropping notes, and I don't think that core is cycle accurate, so it's probably not a problem with the cycle accuracy.
Well yeah, it's some aspect of the DSP the game's music engine relies on that the fast DSP and OpenSPC don't emulate accurately, but that SNESAPU does. Since the fast DSP differences are mostly timing, I'm guessing it's timing-related. This might prompt me to look into it again...
joe_devore
Regular
Posts: 267
Joined: Thu Aug 05, 2004 12:07 am
Location: NH, USA
Contact:

Post by joe_devore »

FitzRoy wrote:foo_gep can do it in foobar. People still use winamp? Wasn't that bought out by aol and turned into garbageware?
I use Foobar2000, its great, the Foo_GEP, I will admit isn't perfect it needs alot of work.
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

joe_devore wrote:foo_gep can do it in foobar. People still use winamp? Wasn't that bought out by aol and turned into garbageware?


Actually if you make sure to uncheck a couple boxes on the install, winamp still works plenty fine with out garbageware thrown in.
h4tred

Post by h4tred »

Actually if you make sure to uncheck a couple boxes on the install, winamp still works plenty fine with out garbageware thrown in.
I beg to differ:

* Its input API is shit
* It has zero native support for archives, making retarded shit like RSN possible with elaborate hacks.
* Its installer is bloated
* Who needs sucky skins?
* Its turned into a media player instead of the thing it should have stayed as: a audio player
byuu

Post by byuu »

* Its turned into a media player instead of the thing it should have stayed as: a audio player
Agreed, I always turn off as much of that as I can.

But at least it's not as bad as those godawful jukebox apps people keep mentioning as "replacements" for Winamp, Audacious et al (eg iTunes, Amarok and Banshee.)
The SMP emulator makes up for this inaccuracy somewhat by examining which DSP register is being accessed and adjusting the claimed timestamp before running the DSP.
Did not know that. Wow, very clever. IIRC, anomie's S-DSP core didn't have any issues after adding a workaround for EDL/ESA writes to fix Koushien 2, so it may be possible to get this issue worked around as well.

Assuming you wanted to, of course. I'm perfectly happy with your current cycle-accurate core. Can't thank you enough for that contribution :D
one wants to play music while doing other things, the usage is more of an issue
Yeah, I can definitely understand that. I guess I just didn't realize how resource intensive the S-DSP was at 1.024MHz -- was under the impression you were getting multiple times full speed on your 66MHz PowerPC box.

Given that's not the case, I can understand much better why you went with the double-length ring buffers to avoid wrapping and such.
FirebrandX
Trooper
Posts: 376
Joined: Tue Apr 19, 2005 11:08 pm
Location: DFW area, TX USA
Contact:

Post by FirebrandX »

h4tred wrote:
Actually if you make sure to uncheck a couple boxes on the install, winamp still works plenty fine with out garbageware thrown in.
I beg to differ:

* Its input API is shit
* It has zero native support for archives, making retarded shit like RSN possible with elaborate hacks.
* Its installer is bloated
* Who needs sucky skins?
* Its turned into a media player instead of the thing it should have stayed as: a audio player
You can beg all you want, but the fact that it works perfectly fine for all my various plugins means I've got no problems with it. About the only thing that I agree was a bit much was turning it into a media player instead of an audio player.

Beyond that, I can't imagine trying to find a player that can handle all the various emu audio plugins I use. It would probably be a nightmare for me to switch at this point, so I stick with whats been working perfectly fine. After all, if it aint broke, I'm not going to worry about it.
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

FireBrand, h4tred was talking about Winamp from a coding point of view, it is terrible to code things for.
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
joe_devore
Regular
Posts: 267
Joined: Thu Aug 05, 2004 12:07 am
Location: NH, USA
Contact:

Post by joe_devore »

I like Foobar2000, because its light weight and plugins.
I only use it for GEP and Highly Experimental_PSF, mainly.

GEP definitely needs a lot of work.

I have never used WinAMP.
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

joe_devore wrote:GEP definitely needs a lot of work.
That's the second time you've said that.. I don't listen to that much music aside from SPCs so I wouldn't know - what needs to be improved?
blargg
Regular
Posts: 327
Joined: Thu Jun 30, 2005 1:54 pm
Location: USA
Contact:

Post by blargg »

To any developers here: raise your hand if you have any released program which you think is near-perfect and couldn't use any improvement. Anyone? Anyone? I thought so.

To users: us developers already know our software needs work. But if there's something specific which you think is subtle and we might not have noticed, point it out. Thank you.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

blargg wrote:To any developers here: raise your hand if you have any released program which you think is near-perfect and couldn't use any improvement. Anyone? Anyone? I thought so.
Well, I made a mean LoM level optimiser that cannot really be improved further without a serious emacs irradiation, but it's not really public, so heh. ^^
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
h4tred

Post by h4tred »

But at least it's not as bad as those godawful jukebox apps people keep mentioning as "replacements" for Winamp, Audacious et al (eg iTunes, Amarok and Banshee.)
Oh, don't get me started on iTunes..... :P

You might find however foobar2000 is a decent replacement for Winamp. Its component API is quite nice (heavily based on purely OO C++), its extremely efficient (can handle up to a million tracks easily, whereas Winamp completely fails)....but I do agree with the Amarok sentiments.
h4tred

Post by h4tred »

That's the second time you've said that.. I don't listen to that much music aside from SPCs so I wouldn't know - what needs to be improved?
Indeed, I want to know this too. foo_gep works awesome for me. It completely whips my Winamp 2/XMPlay implementation of GME (and it benefits from things that fb2k offers natively), plus I think it handles everything needed in a SPC plugin. Or NSF one, for that matter.
joe_devore
Regular
Posts: 267
Joined: Thu Aug 05, 2004 12:07 am
Location: NH, USA
Contact:

Post by joe_devore »

The playback for some SPC are not perfect, like SNES game Eien no Filena.
and some others I can't recall off hand.

other then that its great.

Because I stuck using Win2K (and I'm not complaining) I can't use the latest version of Foobar2000. :(
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

joe_devore wrote:The playback for some SPC are not perfect, like SNES game Eien no Filena.
and some others I can't recall off hand.

other then that its great.

Because I stuck using Win2K (and I'm not complaining) I can't use the latest version of Foobar2000. :(
Have you tried the latest foo_gep? You're lucky I still use an older SDK that works with versions as old as 0.9.3.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Alternatively, is your SPC rip valid or half-assed ?

Distributed Tenshi no uta rips had major channel issues ages before they got properly reripped.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Locked