Page 1 of 1

Retrieving System Generation?

Posted: Sun Sep 25, 2011 1:27 am
by Kittsune
Simple question: Is there a way to retrieve the system type? (e.g. Phat, lite, DSi, ect) :?:

Re: Retrieving System Generation?

Posted: Mon Sep 26, 2011 12:43 pm
by vuurrobin
programs usally shouldn't need to know on what device they are running on.

why do you need this?

Re: Retrieving System Generation?

Posted: Mon Sep 26, 2011 1:29 pm
by elhobbs
it is helpful to know if you are in DSi mode as you have access to more memory and a faster processor. a quick test would be to allocate 4 MB of memory. if it works you are in DSi mode. you can currently also use the following code:

Code: Select all

extern bool __dsimode; 
I am not sure if it is a supported path, so use it at your own risk. if __dsimode is true then you are in DSi mode.

Re: Retrieving System Generation?

Posted: Sat Oct 01, 2011 9:45 am
by t377y000
my homebrew sandbox engine ds-dsi detects dsimode.

Re: Retrieving System Generation?

Posted: Sat Oct 01, 2011 1:56 pm
by WinterMute
This question comes up often enough that it's probably worth implementing a libnds function to obtain the system type. Patches are encouraged, pointers to libraries and/or random code that isn't supplied and maintained by devkitPro make life awkward for everyone.