Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Emulation & ROM Hacking

Does this screen normally appear in Oracle Of Ages / Seasons ? - Page 1

Does this screen normally appear in Oracle Of Ages / Seasons ?

Posted by: coczero
Date: 2013-04-28 11:00:10
First off, I am not 100% sure if "Emulation & ROM Hacking" is for Pokemon games only, so if thats the case then I'm sorry.

I am currently doing some memory hacking in Zelda Oracle of Ages / Seasons. In many cases the following screen shows up:

[img]http://img211.imageshack.us/img211/3664/screenulj.jpg[/img]

From the text, of course the first thing I would think is that the screen comes when you try to play the game on an old GB. But was the GB even capable of starting a GBC game, so that it could show anything at all? I can't test it because I don't have a GB at the moment. Can anyone confirm / say something about this screen?

Re: Does this screen normally appear in Oracle Of Ages / Seasons ?

Posted by: Torchickens
Date: 2013-04-28 13:13:17
Yes, those messages normally show up when trying to run a game that only plays on a Game Boy Color/later build on a Game Boy/Pocket/Light. There are a small few games that only work on Game Boy Color too (e.g. Chee Chai Alien because it makes use of the IR Port).

In games like Pokémon Crystal and Zelda Oracle of Ages / Seasons, the game will only run if a certain flag (I can't remember what memory address it is) is C0h ('GBC only'), otherwise the 'This game can only be played on Game Boy Color' message will appear. (Source)

When memory hacking, sometimes you can get the game to reset unexpectedly, usually with weird colors, and this bypasses a routine where the game is supposed to set the Game Boy flag to C0h. It is left at 00h (any Game Boy), causing the 'This game can only be plyaed on Game Boy Color' message to appear.

It's possible to get a Game Boy/Pocket/Light to attempt to start a Game Boy Color game (see this video), but those aforementioned Game Boy models are not designed to run it, because the Game Boy Color offers more memory/more features like a 'double-speed' mode (sorry I don't know much about this subject).

Hope that clears things up.

Re: Does this screen normally appear in Oracle Of Ages / Seasons ?

Posted by: tachi
Date: 2013-04-28 13:36:30
crazy. When I had my crystal version tooken away from me, I found it hidden in the closet where my mother had never returned it after she grounded me. Then when I popped it inside my gameboy color it did that kind of message. When I blowed on it (as instinct told me to) it went back to normal, and even had my previous save. perhaps I had a connection issue? But what's weird is that my game would do that on occasion until I new gamed it.

Re: Does this screen normally appear in Oracle Of Ages / Seasons ?

Posted by: coczero
Date: 2013-04-28 13:53:45

Yes, those messages normally show up when trying to run a game that only plays on a Game Boy Color/later build on a Game Boy/Pocket/Light. There are a small few games that only work on Game Boy Color too (e.g. Chee Chai Alien because it makes use of the IR Port).

In games like Pokémon Crystal and Zelda Oracle of Ages / Seasons, the game will only run if a certain flag (I can't remember what memory address it is) is C0h ('GBC only'), otherwise the 'This game can only be played on Game Boy Color' message will appear. (Source)

When memory hacking, sometimes you can get the game to reset unexpectedly, usually with weird colors, and this bypasses a routine where the game is supposed to set the Game Boy flag to C0h. It is left at 00h (any Game Boy), causing the 'This game can only be plyaed on Game Boy Color' message to appear.

It's possible to get a Game Boy/Pocket/Light to attempt to start a Game Boy Color game (see this video), but those aforementioned Game Boy models are not designed to run it, because the Game Boy Color offers more memory/more features like a 'double-speed' mode (sorry I don't know much about this subject).

Hope that clears things up.


Really good explanation, thank you!

Re: Does this screen normally appear in Oracle Of Ages / Seasons ?

Posted by: Blaziken257
Date: 2013-04-29 20:38:45
According to this page, the Game Boy Color flag (at 0x143 in every ROM) actually determines whether the GBC should be using the GBC features or not. If the most significant bit is 1 (which means the value is 0x80 or greater), the game will have an expanded color palette (which can't be chosen on the boot screen), 32KB RAM (as opposed to 8KB), a second VRAM bank (which doubles the available tiles and stores the color palette for every background tile), and the option to use double speed mode, for example. Dual cartridge games (usually with black cartridges, or Pokémon Gold/Silver) tend to store 0x80 here, while GBC-only games (with transparent or translucent cartridges) tend to store 0xC0 here. All other games use values less than 0x80. However, I don't think the GBC actually treats 0x80 and 0xC0 differently, so the second most significant bit seems to be there to make things easier for Nintendo.

GBC games (both dual GB/GBC games and GBC exclusive games), instead, have code that checks whether the game is being run on a GBC or not. This is possible since the register A has different values depending on the system. The original Game Boy and Super Game Boy initialize this value to 01. The Game Boy Pocket and Super Game Boy 2 initialize this value to FF. The Game Boy Color initializes this value to 11. Therefore, to detect a Game Boy Color, GBC games check whether the register A is 11 or not. Then, it uses conditional jumps based on whether this is true or not.

Here is some example code from Gold Version. (This is from the English version, but I don't think this matters, but I'm mentioning it just in case.)

ROM0:0100 00              nop 
ROM0:0101 C3 C6 05        jp  05C6            ;Jump to 05C6 (below)
...
ROM0:05C6 FE 11            cp  a,11            ;Is a GBC being used?
ROM0:05C8 28 03            jr  z,05CD          ;If so, then jump to 05CD
ROM0:05CA AF              xor  a                ;If not, then set A to 0
ROM0:05CB 18 02            jr  05CF            ;Jump to 05CF
ROM0:05CD 3E 01            ld  a,01            ;Set A to 1
ROM0:05CF E0 E8            ld  (ff00+E8),a      ;RAM address FFE8 will have the value of 01 if played on GBC; 00 otherwise
...


There's more code after that, which basically pertains to initializing a bunch of registers to 0, etc. Since it's executed whether it's being run on a GB or a GBC, I won't list it here.

Other games use fairly similar methods – the main things are checking if A is 11, then doing conditional jumps based on that. Try various hacking various GBC games and see what the code is – the main code may be somewhere else in the ROM, and it store information in different addresses, but the main things I mentioned should always be there in a GBC game.

For people who know ASM hacking, try to hack the code so that the game thinks it's being run on a GB when it isn't, or vice versa. You'll get crazy results!

Finally, there's a way to perform a Glitch Dimension in numerous GBC games. Here is one way to do it:

- Download bgb if you don't already have it.
- Open bgb.
- Open a GBC ROM by right-clicking the window, and clicking Load rom.
- Open the debugger by right-clicking the window again, and clicking debugger.
- Go back to the main window, and start the game. Play it for a while, for as long (or as short) as you want.
- Now go back to the debugger. The game should pause. In the top-right of the window, you'll see the A register where it says af= #### (where # is some hex value). Make sure the first two nibbles are NOT 11 (if you click the debugger randomly, there's a 255/256 chance that it's not 11, so this shouldn't be a problem).
- In the debugger, press Ctrl+G and enter 100.
- In the debugger, go to Run->Jump to cursor (or press F6). The program will now execute the code here, which is where every Game Boy (Color) game starts.
- Resume the game by clicking the game window. In most games, you will have performed a Glitch Dimension!

This occurs because you're basically restarting the game, which includes running the GB/GBC check. However, A is no longer 11, so the game ends thinking it's being run on a monochrome Game Boy. This means that palettes won't be set, and sometimes screens won't blank properly (since the GB and GBC have different methods of doing this). For GBC-exclusive games, you'll get a "This game can only be played on the Game Boy Color" message.

The only game I've tried where I can't get this to work is Wario Land 3 – for some reason, in the game, the screen just fades smoothly from white to black. Weird.

————

Also…

crazy. When I had my crystal version tooken away from me, I found it hidden in the closet where my mother had never returned it after she grounded me. Then when I popped it inside my gameboy color it did that kind of message. When I blowed on it (as instinct told me to) it went back to normal, and even had my previous save. perhaps I had a connection issue? But what's weird is that my game would do that on occasion until I new gamed it.

I had that same message once back in 2001, but I never figured out why it occurred, and it never happened to me again. I assume it was a connection issue.

Re: Does this screen normally appear in Oracle Of Ages / Seasons ?

Posted by: Torchickens
Date: 2013-04-30 06:54:52
Very thorough answer, thanks Blaziken!