Search found 7 matches

by Xenon
Fri Nov 05, 2010 4:08 am
Forum: DS/DSi Development
Topic: temperature
Replies: 46
Views: 149410

Re: temperature

like this:

Code: Select all

int t1,t2;
u32 temp=touchReadTemperature(&t1, &t2);
printf("%.2f\n",(double)temp/0x1000);
Of course in actual code you need to transfer temp to ARM9 using fifo or IPC.
by Xenon
Mon Oct 25, 2010 5:26 pm
Forum: DS/DSi Development
Topic: general compression
Replies: 1
Views: 5769

Re: general compression

If you are talking about gbalzss, I use my modified(because original gbalzss.c isn't working) version of gbalzss to compress.
http://leafmoon.users.sourceforge.net/x ... ksplash.7z
You can use "gbalzssrawstdio -c <bin >bin.lzs". If you want vramsafem, use -cv instead
by Xenon
Thu Oct 21, 2010 11:38 pm
Forum: Announcements
Topic: libnds 1.4.8
Replies: 3
Views: 13102

libnds 1.4.8 gives warning

nds/arm9/videoGL.h
- sassert(count != NULL,"glCallList received a display list of size 0");
+ sassert(count != 0,"glCallList received a display list of size 0");
will fix that because count is u32...

#Awww possibly wrong section (should go to libnds) very sorry...
by Xenon
Mon Oct 11, 2010 1:58 pm
Forum: libfat
Topic: Issue of libfat?
Replies: 1
Views: 13564

Issue of libfat?

Today I disassembled MoonShell2.10 to compare FAT_LinkFreeCluster() and_FAT_fat_linkFreeCluster(). Both "modified gba_nds_fat" and libfat had: --- if ((curLink >= CLUSTER_FIRST) && (curLink <= fatLastCluster)) { return curLink; // Return the current link - don't allocate a new one } --- But "Update ...
by Xenon
Thu Sep 30, 2010 9:22 am
Forum: DS/DSi Development
Topic: What does getBatteryLevel do?
Replies: 5
Views: 6301

Re: What does getBatteryLevel do?

Thank you for fixing.
by Xenon
Mon Sep 27, 2010 7:47 am
Forum: DS/DSi Development
Topic: What does getBatteryLevel do?
Replies: 5
Views: 6301

Re: What does getBatteryLevel do?

If backlight & ( 1 << 3 ) == Wall power ( 0 = no, 1 = Yes ) battery = 32768 - green light + wall power battery = 32769 - low power, but recharging. is meant, I think battery += backlight & (1<<3)<<12 should be changed to battery += (backlight & (1<<3))<<12
by Xenon
Sun Sep 26, 2010 10:18 pm
Forum: DS/DSi Development
Topic: What does getBatteryLevel do?
Replies: 5
Views: 6301

What does getBatteryLevel do?

I have checked libnds-src to figure out that getBatteryLevel is a FIFO function. Then I see ARM7 code: battery = readPowerManagement(PM_BATTERY_REG) & 1; backlight = readPowerManagement(PM_BACKLIGHT_LEVEL); if (backlight & (1<<6)) battery += backlight & (1<<3)<<12; fifoSendValue32(FIFO_SYSTEM ...