add basic support for rgbds assembly#13831
add basic support for rgbds assembly#13831terinjokes wants to merge 1 commit intomesonbuild:masterfrom
Conversation
ff5dcc1 to
bd1b4a7
Compare
This adds basic support for assembling and linking Game Boy and Game Boy Color games with RGBDS's `rgbasm` and `rgblink`. This also adds knowledge of the Sharp SM83 CPU family, the 8080/Z80-like CPU used on the device's SoC.
I've implemented one possible alternative by adding an |
|
A module is probably the most sensible way to go about replacing the custom target. The code here all looks good to me. The one concern I have is that we now have two different languages implementing |
|
In this specific example, you do already get an error if you declare both in Looking past this specific case (eg, if this PR was adding fasm instead), I can imagine the issues. I'll look at where I could add a warning or error. |
|
hmmm, if they're for different machines then that's not actually a problem. As long as the rgdbs only supports the sm83 architecture I think that's fine. You could, In theory, be building an emulator for the build machine and a rom image for a host machine (ie, for the emulator) as a single invocation, and the emulator using nasm to target x86 and the rom using rgbds would be a valid configuration |
This adds basic support for assembling and linking Game Boy and Game Boy Color games with RGBDS's
rgbasmandrgblink. This also adds knowledge of the Sharp SM83 CPU family, the 8080/Z80-like CPU used on the device's SoC.An example of this being used can bee seen in the two included tests, as we'll as a fork of pokered.
As demonstrated in test case "2 rgbfix" as well as the pokered fork, many projects will need to call
rgbfixto setup the ROM headers to the expected (and computed, in the case of checksum) values on top of the output ofexecutable(). Unfortunately, it's not possible to have the linker automatically callrgbfix, and I wasn't able to find a good place in Meson to add that call. I'm open to ideas as possible alternatives to thecustom_targetI've documented.