Okay, question. Is there a way for GB Basic software to detect the system being used? I had a wicked idea where starting the system up with a Game Boy DMG causes a "this game is not compatible with this system!" error, while putting it in a Game Boy Color gives you a different error. "Sorry, doesn't work on this either."
Yes, try the following approach:
if query(IS_CGB) then
print "CGB"
else if query(IS_SGB) then
print "SGB"
else if query(IS_AGB) then
print "AGB"
else
print "DMG"
end if
if query(IS_GBB) then
let flags = query(PLATFORM_FLAGS)
let os = flags band 0b00001111
select case os
case 0b00000001
print " OS: Windows"
case 0b00000010
print " OS: Linux"
case 0b00000100
print " OS: MacOS"
case 0b00001000
print " OS: HTML"
else
print " OS: Unknown"
end select
if flags band 0b10000000 then
print "Env: Editor"
else
print "Env: Emulator"
end if
end if
Also see https://github.com/paladin-t/ram-mon.gbb for more precise hardware detection.