mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@265 b871894f-2f95-9b40-918c-086798483c85
67 lines
1.7 KiB
C
67 lines
1.7 KiB
C
/*---------------------------------------------------------------------------*
|
|
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 <brom.h>
|
|
|
|
#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 );
|
|
}
|
|
}
|
|
|