8x16 and whatever else unreg wants to know

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 8x16 and whatever else unreg wants to know

Post by tepples »

Bxx means jump to a position in the order table. In order to best accomplish what you're trying to do, I'd like to see a .ftm file representing a simplified use case where forward Bxx is helpful? If you do, perhaps one of us can help you work around the lack of forward Bxx.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Well, I was blessed with the song using a keyboard/piano. And I wrote down all the notes and transferred them to the computer. It sounds best to me if the last note on frame 02 in Pulse 1 and Pulse 2 is a whole note. That leaves about a dotted quarter note unused when using the forward Bxx. But, maybe I can remove the forward Bxx and somehow fill the dotted quarter note worth of space. You did not answer any of my questions tepples, but thank you for your reply. :)

Figured out, after some good work, that I receive the same error, Unhandled exception C0000005, dispite remapping the entire song so that all channels start with 00.
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: 8x16 and whatever else unreg wants to know

Post by Kasumi »

FamiTone2 does support D 00 (According to the readme, I haven't tried), which may or may not accomplish what you want? Like Tepples said, if you could provide an ftm that shows that kind of jump you want to do, it'd be helpful for us to figure out a good workaround. It doesn't have to be the actual song.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Hi Kasumi! How are you?

After removing the forward Bxx and filling the small space that appeared it still gives the same error FamiTrackerThis application has encountered a problem and needs to close.Unhandled exception C0000005. The finished song we are trying to import into our game has:
Song settings in FamiTracker 0.4.6 wrote:Speed 6
Tempo 150
Rows 65
Frames 10
Does 65 Rows create Unhandled exception C0000005? Guess I should look at the FamiTracker site.
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: 8x16 and whatever else unreg wants to know

Post by Kasumi »

I'm alright.

So what exactly are you doing? You have to be super specific. That famitracker itself is crashing is interesting, but I have no idea what you're actually doing to cause the crash.
Anyway, gifs, because lack of ambiguity.
Step one, export your text:
Image
Is Famitracker crashing on that step or are you doing something different? If you were doing something different, do that instead.
Step two, drag the exported text onto text2data.exe included with FamiTone2
Image
And if you get no output from dragging, you do have to run it in the commandline to see what it's complaining about. But it seems like your issue is happening before then.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Unhandled exception C0000005 is an access violation. Learned that after searching on duckduckgo. This site says something about deleting instruments used to result in crashes. Well, maybe if I remove all of the 6 instruments and recreate them C0000005 will go away. I remember using Instrument>Clone instrument and then editing some of the clones... maybe that caused the problem.

@Kasumi: thank you for your visual help, just saw it... will work on this tomorrow. :)
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Kasumi, thank you so much for the visual instruction! :D I was following the instructions in famitone's readme.txt. Doing it your way successfully created the .txt file! Then text2data didn't produce a .asm file so followed your advise and ran it in Command Prompt and got this message:
text2data in Command Prompt wrote:song
Output format: Asm6
Parsing...
Global parameters
Can't find any frames
After looking at the .txt file it has PATTERN 00 through PATTERN 08. But, I thought the PATTERNs were "frames". :oops: So could you help me again? (I don't understand.)

edit: Does "Can't find any frames" mean that I messed up when I tried to make the data as small as possible? Like the orders at the top are like:
ORDER 00: 00 00 00 00 00
ORDER 01: 01 00 00 01 00
ORDER 02: 02 01 01 02 00
ORDER 03: 03 02 00 03 00
ORDER 04: 04 00 00 04 00
ORDER 05: 05 00 00 05 00
ORDER 06: 03 02 00 03 00
etc.
I'm using FamiTone.
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: 8x16 and whatever else unreg wants to know

Post by Kasumi »

I'd recommend you just use FamiTone2. As Shiru's website says,
FamiTone v1.24 (112K)
Audio library for music and sound effects. This version is fully obsoleted by FamiTone2, and is not recommended to use.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Ok Kasumi, FamiTone2 is playing the song in our game now!! :mrgreen: :D Good advice, FamiTone2's text2data.exe is much newer than FamiTone's.

3 notes:
1.) Following your visual example of dragging the .txt file over FamiTone2's text2data.exe created the .asm file in NESASM format. Needed to use the Command Prompt and add the -asm6 flag. Is that a "flag"?
2.) My other music is in FamiTone's text2data format... it must be possible to convert that into an nsf and then convert that nsf into data with FamiTone2's text2data, right? I don't have the FamiTracker file anymore for one of those songs.
3.) The song's tempo is a bit faster than it was in FamiTracker. Is that normal? Or must something be fixed in my code? Could just lower the tempo in FamiTracker, I guess, but don't know if that would be the best solution.

How are sub songs added? Right now there is just sub song 0.


edit.
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: 8x16 and whatever else unreg wants to know

Post by Kasumi »

Needed to use the Command Prompt and add the -asm6 flag. Is that a "flag"?
Yes. Also sometimes called a switch.
2.) My other music is in FamiTone's text2data format... it must be possible to convert that into an nsf and then convert that nsf into data with FamiTone2's text2data, right? I don't have the FamiTracker file anymore for one of those songs.
You could create an NSF with the FamiTone data you have (assuming its error free), and then use something like nsfimport to get an ftm again. But it would be notably different from what you started with. (No instruments, Speed 1, the resulting FamiTone2 export would probably be huge if it could be exported at all.) You'd probably still want to rebuild your original .ftm from that output. Maybe that's easier than rebuilding it by just reading the .asm and maybe it's not...

I think the better bet would be to write a program to convert FamiTone's text2data info to FamiTracker's txt format and then use File, Import text... within FamiTracker. But I don't think there's really gonna be a simple solution to get that music back. You'll likely have to write a difficult program, or do lots of manual transcription.
3.) How are sub songs added? Right now there is just sub song 0.
Add them to the famitracker file and they're automatically included in the export txt.
Image
edit:
3.) The song's tempo is a bit faster than it was in FamiTracker. Is that normal? Or must something be fixed in my code? Could just lower the tempo in FamiTracker, I guess, but don't know if that would be the best solution.

Tempos differing slightly will be par for the course. One of the better things you can do is leave tempo at 150 and only change speed for future songs. You can read some of the why of this here: http://famitracker.com/forum/posts.php? ... &pid=15140 but only speed changes doesn't really cover the whole range of things you might want to do. There are some things where you'll just have to deal with it.

Edit: Well, wait, reading your previous post it seems like you're totally using tempo 150 and speed 6. So... ignore the above, I guess?

But also, make sure you're calling FamiToneInit correctly. If the value in A before you call it is 0, the song will play slightly faster. (Update code for 50 FPS being played at 60FPS) But the pitch would also be wrong, so it may not be this.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Kasumi, thank you for your helpful response! Wanted to apologize for making a mistake in note 2. It should have referred to converting the nsf file to FamiTone2 data with FamiTone2's nsf2data.exe. I've never used it, but noticed it sitting there in the tools folder and thought, "that would be really cool if that worked; I'll ask Kasumi about it," but I failed when writing out my previous post. :(

Will reply to the rest after game work begins tomorrow. :)
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: 8x16 and whatever else unreg wants to know

Post by Kasumi »

Ah. If you have an NSF of the old song, that's a little better. You do still kind of have to rebuild your song from an NSFimported version: http://rainwarrior.ca/projects/nes/nsfimport.html

nsf2data unfortunately won't help you. That's for sound effects, and it's limited to 256 bytes of data. Even something very short like the Super Mario Bros. death jingle is too long for it.

Edit: Well, I guess I should not be surprised that since there is an NSF importer, there is also a famitone NSF decompiler. This is an older version since the link is dead on the newer version: http://famitracker.com/forum/posts.php?id=5483 Drag your NSF onto it and you may just get your FTM back.
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Kasumi wrote:Ah. If you have an NSF of the old song, that's a little better. You do still kind of have to rebuild your song from an NSFimported version: http://rainwarrior.ca/projects/nes/nsfimport.html

nsf2data unfortunately won't help you. That's for sound effects, and it's limited to 256 bytes of data. Even something very short like the Super Mario Bros. death jingle is too long for it.

Edit: Well, I guess I should not be surprised that since there is an NSF importer, there is also a famitone NSF decompiler. This is an older version since the link is dead on the newer version: http://famitracker.com/forum/posts.php?id=5483 Drag your NSF onto it and you may just get your FTM back.
It turns out, all I have is FamiTone's asm file of "musicA". Searched for a way to convert that file into a FamiTone2 asm file, but did not succeed in learning anything. The setup of the asm files is different for FamiTone and FamiTone2, which makes sense because FamiTone2's readme has Shiru writing about how the new asm files are smaller.

I have the external harddrive where musicA's .ftm file was but that hd doesn't work anymore. Would be excellent if FamiTone2 could be backwards compatible. Now I have a FamiTone song and a FamiTone2 song. Could the FamiTone2 song become a FamiTone song if I downloaded an older version of FamiTracker?

Is there a way to convert my FamiTone asm file into a FamiTone2 asm file?
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: 8x16 and whatever else unreg wants to know

Post by Kasumi »

There is likely no existing and automatic way to do any of that. :(
unregistered
Posts: 1318
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: 8x16 and whatever else unreg wants to know

Post by unregistered »

Kasumi wrote:There is likely no existing and automatic way to do any of that. :(
Maybe the external harddisk could be repaired... I think there was a power outage and afterwards it stopped working. My computer was plugged into a powerstrip so maybe all the 1s and 0s are still there. Going to try getting that done; that feels like the right thing to do. Well, thanks again Kasumi for all of your much appreciated help!! :D

edit.
Last edited by unregistered on Fri Feb 09, 2018 3:46 pm, edited 1 time in total.
Post Reply