1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - demos - OS - forChina-fs
3   File:     main.c
4 
5   Copyright 2005-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 /* Constants */
25 
26 // ISBN char strings for Chinese language support
27 // (Example) { "7-900381-62-7", "025-2004-017", "2005", " 065" }
28 static const char *isbn[4] = { "0-000000-00-0", "000-0000-000", "0000", " 000" };
29 
30 
31 /*---------------------------------------------------------------------------*/
32 /* Functions */
33 
34 /*---------------------------------------------------------------------------*
35   Name:         NitroMain
36 
37   Description:  Initialization and main loop.
38 
39   Arguments:    None.
40 
41   Returns:      None.
42  *---------------------------------------------------------------------------*/
NitroMain(void)43 void NitroMain(void)
44 {
45     OS_InitChina(isbn);
46     (void)OS_EnableIrq();
47     (void)OS_EnableInterrupts();
48 
49     DEMOInitCommon();
50     DEMOInitVRAM();
51     DEMOInitDisplayBitmap();
52     DEMOHookConsole();
53     DEMOStartDisplay();
54 
55     OS_Printf("forChina-fs 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