Posted: Tue Jan 25, 2011 1:42 pm
Hello guys,
I am 80% done with a tool that directly converts Famitracker FTM files into ca65 compatible assembly. The tool is implemented in whatever C dialect that MSDEV Studio 98 (vc6.0, sp6) will compile. It also compiles cleanly with gcc-4.4.4 on my Linux development server. (I do my nesdev on both, and shuffle code back and forth using svn).
I find it tedious and annoying to run a point + click export plugin inside Famitracker, and then run a secondary tool (text2data, from famitone) to convert the TXT into nesasm assembly, and then a perl script to convert from nesasm syntax into ca65. So I'm cutting out the middle-men.
My converter does not handle DPCM (yet), as I don't plan to use DPCM in my current project. I plan to release the source under the GPL (same as Famitracker). I've tried to ask jsr on IRC if he wanted the source to add as a "command line utility" to Famitracker, but he's not been on and/or ignored me.
I had planned on adding support to emit assembly in nesasm syntax too (changed via a command line switch).
However, since I began studying the Famitone source code, I've decided to change the output format a bit, and I plan to modify Famitone accordingly. Famitone indexes its instruments as arrays of structs. The 6502 is not very efficient at this. Much more efficient would be to store the data as a single set of arrays. That is, split arrays of words into two arrays of bytes (lsb, msb, separately). I think that I can make Famitone use less CPU if I handle this correctly. Of course, I will share any changes that I make.
I think that Famitone's pattern table encoding format is pretty slick. Nice job Shiru!
Anyway, The hardest part of the project is just writing the code that will convert the FTM file into an intermediate format in memory. Internally Famitracker uses the word "track" to refer to entire songs (also calls them "tunes"), and to parts of a song, and the columns / rows of the "frame" table. It gets very confusing, imho.
My converter runs as a command-line app on Windows and Linux (and I suspect that it work would fine on a Mac). My design goal is that I would store only the FTM files in revision control. The assembly produces by my converter is just a temp file used during the build process, and removed when I do a "make clean". I'm a big fan on only having one canonical source for source-code in a given project. Storing a FTM and pre-converted ASM file side-by-side for the same original data set seems anti-(something.. . what is the word that I am looking for??) to me.
Does anyone have any interest in my little FTM->ASM project? If not, I'll stop pestering people about it and keep it to myself. It cold a pretty cold reception on IRC from a few people, so I don't know if anyone really wants it other than me.
I am 80% done with a tool that directly converts Famitracker FTM files into ca65 compatible assembly. The tool is implemented in whatever C dialect that MSDEV Studio 98 (vc6.0, sp6) will compile. It also compiles cleanly with gcc-4.4.4 on my Linux development server. (I do my nesdev on both, and shuffle code back and forth using svn).
I find it tedious and annoying to run a point + click export plugin inside Famitracker, and then run a secondary tool (text2data, from famitone) to convert the TXT into nesasm assembly, and then a perl script to convert from nesasm syntax into ca65. So I'm cutting out the middle-men.
My converter does not handle DPCM (yet), as I don't plan to use DPCM in my current project. I plan to release the source under the GPL (same as Famitracker). I've tried to ask jsr on IRC if he wanted the source to add as a "command line utility" to Famitracker, but he's not been on and/or ignored me.
I had planned on adding support to emit assembly in nesasm syntax too (changed via a command line switch).
However, since I began studying the Famitone source code, I've decided to change the output format a bit, and I plan to modify Famitone accordingly. Famitone indexes its instruments as arrays of structs. The 6502 is not very efficient at this. Much more efficient would be to store the data as a single set of arrays. That is, split arrays of words into two arrays of bytes (lsb, msb, separately). I think that I can make Famitone use less CPU if I handle this correctly. Of course, I will share any changes that I make.
I think that Famitone's pattern table encoding format is pretty slick. Nice job Shiru!
Anyway, The hardest part of the project is just writing the code that will convert the FTM file into an intermediate format in memory. Internally Famitracker uses the word "track" to refer to entire songs (also calls them "tunes"), and to parts of a song, and the columns / rows of the "frame" table. It gets very confusing, imho.
My converter runs as a command-line app on Windows and Linux (and I suspect that it work would fine on a Mac). My design goal is that I would store only the FTM files in revision control. The assembly produces by my converter is just a temp file used during the build process, and removed when I do a "make clean". I'm a big fan on only having one canonical source for source-code in a given project. Storing a FTM and pre-converted ASM file side-by-side for the same original data set seems anti-(something.. . what is the word that I am looking for??) to me.
Does anyone have any interest in my little FTM->ASM project? If not, I'll stop pestering people about it and keep it to myself. It cold a pretty cold reception on IRC from a few people, so I don't know if anyone really wants it other than me.