Changes

Jump to navigation Jump to search
737 bytes removed ,  08:04, 27 April 2008
#include <unistd.h>
#include <assert.h>
#include <ogc/ios.h>
#include <ogc/stm.h>
#include <ogc/es.h>
#include <ogc/gu.h>
static void *xfb = NULL;
static GXRModeObj *rmode = NULL;
#include "ios.c"define USB_ALIGN __attribute__ ((aligned(32)))#include "stm.c"#include "es.h"#include "es.c"#include "ipc.h"#include "gu.c"define MAX_WIIMOTES 4
#include "GRRLIB.h"
 
#include "wiiuse.h"
#include "../gfx/music.h"
#include "../gfx/cursor.h"
#include "../gfx/impact.h"
typedef void (*Loader_Entry)(void);
extern u16 *GRRLIB_buffer;
 
void wiimote_event(struct wiimote_t* wm, int event)
{
}
void hello(void)
VIDEO_Configure(rmode);
VIDEO_SetNextFramebuffer(xfb);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
void sysutils(void) {
bool pressed;
pressed=false;
clearscreen();
printf("System Utils Menu\n");
printf("-----------------\n\n");
printf("X = Load IOS37\n");
printf("Y = Load IOS9\n");
printf("B = Go Back\n");
printf("Press A to continue \n");
while((pressed=false)) {
VIDEO_WaitVSync();
PAD_ScanPads();
int buttonsDown = PAD_ButtonsHeld(0);
if (buttonsDown & PAD_BUTTON_X){
__IOS_LaunchNewIOS(37);
pressed=true;
}
if (buttonsDown & PAD_BUTTON_Y){
IOS_ReloadIOS(9);
pressed=true;
}
if (buttonsDown & PAD_BUTTON_B){
pressed=true;
}
}
return;
}
int revmi;
int di_fd;
int es_fd;
int vec;
u32 wiiid;
static u8 stm_inbuf[0x20] ATTRIBUTE_ALIGN(32);
static u8 stm_iobuf[0x20] ATTRIBUTE_ALIGN(32);
IOS_Close(di_fd);
vec=0; es_fd=IOS_Open("/dev/es",1); vec = ES_GetDeviceID(&wiiid); // printf("Console ID : %08x \n\n", wiiid); IOS_Close(es_fd); GRRLIB_DrawImg(10,50, music_width, music_high, music_img, 0, 1);
GRRLIB_Render();
/****************************************************************************
Initialise Video
Initialise GCPad for input
****************************************************************************/
GRRLIB_buffer=(u16 *)malloc(640*240*2);
wiimote** wiimotes;
VIDEO_Init();
PAD_Init();
*((u32*)0xcd0000c0) |= 0x100;
bte_init();
bte_start();
wiimotes = wiiuse_init(MAX_WIIMOTES,wiimote_event);
GRRLIB_InitVideo();
GRRLIB_Start();
}
xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode)); xjb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode)); console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ); VIDEO_Configure(rmode); VIDEO_SetNextFramebuffer(xfb); VIDEO_SetBlack(FALSE); VIDEO_Flush(); VIDEO_WaitVSyncconsole();
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
569

edits

Navigation menu