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 > Re-initizliaing the io registers?

#36019 - Dwedit - Mon Feb 14, 2005 6:47 am

I've noticed that when you run multiboot roms from the Movie Player, the hardware is in a bad initial state. For example, the animation of the rocket moves eratically in Chu Chu Rocket Challenge.
There are also problems in pogoshell with the sound bias, resulting in horrible sound.

To try to fix those types of problems, I'm writing a stub program to reset the hardware before running a multiboot game.

Any ideas on which registers, memory areas, or CPU flags I should clear before executing the games?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#36020 - DekuTree64 - Mon Feb 14, 2005 7:01 am

Try SWI 1 (register/RAM reset), as described in GBATEK here. Looks like setting bits 5/6/7 of r0 will fix all the registers.
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku