Jump to content
cp/m

Hello World pe Wii

Recommended Posts


Ce va trebuie?
-Wii
-Un calculator preferabil cu Windows
-Internet
-SD card

Care sunt riscurile?
Daca nu instalati corect "The Homebrew Channel", va brick-uiti Wii-ul

Pasul I - Instalarea lui Homebrew Channel
+Descarcati:
-http://bootmii.org/get.php?file=hackmii_installer_v0.8.zip&key=39ee8c4a22dce583066bcf2180b65831f665e38b
-http://bannerbomb.qoid.us/abds/abd6a_v200.zip

+Avand card-ul gol, copiati:
-boot.elf din hackmii_installer_v0.8.zip
-folder-ul "private" din abd6a_v200.zip

+Mergeti in SD Card Menu si urmati wizzard-ul.

Pasul II - Instalarea lui devkitPro
+Descarcati:
-http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitProUpdater-1.5.0.exe/download

+Compilati urmatorul cod:
---inceput---
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ogcsys.h>
#include <gccore.h>
#include <wiiuse/wpad.h>
static u32 *xfb;
static GXRModeObj *rmode;
void Initialise() {
VIDEO_Init();
WPAD_Init();
rmode = VIDEO_GetPreferredMode(NULL);
xfb = 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_WaitVSync();
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
}
int main() {
Initialise();
printf("Hello World!\n");
while(1) {
WPAD_ScanPads();
u16 buttonsDown = WPAD_ButtonsDown(0);
if( buttonsDown & WPAD_BUTTON_A ){
printf("A\n");
}
u16 buttonsHeld = WPAD_ButtonsHeld(0);
if (buttonsHeld & WPAD_BUTTON_A ) {
printf("apasat\n");
}
u16 buttonsUp = WPAD_ButtonsUp(0);
if (buttonsUp & WPAD_BUTTON_A ) {
printf("released\n");
}
if (PAD_StickY(0) > 18) {
printf("sus\n");
}
if (PAD_StickY(0) < -18) {
printf("jos\n");
}
if (buttonsDown & WPAD_BUTTON_HOME) {
exit(0);
}
}
return 0;
}
---sfarsit---

+Copiaza .dol-ul pe sd card-ul gol in folder-ul "apps" in folder-ul "rst"
+Creeaza in acelasi folder un fisier cu numele "meta.xml" cu urmatorul continut:
---inceput---
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <app version="0.6">
<name>Hello World</name>
<coder>cp/m</coder>
<version>0.1</version>
<release_date>20113004</release_date>
<short_description>Program hello world.</short_description>
<long_description>ala bala portocala</long_description>
</app>

Edited by cp/m
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...