Latest compatible version of Classicube from the original GitHub repository (https://github.com/ClassiCube/ClassiCube) that can be compiled on Classicube for PowerMac PPC running Mac OS X 10.4.
This commit is contained in:
54
misc/ds/main_arm7.c
Normal file
54
misc/ds/main_arm7.c
Normal file
@@ -0,0 +1,54 @@
|
||||
// SPDX-License-Identifier: Zlib
|
||||
//
|
||||
// Copyright (C) 2005 Michael Noland (joat)
|
||||
// Copyright (C) 2005 Jason Rogers (Dovoto)
|
||||
// Copyright (C) 2005-2015 Dave Murphy (WinterMute)
|
||||
// Copyright (C) 2023 Antonio Niño Díaz
|
||||
|
||||
// Default ARM7 core
|
||||
#include <dswifi7.h>
|
||||
#include <nds.h>
|
||||
|
||||
volatile bool exit_loop = false;
|
||||
|
||||
static void power_button_callback(void) {
|
||||
exit_loop = true;
|
||||
}
|
||||
|
||||
static void vblank_handler(void) {
|
||||
inputGetAndSend();
|
||||
Wifi_Update();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
enableSound();
|
||||
readUserSettings();
|
||||
ledBlink(0);
|
||||
touchInit();
|
||||
|
||||
irqInit();
|
||||
irqSet(IRQ_VBLANK, vblank_handler);
|
||||
|
||||
fifoInit();
|
||||
installWifiFIFO();
|
||||
installSoundFIFO();
|
||||
installSystemFIFO();
|
||||
|
||||
setPowerButtonCB(power_button_callback);
|
||||
|
||||
initClockIRQTimer(3);
|
||||
irqEnable(IRQ_VBLANK | IRQ_RTC);
|
||||
|
||||
while (!exit_loop)
|
||||
{
|
||||
const uint16_t key_mask = KEY_SELECT | KEY_START | KEY_L | KEY_R;
|
||||
uint16_t keys_pressed = ~REG_KEYINPUT;
|
||||
|
||||
if ((keys_pressed & key_mask) == key_mask)
|
||||
exit_loop = true;
|
||||
|
||||
swiWaitForVBlank();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user