Hacking programing language .ELF

arctic_flame

GBAtemp ATMEGA8 Fan
Member
Joined
Nov 4, 2006
Messages
2,835
Trophies
0
Age
32
Location
England land
XP
168
Country
I assume you're on windows. Get the devkitPro installer from devkitpro.org. Make sure you install devkitPPC (GC/Wii) (devkitARM is for the GBA/DS, take a guess for devkitPSP).

After the install is done, restart, or logoff/logon. Then find Msys in your start menu under devkitPro, this will get you a shell. To compile, navigate to the folder (cd /c/devkitPro/.../project/) (CASE SENSITIVE) and type "make".
 

Prime

Well-Known Member
OP
Member
Joined
Nov 7, 2007
Messages
3,663
Trophies
0
Age
34
Location
Under your bed
Website
Visit site
XP
601
Country
When i do what you said it says "nothing to be done".

I thought i'd go ahead and put it on my SD Card. I rename it boot.elf but when i start up twilight princess it freezes trying to load the .elf i think.

frown.gif
 

superrob

H4X H4X H4X!
Member
Joined
Apr 4, 2007
Messages
2,464
Trophies
0
Age
30
Location
GBATemp factory.
Website
zabbo.dk
XP
359
Country
Try your projects .dol format in the included emulator
wink.gif

If it doesn't work in that in most likely also wont work on the Wii.
And remember to watch the compile log for errors
wink.gif
 

Prime

Well-Known Member
OP
Member
Joined
Nov 7, 2007
Messages
3,663
Trophies
0
Age
34
Location
Under your bed
Website
Visit site
XP
601
Country
Wait i might this completely wrong. Can i just make a .elf which contain a simple "Hello World" written in C?

CODE#include

int main(void)
{
ÂÂÂÂprintf("hello, world\n");
ÂÂÂÂreturn 0;
}

maybe i need to have a special code or something to make it work on the twilight hack.
 

tredes

Well-Known Member
Member
Joined
Mar 17, 2008
Messages
180
Trophies
0
XP
73
Country
im very interested in this too..i would like to know the difference and how to compile a program to run on the twliilight hack...

any help is great...iv followed to above instructions....
 

Prime

Well-Known Member
OP
Member
Joined
Nov 7, 2007
Messages
3,663
Trophies
0
Age
34
Location
Under your bed
Website
Visit site
XP
601
Country
tredes said:
im very interested in this too..i would like to know the difference and how to compile a program to run on the twliilight hack...

any help is great...iv followed to above instructions....

Well just keep a eye on this thread. Hopefully arctic_flame will write back.
 

arctic_flame

GBAtemp ATMEGA8 Fan
Member
Joined
Nov 4, 2006
Messages
2,835
Trophies
0
Age
32
Location
England land
XP
168
Country
metroid_phobia said:
Wait i might this completely wrong. Can i just make a .elf which contain a simple "Hello World" written in C?

CODE#include

int main(void)
{
ÂÂÂÂprintf("hello, world\n");
ÂÂÂÂreturn 0;
}

maybe i need to have a special code or something to make it work on the twilight hack.

Uh, yeah, this isn't like programming for the PC. Check the /c/devkitPro/examples/wii/template (There's a makefile too, so you can compile it by navigating to that folder and typing "make"

Hello, World! for the Wiilooks like this:

CODE#include
#include
#include
#include
#include
#include

static void *xfb = NULL;
static GXRModeObj *rmode = NULL;

int main(int argc, char **argv) {

ÂÂÂÂVIDEO_Init();
ÂÂÂÂPAD_Init();
ÂÂÂÂ
ÂÂÂÂswitch(VIDEO_GetCurrentTvMode()) {
ÂÂÂÂÂÂÂÂcase VI_NTSC:
ÂÂÂÂÂÂÂÂÂÂÂÂrmode = &TVNtsc480IntDf;
ÂÂÂÂÂÂÂÂÂÂÂÂbreak;
ÂÂÂÂÂÂÂÂcase VI_PAL:
ÂÂÂÂÂÂÂÂÂÂÂÂrmode = &TVPal528IntDf;
ÂÂÂÂÂÂÂÂÂÂÂÂbreak;
ÂÂÂÂÂÂÂÂcase VI_MPAL:
ÂÂÂÂÂÂÂÂÂÂÂÂrmode = &TVMpal480IntDf;
ÂÂÂÂÂÂÂÂÂÂÂÂbreak;
ÂÂÂÂÂÂÂÂdefault:
ÂÂÂÂÂÂÂÂÂÂÂÂrmode = &TVNtsc480IntDf;
ÂÂÂÂÂÂÂÂÂÂÂÂbreak;
ÂÂÂÂ}

ÂÂÂÂ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();


ÂÂÂÂprintf("Hello World!\n");

ÂÂÂÂwhile(1) {

ÂÂÂÂÂÂÂÂVIDEO_WaitVSync();
ÂÂÂÂ}

ÂÂÂÂreturn 0;
}
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan @ BakerMan:
    this is my first aurora tbh
    +1
  • BakerMan @ BakerMan:
    i mean, multiple have happened in my lifetime, but it's always been too cloudy
  • BakerMan @ BakerMan:
    IT'S LIKE THAT ALMOST EVERY FUCKING METEOR SHOWER TOO
  • BigOnYa @ BigOnYa:
    You need to setup a time lapse camera, be neat
  • BigOnYa @ BigOnYa:
    I actually use a pic of it on my pc desktop cause its cool looking
  • Xdqwerty @ Xdqwerty:
    Apparently the pro versión of pizza boy is back aswell
  • Xdqwerty @ Xdqwerty:
    Gonna download the update
  • Xdqwerty @ Xdqwerty:
    Only 2 antiviruses detected the APK as a virus on virustotal so it Must be safe
  • Xdqwerty @ Xdqwerty:
    Cuz false positive
  • Xdqwerty @ Xdqwerty:
    Wait
  • Xdqwerty @ Xdqwerty:
    Eh nvm
  • BakerMan @ BakerMan:
    sadly, the clouds are setting in now

    hey BigOnYa the clouds are coming from the south, maybe check again
  • Xdqwerty @ Xdqwerty:
    Good night it's 11 pm
  • BakerMan @ BakerMan:
    night
  • BigOnYa @ BigOnYa:
    @BakerMan Nuh I'm in for the night playing Fallout 4, ill look tomorrow night
  • BigOnYa @ BigOnYa:
    Ok had let dog out, and yea still can't see it, oh well. Maybe tom night.
  • K3Nv2 @ K3Nv2:
    Ballocks these drives aren't allowing raid
  • BigOnYa @ BigOnYa:
    That sucks, well you will get double the space then atleast.
  • K3Nv2 @ K3Nv2:
    @Sicklyboy needs to come back
  • BigOnYa @ BigOnYa:
    Did you try Raid 10?
  • K3Nv2 @ K3Nv2:
    I did raid69
  • K3Nv2 @ K3Nv2:
    The physical disk keeps disabling in bios
  • BakerMan @ BakerMan:
    hey ken did you see the aurora tonight?
  • BakerMan @ BakerMan:
    also sorry it was too cloudy, that sucks
    BakerMan @ BakerMan: also sorry it was too cloudy, that sucks