### Userbox bootmii Example Source: https://wiibrew.org/wiki/Template%3AUserbox_bootmii An example demonstrating how to use the Userbox bootmii template with specific version and installation parameters, resulting in a visual userbox. ```wikitext {{Userbox bootmii|1.5|boot2}} ``` -------------------------------- ### Libwiiradio Quickstart Example Source: https://wiibrew.org/wiki/User%3AScanff/Libwiiradio Demonstrates how to use Libwiiradio to play multiple internet radio streams, including setting volume, retrieving track information, and handling playback errors. Ensure `usleep` is available or replaced with an appropriate delay mechanism. ```c char* tests[] = { "http://205.188.215.225:8002", "http://scfire-dtc-aa07.stream.aol.com:80/stream/1040", "http://208.76.152.74:8000" }; int test_lib() { printf("\n\n\n\nTest libWiiRadio, will test three streams!\n"); for(int i = 0; i < 3;i++) { printf("Connecting to %s\n", tests[i]); LWR_SetVolume(40*(i+1)); printf("setting volume %d\n", 40*(i+1)); if(LWR_Play(tests[i]) < 0) { printf("ERROR!\n"); LWR_Stop(); continue; } usleep(2000000); // wait till the info is grabbed char *title = LWR_GetCurrentTrack(); if (title) printf("current track = %s\n", title); int br = LWR_GetCurrentBitRate(); if (br != -1) printf("current bitrate = %d\n", br); char* url = LWR_GetUrl(); if (url) printf("current url = %s\n", url); int vol = LWR_GetVolume(); if (vol != -1) printf("current volume = %d\n", vol); usleep(30000000); // play for a while printf("Stop Playback!\n"); LWR_Stop(); } printf("Test Done!\n"); return 0; } ``` -------------------------------- ### Basic SDL Wii Initialization and Input Handling Source: https://wiibrew.org/wiki/Talk%3ASDL_Wii/Archive_1 This example demonstrates how to initialize SDL video and audio, set up Wii-specific libraries like fat and wpad, and handle basic input including quitting with the HOME button. It's useful for starting new SDL projects on the Wii. ```c #include #include #include //#include //#include #include #include int main(int argc, char** argv) { SDL_Surface *screen=NULL; srand(time(NULL)); // initialize SDL video if ( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 ) { fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError() ); exit(EXIT_FAILURE); } fatInitDefault(); //for read files (level, serialized structs...) WPAD_Init(); // make sure SDL cleans up before exit atexit(SDL_Quit); SDL_ShowCursor(SDL_DISABLE); // create a new window screen = SDL_SetVideoMode(640, 480, 16, SDL_DOUBLEBUF); if ( !screen ) { fprintf(stderr, "Unable to set video: %s\n", SDL_GetError()); exit(EXIT_FAILURE); } state_in_game(screen); return 0; } void state_in_game(SDL_Surface *screen) { int tick_count=0; int tick_trigger=15; bool done = false; SDL_EnableKeyRepeat(10,10); while (!done) { SDL_Event event; while (SDL_PollEvent(&event)) { switch ( event.type ) { case SDL_QUIT: done = true; break; } } //With SDL_Event, the wiimote is detected as a mouse, to use wiiuse/wpad to handle inputs WPAD_ScanPads(); u32 held = WPAD_ButtonsHeld(WPAD_CHAN_0); if(held & WPAD_BUTTON_HOME){ done=true; } tick_count = SDL_GetTicks(); if (tick_count > tick_trigger) { tick_trigger = tick_count; SDL_FillRect(screen, 0, SDL_MapRGB(screen->format, 0, 50, 150)); SDL_Flip(screen); } //end tick } //end while SDL_Quit(); exit(EXIT_SUCCESS); } ``` -------------------------------- ### Install Script Error Example Source: https://wiibrew.org/wiki/Hbcxmlgen-bash Demonstrates an error encountered when the install script is not run from its own directory. ```bash mcpancakes@desktop:/$ /usbhdd/Programming/hbcxmlgen-bash/install.sh -i Copying to /usr/bin/hbcxmlgen-bash ... [sudo] password for mcpancakes: cp: cannot stat `hbcxmlgen-bash.sh': No such file or directory Installed! mcpancakes@desktop:/$ ``` -------------------------------- ### Compile and Install libext2fs Source: https://wiibrew.org/wiki/Libext2fs Compile the library from the source directory. 'make install' installs it, or 'sudo make install' if root privileges are needed. ```bash make make install # or 'sudo make install' if you aren't root. ``` -------------------------------- ### Compile and Install from Source Source: https://wiibrew.org/wiki/WiiToo%21 Execute the configure, make, and make install commands to compile and install software from source code. The '&&' operator ensures sequential execution. ```bash ./configure && make && make install ``` -------------------------------- ### Wiimote Initialization and Data Reading Example Source: https://wiibrew.org/wiki/How_to_use_the_Wiimote This C code snippet demonstrates the complete process of initializing the Wiimote, reading its data, and displaying it. It includes setup for video, pad, and Wiimote systems, event handling, and displaying various sensor inputs. Ensure the necessary libraries are linked. ```c #include #include #include #include #include #include #include #include #include #include static GXRModeObj *rmode = NULL; //----------------------------------------------------------------------------------- int doreload=0, dooff=0; void reload(void) { doreload=1; } void shutdown(void) { dooff=1; } void drawdot(void *xfb, GXRModeObj *rmode, float w, float h, float fx, float fy, u32 color) { u32 *fb; int px,py; int x,y; fb = (u32*)xfb; y = fy * rmode->xfbHeight / h; x = fx * rmode->fbWidth / w / 2; for(py=y-4; py<=(y+4); py++) { if(py < 0 || py >= rmode->xfbHeight) continue; for(px=x-2; px<=(x+2); px++) { if(px < 0 || px >= rmode->fbWidth/2) continue; fb[rmode->fbWidth/VI_DISPLAY_PIX_SZ*py + px] = color; } } } int evctr = 0; void countevs(int chan, const WPADData *data) { evctr++; } int main(int argc, char **argv) { int res; void *xfb[2]; u32 type; int i; int fbi = 0; float theta; WPADData *wd; VIDEO_Init(); PAD_Init(); WPAD_Init(); rmode = VIDEO_GetPreferredMode(NULL); xfb[0] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode)); xfb[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode)); VIDEO_Configure(rmode); VIDEO_SetNextFramebuffer(xfb); VIDEO_SetBlack(FALSE); VIDEO_Flush(); VIDEO_WaitVSync(); if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync(); SYS_SetResetCallback(reload); SYS_SetPowerCallback(shutdown); WPAD_SetDataFormat(0, WPAD_FMT_BTNS_ACC_IR); WPAD_SetVRes(0, rmode->fbWidth, rmode->xfbHeight); while(!doreload && !dooff) { CON_Init(xfb[fbi],0,0,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ); //VIDEO_ClearFrameBuffer(rmode,xfb[fbi],COLOR_BLACK); printf("\n\n\n"); WPAD_ReadPending(WPAD_CHAN_ALL, countevs); res = WPAD_Probe(0, &type); switch(res) { case WPAD_ERR_NO_CONTROLLER: printf(" Wiimote not connected\n"); break; case WPAD_ERR_NOT_READY: printf(" Wiimote not ready\n"); break; case WPAD_ERR_NONE: printf(" Wiimote ready\n"); break; default: printf(" Unknown Wimote state %d\n",res); } printf(" Event count: %d\n",evctr); if(res == WPAD_ERR_NONE) { wd = WPAD_Data(0); printf(" Data->Err: %d\n",wd->err); printf(" IR Dots:\n"); for(i=0; i<4; i++) { if(wd->ir.dot[i].visible) { printf(" %4d, %3d\n", wd->ir.dot[i].rx, wd->ir.dot[i].ry); } else { printf(" None\n"); } } if(wd->ir.valid) { printf(" Cursor: %.02f,%.02f\n",wd->ir.x, wd->ir.y); printf(" @ %.02f deg\n",wd->ir.angle); } else { printf(" No Cursor\n\n"); } if(wd->ir.raw_valid) { printf(" Distance: %.02fm\n", wd->ir.z); printf(" Yaw: %.02f deg\n", wd->orient.yaw); } else { printf("\n\n"); } printf(" Accel:\n"); printf(" XYZ: %3d,%3d,%3d\n",wd->accel.x,wd->accel.y,wd->accel.z); printf(" Pitch: %.02f\n",wd->orient.pitch); printf(" Roll: %.02f\n",wd->orient.roll); printf(" Buttons down:\n "); if(wd->btns_h & WPAD_BUTTON_A) printf("A "); if(wd->btns_h & WPAD_BUTTON_B) printf("B "); if(wd->btns_h & WPAD_BUTTON_1) printf("1 "); if(wd->btns_h & WPAD_BUTTON_2) printf("2 "); if(wd->btns_h & WPAD_BUTTON_MINUS) printf("MINUS "); if(wd->btns_h & WPAD_BUTTON_HOME) printf("HOME "); if(wd->btns_h & WPAD_BUTTON_PLUS) printf("PLUS "); printf("\n "); if(wd->btns_h & WPAD_BUTTON_LEFT) printf("LEFT "); if(wd->btns_h & WPAD_BUTTON_RIGHT) printf("RIGHT "); if(wd->btns_h & WPAD_BUTTON_UP) printf("UP "); if(wd->btns_h & WPAD_BUTTON_DOWN) printf("DOWN "); printf("\n"); for(i=0; i<4; i++) { if(wd->ir.dot[i].visible) { drawdot(xfb[fbi], rmode, 1024, 768, wd->ir.dot[i].rx, wd->ir.dot[i].ry, COLOR_YELLOW); } } if(wd->ir.raw_valid) { for(i=0; i<2; i++) { drawdot(xfb[fbi], rmode, 4, 4, wd->ir.sensorbar.rot_dots[i].x+2, wd->ir.sensorbar.rot_dots[i].y+2, COLOR_GREEN); } } if(wd->ir.valid) { theta = wd->ir.angle / 180.0 * 3.1415; drawdot(xfb[fbi], rmode, rmode->fbWidth, rmode->xfbHeight, wd->ir.x, wd->ir.y, COLOR_RED); drawdot(xfb[fbi], rmode, rmode->fbWidth, rmode->xfbHeight, wd->ir.x + 10*sinf(theta), wd->ir.y - 10*cosf(theta), COLOR_BLUE); } if(wd->btns_h & WPAD_BUTTON_1) doreload=1; } VIDEO_SetNextFramebuffer(xfb[fbi]); VIDEO_Flush(); VIDEO_WaitVSync(); fbi ^= 1; } if(doreload) return 0; if(dooff) SYS_ResetSystem(SYS_SHUTDOWN,0,0); return 0; } ``` -------------------------------- ### Netsend Example Source Source: https://wiibrew.org/wiki/Talk%3ACode_Downloader A link to the source code for the netsend example, provided as a starting point for network-related functionalities in Wii applications. ```link Image:Sample netsend.zip ``` -------------------------------- ### Concise Keyboard Input Example Source: https://wiibrew.org/wiki/User%3ACboomf/libusbkbd A more concise example showing how to initialize, scan, handle, print, and deinitialize the library in fewer lines. ```c int kbdfd = kbdinit(); printf("%s was pressed\n",kbdhandle(kbdfd,kbdscan(kbdfd), false); kbddeinit(kbdfd); ``` -------------------------------- ### SD Card Operations Examples Source: https://wiibrew.org/wiki//dev/sdio Examples of sending specific SD commands for setting block length, data bus width, selecting/deselecting cards, and getting status. ```c SD_SendCmd(0x10, 3, 1, 0x200, 0, 0, 0) card_set_blocklen(0x200) SD_SendCmd(0x37, 3, 1, rca&0xFFFF0000, 0, 0, 0) set data bus width SD_SendCmd(7, 3, 2, rca&0xFFFF0000, 0, 0, 0) // select SD_SendCmd(7, 3, 2, 0, 0, 0, 0) // deselect IOS_Ioctl(fd, 11, 0, 0, (u32 *)&status, 4); // get status IOS_Ioctl(fd, 4, 0, 0, (u32 *)&rca, 4) // reset and get rca IOS_Ioctl(fd, 6, (u32 *)&clock, 4, 0, 0) // using 1 as clock seems to work ``` -------------------------------- ### Makefile Example: Compile for Emulator Source: https://wiibrew.org/wiki/MLlib Use 'make emu' to compile the project and load it into the Dolphin Emulator if installed. This simplifies testing on an emulator. ```makefile make emu ``` -------------------------------- ### Basic Keyboard Input Example Source: https://wiibrew.org/wiki/User%3ACboomf/libusbkbd A basic example demonstrating how to initialize the library, scan for a keypress, handle it, print the pressed key, and deinitialize the library. ```c int kbdfd = kbdinit(); char receivedmessage[15] = kbdscan(kbdfd); char* pressed = kbdhandle(kbdfd, receivedmessage, false); printf("%s was pressed\n", pressed); kbddeinit(kbdfd); ``` -------------------------------- ### Complete Net Configuration Example Source: https://wiibrew.org/wiki/WiiToo%21 An example of a complete /etc/conf.d/net file, including DHCP, static IP options, ESSID, and other parameters. ```bash # This blank configuration will automatically use DHCP for any net.* # scripts in /etc/init.d. To create a more complete configuration, # please review /usr/share/doc/openrc/net.example and save your configuration # in /etc/conf.d/net (this file :)!). modules_wlan0=( "wpa_supplicant" ) wpa_supplicant_wlan0=( "-Dwext" ) #dhcp config_wlan0=( "dhcp" ) #static ip #config_wlan0=( "192.168.1.189 netmask 255.255.255.0 broadcast 192.168.1.255" ) #routes_wlan0=( "default via 192.168.1.1" ) #dns_servers_wlan0=( "192.168.1.1" ) #you may enter your ESSID here essid_wlan0="dlink" mode_wlan0="managed" #default channel is 3 though channel_wlan0="6" #extend timeout here associate_timeout_wlan0="20" #mtu_wlan0="1400" #wait a bit when scanning wlan networks sleep_scan_wlan0="3" ``` -------------------------------- ### WiiEarth HTTP Source Example Source: https://wiibrew.org/wiki/Talk%3ACode_Downloader A link to the HTTP source code from the wiiearth project, suggested as a more appropriate starting point for network operations. ```link http://code.google.com/p/wiiearth/source/browse/trunk/MyWiiEarth/source/http.c ``` -------------------------------- ### Configure MPlayer TT Build Source: https://wiibrew.org/wiki/Talk%3AMPlayer_TT Example of configuring the build process for MPlayer TT, specifying the C compiler, installation prefix, and include/library paths for libogc. ```bash ./configure2 \ --cc=/usr/local/devkitPro/devkitPPC/bin/powerpc-gekko-gcc \ --prefix=/usr/local/devkitPro/ \ --extra-cflags=-I/usr/local/devkitPro/libogc/include \ --extra-ldflags=-L/usr/local/devkitPro/libogc/lib/wii ``` -------------------------------- ### Libwiilight Basic Usage Example Source: https://wiibrew.org/wiki/Libwiilight Demonstrates a basic usage pattern for libwiilight. It initializes the library, sets the backlight to maximum, turns it on, waits for 3 seconds, and then turns it off. ```c //Defines/includes #include //Inits WIILIGHT_Init(); //Main App WIILIGHT_SetLevel(255); WIILIGHT_TurnOn(); sleep(3); WIILIGHT_TurnOff(); ``` -------------------------------- ### Example meta.xml with descriptions Source: https://wiibrew.org/wiki/HBC This example shows a populated meta.xml file with explanations for each field. It provides guidance on what information to include for each tag. ```xml The name of the application The name of the person or group that wrote the code for the program. The version of the application. The data the application was released. It has to be a timestamp using this format: YYYYmmddHHMMSS This is displayed on the main menu of the Homebrew Channel (before you select an application) and is used as a space to add a few words to describe the program. This is displayed once the application is chosen. It describes the program and its function in great detail, and can be used to elaborate on a program's controls. ``` -------------------------------- ### Specify Audio Track Length and Position Source: https://wiibrew.org/wiki/WiiEngine Example demonstrating how to specify both a custom audio track length and its start position, ensuring no overlap with subsequent data. ```plaintext track1.wav 00:44:00 Position: 00:49:65 dracx-02.iso ``` -------------------------------- ### HTTP Download Example Source: https://wiibrew.org/wiki/User_talk%3ATeknecal Provides a basic example of how to perform an HTTP download. It demonstrates requesting HTTP 1.0 and handling potential server responses. ```c #include #include #include #include // Function to perform an HTTP GET request and save the response to a file int http_get(const char *url, const char *filename) { networkInit(); // Parse URL to get host, port, and path char host[256]; char path[256]; int port; // Basic URL parsing (assumes http://host:port/path) sscanf(url, "http://%255[^:]:%d%255s", host, &port, path); if (port == 0) { port = 80; // Default HTTP port sscanf(url, "http://%255s", host); // Handle case without port // Need to re-parse path if port was not specified char *path_start = strchr(host, '/'); if (path_start) { strcpy(path, path_start); *path_start = '\0'; } else { strcpy(path, "/"); } } // Create socket int sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); if (sockfd < 0) { perror("socket creation failed"); return -1; } // Resolve host struct hostent *he = gethostbyname(host); if (!he) { perror("gethostbyname failed"); close(sockfd); return -1; } // Connect to server struct sockaddr_in server_addr; server_addr.sin_family = AF_INET; server_addr.sin_port = htons(port); server_addr.sin_addr = *((struct in_addr *)he->h_addr_list[0]); if (connect(sockfd, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0) { perror("connect failed"); close(sockfd); return -1; } // Construct HTTP request char request[1024]; sprintf(request, "GET %s HTTP/1.0\r\nHost: %s\r\nConnection: close\r\n\r\n", path, host); // Send request if (send(sockfd, request, strlen(request), 0) < 0) { perror("send failed"); close(sockfd); return -1; } // Receive response and save to file FILE *file = fopen(filename, "wb"); if (!file) { perror("fopen failed"); close(sockfd); return -1; } char buffer[4096]; int bytes_received; int header_processed = 0; while ((bytes_received = recv(sockfd, buffer, sizeof(buffer) - 1, 0)) > 0) { buffer[bytes_received] = '\0'; // Simple header processing: find end of headers and write rest to file if (!header_processed) { char *header_end = strstr(buffer, "\r\n\r\n"); if (header_end) { header_end += 4; // Move past \r\n\r\n // Check for HTTP status code (basic check) if (strstr(buffer, "HTTP/1.1 200") || strstr(buffer, "HTTP/1.0 200")) { fwrite(header_end, 1, bytes_received - (header_end - buffer), file); header_processed = 1; } else { // Handle non-200 status codes if necessary fprintf(stderr, "Error: Received non-200 status code.\n"); fclose(file); close(sockfd); return -1; } } } else { fwrite(buffer, 1, bytes_received, file); } } if (bytes_received < 0) { perror("recv failed"); } fclose(file); close(sockfd); networkShutdown(); return 0; } int main() { // Example usage: // http_get("http://example.com/somefile.txt", "downloaded_file.txt"); printf("HTTP Download Example (not functional without actual network setup and URL)\n"); return 0; } ``` -------------------------------- ### Wii Mini uid.sys Content Example Source: https://wiibrew.org/wiki/User%3AHallowizer/Factory3 This snippet shows a portion of the uid.sys file from a Korean Wii Mini. It lists various title IDs and their associated identifiers, some of which are not typically installed at the factory. ```text 00000001-00000002 ... 00000001-00000004 ... 00000001-00000009 ... 00010000-3132334a 123J 00010000-0000dead ..ޭ 00000001-00000100 ... 00000001-00000101 .. 00010000-3132314a 121J 00000001-00000015 ... 00010000-30303032 0002 00000001-00000025 ...% 00000001-00000028 ...( 00000001-00000029 ...) 00000001-0000002b ...+ 00000001-0000002d ...- 00010002-4841434b HACK 00010002-48414141 HAAA 00010002-4841594b HAYK 00010002-4841424b HABK 00010008-48414b4b HAKK 00010000-31323245 122E 00010000-30303033 0003 00010000-00555044 .UPD 00010000-524d474b RMGK 00010000-525a4445 RZDE 00010000-525a444a RZDJ 00010001-525a444a RZDJ 00000001-00000033 ...3 00010000-00555050 .UPP 00000001-0000000b ... 00000001-0000000c ... 00000001-0000000d ... 00000001-0000000e ... 00000001-0000000f ... 00000001-00000011 ... 00000001-00000014 ... 00000001-00000016 ... 00000001-0000001c ... 00000001-0000001e ... 00000001-0000001f ... 00000001-00000021 ...! 00000001-00000022 ..." 00000001-00000023 ...# 00000001-00000024 ...$ 00010008-48414b50 HAKP ``` -------------------------------- ### Wiimote 3D Tracking Example Source: https://wiibrew.org/wiki/Python_HTDP_Driver This Python script demonstrates how to use the Wiimote3dTracker to connect to Wiimotes, register a listener for data processing, and start the tracking loop. It requires the pybluez library and is currently Linux-specific. ```Python import sys,time from final.Wiimote3dTracking import Wiimote3dTracker address1 = '00:19:FD:ED:E1:25' ## address of my wiimote address2 = '00:19:FD:D7:63:B1' ## address of my second wiimote ## These could be passed to tracker to connect to them specifically, but ## specifying no addresses causes the tracker to search for remotes anyway. tracker = Wiimote3dTracker(address1,address2) ## A tracker has the following methods: ## connect() -- connects to any wiimotes it knows the address for ## disconnect() -- quite similar to connect. ## ## register( listener ) ## refresh() ## a listener is anything that has a refresh(pos ,axis) method. When tracker.register( newListener ) ## is called, newLitener is added to the list of trackers current listeners. Upon calling ## tracker.refresh() refresh( pos, axis) is called for each of the registered listeners, ## where pos and axis are the processed data from the wiimotes. tracker.connect() ##Connect to the wiimote class Printer: ## This is an example of a listener. Its refresh method simply prints the data ## if it has changed, and returns True to indicate success. def __init__(self): self.oldData = None def refresh(self,(x1,y1,z1),(x2,y2,z2)): if (x1,y1,z1,x2,y2,z2) != self.oldData: print "x:%i,y:%i,z:%i,X:%i,Y:%i,Z:%i:1" % (x1,y1,z1,x2,y2,z2) self.oldData = (x1,y1,z1,x2,y2,z2) return True tracker.register( Printer() ) tracker.start() ## Starts the tracker running in a loop, calling tracker.refresh() each time. ``` -------------------------------- ### Example Homebrew Release Entry Source: https://wiibrew.org/wiki/Homebrew_Releases An example of how to format a homebrew release entry according to the specified format. ```wiki markup '''07 June 26:''' [[RockPaperScissors64]] 1.2 released by [[User:DevDude|DevDude]] ``` -------------------------------- ### Wii Homebrew Initialization Example Source: https://wiibrew.org/wiki/Talk%3ADisk_Drive_Lighter This C code snippet demonstrates the basic initialization required for a Wii homebrew application, including video system setup. It is intended for use with the libogc development kit. ```c #include #include #include #include #include static void *xfb = NULL; static GXRModeObj *rmode = NULL; //--------------------------------------------------------------------------------- int main(int argc, char **argv) { //--------------------------------------------------------------------------------- // Initialise the video system VIDEO_Init(); ``` -------------------------------- ### Example /sys/launch.sys Content (Part 2) Source: https://wiibrew.org/wiki//sys/launch.sys This snippet presents another hexadecimal view of the /sys/launch.sys file, potentially showing different data or a different section of the file. ```text 0000000000 00000001 00000002 00000000 000065DB ..............e. 0000000010 5F145E8F 00000000 00000001 00000002 _.^............. 0000000020 FFFF0000 00000000 00000000 00000000 ................ 0000000030 00000000 00000000 00000000 00000000 ................ 0000000040 00000000 00000000 00000000 00000000 ................ 0000000050 00000000 00000000 00000000 0000FFFF ................ 0000000060 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ................ 0000000070 FFFFFFFF FFFFFFFF FFFFFFFF FFFF0000 ................ 0000000080 00000000 00000000 00000000 00000000 ................ 0000000090 00000000 00000000 00000000 00000000 ................ 00000000A0 00000000 00000000 00000000 00000000 ................ 00000000B0 00000000 00000000 00000000 00000000 ................ 00000000C0 00000000 00000000 00000000 00000000 ................ ``` -------------------------------- ### Initialize System Libraries Source: https://wiibrew.org/wiki/Libosk Initialize FAT, libwiisprite (GameWindow), and Wiimote for application use. ```cpp //... in main fatInitDefault(); wsp::GameWindow gwd; gwd.InitVideo(); WPAD_Init(); WPAD_SetDataFormat(WPAD_CHAN_0, WPAD_FMT_BTNS_ACC_IR); ```