#172383 - hounjini - Thu Feb 04, 2010 3:37 am
As you see, my question is why I can't use my X, Y keys.
I want select critical section.
so I use code like this
void abcdefg()
{
REG_IME = 0;
do something here.
REG_IME = 1;
}
after I use this, I can use + pad, A,B button, but cannot with X, Y button.
(also, can't use my touch screen any more.)
is there any method to use critical section with X, Y button support after critical section?
thank you.
#172385 - zelbo - Thu Feb 04, 2010 7:07 am
I'm not sure quite what you're doing, probably over my head, so i'm just tossing this out there. I believe the x and y keys are handled by the ARM9 while all other input goes through the ARM7. I don't have much to offer beyond that.
#172386 - Ruben - Thu Feb 04, 2010 7:13 am
All input (except X/Y/Stylus/Open) is handled by the ARM9's REG_INPUT register. The rest appear on the extended input register located on the ARM7 so you will have to use FIFO to pass this data to the ARM9. I know it sounds ridiculous that the extended input is only available to ARM7; I find it absolutely stupid. I guess we'll never know why Nintendo made it so...
#172387 - Normmatt - Thu Feb 04, 2010 7:30 am
Its the other way around. Arm7 handles Touch/X/Y and both arm7 and arm9 have access to the rest of the buttons.
#172389 - zelbo - Thu Feb 04, 2010 7:37 am
Now i'm confused. I guess it's been a while since i looked at it that closely, and i'm pretty much a noob at this, but i thought the ARM7 was what handled the majority of the input. Sorry, my bad.
#172391 - sverx - Thu Feb 04, 2010 10:15 am
Isn't it easier to simply say that "ARM9 can't access X/Y/Touch directly"? ;)
#172392 - Ruben - Thu Feb 04, 2010 10:17 am
Er, yeah... >_>'
Give me a break, I was sleepy at the time I wrote that =P
#172398 - elhobbs - Thu Feb 04, 2010 3:40 pm
how frequently is abcdefg called and how long are interrupts disabled?