I am looking for the source code for the kenobiwii handler which is copied into wii memory by the wii before a game is started. specifically i want to see what needs to be done to get homebrew to boot with it. i have tried a few different things and i cant get everything to work like it should.i really dont care if its the new or old engine, since i really dont need 8000 lines of cheat codes. i just want to view the memory and take screenshots (and cheat at homebrew games).
http://code.google.com/p/usbgecko/source/browse/trunk/Gecko_src/code%20handler/codehandler.s
http://code.google.com/p/geckodownloads/downloads/list
That's the code handler.. it does not say though how it is included into game code, it will give you an idea though about the handler itself!
damn. i was hoping for c or c++. looks like its time for me to learn a bit of asm.
ASM is fairly easy if you have experience with other programming languages.
well, im half way there. i got a function to dump the framebuffer or to convert it to a png and dump it if the project is linked with pngu. now for that pesky memory viewing...
The code for debugging homebrew is already mostly there, you just need to:
1. Set "Gecko Pause Start" to "YES".
2. Use geckoload.exe to transfer a DOL executable to Gecko OS.
3. Use WiiRD to manually hook the DOL executable.
You will probably need to disassemble the homebrew executable on your PC to find a good location to hook from, but if you have access to the source code for the homebrew you want to debug then I would recommend compiling it and using the ELF file for finding the memory address to hook from and the DOL file for loading onto the Wii. The reason there isn't a hook for homebrew yet is because there are a lot of variations between the code generated from different versions of devkitpro so it is difficult to find code that is common between all homebrew executables and executes often.
I am also interested to learn this. Does anyone have an example how to find memory address in a wiibrew application to put a hook from (the last step in brkirch posting)? I have developed wiibrew applications: e.g. turnip and DiiLC, and it would be nice if I could run them through geckoos and then be able to take screenshots or seeing how the applications run within geckoos.
Thanks in advance.