gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Old project doesn't build on newer devkit

#177561 - strat - Thu Aug 30, 2012 10:53 am

I've been thinking about adding an image loader to Animanatee but it doesn't build correctly on release 41; the binary just crashes when trying to run on the hardware without showing anything. It does build correctly on an older devkit release that by chance I had installed on another computer, but since older releases aren't readily available the mystery needs to be solved.

There are two changes to the source that are needed so 41 builds anything at all: removing -fno-fpu (linker option) from the makefile and changing 'diropen', 'dirclose' in Game.c to 'opendir', 'closedir'. I'm assuming that option just told the linker not to include an fpu library and the latter change shouldn't affect the application starting up in any case. One poster on the Devkitpro forum suggested removing irqInit call from the Arm9 Main and any custom FIFO code, but neither is in the source.

Also I tried dldi patching it even though the binary released by DekuTree didn't need to be patched. I've been looking at the devkit examples for clues but nothing stands out.

#177562 - sverx - Thu Aug 30, 2012 2:17 pm

Are you using arm7 custom code, by chance?
You should remove both irqInit() and irqEnable(IRQ_VBLANK) or something similar from your source AFAIR...
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary

#177563 - strat - Thu Aug 30, 2012 7:09 pm

I think irqInit still has to be called from Arm7, but not Arm9 (Because it was added to the start-up code). Also, Animanatee doesn't have any Arm7 code.

#177564 - sverx - Fri Aug 31, 2012 8:01 am

If you're not using any custom arm7 code then don't worry about it :) In the arm9 code though you have to remove both irqInit() and irqEnable(IRQ_VBLANK), I've been comparing an old version of one of my sources against a newer one and I confirm those should go away.

Are you using the old IPC struct for interprocessor communications? Those should go away too, and should be replaced with the various FIFO library functions.
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary