+
Skip to content

GFX low power state implementation #1

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
wants to merge 7 commits into from

Conversation

EvansJahja
Copy link

@EvansJahja EvansJahja commented Apr 12, 2024

base commit: 8f88216
compare

This is changes tries to conserve power by turning off VRAM and GPU.

Coming from open_agb_firm, when I started work on this I wasn't aware that there's GFX_sleep and GFX_sleepAwake.

Now I am really new into both of these projects, and my motivation is simply to make sleep works when the lid is closed. I'm aware that currently the code is not exactly in a pretty state and there's a mix of concern, I'll try to refine this more, but I could appreciate any feedbacks.

@profi200
Copy link
Owner

Have you taken a look at the recent changes to the whole gfx driver code? A lot has changed. This seems to be based on an old commit. I'm pretty sure the old gfx sleep/awake code is quite broken.
https://github.com/profi200/libn3ds/blob/master/source/arm11/drivers/gfx.c

I'm not sure how i feel about the changes in this pull request. The reason i didn't implement proper sleep mode yet is because it's a little more complicated with the whole PDN reg poking & CPU wait for interrupt state and i wanted to give the main app code full control of how sleep works. This hardcodes it in the gfx driver.

@EvansJahja
Copy link
Author

Thanks so much for the input and no worries, I didn't expect this changes to go through at all, as there's too many mix of concerns. When I started I didn't check the master branch as I thought open agb uses master already. I'll rework the changes on top of master and probably take more care into using KEvent this time.

By the way, if you have any resources I can follow that'd be sweet. I have no experience reversing 3ds. I've been only following 3dbrew and nesdev. Any guides how I can contribute with figuring out the register poking logic?

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

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载