Search found 43 matches

by Dwedit
Sun Dec 04, 2022 8:17 pm
Forum: GBA Development
Topic: Volatile now required for access to SRAM/VRAM unlike past versions
Replies: 3
Views: 5300

Re: Volatile now required for access to SRAM/VRAM unlike past versions

That's a bummer, now it has to be inline functions with inline ASM?
by Dwedit
Thu Jun 02, 2022 9:37 pm
Forum: devkitARM
Topic: Internal compiler error
Replies: 0
Views: 9398

Internal compiler error

This is a minimal C program that triggers an "internal compiler error" if built with the -Os switch. I'm building it with the command "arm-none-eabi-gcc test.c -Os" The code: (Save as "test.c") int main() { { char *s=(char*)0x0203fc08; //advance past first null while (*...
by Dwedit
Mon May 23, 2022 7:36 pm
Forum: GBA Development
Topic: Volatile now required for access to SRAM/VRAM unlike past versions
Replies: 3
Views: 5300

Volatile now required for access to SRAM/VRAM unlike past versions

I just wanted to give a heads up to anyone experiencing this. I only caught this because of warnings from the NO$GBA debugger. In past versions of DevKitArm, you could write code like this: void ByteSet(char *p, char value, int size) { while (size) { *p++ = value; size--; } } In past versions of Dev...
by Dwedit
Mon Oct 22, 2012 6:58 pm
Forum: Off Topic
Topic: memory management for a noob
Replies: 3
Views: 19641

Re: memory management for a noob

The problem with this question is that "Memory Management" is a very broad term. It could refer to how RAM is physically allocated (static arrays vs malloc/new, or even allocating from areans), or how objects are assigned to each other. (Always Deep Copy, Reference Counting, or Garbage Col...
by Dwedit
Thu Jul 19, 2012 9:27 pm
Forum: DS/DSi Development
Topic: Simultaneous button presses
Replies: 2
Views: 6549

Re: Simultaneous button presses

keysDown() tells you what keys have *changed state* from not-pressed to pressed.
keysHeld() tells you what keys are currently in a pressed state.
by Dwedit
Sat Jul 14, 2012 7:20 pm
Forum: DS/DSi Development
Topic: zlib using bios functions
Replies: 3
Views: 6687

Re: zlib using bios functions

Just because there's a bios function doesn't mean it will be any faster. Compiling code in ARM mode instead of THUMB mode will make it run faster. Then profile it to see what the "hot" loops are, and rewrite those in ASM if they need it. Placing code in ITCM makes it faster, but loops end ...
by Dwedit
Wed Jun 27, 2012 6:18 am
Forum: Announcements
Topic: devkitARM release 41
Replies: 1
Views: 28435

Re: devkitARM release 41

Big congratulations here at getting rid of all that exceptions stuff. *applauds* Only thing is I was getting exception-handling code added when using the "new" operator. Even when I tried using the "nothrow" version, it was also including the code. When I switched to malloc and p...
by Dwedit
Wed Jun 27, 2012 4:16 am
Forum: Bug Reports
Topic: "cp" command in MSYS appears to have broken
Replies: 0
Views: 7467

"cp" command in MSYS appears to have broken

The "cp" command in MSYS appears to have broken. Not sure if reverting back to MSYS 1.0.15 is the best idea or not, but this means that the newer version has bugs in it. Here's what I'm doing here: I have created a FAT32 disk image, and mounted it using FileDisk, making a V:\ drive. I am c...
by Dwedit
Sun Jun 17, 2012 6:34 pm
Forum: devkitARM
Topic: should I use assembly
Replies: 2
Views: 7142

Re: should I use assembly

There are other things you can do to optimize code. First, if you are using any significant amount of multiplication or division, build as ARM code instead of THUMB code. GCC generates really bad THUMB code for math heavy code, but it's better for ARM mode. Second, there's a trick to write a functio...
by Dwedit
Sun Jun 17, 2012 4:49 pm
Forum: Bug Reports
Topic: Dependency problem is back again - _divdi3 brings in unwind
Replies: 2
Views: 6615

Re: Dependency problem is back again - _divdi3 brings in unw

Good.

For now, I'm just using dummy functions (blank functions with the same name) until the bug is fixed.