1 /*---------------------------------------------------------------------------*
2 Project: TwlSDK - demos - OS - forKorea-1
3 File: main.c
4
5 Copyright 2006-2008 Nintendo. All rights reserved.
6
7 These coded instructions, statements, and computer programs contain
8 proprietary information of Nintendo of America Inc. and/or Nintendo
9 Company Ltd., and are protected by Federal copyright law. They may
10 not be disclosed to third parties or copied or duplicated in any form,
11 in whole or in part, without the prior written consent of Nintendo.
12
13 $Date:: 2009-06-16 #$
14 $Rev: 10758 $
15 $Author: ooshimay $
16 *---------------------------------------------------------------------------*/
17
18 #ifdef SDK_TWL
19 #include <twl.h>
20 #else
21 #include <nitro.h>
22 #endif
23
24 #include "DEMO.h"
25
26
27 /*---------------------------------------------------------------------------*/
28 /* Functions */
29
30 /*---------------------------------------------------------------------------*
31 Name: NitroMain
32
33 Description: Initialization and main loop.
34
35 Arguments: None.
36
37 Returns: None.
38 *---------------------------------------------------------------------------*/
39 #ifdef SDK_TWL
TwlMain(void)40 void TwlMain(void)
41 #else
42 void NitroMain(void)
43 #endif
44 {
45 OS_Init();
46 (void)OS_EnableIrq();
47 (void)OS_EnableInterrupts();
48
49 DEMOInitCommon();
50 DEMOInitVRAM();
51 DEMOInitDisplayBitmap();
52 DEMOHookConsole();
53 DEMOStartDisplay();
54
55 OS_Printf("forKorea-1 test started.\n");
56
57 {
58 OSOwnerInfo ownerInfo;
59 int frame;
60
61 OS_GetOwnerInfo(&ownerInfo);
62
63 for (frame = 0; ; ++frame)
64 {
65 DEMOClearString();
66
67 DEMOPutString(4, 4, "Frame : %d", frame);
68 DEMOPutString(4, 8, "LanguageCode : %d", ownerInfo.language);
69
70 DEMO_DrawFlip();
71 OS_WaitVBlankIntr();
72 }
73 }
74 }
75
76 /*---------------------------------------------------------------------------*
77 End of file
78 *---------------------------------------------------------------------------*/
79