#148219 - nipil - Thu Jan 03, 2008 6:03 pm
Good evening everone. I recently discovered i could program on my own DS and i'm fidling with the code samples, and porting some stuff i made for the PC.
But i have met some spots for which (despite me searching the wikis, docs and various tutorials) i couldn't find a good answer for.
The trouble is double :
- time & clock (time.h)
For info, I'm currently testing my work on emulators (no$gba, ideas, dsemume). These two functions give me strange, inconsistant results. I'm calling clock(), and time(NULL) before and after a for-wait loop. Clock returns 0 both times, or sometime -1 depending on the emulator, and time(NULL) returns a huge int but this number is the same before and after the wait (about 10 seconds).
What's the problem with the way i do it ? I heard about the RTC, is it the same thing (accessible via ARM7 if i'm correct) ; should i use it in place of time.h ?
- using fonts
Right now i'm running programs in console mode (to debug). The screen was initialized using the following code taken from devkitpro default arm9 template :
Questions are : as games display text in farious fonts (arial like, cartoon etc), are there any built-in other standard fonts ? If not, what's the "format" to specify the content of the font ?
Thanks for your attention.
But i have met some spots for which (despite me searching the wikis, docs and various tutorials) i couldn't find a good answer for.
The trouble is double :
- time & clock (time.h)
For info, I'm currently testing my work on emulators (no$gba, ideas, dsemume). These two functions give me strange, inconsistant results. I'm calling clock(), and time(NULL) before and after a for-wait loop. Clock returns 0 both times, or sometime -1 depending on the emulator, and time(NULL) returns a huge int but this number is the same before and after the wait (about 10 seconds).
What's the problem with the way i do it ? I heard about the RTC, is it the same thing (accessible via ARM7 if i'm correct) ; should i use it in place of time.h ?
- using fonts
Right now i'm running programs in console mode (to debug). The screen was initialized using the following code taken from devkitpro default arm9 template :
Code: |
SUB_BG0_CR = BG_MAP_BASE(31);
BG_PALETTE_SUB[255] = RGB15(31,31,31); consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(31), (u16*)CHAR_BASE_BLOCK_SUB(0), 16); |
Questions are : as games display text in farious fonts (arial like, cartoon etc), are there any built-in other standard fonts ? If not, what's the "format" to specify the content of the font ?
Thanks for your attention.