ca83: Assemble SM83 code with ca65
Posted: Thu Sep 26, 2019 10:34 pm
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. Then the Super NES side would treat the Game Boy as a storage server, requesting 4 KiB sectors and waiting for the GB-side code to do the equivalent of DATA_TRN.
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.
"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. Then the Super NES side would treat the Game Boy as a storage server, requesting 4 KiB sectors and waiting for the GB-side code to do the equivalent of DATA_TRN.
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.