/*---------------------------------------------------------------------------* Project: MIDI adaptor sample demo File: main.c Programmer: HIRATSU Daisuke Copyright (C) 2007 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. $Log: main.c,v $ Revision 1.2 2007/04/17 08:24:47 hiratsu Refactoring. Revision 1.1 2007/04/13 08:39:53 hiratsu Initial check-in. *---------------------------------------------------------------------------*/ #include "midiqueue.h" #include "synth.h" #include #include #include #include #define STACK_SIZE (0x200*8) #define PRIO 10 #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 #define LOG_SIZE 256 static void* midiThread(void*); static u8 s_midiSequence[LOG_SIZE]; static u8 s_index = 0; int main(void) { static u8 s_stack[STACK_SIZE] ATTRIBUTE_ALIGN(32); OSThread th; DEMOInit(0); DEMOInitCaption(DM_FT_XLU, SCREEN_WIDTH, SCREEN_HEIGHT); GXSetZMode( GX_ENABLE, GX_ALWAYS, GX_ENABLE ); GXSetBlendMode( GX_BM_BLEND, GX_BL_ONE, GX_BL_ONE, GX_LO_CLEAR ); initialize(); MIDIInit(); OSCreateThread(&th, midiThread, NULL, s_stack + STACK_SIZE, STACK_SIZE, PRIO, OS_THREAD_ATTR_DETACH); OSResumeThread(&th); programChange(0); while(1) { int i = 0; DEMOBeforeRender(); DEMOPrintf(60, 10, 0, "MIDI adaptor sample demo"); for(i=0; i>= MIDI_JSTAT_FLAGS_SHIFT; count++; for(i=0; i