8000 Setting for reducing battery drain · Issue #39 · emufreak/iAmiga · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Setting for reducing battery drain #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdbergmann opened this issue Apr 3, 2016 · 10 comments
Closed

Setting for reducing battery drain #39

mdbergmann opened this issue Apr 3, 2016 · 10 comments

Comments

@mdbergmann
Copy link

Hi.

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

Manfred

@mithrendal
Copy link

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.

@mdbergmann
Copy link
Author

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.

@mdbergmann
Copy link
Author

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.

@mithrendal
Copy link

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.

@mdbergmann
Copy link
Author

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.

@mithrendal
Copy link

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 ?

@mdbergmann
Copy link
Author

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.

@simontoens
Copy link

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

@mdbergmann
Copy link
Author

Yeah, can do.

@mdbergmann
Copy link
Author

Added pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0