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:: 2008-09-17 #$
14 $Rev: 8556 $
15 $Author: okubata_ryoma $
16 *---------------------------------------------------------------------------*/
17
18 #include <nitro.h>
19
20 #include "DEMO.h"
21
22
23 /*---------------------------------------------------------------------------*/
24 /* Functions */
25
26 /*---------------------------------------------------------------------------*
27 Name: NitroMain
28
29 Description: Initialization and main loop.
30
31 Arguments: None.
32
33 Returns: None.
34 *---------------------------------------------------------------------------*/
NitroMain(void)35 void NitroMain(void)
36 {
37 OS_Init();
38 (void)OS_EnableIrq();
39 (void)OS_EnableInterrupts();
40
41 DEMOInitCommon();
42 DEMOInitVRAM();
43 DEMOInitDisplayBitmap();
44 DEMOHookConsole();
45 DEMOStartDisplay();
46
47 OS_Printf("forKorea-1 test started.\n");
48
49 {
50 OSOwnerInfo ownerInfo;
51 int frame;
52
53 OS_GetOwnerInfo(&ownerInfo);
54
55 for (frame = 0; ; ++frame)
56 {
57 DEMOClearString();
58
59 DEMOPutString(4, 4, "Frame : %d", frame);
60 DEMOPutString(4, 8, "LanguageCode : %d", ownerInfo.language);
61
62 DEMO_DrawFlip();
63 OS_WaitVBlankIntr();
64 }
65 }
66 }
67
68 /*---------------------------------------------------------------------------*
69 End of file
70 *---------------------------------------------------------------------------*/
71