Page 1 of 1

A way to distinguish DS version?

Posted: Sat Feb 05, 2011 7:28 am
by Oranj
Please, tell me, it's important.
I have this relict which works but since there are other versions now I need an update.
#define PM_DSLITE_REG (4)
#define PM_IS_LITE BIT(6)
if((readPowerManagement(PM_DSLITE_REG) & PM_IS_LITE)) //Lite
else //Phat
And if there's a facility to do this from ARM9 code, it would be better!

Re: A way to distinguish DS version?

Posted: Sat Feb 05, 2011 12:36 pm
by WinterMute
Actually, no, this isn't important. If you think it is then you're doing something wrong.

Well written homebrew should never need to care about which particular DS model it's running on.

Re: A way to distinguish DS version?

Posted: Sat Feb 05, 2011 1:15 pm
by Oranj
Well I'm writing an ebook reader with subpixel font rendering and screens of different DS versions have different subpixel alighnment (RGB / BGR).
I added an option to change rendering manually but users are still getting confused and read blurred text.
Is this good enough point to ask for a couple of lines of code?

Re: A way to distinguish DS version?

Posted: Sat Feb 05, 2011 3:15 pm
by WinterMute
The subpixel alignment seems to depend more on time of manufacture and whether or not the LCD has been replaced than any particular model, unfortunately it's not as simple as phat vs lite. Do you have some test code that will show the difference by any chance? It might be worth checking DSi & DSiXL too but I'm really not convinced you could do much better than provide a means to switch the rendering while viewing text.

Re: A way to distinguish DS version?

Posted: Fri Feb 11, 2011 8:08 pm
by Oranj
Thanks for willing to help! I don't think that a lot of people replace their screens, and that worked for moonshell back when there were only Phat and Lite. To see the difference you could just download the whole reader. It's located at http://code.google.com/p/ikureader/ . There's a button called "Sharpness" in the menu, there you can swap the subpixels.