2 * Copyright (C) 2008 dhewg, #wiidev efnet
4 * this file is part of wiifuse
5 * http://wiibrew.org/index.php?title=Wiifuse
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #include "../../shared.h"
36 static void *xfb
= NULL
;
37 static GXRModeObj
*rmode
;
39 // TODO reset/power cb
40 void (*reload
)() = (void (*) ()) 0x80001800;
43 unsigned int geckoattached
;
48 switch (VIDEO_GetCurrentTvMode())
51 rmode
= &TVNtsc480IntDf
;
54 rmode
= &TVPal528IntDf
;
57 rmode
= &TVMpal480IntDf
;
60 rmode
= &TVNtsc480IntDf
;
64 xfb
= MEM_K0_TO_K1 (SYS_AllocateFramebuffer (rmode
));
66 VIDEO_Configure (rmode
);
67 VIDEO_SetNextFramebuffer (xfb
);
68 VIDEO_SetBlack (FALSE
);
71 if (rmode
->viTVMode
&VI_NON_INTERLACE
)
73 console_init(xfb
, 20, 64, rmode
->fbWidth
, rmode
->xfbHeight
,
75 VIDEO_SetNextFramebuffer (xfb
);
77 printf ("wiifuse server " WIIFUSE_VERSION
"\n"
78 "coded by dhewg, #wiidev efnet/blitzed\n\n"
79 "running under ios version %d v%d.%d\n\n", IOS_GetVersion (),
80 IOS_GetRevisionMajor (), IOS_GetRevisionMinor ());
82 geckoattached
= usb_checkgecko ();
84 printf ("usb gecko not found\n");
90 printf ("reloading\n");