Recommended NES Assembler and/or Compiler
Moderator: Moderators
Recommended NES Assembler and/or Compiler
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.
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.
Re: Recommended NES Assembler and/or Compiler
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.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Recommended NES Assembler and/or Compiler
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.
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.
Re: Recommended NES Assembler and/or Compiler
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!
Re: Recommended NES Assembler and/or Compiler
About the options: NESICIDE uses CA65 (CC65), and MagicKit is basically the same as NESASM.
I use CA65.
I use CA65.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: Recommended NES Assembler and/or Compiler
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.
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.
Re: Recommended NES Assembler and/or Compiler
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.
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
Yes, I agree! ASM6!Dwedit wrote:ASM6 goes for simplicity all the way, so it's very easy to use.
This is where tokumaru agreed with Dwedit; they recommended ASM6 to me.
Re: Recommended NES Assembler and/or Compiler
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.
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.
Re: Recommended NES Assembler and/or Compiler
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.
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
Re: Recommended NES Assembler and/or Compiler
Really? This is something we've seen NESASM do, but never happened to me with ASM6.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
Re: Recommended NES Assembler and/or Compiler
...that you've noticed, anyway, which is why silent failure is such a serious problem.[Silently failing] is something we've seen NESASM do, but never happened to me with ASM6.
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 byteRe: Recommended NES Assembler and/or Compiler
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.
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.
Re: Recommended NES Assembler and/or Compiler
You'd want to use named labels anyway to make it easier to rearrange your loop later.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.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Recommended NES Assembler and/or Compiler
Yeah, you can just use named labels with local scope to get what you want there.