| 1 |
/*--------------------------------------------------------------------------------- |
| 2 |
|
| 3 |
default ARM7 core |
| 4 |
|
| 5 |
Copyright (C) 2005 - 2010 |
| 6 |
Michael Noland (joat) |
| 7 |
Jason Rogers (dovoto) |
| 8 |
Dave Murphy (WinterMute) |
| 9 |
|
| 10 |
This software is provided 'as-is', without any express or implied |
| 11 |
warranty. In no event will the authors be held liable for any |
| 12 |
damages arising from the use of this software. |
| 13 |
|
| 14 |
Permission is granted to anyone to use this software for any |
| 15 |
purpose, including commercial applications, and to alter it and |
| 16 |
redistribute it freely, subject to the following restrictions: |
| 17 |
|
| 18 |
1. The origin of this software must not be misrepresented; you |
| 19 |
must not claim that you wrote the original software. If you use |
| 20 |
this software in a product, an acknowledgment in the product |
| 21 |
documentation would be appreciated but is not required. |
| 22 |
|
| 23 |
2. Altered source versions must be plainly marked as such, and |
| 24 |
must not be misrepresented as being the original software. |
| 25 |
|
| 26 |
3. This notice may not be removed or altered from any source |
| 27 |
distribution. |
| 28 |
|
| 29 |
---------------------------------------------------------------------------------*/ |
| 30 |
#include <nds.h> |
| 31 |
#include <dswifi7.h> |
| 32 |
#include <maxmod7.h> |
| 33 |
|
| 34 |
u32 TouchRead(u32* xpos, u32* ypos); |
| 35 |
|
| 36 |
//--------------------------------------------------------------------------------- |
| 37 |
void VblankHandler(void) { |
| 38 |
//--------------------------------------------------------------------------------- |
| 39 |
Wifi_Update(); |
| 40 |
} |
| 41 |
|
| 42 |
|
| 43 |
//--------------------------------------------------------------------------------- |
| 44 |
void VcountHandler() { |
| 45 |
//--------------------------------------------------------------------------------- |
| 46 |
//inputGetAndSend(); |
| 47 |
} |
| 48 |
|
| 49 |
volatile bool exitflag = false; |
| 50 |
|
| 51 |
//--------------------------------------------------------------------------------- |
| 52 |
void powerButtonCB() { |
| 53 |
//--------------------------------------------------------------------------------- |
| 54 |
exitflag = true; |
| 55 |
} |
| 56 |
|
| 57 |
//--------------------------------------------------------------------------------- |
| 58 |
int main() { |
| 59 |
//--------------------------------------------------------------------------------- |
| 60 |
u32 *ptr = (u32*)0x02400000; |
| 61 |
// readUserSettings(); |
| 62 |
|
| 63 |
irqInit(); |
| 64 |
// Start the RTC tracking IRQ |
| 65 |
// initClockIRQ(); |
| 66 |
fifoInit(); |
| 67 |
|
| 68 |
/* mmInstall(FIFO_MAXMOD); |
| 69 |
|
| 70 |
SetYtrigger(80); |
| 71 |
|
| 72 |
installWifiFIFO(); |
| 73 |
installSoundFIFO(); |
| 74 |
|
| 75 |
installSystemFIFO(); |
| 76 |
|
| 77 |
irqSet(IRQ_VCOUNT, VcountHandler); |
| 78 |
irqSet(IRQ_VBLANK, VblankHandler); |
| 79 |
|
| 80 |
irqEnable( IRQ_VBLANK | IRQ_VCOUNT | IRQ_NETWORK); |
| 81 |
|
| 82 |
setPowerButtonCB(powerButtonCB); */ |
| 83 |
|
| 84 |
//ptr[0] = TouchRead(ptr+1, ptr+2); |
| 85 |
|
| 86 |
// Keep the ARM7 mostly idle |
| 87 |
while (!exitflag) { |
| 88 |
ptr[0] = TouchRead(ptr+1, ptr+2); |
| 89 |
|
| 90 |
// if ( 0 == (REG_KEYINPUT & (KEY_SELECT | KEY_START | KEY_L | KEY_R))) { |
| 91 |
// exitflag = true; |
| 92 |
// } |
| 93 |
// swiWaitForVBlank(); |
| 94 |
} |
| 95 |
return 0; |
| 96 |
} |