/*---------------------------------------------------------------------------* Project: TwlBrom - vfp File: main.c Copyright 2008 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Date:: $ $Rev$ $Author$ *---------------------------------------------------------------------------*/ #include #define THREAD1_PRIO 10 #define STACK_SIZE 1024 OSThread thread1; u64 stack1[STACK_SIZE / sizeof(u64)]; void proc1(void *arg); float f0 = 1; float f1 = 1; void BromMain( void ) { s32 n; osInitException(); osInitBROM(); osPrintf( "ARM11: start\n" ); osInitThread(); osCreateThread( &thread1, proc1, (void *)0x111, stack1 + STACK_SIZE / sizeof(u64), STACK_SIZE, THREAD1_PRIO ); for (n = 0; n < 5; n++) { osPrintf( "BromMain\n" ); osWakeupThreadDirect( &thread1 ); } } //-------------------------------------------------------------------------------- // proc1 // void proc1(void *arg) { #ifdef SDK_FINALROM #pragma unused( arg ) #endif while (1) { osPrintf( "Thread1: (%x)\n", (u32)arg ); // 1回目のみVFP例外発生 f0+=f1; // osVSNPrintf は %f 非サポート osPrintf( "Thread1: %d\n", (u32)f0 ); osSleepThread( NULL ); } }