Recommended NES Assembler and/or Compiler

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

What do you use?

NESASM
7
16%
CC65
14
32%
NESICIDE
3
7%
ASM6
13
30%
WLA-DX
3
7%
NBASIC
0
No votes
MagicKit Vx.xx
1
2%
NESHLA
0
No votes
OTHER (Please leave comment)
3
7%
 
Total votes: 44

User avatar
E1D0L0N
Posts: 1
Joined: Mon Mar 25, 2013 8:05 pm

Recommended NES Assembler and/or Compiler

Post by E1D0L0N »

As we are all on here for the same reason, I would like to create my own NES game, whether simple and stupid, or elaborate and fun (if I can ever find the time). I have been reading all sorts of information online, seen many examples, and tested some things I've created. With all that said, what is the most commonly used compiler for NES games? I have read post about people wanting to know the best, which usually results in people just going back and forth about why they think the one they are using is better. I just want to know what the majority of the people are using. Thoughts?

By request, I created a poll for this topic. I'm sure I am missing something, if so just leave it in a comment.
Last edited by E1D0L0N on Mon Mar 25, 2013 8:29 pm, edited 1 time in total.
3gengames
Formerly 65024U
Posts: 2281
Joined: Sat Mar 27, 2010 12:57 pm

Re: Recommended NES Assembler and/or Compiler

Post by 3gengames »

Make a poll. Most use ASM6 or C(A/C)65 AFAIK. I use NESASM because it's the least bullshit of any out there, even if you do have to work a different way when writing code.
Last edited by 3gengames on Tue Mar 26, 2013 1:41 am, edited 2 times in total.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Recommended NES Assembler and/or Compiler

Post by rainwarrior »

I think NESASM is great for smaller things, esp. because you can put an entire program in a single .asm file. I learned on it because that's what bunnyboy's tutorial uses.

However, once I had learned how to use cc65's linker, there was no turning back for me. There's so much power in it, not to mention the ability to use C as well.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Recommended NES Assembler and/or Compiler

Post by Dwedit »

I started out using TASM, then switched to ASM6. ASM6 goes for simplicity all the way, so it's very easy to use.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: Recommended NES Assembler and/or Compiler

Post by thefox »

About the options: NESICIDE uses CA65 (CC65), and MagicKit is basically the same as NESASM.

I use CA65.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Grumskiz
Posts: 79
Joined: Sat Mar 26, 2011 1:06 pm
Location: Germany

Re: Recommended NES Assembler and/or Compiler

Post by Grumskiz »

I completely agree with rainwarrior. I started out with NESASM, but quickly changed to CA65. CA65 can be really difficult or confusing at first, but I got used to it very quickly. And while it seems like it is only useful for bigger projects, I never had any trouble using it for smaller ones. In fact I have only used it for smaller projects so far.
I have not used asm6 so I can't really say anything about it.

This discussion comes up a lot I think and there are always good reasons to use or not to use a certain assembler. I think what it really comes down to is preference and getting used to the negative aspects of a certain assembler and learning how to work with/around them.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: Recommended NES Assembler and/or Compiler

Post by Bregalad »

I use WLA-DX. It's good and has lots of features, but I heard CA65 is even better.
I never really used CA65 so I can't tell. The problem is that apprently WLA-DX has not been updated since 2008.
unregistered
Posts: 1193
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: Recommended NES Assembler and/or Compiler

Post by unregistered »

Dwedit wrote:ASM6 goes for simplicity all the way, so it's very easy to use.
Yes, I agree! ASM6!
This is where tokumaru agreed with Dwedit; they recommended ASM6 to me. :D
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Recommended NES Assembler and/or Compiler

Post by tokumaru »

NESASM and ASM6 are equally simple IMO: both can create a ROM from nothing more than a single ASM file, without configuration files or complex command lines. If you're going for simplicity, you should pick one of these 2. I prefer ASM6 because NESASM uses non-standard 6502 syntax for some things and it has been known to fail silently in the past, producing corrupt binaries without reporting any errors (some people say these bugs have been fixed).

Even though they can assemble ROMs from single ASM files, that doesn't mean that's all they can do... you can use includes and local/temporary labels to better organize your sources, which is recommended for larger projects.
snarfblam
Posts: 143
Joined: Fri May 13, 2011 7:36 pm

Re: Recommended NES Assembler and/or Compiler

Post by snarfblam »

I use ASM6 and an assembler I wrote myself that is very similar.

My only reservation about ASM6 is its tendency to fail silently from time to time. If you use an invalid addressing mode, it might pick a different addressing mode, and the overly flexible syntax means that typos can be interpreted as labels (labels don't require colons). Once or twice this has caused me some very-difficult-to-track-down issues.

Code: Select all

    pha    ; Interpreted as instruction

    phx    ; All interpreted as labels
    phaa
    phs
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Recommended NES Assembler and/or Compiler

Post by tokumaru »

snarfblam wrote:My only reservation about ASM6 is its tendency to fail silently from time to time. If you use an invalid addressing mode, it might pick a different addressing mode
Really? This is something we've seen NESASM do, but never happened to me with ASM6.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: Recommended NES Assembler and/or Compiler

Post by blargg »

[Silently failing] is something we've seen NESASM do, but never happened to me with ASM6.
...that you've noticed, anyway, which is why silent failure is such a serious problem.

At least until the next-to-latest version (I haven't upgraded), ca65 silently assembled invalid code for the 65816:

Code: Select all

BF 56 34 12  lda $123456,x ; OK, supports 24-bit indexed on X
B9 56 34     lda $123456,y ; Y can't be used for 24-bit indexing, so silently drops bank byte
I wouldn't be surprised if this isn't an isolated thing.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: Recommended NES Assembler and/or Compiler

Post by Bregalad »

Silent failing shouldn't ever happen I think. At the very least print a warning, an error that would force the programmer to change the code is better.

As for WLA-DX, it does not requires semicolumns for labels, but anything that starts straight after a line is a label while instructions must have a whitespace before them. I think it's a convenient way to distinguish from labels to instructions, although semicolumns are just as convenient.

I'd say it's a good thing that ASM6 can assemble a complex project without configuration files, and it's probably a very good reason to use it. WLA-DX requires a memory mapping file and a link file, and while this enables me to solve things (like the iNES header) in a very elegant way, it is a source of annoynace for small NROM projects.

Another nice thing is unnamed labels. I use them all the time. The problem is that WLA-DX doesn't handle the + / - the same ways as CA65, which is what is preventing me to switch.

In WLA dx, something like

bpl ++

Will branch to the next unnamed label which is called "++", while on CA 65 it will mean to branch to the second next unnamed label (if I understand correctly).

Therefore in WLA-DX it's easy you use "+, -" for the inner loop, "++, --" for the outer loop, etc.. (I rarely use more than 2 of them).
For CC65 it'd be a complex process to count the amount of unnamed labels you want to skip, and therefore make the code more error prone, and indirectly you'd have to use named labels instead in order to avoid errors. I HAD errors with unnamed labels on WLA, of course, but quite rarely so.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Recommended NES Assembler and/or Compiler

Post by tepples »

Bregalad wrote:For CC65 it'd be a complex process to count the amount of unnamed labels you want to skip, and therefore make the code more error prone, and indirectly you'd have to use named labels instead in order to avoid errors.
You'd want to use named labels anyway to make it easier to rearrange your loop later.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Recommended NES Assembler and/or Compiler

Post by rainwarrior »

Yeah, you can just use named labels with local scope to get what you want there.
Post Reply