Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: NSF loads backwards (Read 2769 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

NSF loads backwards

I wasn't sure whether to put this in here or 3rd party - as it's a problem either with core or NEZplug. I put it here. Hold your fire, please

Basically, problem is this. I changed my "sort incoming files by" under "add new files" recently in core to

Code: [Select]
$pad(%_path%,90)|$tracknumber(3)


, which works fine with 99% of my files. Unfortunately, when it comes to NSF, it doesn't. Basically, an NSF file (as you may or may not know) consists of many song tracks in one file, not just one, and uses a "sub-song" section inside it to differentiate each track from the others, starting at 1 and going up. It used to load like this (the numers are the sub-song index number, the 'track' if you will for each game:

Code: [Select]
1
2
3
4
5
etc


But since the change, it now loads like THIS:

Code: [Select]
etc
5
4
3
2
1


Oddly, GBS, which also uses a sub-song set for the internal music files, loads the tracks in the correct order. However, I note that it stores a TRACKNUMBER value which matches up to the sub-song - I guess this is what's doing it. =P

Soooo - is this a problem with NEZplug or with core? And how can I get them to load in the right order? Any way of getting the value from the sub-song index?

NSF loads backwards

Reply #1
Include $num(%_subsong%,3) somewhere in there.

Note that both foo_festalon and foo_gep have superior NSF support, and foo_gep has superior GBS support.

NSF loads backwards

Reply #2
I did have GEP installed at one point, but the SPC comonent in it sucks compared to foo_spc (audible clicking in the Plok! soundtrack that shouldn't be there). As for Festalon, I actually have it installed, but I dunno whether that or NezPlug is playing my NSFs. Oh well o_O

Either way, it's loading correctly now. Cheers. =P


NSF loads backwards

Reply #4
The input priority depends on plug-in load order. Regardless, Nezplug's NSF support can be disabled in its configuration.

Thanks to Blargg, the issue with Plok has been solved, and a new version of foo_gep has been uploaded. Enjoy.

(Oh, and slightly off-topic, my foo_gep projects were importing the headers from Game_Music_Emu v0.2.2 while linking against v0.2.3. Thankfully, nothing major changed in the class structures, but I was wondering why my own attempts to make now pointless changes to the SPC class was causing heap corruption. I'll have to remember that one in case any of my libraries are updated in the future...)

NSF loads backwards

Reply #5
I found another problem with the Plok soundtrack (track 14, Akrillic), where one of the drum samples has a pop at the end. The SPC file plays correctly on my SNES so it's not due to a corrupt rip. After doing some debugging, I don't think I'll be able to fix it until I get around to doing more reverse-engineering of the SPC's DSP.

[edit: I ran some SNES tests and found the correct behavior. I'm e-mailing the fix to kode54.]

NSF loads backwards

Reply #6
I always remember the problem stuff a bit too late... Chalk up some more troublesome examples in Earthworm Jim, but I already mailed about that. (On that note, yay for dynamic voice allocation players. I think there are a few other games which use the same player/driver, fairly easy to find by the copyright string.)