Hi, I'm looking for information on how the USB Gecko is able to accomplish what it does, without the need to... well I would have expected it to be more difficult to gain access to the RAM like that.
I assumed it had something to do with the way the gamecube treated memory cards, maybe it treated them as a sort of extended RAM (for speed reasons or to make accessing it easier for developers), and the wii maintains this for backwards compatibility. So anything plugged in there would be able to access the rest of memory, unlike, say the SD card, which is obviously separate.
Although I'm probably entirely off base, but I was unable to find an explanation of how it was working.
Does anyone have a good understanding of how the USB Gecko works? or maybe a link to a resource that explains it?
the usb gecko doesnt have access to the memory. when you are hacking a game, there is a code handler running on the ppc along with the game. the game is hooked in some common loop functions. so, instead of the game just looping and doing what it normally does, each time the game calls the hooked function, it runs the code handler once. this magic code handler is what turns the cheat codes into real-world results ( turns 04000004 11223344 into "write 0x11223344 to memory address 0x80000004" ).
the code handler has access to all the memory, registers, and whatever else as the game. another fun thing the code handler does is look for commands from the usb gecko. so, you can issue a command via wiird such as "dump blablabla memory". the short command is sent to the code handler via the usb gecko. next time the game calls the hooked function and causes the code handler to run, it will see that command request and read the memory and dump it over the usb gecko to your PC. this is obviously not everything that happens, but it should explain teh basic idea behind the process.
giantpune is basically right. The code handler is a special program that hackers have written, and it can read and write to the GameCube memory card EXI bus while the game is running.
The USB Gecko has a CPLD that acts as a transceiver between the EXI bus and an RS232 serial bus. The RS232 serial bus is then connected to an FTDI RS232 to USB converter. When attached to a PC, it creates a virtual serial port.
code handler <-> EXI Bus <-> RS232 bus <-> USB <-> PC
Ahh, thank you. That clarifies some things.
Is the source code for the code handler available?
i asked the same question a while back. source is available, but it is written in ASM. there are a few different variations of the coehandler. different ones are used of the usb gecko is in slot A and stuff like that. heres the generic one http://pastie.org/1028871
Oh that's very useful. Thank you, I saved a copy.
Did you write that?
nope. that is the code handler that is used in geckoOS. im not exactly sure who gets the credit for writing it.