ASM6 symbol file output.

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
Movax12
Posts: 529
Joined: Sun Jan 02, 2011 11:50 am

Re: ASM6 symbol file output.

Post by Movax12 »

Oh, I never use those. That could be a problem.
User avatar
sonder
Posts: 116
Joined: Wed Jun 26, 2013 12:35 pm
Location: Baltimore
Contact:

Re: ASM6 symbol file output.

Post by sonder »

Movax12 wrote:Oh, I never use those. That could be a problem.
Ha. Give them a try. You might learn why I prefer asm6... ;)
sonder
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: ASM6 symbol file output.

Post by tokumaru »

Movax12 wrote:Oh, I never use those. That could be a problem.
Heh, I, on the other hand, am probably abusing them... For example, I do this for placing code/data at the very end of a bank (the "Game.FixedBank = $" is so I can include this multiple times):

Code: Select all

	.org $10000 - (+FixedBankEnd - +FixedBankStart)

Game.FixedBank = $

+FixedBankStart:

	.include "interrupts\System.NMI.asm"
	.include "interrupts\System.IRQ.asm"
	.include "interrupts\System.Reset.asm"
	.include "tables\System.BankIndexes.asm"
	.include "tables\System.InterruptVectors.asm"

+FixedBankEnd:
I don't know how easy/possible this is in other assemblers.
User avatar
sonder
Posts: 116
Joined: Wed Jun 26, 2013 12:35 pm
Location: Baltimore
Contact:

Re: ASM6 symbol file output.

Post by sonder »

OK. I cleaned up the source's formatting (Loopy apparently hated whitespace) and got it compiling and assembling my project.

Now to add the symbol file output. Can anyone help me with the format? I tried looking at an output file from a cc65 project thinking I could figure it out... and I can't.
sonder
User avatar
Movax12
Posts: 529
Joined: Sun Jan 02, 2011 11:50 am

Re: ASM6 symbol file output.

Post by Movax12 »

sonder wrote:
Movax12 wrote:Oh, I never use those. That could be a problem.
Ha. Give them a try. You might learn why I prefer asm6... ;)
I agree that asm6 does a better job here, but I have other means. https://www.assembla.com/spaces/ca65hl/wiki

Regarding debug output format, maybe try to talk to thefox or qbradq on these forums.
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: ASM6 symbol file output.

Post by thefox »

sonder wrote:Now to add the symbol file output. Can anyone help me with the format? I tried looking at an output file from a cc65 project thinking I could figure it out... and I can't.
There's a file called "dbginfo.c" (and the corresponding header) in the CC65 sources, NintendulatorDX and NESICIDE use it to parse debug info files generated by CC65. The source can be helpful in figuring out the format, and you can also use it to fairly easily test if the debug files you have generated parse correctly.

It's probably not straightforward to generate them from other assemblers though because of how closely the format is tied to CC65. Especially if you want to support everything like source line infos.

I also seem to remember there is a small command line utility in the CC65 package that could be used to browse debug files.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: ASM6 symbol file output.

Post by Dwedit »

Don't forget that ASM6 can already make listing files, which are useful in their own way.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
sonder
Posts: 116
Joined: Wed Jun 26, 2013 12:35 pm
Location: Baltimore
Contact:

Re: ASM6 symbol file output.

Post by sonder »

Dwedit wrote:Don't forget that ASM6 can already make listing files, which are useful in their own way.
yeah that's what i've been relying on to do my debugging. manually tabbing back and forth and noting addresses. it's not much fun. :P
sonder
User avatar
sonder
Posts: 116
Joined: Wed Jun 26, 2013 12:35 pm
Location: Baltimore
Contact:

Re: ASM6 symbol file output.

Post by sonder »

sonder wrote:OK. I cleaned up the source's formatting (Loopy apparently hated whitespace) and got it compiling and assembling my project.

Now to add the symbol file output. Can anyone help me with the format? I tried looking at an output file from a cc65 project thinking I could figure it out... and I can't.
I just added FCEUX label file export to asm6 since it had clear documentation and a straightforward format.

Here's the modded version + source. There's no commandline option, it just always outputs the nl files. I'll let someone else take care of that.
Attachments
asm6.zip
(28.74 KiB) Downloaded 100 times
sonder
Ti_
Posts: 42
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: ASM6 symbol file output.

Post by Ti_ »

sonder wrote:
sonder wrote: Here's the modded version + source. There's no commandline option, it just always outputs the nl files. I'll let someone else take care of that.
It's 64 bit? Can you make win32?
User avatar
sonder
Posts: 116
Joined: Wed Jun 26, 2013 12:35 pm
Location: Baltimore
Contact:

Re: ASM6 symbol file output.

Post by sonder »

Ti_ wrote:
sonder wrote:
sonder wrote: Here's the modded version + source. There's no commandline option, it just always outputs the nl files. I'll let someone else take care of that.
It's 64 bit? Can you make win32?
Grab Tiny C compiler and compile it, the source is included. I'm sure people would appreciate it if you posted a 32bit version, I just don't wanna mess with that.
sonder
Ti_
Posts: 42
Joined: Sat Aug 03, 2013 3:08 pm
Location: Russia
Contact:

Re: ASM6 symbol file output.

Post by Ti_ »

Well, ok. It's works, thank you.

Symbols files for labels and ram created. The only thing not working is equ's (like objects_X_low equ $300).
User avatar
sonder
Posts: 116
Joined: Wed Jun 26, 2013 12:35 pm
Location: Baltimore
Contact:

Re: ASM6 symbol file output.

Post by sonder »

Ti_ wrote:Well, ok. It's works, thank you.

Symbols files for labels and ram created. The only thing not working is equ's (like objects_X_low equ $300).
Ah, yeah. Nice catch. I meant to add those, should be fairly easy. Will post an update.
sonder
User avatar
sonder
Posts: 116
Joined: Wed Jun 26, 2013 12:35 pm
Location: Baltimore
Contact:

Re: ASM6 symbol file output.

Post by sonder »

sonder wrote:
Ti_ wrote:Well, ok. It's works, thank you.

Symbols files for labels and ram created. The only thing not working is equ's (like objects_X_low equ $300).
Ah, yeah. Nice catch. I meant to add those, should be fairly easy. Will post an update.
Here. Note that I made it ignore all equates and values that are 1 character, so that indexes and such aren't included.
Attachments
asm6.zip
(30.08 KiB) Downloaded 110 times
sonder
Zipper
Posts: 11
Joined: Mon Sep 03, 2012 1:38 pm
Location: Netherlands

Re: ASM6 symbol file output.

Post by Zipper »

Great work sonder!!! Thanks.
Post Reply