What assembler to use for GBC assembly hacking?

Started by Spikeman, March 21, 2012, 05:05:51 PM

Previous topic - Next topic

Spikeman

Hey all, I'm hoping to foray into some assembly hacking for the GBC, but I'm not sure what tools to use. My only experience with assembly hacking is for GBA/NDS, where armips is the weapon of choice. I'm looking for an assembler that can assemble code directly into the ROM, similar to how armips handles things. Does such a tool exist? If not, can someone detail how they do this sort of thing?

Thanks. :)
Open Source Hacking Projects: Guru Logic Champ, Telefang 2, (Want more? Check out my GitHub!)

LostTemplar

I have absolutely no experience with GBC hacking nor bass, but I guess you could set up a Z80 architecture for byuu's bass.

KingMike

#2
I've used WLA-dx.

To insert stuff, a basic start to the asm code is

.MEMORYMAP        ;CPU mapping
DEFAULTSLOT 1
SLOT 0 START $0000 SIZE $4000    ;0-3FFF fixed bank
SLOT 1 START $4000 SIZE $4000    ;4000-7FFF swappable bank
.ENDME

.ROMBANKSIZE $4000         ;sets up for a 128KB ROM (8 banks at 16KB each)
.ROMBANKS 8

.BACKGROUND "file.gb"   ;to patch an existing file

.bank 0 slot 0   ;informs the game we are inserting to ROM bank 0,
                       and assume in CPU slot 0 (which we defined above as $0-3FFF)
.org $0A3F    ;CPU address to insert to


To assemble, I use a batch file.
wla-gb -o source.asm game.o
wlalink -r game.txt game.gb
pause


Where game.txt is like

[objects]
game.o
"My watch says 30 chickens" Google, 2018

Spikeman

Thanks guys. It doesn't look like bass supports z80, but WLA-dx is exactly what I'm looking for. (Any reason this isn't in the utilities section?)
Open Source Hacking Projects: Guru Logic Champ, Telefang 2, (Want more? Check out my GitHub!)