Search found 94 matches

by sverx
Thu Jun 06, 2013 12:34 pm
Forum: Off Topic
Topic: Help with Arrays
Replies: 9
Views: 12296

Re: Help with Arrays

How would I store 4 6 bit values into a 24 bit (a char and a short)value so i can later read each 6 bit value into a 1 byte value Storing each 6 bits in a separate unsigned char will be faster and easier, at the cost of some 'wasted' memory. But, as suggested, many times it's better to waste some m...
by sverx
Wed Jun 05, 2013 1:13 pm
Forum: Off Topic
Topic: Help with Arrays
Replies: 9
Views: 12296

Re: Help with Arrays

an 'int' on a GBA/DS is 32 bits. You can use 'u8' or 'unsigned char' if you need to store only values from 0 to 255, and of course it will require less memory. Speed is another matter, as you can't be sure that accessing smaller memory will require less time, since you should consider other details ...
by sverx
Sat May 25, 2013 2:41 pm
Forum: Off Topic
Topic: Help with Arrays
Replies: 9
Views: 12296

Re: Help with Arrays

In C you can make n-dimensions array just using square brackets pairs.
for instance

Code: Select all

int myMatrix[10][30][50];
declares a 3D array (matrix) with 10x30x50 elements, each one of the specified base type - 'int' in the example
by sverx
Fri May 24, 2013 2:17 pm
Forum: DS/DSi Development
Topic: libn3ds?
Replies: 4
Views: 6319

Re: libn3ds?

WM: I hope at least they gave you that possibility. If you start developing the 'lib3ds', I'm sure many will happily help (I would!)
by sverx
Thu May 23, 2013 4:29 pm
Forum: DS/DSi Development
Topic: Palette Indexes [BUG?]
Replies: 3
Views: 6712

Re: Palette Indexes [BUG?]

btw you should either use -pn or -pe
by sverx
Thu May 23, 2013 12:50 pm
Forum: DS/DSi Development
Topic: Palette Indexes [BUG?]
Replies: 3
Views: 6712

Re: Palette Indexes [BUG?]

If you try using

Code: Select all

-pn7
removing

Code: Select all

-ps8
-pe14
do you get it correct?
by sverx
Sun May 19, 2013 1:26 pm
Forum: DS/DSi Development
Topic: how can I render a font
Replies: 3
Views: 4919

Re: how can I render a font

If you plan to use a 8px fixed width font, the faster approach is to use a text BG for that. If you want to use a variable width font, I guess you will be forced to render them on a bitmap BG. There can be other options in between ;)
by sverx
Thu May 16, 2013 12:15 pm
Forum: DS/DSi Development
Topic: libn3ds?
Replies: 4
Views: 6319

Re: libn3ds?

AFAIK, to develop a library you should at least have enough knowledge on the hardware internals. AFAIK (and if I'm wrong I'd like to read some details...) there's still no such knowledge. (well, we know there's an ARM11 and a PICA200 etc etc but we still don't know which hardware registers to point ...
by sverx
Thu May 16, 2013 12:11 pm
Forum: DS/DSi Development
Topic: Which one is more better, directly setting variables or API?
Replies: 3
Views: 5868

Re: Which one is more better, directly setting variables or

If you write to OAM or OAM_SUB, you're updating sprites 'immediately' (meaning in the current frame) while using libnds APIs, you're 'preparing' OAMs for an update that you'll do later, probably right when VBlank starts. This is however not really related to performance, but it is surely related to ...
by sverx
Fri Apr 19, 2013 8:52 am
Forum: DS/DSi Development
Topic: RealTimeClock example doesn't work on 3DS (!)
Replies: 0
Views: 4953

RealTimeClock example doesn't work on 3DS (!)

I haven't got a chance to test this by my own... on my NDS Lite the RealTimeClock example works perfectly but I've been in touch with some guy who said the clock doesn't go on on his 3DS. He suggests that IRQ7 doesn't get triggered (which is likely to be possible, if the clock hands doesn't move...)...