Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > What compiler is the ASM export used with? Owner: iexpress New post
Page 1 of 1 Sort:  
What compiler is the ASM export used with? Posted: 2013-05-30 10:56 Reply | Quote
iexpress



Member for: 3309 days
Location: saint louis, mo, USA
Status: Offline

#48075
OK, I found the new famitracker release has ASM output, but what compiler isa it exporting for compatibility with?

I'm trying Nbasic from Bob Rost, but the ASM's have severe errors.
The assembly syntax is not correct, or the SM doesn't contain any play code. Either way the nes rom image isn't building.

Any ideas how to get it to work with .incbin?

Whoever made Famitracker needs to make it more compatible. The ASM and binary exports are corrupted and an't be used with their load addresses.

_______________________
JDS
Posted: 2013-05-30 18:50 Reply | Quote
furrykef

Avatar

Member for: 5189 days
Status: Offline

#48080
Last I've checked the assembler used was ca65.

(BTW, an "assembler" and a "compiler" are different things.)

Posted: 2013-05-30 18:54  (Last Edited: 2013-05-30 18:55) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#48082
There is no standard for assembly code, so it's not possible to make it compatible with everything.

The assembly export works fine with ca65, and even a few others that are popular for NES.

Yes, the assembly export does not contain any play code, only the music data. The play code is in the NSF driver, which can only be assembled with ca65.

Posted: 2013-05-30 18:57  (Last Edited: 2013-05-30 19:25) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#48083
Also, I would suggest you put your questions in a single thread, instead of spreading them out like you've done. They're all related, and it's weird trying to respond to them all like they're from different people.

By the way I made a guide a while back for using the BIN export:
[url=http://famitracker.com/forum/posts.php?page=1&id=3681]http://famitracker.com/forum/posts.php?page=1&id=3681
It might help as a tutorial for what you need to do to get the NSF driver assembled, and how to use it with your .bin music data.

You will probably need to get comfortable with ca65 if you want to do this right. Combining binary output from different assemblers is possible, but it's not easy.

Posted: 2013-05-30 21:14 Reply | Quote
iexpress



Member for: 3309 days
Location: saint louis, mo, USA
Status: Offline

#48088
Right, I got confused for a second.

I'm using a Basic language in a compiler Nbasic made by Bob Rost, while the assembler he decided to use for his Basic language is NESASM.

It appears the ASM export from Famitracker doesn't work with NESASM whe I .incbin

The final NES image shows a gray screen without audio or chr data.

Not sure if its the syntax difference because NESASM uses .db and it looks like the ASM export was using .byte and .segment keywords.

I took a look at ca65 but can't figure out how to use it. Can we .incbin .ASM files in each other with it?

Thanks



_______________________
JDS
Posted: 2013-05-30 21:20 Reply | Quote
iexpress



Member for: 3309 days
Location: saint louis, mo, USA
Status: Offline

#48089
Alright, this makes sense now.

Is there ASM source code for making an NSF driver?

I'm trying to load music data at $ADDA

I did .incbin the .BIN export at $ADDA for a load address but figured it also included the play code.

The NSF epxort I couldn't get to work as an .incbin.

To get the play data from the NSF, is it a 16 or 128 byte header every 16k? I can probably code up a hex editor in visual basic real quick to take the header out and leave me with the prg code inside it.

_______________________
JDS
Posted: 2013-05-30 22:27 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#48090
The ASM source code is the actual music player and must be included, you can get it here: [url=http://famitracker.com/files/FamiTracker.NSF.Driver-v2.9.zip]http://famitracker.com/files/FamiTracker.NSF.Driver-v2.9.zip

This must be used together with either BIN or ASM exports, neither of those works alone.

_______________________
Programmer and developer
Posted: 2013-05-31 16:52 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#48108
There is only one header in NSF, iexpress. Instead of using kevtris' old document, you may find it easier to read the version of it on the Nesdev wiki. I think it's explained better there how the NSF format works.

[url=http://wiki.nesdev.com/w/index.php/NSF]http://wiki.nesdev.com/w/index.php/NSF

Posted: 2013-06-02 13:15 Reply | Quote
iexpress



Member for: 3309 days
Location: saint louis, mo, USA
Status: Offline

#48177
Thanks. I'm finding there's a bit of a difference between the assmeblers.

We're getting closer. The unit is quacking like a duck kinda.

_______________________
JDS
Posted: 2013-06-02 13:46 Reply | Quote
iexpress



Member for: 3309 days
Location: saint louis, mo, USA
Status: Offline

#48179
Thanks, I gave it a shot but neither of the NSF players are compiling so I'll probably have to tell the hardware what to do manually one command per line.

I'm trying to figure out why Famitracker handed 5 sound channels + DPCM.

The ASM export didn't say which bytes go to which registers or in what sequence. Maybe they can add comments to the ASM exports in the next release.

I'm not sure how to load the binary exports into the registers.

Are the bytes sequential that get fed in like this? $4000, $4001, $4002, $4003 for channel 0? This would seem the most logical for a binary export but it's not quite working this way.

_______________________
JDS
Posted: 2013-06-02 16:48 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#48182
No, the ASM/BIN exports are not raw register write logs. They are data that gets fed to the "NSF driver" player program. It's streams of notes and tracker effects, pattern order, instrument macros, etc. that get "played" by the player which will write the appropriate things to the APU registers during playback.

Page 1 of 1 Sort: