emufreak/iAmiga

Setting for reducing battery drain

Closed this issue · 10 comments

Hi.

Can anyone recommend a compile time setting to reduce CPU load and battery drain as much as possible?

Manfred

Hi manfred,
In order to save some execution time during emulation you could disable sprite collision. At the moment sprite collision is enabled by default. Some games who use BlitterObjects (BOBs) dont need proper collision deetction. You could invent a setting to toggle sprte collsion on/off.

I found a function do_sprite_collision() in custom.cpp and commented it out.
But I couldn't see that it reduces the CPU load very much. I guess there must be a lot of sprites to really reduce load.

On average one core has a load of 45% on Workbench 1.3, using mouse, shell, etc. That is quite a lot. Although watching a youtube video might produce a similar load.

When you seeing 45% load, which device are you talking about ? I mean if it is a A4-Processor powered device, this would seem to be an completely welcome and acceptable value.

It's an iPad mini 4. With a A8 CPU, 2 core, 1.5GHz.
Some say it has more power per core than a PPC G4 that was built into PowerBooks, MacMini, etc.
On my PowerBook G4, 1.6GHz e-uae on MorphOS is emulating an A500 cycle exact at ~30% CPU load.

Having said that, compiling iUAE with -O3 reduces the load to 24-27%.
That's acceptable, also for longer play sessions on battery.

Wow, that sounds better. I also want this setting ;-) Someone should make a pull request and bring it into the master/dev branch, @emufreak or do you like to fix that quickly ?

It depends a bit how you install iUAE on you device.
If you install it by running the app in Xcode then the debug setting is effective here, which by default is -O0. And it must be -O0 if you want to debug the code. However you can set it temporarily to -O3 when installing the app to the device in case you don't want to debug.
If you use Ad-hoc install the optimization setting is already at -Os which should give a similar speed improvement.

Sounds like we can just document this - @mdbergmann do you want to update README.md with this information?

Yeah, can do.

Added pull request