rainwarrior wrote:
It's found in the NSF export where it says "type of file".
No wonder I've never seen this before: from a UI perspective, "Export NSF..." for exporting
a text .asm is a bit misleading, particularly when compounded with the fact that there's File -> Export text... Yeah, I can see now how this utility is mainly catering to people who just want to make music and less so for "making music that's to be used in a NES game" (I'm being a bit harsh here, but you get what I'm saying I hope).
This is mainly me just doing a brain dump (CollisionDetection might find some sympathy in this): I'm also confused about what it outputs -- it looks like relevant NSF header, sequencer, and sample data... but where's the actual sequencer/music driver? Oh wait, I see, it's implied under the "BIN" section of the .chm: "Stores only the music data and DPCM samples in separate files, for use with the NSF driver sources which are available from the web page." But the "ASM" section isn't as clear: "Stores the music data and samples in text format that can be used with the driver sources (for CA65). More flexible than the BIN option." This refers to the "NSF driver source" download/.zip on the website, which contains the actual ca65
.s files that make up the actual sound driver. Okay, so let's look at that.
The
readme.txt in there goes over some of the necessary details, but no where near what I'd hope for general use in one's own NES game/program. The ability to relocate what regions of ZP and RAM are used is in the
nsf.cfg file -- person had best have familiarity with ld65. But this didn't answer my question as far as
how much memory it actually used for those regions (again: conflicts between your own code and what the NSF driver uses). So I took a look at that.
The details are actually in
driver.s, specifically the bits that refer to both the
ZEROPAGE and
BSS (RAM) segments.
It looks like about 27 bytes of ZP are used (subtract 2 if you don't need FDS support, and subtract 4 more if you don't need VRC7).
RAM-wise, it's justifiably more hefty -- I can't easily calculate it just by looking at the code (lots of
.ifdefs for different features, and things that rely on equates which are ifdef'd too), but I'm sure if I was to assemble + link with ld65's
--mapfile flag I'd get an accurate number. Just from skimming I'd say it uses a couple hundred bytes minimum. This is the kind of stuff people who want to use it in their projects need to know -- it'd be a rude awakening otherwise, I think.
rainwarrior wrote:
The Wiki content was not made by jsr, just hosted by him; it was basically just a place for some users of the Famitracker forums to collect information and ideas. I don't think people who contributed to the wiki really were interested in the ASM export. Very few people are, really.
Ahhh, that explains it. Thanks for the insight!
rainwarrior wrote:
By the way, BIN export is just as good as ASM export unless you need to modify the output in some way. A very long time ago I wrote a short guide for using it:
http://famitracker.com/forum/posts.php?id=3681Perfect. I'm going to add a link directly to that under
http://wiki.nesdev.com/w/index.php/Programming_guide section Tutorials / "Music, how to make, to play, sound fx". This is the first time I've seen your guide. Thank you for that!
rainwarrior wrote:
As for available music engines, I've started a list on the wiki, please contribute:
http://wiki.nesdev.com/w/index.php/Tools#EnginesUnrelated to this thread, but we need to merge the stuff from here
http://wiki.nesdev.com/w/index.php/Music_tools into there, then figure out how to do a Wiki redirect so that old Music_tools links go to Tools#Music_tools. That Music_tools wiki page I found on the wiki here
http://wiki.nesdev.com/w/index.php/Programming_guide under General Reference, "Music: Expansion audio,
tools". I'll take care of this.