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 > problems with KEY_X and the ds lite

#118031 - captaincabinets - Fri Feb 09, 2007 6:18 am

Ahoy. I am having troubles with a simple program I'm trying to code. It reads the button presses using

scanKeys()
if (keyHeld() & KEY_X) etc.

Now this works fine on an emulator, but when I put it on my ds lite, it acts as if the KEY_X bit is always set, ie, x is constantly pressed. I tried re-writing it so it gets the special keys from

~IPC->buttons & 1

but it is exactly the same result: works fine on the emulator (dualis), but not on the ds lite.

I am using the standard ARM7 code that comes with devkitpro.

Any suggestions? Does the lite's GBA architecture differ from the normal ds', ie are the x,y,touch registers in a different location?

Any help appreciated.

#118036 - wintermute - Fri Feb 09, 2007 8:06 am

This is symptomatic of a non functioning arm7 core - dualis does not emulate arm7 code so it won't show up there.

Make sure that you have the most recent toolchain and libnds, this can be caused by a mismatch between the libnds used to build the ndstool embedded arm7 core and your arm9 application.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#118044 - captaincabinets - Fri Feb 09, 2007 12:00 pm

yep, I updated libnds and the problem went away. Spectacular, thanks very much for the help.

#118055 - tepples - Fri Feb 09, 2007 2:34 pm

wintermute wrote:
This is symptomatic of a non functioning arm7 core - dualis does not emulate arm7 code

Then why does AXE work in a copy of Dualis from May 2006?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#118063 - Sausage Boy - Fri Feb 09, 2007 5:40 pm

I believe dualis has arm7 emulation these days, at least in some form.
_________________
"no offense, but this is the gayest game ever"

#118065 - wintermute - Fri Feb 09, 2007 6:28 pm

Really?

I was under the impression that Dualis just filled in the IPC struct rather than doing anything at all with the arm7 core.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#118070 - Sausage Boy - Fri Feb 09, 2007 8:04 pm

Quote:
2006-03-01

Two are better than one.

This release features the addition of the second CPU (ARM7TDMI). Touchscreen access is still faked in the same manner as in earlier versions, and not all parts of ARM7 memory are handled correctly yet.


I hope this quote from http://dualis.1emulation.com clears things up.
_________________
"no offense, but this is the gayest game ever"