Chemical Plant Zone SNES (Sampling FM Instruments)

You can talk about almost anything that you want to on this board.

Moderator: Moderators

lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by lidnariq »

Rahsennor wrote:Some of them crash my SPC player (Game_Music_Emu 0.5.2) though. Not entirely sure why, and probably not your fault, but I can't listen to them.
Trying playing track 2 via gst123 yields this amazing error message:
gst123: /build/game-music-emu-0.6.2/gme/Spc_Cpu.cpp:496: int Snes_Spc::cpu_read(int, Snes_Spc::rel_time_t): Assertion `reg + (r_t0out + 0xF0 - 0x10000) < 0x100' failed.
tssf
Posts: 53
Joined: Sun Oct 19, 2008 2:37 pm

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by tssf »

Hooray for bug testing! I'm blaming the revised snesmod for this. It was modified by someone else who added all the crazy cool features. That being said I'm glad they did, just sad they seem to make some other SPC players not react properly.

I did an FF7 SPC that was supposed to disable echo writes essentially cutting the reverb so that there was nothing left but silence. Spcplay and that other Japanese SPC player handles it right, but DDB and zxtune on Android kind of blow up when it happens and causes a feedback to occur so I had to throw in an extra command to mute the echo so you can't hear when it does that.

Here's that SPC if you want to throw it against your player too, hopefully it doesn't make it explode either XD

http://tssf.gamemusic.ca/Remakes/FF7Stuff/ff7pizza.spc

This is why my name is in the credits for WinAmp, Jake Stine used to use my mods for testing since I used to do crazy shit to break his MikMod player haha
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by lidnariq »

Same crash.

... having now installed debug symbols, I have absolutely no idea why it's trying to read from address 0x10003, but that apparently causes this crash.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by lidnariq »

Greeeaat. Rather than actually fixing the bug they just chose to assert and crash instead.
User avatar
kulor
Posts: 33
Joined: Thu Mar 15, 2018 12:49 pm

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by kulor »

Sup guys! Long time lurker, first time poster. I just wanted to make a minor correction real quick 'cuz this stuff tends to proliferate:
Espozo wrote:Perhaps the most surprising thing to me though, is that he said it only took 22KB, because the instruments were very small.
After messing with the track again, I saw that I had misremembered what the console said, and actually have 22KB -remaining-. So the track is roughly double what I thought it was, ~42-some KB.

The biggest reason I wanted to do this was because people seem to have this idea that the SNES is locked into mock-orchestra sounds, and that the SNES can't sound crisp because of interpolation, and that the SNES can't do this-and-that etc...
Attached a few conversions of various Amiga/PC game music that I made using snesmod, I was thinking of using these for a video explaining what exactly the limits are for SNES audio, why songs tend to sound muffled, what sort of sounds you can do, that sort of thing. Maybe someday I'll be able to find the time...

Anyway, I've done some NES homebrew soundtracks, and I'd love to do SNES homebrew soundtracks too if anyone's looking for a musician...!
Attachments
toytitle.spc
From the Toy Story OST [Genesis, MOD]
(64.5 KiB) Downloaded 144 times
SONG0.spc
From the Epic Pinball OST [PC, S3M 8 channels]
(64.5 KiB) Downloaded 141 times
Tubelectric.spc
From the Jazz Jackrabbit OST [PC, S3M 4 channels]
(64.5 KiB) Downloaded 138 times
mrsolid.spc
Tempest - Mr Solid [Amiga]
(64.5 KiB) Downloaded 140 times
metamorph1.spc
From the Morph OST [Amiga]
(64.5 KiB) Downloaded 137 times
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by Rahsennor »

lidnariq wrote:Greeeaat. Rather than actually fixing the bug they just chose to assert and crash instead.
If I facepalm any harder I'm going to do myself an injury. I might just have to write an SPC player to go with my NSF player...
kulor wrote:Sup guys! Long time lurker, first time poster.
Welcome! I enjoyed your Famicompo entries and found your Adlib stuff on http://opl.wafflenet.com/, but somehow never tracked down your site before now. Keep up the good work!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by lidnariq »

Rahsennor wrote:If I facepalm any harder I'm going to do myself an injury. I might just have to write an SPC player to go with my NSF player...
I'm certain Blargg had some reason to make the cpu_read function the bizarre chain of logic that it is ... maybe pentium 4 predictor failures?

It's literally just
* Read from RAM regardless; the RAM array is actually 0x10100 bytes long to avoid having to do bounds checking
* Is the memory address 0xF0 or above?
* Is the memory address - 0x100, parsed as an unsigned number equal to 0xFF00 or above? (why???)
* Is the memory address 0xFD, 0xFE, or 0xFF?
* Is the memory address 0xF0-0xFC?
* Is it neither of the last two? (because it's actually 0x10000 or above)

I think whatever compiler he tested against treated the enums as signed, because the math there ( (r_t0out + 0xF0 - 0x10000) seems to work correctly if that expression is treated as a signed number. Apparently the signed-ness of an enum is officially undefined, so ... naughty naughty? Makes you wonder on which compilers the original CVE wouldn't happen because this expression was treated as signed.

I'm just bewildered by an ISA implementation where bitmasks are expensive and subtraction+comparison+branching is cheap.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by Oziphantom »

Whenever somebody starts with the "but the megadrive has better sound" I play this https://www.youtube.com/watch?v=6MVMcAl ... D88F5B0565 then ask if they herd the sloshing water and the stereo drums... usually shuts them up pretty quick...

follow ups https://www.youtube.com/watch?v=ht7YJptvt_w https://www.youtube.com/watch?v=5gyu_KobenE
https://www.youtube.com/watch?v=W3SA9LuqQgA (shsssh about the extra chip though ;) )
93143
Posts: 1718
Joined: Fri Jul 04, 2014 9:31 pm

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by 93143 »

What extra chip? Star Ocean used an S-DD1 because it was enormous, but Tales of Phantasia is just an unusually large FastROM game. Pretty sure neither of the others uses special chips either.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by Oziphantom »

I remember their being some extra chip that assisted with the Audio, which was hard to emulate at the time. This enabled the fancy music player with the cross fade part in the town. And explained why the "opening song" was just random garbage when played in the emulators... but looking at the board, nothing special at all...
93143
Posts: 1718
Joined: Fri Jul 04, 2014 9:31 pm

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by 93143 »

The opening song was pulled off using a streaming technique to switch out vocal snippets on the fly. Early emulators probably bodged up the timing or something. And obviously it's undumpable in SPC format...
tssf
Posts: 53
Joined: Sun Oct 19, 2008 2:37 pm

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by tssf »

There was no extra chip to help tales of phantasia. All it did was dynamically stream samples in and out of memory. Just the good ol' spc700.

The compression chips were for graphics. All SNES music samples are BRR compressed regardless.
User avatar
kulor
Posts: 33
Joined: Thu Mar 15, 2018 12:49 pm

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by kulor »

Say, since we're talking about Tales of Phantasia and dynamic sample swapping...
Anyone ever messed with doing this themselves? I'd love to somehow make an SNES ROM wrapper that plays an snesmod tune back while swapping out samples at certain intervals. I imagine if you use certain samples as buffers of a certain length, so long as you know the address of the sample on the SPC700 side it wouldn't be too hard...
93143
Posts: 1718
Joined: Fri Jul 04, 2014 9:31 pm

Re: Chemical Plant Zone SNES (Sampling FM Instruments)

Post by 93143 »

Augustus Blackheart and KungFuFurby's fork of SNESMOD has a streaming feature: http://battleofthebits.org/arena/Entry/ ... ber/27464/

N-Warp Daisakusen by d4s uses HDMA for streaming. The source code is available.

I myself have attempted to design a high-bandwidth HDMA streaming technique using self-modifying code, but I haven't tested it. Gotta get on that one of these days - I want it for my game...
Post Reply