Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.


#1 2019-09-27 01:35:48

Registered: 2018-03-22
Posts: 61

ca83: Assemble SM83 code with ca65

Years ago, blargg and I explored the concept of implementing uncommon ISAs using macro packs for ca65 .setcpu "none", in reimplemented 6502 and spca65. Now I have applied it to the Z80-like architecture of the Game Boy CPU. This is a very rough proof of concept, but it assembles a ROM that successfully executes in bgb and on my Game Boy. The only piece of RGBDS left is RGBFIX, used to write the internal header, which I plan to eventually replace.

"But why?"
Say you have a project for Super Game Boy that uses custom native code, anywhere from minor patches to Space Invaders-style full takeover. This would let you develop the Game Boy and Super NES parts using one assembler for all three instruction sets (SM83, 65816, SPC700), so as not to need to install RGBDS or WLA DX or work around some of their limits and bugs.

The tech would also generalize to the Zilog Z80, which has been used alongside a 2A03 on the Donkey Kong 3 and Punch-Out!! arcade system boards. The PlayChoice also uses a Z80 and 2A03, and now I'm curious as to whether custom Z80 code could be used to make the PlayChoice coin model act more like Vs. System where you buy lives instead of play time.

Download: (26 kB)



#2 2019-11-09 19:26:07

Registered: 2018-03-22
Posts: 61

Re: ca83: Assemble SM83 code with ca65

I've updated ca83

* Describe syntax choices
* Add hlt and djnz macros
* Rename to sm83isa.mac to allow use of .macpack
* Add so that rgbfix need not be installed
* Add bgb debug information (requested by NovaSquirrel)

Download: (32 KiB)



Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson