incorrect NSF header

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Post Reply
User avatar
Eugene.S
Posts: 317
Joined: Sat Apr 18, 2009 4:36 am
Location: UTC+3
Contact:

incorrect NSF header

Post by Eugene.S »

All standalone NSF players and NES emulators take extra info from NSF-header.
But i've found Power Blade NSF (http://akumunsf.good-evil.net/)
that indicates VRC6, VRC7 and FDS are using same time:
Image
But Power Blade is just plain 2A03 tune, so i guess NSF have incorrect header info.

Why all the emulators/players take header info but not detect/display what extra chip really work?
bucky o'hare
Posts: 160
Joined: Fri Sep 22, 2006 9:52 am
Location: philly

Re: incorrect NSF header

Post by bucky o'hare »

I've seen the same thing in some older NSFs. Wolverine had the same issue-
Image
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: incorrect NSF header

Post by thefox »

Eugene.S wrote:Why all the emulators/players take header info but not detect/display what extra chip really work?
It's not really easy to detect what extra chips are actually used. You'd have to play through all songs (assuming there are no random elements in them) and check whether they write to any of the audio extension's registers.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: incorrect NSF header

Post by tepples »

How much of an NSF player's time is spent emulating the 6502, as opposed to generating the audio waveform? Perhaps when a player loads an NSF, it could emulate each track for 20 seconds and log writes made during that time, in effect converting those first seconds to a logged format analogous to VGM from which actual mapper synth writes can be inferred.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: incorrect NSF header

Post by thefox »

tepples wrote:How much of an NSF player's time is spent emulating the 6502, as opposed to generating the audio waveform? Perhaps when a player loads an NSF, it could emulate each track for 20 seconds and log writes made during that time, in effect converting those first seconds to a logged format analogous to VGM from which actual mapper synth writes can be inferred.
Still, it would be a flaky solution to what is really a non-issue.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: incorrect NSF header

Post by rainwarrior »

thefox wrote:(assuming there are no random elements in them)
There aren't random elements; NSFs are deterministic as far as they don't start using out-of-bounds hardware (e.g. reading the controllers, PPU, open bus areas, etc.) RAM is initialized to 0 before the NSF INIT code runs.

But, yeah, there is no reason to try to detect anything. Just fix the header.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: incorrect NSF header

Post by tepples »

rainwarrior wrote:
thefox wrote:(assuming there are no random elements in them)
There aren't random elements; NSFs are deterministic
I assumed thefox referred to pseudorandom elements, which would cause the NSF not to end or loop within 5 minutes like most NSFs do. Think of a musical improvisation engine that doesn't decide to use a particular expansion until several minutes in.
rainwarrior wrote:as far as they don't start using out-of-bounds hardware (e.g. reading the controllers, PPU, open bus areas, etc.) RAM is initialized to 0 before the NSF INIT code runs.
Such "out-of-bounds hardware" would include RAM addresses $0101+S through $01FF. From "NSF" on the wiki:
The precise position of the stack on INIT or PLAY is not guaranteed, as the NSF player may need to use the top area of the stack for its own internal purpose. Make sure the tune does not attempt to modify $01F0-01FF directly. (Armed Dragon Villigust did, and was relocated to 2xx for its NSF.)
rainwarrior wrote:But, yeah, there is no reason to try to detect anything. Just fix the header.
Unless you're writing the tool that audits headers.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: incorrect NSF header

Post by thefox »

rainwarrior wrote:
thefox wrote:(assuming there are no random elements in them)
There aren't random elements;
Could have worded that better. I meant that a randomized song could run infinitely long, making it impractical to play through it. Of course in practice it would be highly unlikely that a song would run for a very long time and only then suddenly decide to write to an expansion audio register. :)
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Post Reply