News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Metroid nes ASM help

Started by PonchGaming, September 04, 2015, 10:07:45 PM

Previous topic - Next topic

PonchGaming

Like the title kind of says, how do you put asm on metroid nes? Is there a program like xkavs but for nes? I'm just wondering, i want to use asm a little more. Thanks

snarfblam

You can use xkas for NES, provided that you make sure you stick to opcodes and operand sizes supported by 6502. The other general approach for NES is to assemble your ASM files to BIN files and use a hex editor to manually insert the assembled code. You can also use the built-in mini-assembler in FCEUX for something quick-and-dirty. (After inserting new code, you can save the ROM via the hex editor.)

I wrote an assembler that outputs IPS patches, but it's not the most feature complete (no macros is a big one), and not the most thoroughly tested. (AFAIK, there is a bug with the .ifdef/.ifndef directives). It supports multiple patches, each beginning with a .PATCH directive.


; bank:address format
.PATCH 04:ABCD
    ;stuff

; file location format (same address)
.PATCH $12BDD
    ;stuff


If you're using Editroid, my assembler is already built-in and accessible via the project menu.