gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Switch GBA into GBC mode by software.

#178183 - AntonioND - Sun Apr 20, 2014 7:39 pm

Hello!

I know dwedit did something like this a few years ago, but I never managed to compile its code and make it run (even though the precompiled binary worked fine). Anyway, the code was just an incomprehensible mess:

http://www.dwedit.org/dwedit_board/viewtopic.php?id=339

This morning I've read that the GBA bios still had the piece of code that switches the GBA into GBC mode, like Nintendo planned to do in the begining (before deciding that it would be better to do it with a hardware switch).

I've disassembled the part that performs this switch and made a little demo to show that it works! Here it is:

https://github.com/AntonioND/gba-switch-to-gbc

But it doesn't end here! It can also apply an affine transformation to the GBC video output, and even enable mosaic effect or GREENSWP register! The GREENSWP register works a bit different than in GBA mode, by the way.

The bad thing is that the video output only works in GB Micro, in GBA and GBA SP it shows a black screen, and in DS it doesn't work at all (it doesn't have a GB CPU).

I've also uploaded a video:

https://www.youtube.com/watch?v=-SkR8SAdS9w

Bye!

#178184 - sverx - Tue Apr 29, 2014 1:45 pm

AntonioND wrote:
The bad thing is that the video output only works in GB Micro, in GBA and GBA SP it shows a black screen


Oh, why? Can't it just be a background disabled?
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary

#178185 - AntonioND - Thu May 01, 2014 8:20 pm

I don't know. I suppose that the GBA and GBA SP circuits try to use 5V and, since the voltage switch is in 3.3V (because of the cartridge) it doesn't get the energy to run. The GB Micro doesn't have that circuits so for some reason the circuits work?

I tried to make the GBM read some data from a cartridge I modified to output some data at 3.3V (I soldered a pin to GND and another to VCC) but it doesn't seem to work, the GBM reads 0s (the GBC reads the correct pattern with the same cartridge).