« on: February 09, 2016, 06:54:28 pm »
If I'm not mistaken, most GBC only games were programmed to display an error message when booting on incompatible hardware (either GB, Super GB or an emulated GB). In addition to that there was the physical impossibility to insert GBC only games in a GB because some plastic thing that prevented to insert the cart in a regular GB.They were only physically impossible to insert on an original Game Boy, not impossible to insert any other variation of the original GB (SGB1/2, Pocket, Lite).
Yes, as said, games contained an error message to stop the user from experiencing a buggy game if they played on a wrong console. The game might play, but as soon as they hit a part of the game that tries to use a feature unsupported by the original Game Boy (such as using the extra RAM or higher-speed CPU mode), it will crash.
How to bypass the check and experience the glitchy mess that results is possibly a game-specific hack.
It could be checking a few things:
all GB/GBC systems have a boot ROM (which checks if the cart has a proper Nintendo header). The important thing is the last instruction, which writes something to a CPU register that disables the boot ROM. The boot ROM on different GB systems will write a different value to that register to give a secondary effect of allowing the game to identify which GB system is used (but the game will need to immediately copy that value to RAM, like in one of the first instructions executed, since it cannot be directly read again).
Example, Donkey Kong GB: Dinky & Dixie:
All GB code (after the boot ROM) will start executing at ROM address $0100). Typically that code isThat last line seems to do it. Game "playable" in GB mode with all graphics replaced by a glitchy mess.
DKGB is no exception.
At $0150 is:
cp a,11 ;a holds the value left by the GBC boot ROM, identifying the hardware as GBC.
;this instruction sets a flag in the CPU if a=11 or not
ld a, 23 ;these two instructions swap in ROM bank $23. This is going to be the ROM bank with the error screen.
jp nz,6c47 ;here is where the flag, previously written by the GBC detection check is checked. It will branch to the error screen.
;I'd guess you could nullify the check by writing nop ($00) over the 3 bytes in this instruction (C2 47 6C at address $015A) in the ROM