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 > Sleep Mode

#408 - Indecisive - Tue Jan 07, 2003 3:05 pm

Some games, such as Golden Sun and Metroid Fusion, include a sleep mode to save battery power when you want a break but can't save. I'm hoping to implement a similar function in my games.

Is this a feature of the hardware or must it be done in software, and can anyone provide code for doing this?

#414 - Touchstone - Tue Jan 07, 2003 4:28 pm

This is a hardware function. Systemcall no. 3 to be more precise. Check out more info on this at http://www.work.de/nocash/gbatek.htm#biosfunctionsummary

My personal opinion though is that it is better if the games have a quick-save instead of sleep, that way you can turn the gba of for a long period of time or if you need to change batteries. Look at how Breath of Fire did it, at least the first BoF for gba.
_________________
You can't beat our meat

#417 - Burre - Tue Jan 07, 2003 4:45 pm

Touchstone wrote:
My personal opinion though is that it is better if the games have a quick-save instead of sleep, that way you can turn the gba of for a long period of time or if you need to change batteries.


True, but it is nice to have both, using qsave for longer breaks (or providing a more flexible gameplay in general), and using sleep as an extension of the pause function.
_________________
"The best optimizer is between your ears..."

#422 - Touchstone - Tue Jan 07, 2003 5:03 pm

Well.. There's really no need to have both since they basically do the same thing and if you're working on a game in a professional environment you'd want to avoid having two alternatives because of the extra labor in terms of menu text have to be localized, functionallity must be QA tested, you'd have to describe it in the manual and so on.

But in theory and in a hobby project you can have both there. :)
_________________
You can't beat our meat

#544 - Indecisive - Wed Jan 08, 2003 4:46 pm

Thanks for the info.

I actually want to implement it because I will soon be getting my MBV2 cable (it's currently about 40 miles away according to UPS) and then I'll be testing my code on hardware. Switching off the GBA would lose my program. So I thought of using sleep mode.

#547 - Burre - Wed Jan 08, 2003 5:34 pm

Talking about sleep mode, does anyone know how big the powerconsumption is while in sleep mode?
_________________
"The best optimizer is between your ears..."

#581 - ampz - Wed Jan 08, 2003 9:48 pm

I measured the powerconsumption to about 100mA with a active game... (varying somewhat depending on bus utilization, sound and stuff)
Also, some flash carts tend to consume alot more power than original carts. I think it's the PLD based flashcarts that consume the most current.

Of course, my flashcart design consumes minimal amounts of power... ;-)

I've not measured powerconsumption in sleep mode thou... Considering that CPU, busses, video and sound is off, it should consume only a few mA..

#676 - Psyk - Thu Jan 09, 2003 6:21 pm

Quote:
Well.. There's really no need to have both since they basically do the same thing and if you're working on a game in a professional environment you'd want to avoid having two alternatives because of the extra labor in terms of menu text have to be localized, functionallity must be QA tested, you'd have to describe it in the manual and so on.


Well Golden Sun has both...

#685 - Touchstone - Thu Jan 09, 2003 6:48 pm

Psyk, I'm not saying it cannot be done, I'm just saying there's no point in having them both. :)
_________________
You can't beat our meat