Page 1 of 1

What is the most popular assembler used for NES?

Posted: Sat Oct 26, 2019 2:19 pm
by greatkreator
What is the most popular assembler used for NES?

Re: What is the most popular assembler used for NES?

Posted: Sat Oct 26, 2019 2:28 pm
by NOOPr
Don't know for sure, but i guess it is ca65 ... second asm6

Re: What is the most popular assembler used for NES?

Posted: Sat Oct 26, 2019 4:07 pm
by greatkreator
Thanks! I will try them.

Re: What is the most popular assembler used for NES?

Posted: Sat Oct 26, 2019 8:16 pm
by tokumaru
The top 3 are definitely ca65, NESASM and ASM6. Here's a quick summary of all 3:

NESASM: common among beginners, due to it having been used in a popular tutorial series (Nerdy Nights). It's a very straightforward assembler, takes assembly code as input and outputs a binary ROM file. Uses non-standard syntax for some things, and has a few weird bugs/quirks that sometimes creates problems that are hard to debug.

ASM6: Just as straightforward as NESASM, also taking assembly code and spitting out a binary file. Has very few built-in functionalities, only covering the basics. Being a multi-pass assembler means it offers a lot of versatility when it comes to organizing banks and variables. Also has it's share of little bugs/quirks, but these are normally less problematic than the ones in NESASM.

ca65: The most "professional" one. After the assembly step, it needs to link the intermediary code in order to generate the final binary, which requires a memory configuration file, which is normally what you use to define the ROM/RAM layout. Has a very extensive set of built-in directives and an advanced macro system that combined allow the implementation of all sorts of custom functionalities. Some versatility is lost sure to the fact it's a single pass assembler.

I personally avoid NESASM, use ASM6 for small programs and quick tests, and ca65 for bigger projects, but I'm still not 100% satisfied with this combination. Ideally I'd like something between ASM6 and ca65, with a decent number of useful directives and functions, but not so strict about ROM/RAM organization.

Re: What is the most popular assembler used for NES?

Posted: Wed Oct 30, 2019 11:09 pm
by Oziphantom
maybe 64tass, you can just set up sections, and then send things to it, this way you can make 'procs' and then just put them in BANK0 BANK1 etc. ZP
It basically has a built in linker and it is N pass, so you can do some voodoo with it. http://tass64.sourceforge.net/

Re: What is the most popular assembler used for NES?

Posted: Sat Jan 04, 2020 4:39 am
by nitrofurano
what do you all think about dasm?

Re: What is the most popular assembler used for NES?

Posted: Sat Jan 04, 2020 5:18 am
by calima
Literally neverheard.

Re: What is the most popular assembler used for NES?

Posted: Sat Jan 04, 2020 4:11 pm
by gauauu
Dasm is really popular in the Atari 2600 community. I've used it.... It's fine. I prefer ca65 for NES stuff primarily because of how the segments and linker work, but dasm is a nice usable simple assembler.

Re: What is the most popular assembler used for NES?

Posted: Sat Jan 04, 2020 4:30 pm
by turboxray
Do any other the assemblers, besides nesasm, support including binary files and then setting destination address to overwrite part of them?

Re: What is the most popular assembler used for NES?

Posted: Sat Jan 04, 2020 4:40 pm
by lidnariq
XA65 is specifically designed for that use case.

Re: What is the most popular assembler used for NES?

Posted: Tue Jan 07, 2020 10:27 am
by rainwarrior
turboxray wrote:
Sat Jan 04, 2020 4:30 pm
Do any other the assemblers, besides nesasm, support including binary files and then setting destination address to overwrite part of them?
ca65 has an incbin directive that lets you include part of a binary file. Using segments to place them at the correct location, you can replace the middle of a binary file with a patch:

Code: Select all

.segment "BIN1"
.incbin "bank.bin", 0, $9500 - $8000

.segment "PATCH"
; patch code goes here

.segment "BIN2"
.incbin "bank.bin", $A000 - $8000, $C000 - $A000
Alternatively, what I tend to prefer to this is to use ca65 to output an IPS file directly, rather than a new NES ROM, then just use a command line IPS patcher in my build step to make the ROM. It ends up looking something like this:

Code: Select all

.segment "HEADER"
.ascii "PATCH"

.segment "PATCH1_HEADER"
PATCH1_POS = $9500 - $8000
.import __PATCH1_SIZE__
.byte PATCH1_POS >> 16
.byte >PATCH1_POS
.byte <PATCH1_POS
.byte >__PATCH1__SIZE__
.byte <__PATCH1__SIZE__

.segment "PATCH1"
; patch code goes here
; remember to use 'define = yes' in the segment definition

.segment "FOOTER"
.ascii "EOF"
A third method I've found useful is to use the da65 tool to disassemble the whole bank, so you can just edit the code more directly. (example)