Assembler of your choice

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

Moderator: Moderators

Which assembler you use?

ca65
29
35%
asm6
28
33%
nesasm
13
15%
dasm
3
4%
wla
1
1%
tasm
1
1%
p65
2
2%
custom
7
8%
 
Total votes: 84

User avatar
clueless
Posts: 498
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Post by clueless » Thu Dec 16, 2010 3:04 pm

I like ca65 because its all unixie. I love Makefiles. :)

But seriously, I break my projects down into many source files, each implementing only a function or two. I use a single top-level Makefile to handle building my own pre-processors (for text, graphics, etc...) and to drive the use of ca65 / ld65 and any post-processing steps.

I know that other assemblers can handle a single top-level source file that just "#includes" the rest of the project, but I find that kinda sloppy.

Now my coworkers keep telling me that "Ant" is superior to "make". It probably is, but I don't need those ant features, and I surely don't want a hugely bloated JVM to be a build-chain dependency.

ps- for anyone who likes the makefile approach, I highly recommend reading the article "recursive makefiles considered harmful": http://miller.emu.id.au/pmiller/books/rmch/

User avatar
tokumaru
Posts: 11858
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Thu Dec 16, 2010 3:49 pm

Gradualore wrote:I didn't realize until recently you could have one top level source file whose sole purpose is to organize all your code and data across banks and simply include the source files and data. It's just a different way of accomplishing the same result.
This is exactly what I do. I have a pretty complex file/folder structure that keeps things easy to find and manage, and prevents thousand-line long source files.

Thanks for the CA65 config example, I'll take a better look at it later. I don't feel like I'm missing anything by using ASM6 though, it's just that I can see that CA65 is a pretty decent piece of software, so it would be nice to be able to use it in addition to ASM6, like some of you guys are doing.

User avatar
loopy
Posts: 396
Joined: Sun Sep 19, 2004 10:52 pm
Location: UT

Post by loopy » Thu Dec 16, 2010 8:37 pm

kevtris wrote:What, no love for X816? I like X816 and have been using it for a long time now to do NES and other random 6502 coding. It's fast, has all the stuff I like (incbin, relative labels, etc) and works.

Sometimes I will use tasm, but mainly if I'm doing something with copynes. These days, if it's 6502, it's X816.
x816 used to be my assembler of choice. Then I ran into some bugs I couldn't work around, and switched to DASM for a while. Then I found out it couldn't do some of the things I wanted so I wrote asm6 :D

User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

Post by Roni » Sat Dec 18, 2010 12:35 pm

I see no problem using a combination of NESASM and XVI32 for NES program building, as long as cart memory structure and 6502 hex opcodes are known those two together can do pretty much anything you need...and with YY-chr to double check prg and chr data locations, I find no need to ever use anything else.

User avatar
tokumaru
Posts: 11858
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Sat Dec 18, 2010 1:17 pm

It sure is possible to do anything with NESASM, to me this is not a question of "complex games need advanced assemblers", that's not the case at all. As long as you are well organized and consistent, the simplest assembler can be used to build the greatest game.

My only problem with NESASM is that once in a while people face unpleasant surprises with it, because of some nasty silent bug that causes the program to generate a bad binary instead of reporting the problem. I can't possibly understand why someone would choose to take this risk.

User avatar
neilbaldwin
Posts: 481
Joined: Tue Apr 28, 2009 4:12 am
Contact:

Post by neilbaldwin » Sun Dec 19, 2010 4:10 pm

thefox wrote:I use CA65. The only thing I have to complain about it is that when there's an error in a macro block, it doesn't display the exact line of the error, it displays the line where the macro was called. Also debug line info isn't stored for macros and .repeat blocks, so debugging long macros can be a pain sometimes.
Yes, this definitely needs fixing. Absolute pain in the ass sometimes.

Other than that, CA65 for me. It does take a little more effort to initially get set up but it's worth that effort. I have blargg to thank for guiding me through the pain :)

User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

Post by Roni » Mon Dec 27, 2010 12:08 pm

tokumaru wrote: My only problem with NESASM is that once in a while people face unpleasant surprises with it, because of some nasty silent bug that causes the program to generate a bad binary instead of reporting the problem. I can't possibly understand why someone would choose to take this risk.
OH! cool! I think I've encountered that bug...it seemed to occur when I would assemble an UNROM program while an emulator window was still open, and the nes file would come out corrupt. Well it's good to know that NESASM has those kinds of problems...still, I prefer it simply because out of all assemblers that I've attempted to use, I've never succeeded in producing a .NES file with anything else. Maybe my syntax was just incorrect, or commands improperly entered. I just stick to what works for me.

User avatar
GradualGames
Posts: 1107
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA
Contact:

Post by GradualGames » Mon Dec 27, 2010 5:30 pm

Roni wrote:
tokumaru wrote: My only problem with NESASM is that once in a while people face unpleasant surprises with it, because of some nasty silent bug that causes the program to generate a bad binary instead of reporting the problem. I can't possibly understand why someone would choose to take this risk.
OH! cool! I think I've encountered that bug...it seemed to occur when I would assemble an UNROM program while an emulator window was still open, and the nes file would come out corrupt. Well it's good to know that NESASM has those kinds of problems...still, I prefer it simply because out of all assemblers that I've attempted to use, I've never succeeded in producing a .NES file with anything else. Maybe my syntax was just incorrect, or commands improperly entered. I just stick to what works for me.
In my case, the version of nesasm I used would not assemble any bytes past the 72nd or 80th column or so. The tools I use to generate data for my game generate gigantic .db statements for data rather than binary files. Once I modified these to wrap to less than 72 characters wide, I got a correctly assembling rom. Even so, that bug scared me off of nesasm. I haven't had any problems with P65, ASM6, or CA65, and finally settled on CA65 due to overall development style preferences, and some of the syntactic conveniences it offers. If you haven't gotten correctly assembling roms with more than one assembler, it may still be useful to keep trying until you do...I know in my case once I finally "got it" on how assemblers work, they all made sense to me, including CA65, giving me the freedom to choose based on style alone.

*edit* I now believe the only thing that truly makes CA65 less convenient than other assemblers is that depending on how you organize your code you may need to compile multiple source files, and then link them all together. But the process is very straightforward and can be easily abstracted away with a batch file or a makefile.

User avatar
Hamtaro126
Posts: 773
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 » Wed Dec 29, 2010 10:57 am

I used to use x816, but currently:

For tests = NESASM (rarely) or ASM6
For actual releases: ASM6 or CA65

I use ASM6 for the simplicity, But for using with more custom stuff: CA65 is the stuff
AKA SmilyMZX/AtariHacker.

frantik
Posts: 332
Joined: Tue Mar 03, 2009 3:56 pm

Post by frantik » Tue Jan 18, 2011 12:28 am

mark me down for asm6.. simple and easy to use, plus i love the .hex command

albailey
Posts: 177
Joined: Thu Jul 13, 2006 3:15 pm

Post by albailey » Tue Jan 18, 2011 9:56 am

I use ca65. I run cygwin and have a certain familiarity with Makefiles.

I do not think I use all of its capabilities though. In my early coding days, I was making multiple wrongs and somehow getting a right.

I usually just have separate ASM files broken up by functionality and then include them all in my main ASM file.

I really like the IFDEFs and locally defined labels and anonymous labels

Al

User avatar
Bregalad
Posts: 7951
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Tue Jan 18, 2011 9:58 am

and have a certain familiarity with Makefiles.
Me it's the exact opposite, I deeply hate them and runs aways anything that uses makefiles.
Useless, lumbering half-wits don't scare us.

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

Post by tepples » Tue Jan 18, 2011 10:08 am

Bregalad wrote:Me it's the exact opposite, I deeply hate them and runs aways anything that uses makefiles.
Then what do you use when you code PC-side tools? Those use makefiles, even if they're automatically generated from a (binary or XML) project file.

User avatar
Bregalad
Posts: 7951
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Post by Bregalad » Tue Jan 18, 2011 11:05 am

Well for now I use java. But I guess I could also do C++ with eclipse, I'd just have to figure how.
Useless, lumbering half-wits don't scare us.

albailey
Posts: 177
Joined: Thu Jul 13, 2006 3:15 pm

Post by albailey » Tue Jan 25, 2011 10:57 am

Bregalad wrote:Well for now I use java. But I guess I could also do C++ with eclipse, I'd just have to figure how.
I think if you are familiar with java, give ANT a try.
It's similar to a makefile (in my opinion).

Al

Post Reply