Need help with adding feature to famitone

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

Moderator: Moderators

Post Reply
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Need help with adding feature to famitone

Post by dougeff »

I am trying to add more famitracker effects to famitone. But I'm stuck at stage 1 of my plan...changing the source code of 'text2data' so that it....
-doesn't exit on seeing an unsupported effect (simple enough)
-marks the notes in the output with something where the unsupported effect is, preferably the actual effect name (which I can then replace later with a tag to watch out for...lets say $FF), or an actual $FF inserted

I stared at the source code for 2 hours, and tried a few things, but wasn't successful.

I think this prints the data to the file (line 1989)...
size+=output_dump_byte_array(tptn.data,tptn.length,test);

where tptn is a copy of packedPatterns.data (1966)...
memcmp(tptn.data,packedPatterns.data,tptn.length))

which had data from song_original...or song_split?, which is a struct with a large array at the end, where the data is loaded...in the parse_song() function

specifically in the switch case at 1262...
switch(nsrc->effect)//supported effects
case 'B':
case 'D':
etc.
default: (this is for unsupported effects)

But I can't figure out what to insert here to mark the data at this point.

And, mark it with anything, really. Any ideas?
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Need help with adding feature to famitone

Post by dougeff »

Never mind. I'm going to try a different approach.
nesdoug.com -- blog/tutorial on programming for the NES
Post Reply