Retrieving System Generation?

Post Reply
Posts: 2
Joined: Sat Sep 24, 2011 10:51 pm

Retrieving System Generation?

Post by Kittsune » Sun Sep 25, 2011 1:27 am

Simple question: Is there a way to retrieve the system type? (e.g. Phat, lite, DSi, ect) :?:

User avatar
Posts: 222
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands

Re: Retrieving System Generation?

Post by vuurrobin » Mon Sep 26, 2011 12:43 pm

programs usally shouldn't need to know on what device they are running on.

why do you need this?

Posts: 353
Joined: Thu Jul 02, 2009 1:19 pm

Re: Retrieving System Generation?

Post by elhobbs » Mon Sep 26, 2011 1:29 pm

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.

Posts: 52
Joined: Wed Jun 02, 2010 3:14 am
Location: United States

Re: Retrieving System Generation?

Post by t377y000 » Sat Oct 01, 2011 9:45 am

my homebrew sandbox engine ds-dsi detects dsimode.

Site Admin
Posts: 1403
Joined: Tue Aug 09, 2005 3:21 am
Location: UK

Re: Retrieving System Generation?

Post by WinterMute » Sat Oct 01, 2011 1:56 pm

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.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests