Hi! I got a question. Is there a code in the disassembly that let's you brute force the rom to work in gb mode? The reason I'm asking is that I'm using an emulator in a DIY device that only recognizes the rom in gbc mode and I want to try it in the monochrome gb mode. Or if all else fails, should I try building the rom without the palettes codes instead?
As Chronosplit said, the best way to do this is by adjusting the emulator settings to boot in DMG mode rather than GBC mode. But it sounds like this is may not be an option in your case due to limitations of your hardware.
To answer your question, yes the code can be compiled as DMG roms instead of GBC roms. But I must state that there is nothing in the assembly code that does this. There is a single value in the header portion of every gameboy rom that identifies whether or not the game is a DMG game (gray cartridge), GBC-compatible (black cartridge), or GBC-only (clear cartridge).
Go into the file called Makefile and scroll all the way down to all the header options for the roms. One set of options on all of them is "-cjsv". The letters tell the compiler to set the following header options:
- "c" (lowercase) means the game is a GBC game that also works on the DMG.
- "j" means non-japan region.
- "s" means the game contains super gameboy enhancements.
- "v" tells the compiler to validate the rom header and adjust the checksum so that a real gameboy will load it.
A full list of definitions can be found here:
https://rgbds.gbdev.io/docs/v0.3.0/rgbfix.1.pdf
All you have to do is remove the "c" option from each rom in the Makefile and recompile.
Alternately, you could try manually editing header with a hex editor.
The header structure is described here:
https://gbdev.io/pandocs/The_Cartridge_Header.html
The TLDR of this is to first open a shin pokemon rom in a hex editor. Go to address $0143. It will probably have a value of $80. Set it to a value of $00 instead and save your change. Don't worry about the checksum because most emulators won't care about it being valid and will run the game anyway.