nesdev.com
http://forums.nesdev.com/

incorrect NSF header
http://forums.nesdev.com/viewtopic.php?f=6&t=16175
Page 1 of 1

Author:  Eugene.S [ Tue Jul 04, 2017 10:46 am ]
Post subject:  incorrect NSF header

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?

Author:  bucky o'hare [ Tue Jul 04, 2017 11:27 am ]
Post subject:  Re: incorrect NSF header

I've seen the same thing in some older NSFs. Wolverine had the same issue-
Image

Author:  thefox [ Tue Jul 04, 2017 11:32 am ]
Post subject:  Re: incorrect NSF header

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.

Author:  tepples [ Tue Jul 04, 2017 12:07 pm ]
Post subject:  Re: incorrect NSF header

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.

Author:  thefox [ Tue Jul 04, 2017 12:59 pm ]
Post subject:  Re: incorrect NSF header

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.

Author:  rainwarrior [ Wed Jul 05, 2017 8:14 am ]
Post subject:  Re: incorrect NSF header

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.

Author:  tepples [ Wed Jul 05, 2017 8:27 am ]
Post subject:  Re: incorrect NSF header

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.

Author:  thefox [ Wed Jul 05, 2017 8:29 am ]
Post subject:  Re: incorrect NSF header

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. :)

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/