It is currently Mon Nov 20, 2017 5:01 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Aug 10, 2015 10:54 pm 
Offline

Joined: Thu Apr 14, 2011 9:27 pm
Posts: 85
If a NSF does not use bank switching, should I still allow access to the bank switching registers? The reason why I ask is because Strobe-Ziberia.nsf has all zeroes in the header from 0x70-0x7F but is obviously much larger than 32k. It expects to be loaded with the identity mappings and then tries to bank switch as the tune goes on. It doesn't work in Nestopia but does in Nintendulator, so should I cater to this NSF like Nintendulator does?


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 11:29 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5822
Location: Canada
An NSF that puts all zeroes in the bankswitch area but still writes to the bankswitch registers is malformed, and should be fixed. (Really easy fix, just put 00 01 02 03 04 05 06 07 in its bank setup data).

All zeroes is supposed to denote no use of the bankswitch registers, i.e. it should indicate that this NSF is safe to play on an implementation that cannot bankswitch.

It's up to you as an implementer whether you want to just always enable bankswitch registers, or only if the bank setup is nonzero. Anything that breaks because of either decision is a malformed NSF. In NSFPlay I take the stricter approach of disabling bankswitching (though I plan to add an option in the future to take the other approach in case somebody needs it).


Top
 Profile  
 
PostPosted: Tue Aug 11, 2015 12:22 am 
Offline

Joined: Thu Apr 14, 2011 9:27 pm
Posts: 85
I did go ahead and hex-edit my personal copies of those broken superNSF tracks but I know no one else will bother.

There sure are an unfortunate amount of malformed NSFs out there, everything from Shift-JIS in the title field to not respecting the write delays required by the real expansion sound chip to bankswitching the same RAM in two places and expecting writes not to be mirrored. I guess that's what happens when the authors are only testing on a few players or using automated tools.


Top
 Profile  
 
PostPosted: Tue Aug 11, 2015 2:15 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5822
Location: Canada
SHIFT-JIS is pretty common in Japanese NSFs. I think that's just the result of underspecification; the spec never said anything about character encoding. I might consider it valid. At least it doesn't affect playback.

Currently NSFPlay uses SHIFT-JIS encoding if it's run in a Japanese region, and just ascii if it's run anywhere else. In the future I'd like to make it an option, though (changing the Windows region for testing is a bit of an ordeal), or maybe attempt to detect SHIFT-JIS in the text and automatically switch.


Top
 Profile  
 
PostPosted: Wed Aug 12, 2015 6:42 pm 
Offline
User avatar

Joined: Thu Jan 03, 2008 1:48 pm
Posts: 543
Most of those were already fixed and resubmitted. SuperNSF didn't have a problem with bankswitching since the production headers already accounted for them; at least with the pack I received from madbrain/mukunda.

Strobe had his own hacked version of FamiTracker for a while where he made an output plugin that generated an FTM that played nicely with large samples. Before releasing the NSF Strobe just forgot about the bankswitching information in the header. No problems anymore since FamiTracker does bankswitching by itself now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group