Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Making Gecko Codes To Edit RAM: Difference between revisions

From LMHack
GameCubing861999 (talk | contribs)
made page for making geckos will add table from the doucmentation
 
GameCubing861999 (talk | contribs)
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
With Gamecube/Wii there is code stored within dol memory locations, and we can actually edit and add to this compiled assembly code within memory with the use of gecko/ar codes. And this page will detail on how to make said codes
With Gamecube/Wii there is code stored within dol memory locations, and we can actually edit and add to this compiled assembly code within memory with the use of gecko/ar codes. And this page will detail on how to make said codes with help of the documentation from BannerBomb. Now, to make a gecko code with the code types below dolphin debugger is recommended for looking at the compiled c++ assembly and experimenting with each function.
and to make a code first grab the base address that you want to inject into and put what ever code type as 80 or 90, like for example lets say that the base address that we want to inject into is 800021c0 and the code type we want to use is 04 32 bit write to ram. the memory address would become 040021c0 and the second part of the code represents a instruction with its registers and parameters. like lets say that we want to insert a NOP to 800021c0 that code would look like "040021c0 60000000" which 60000000 being what represents the NOP instruction.
 
{| class="wikitable"
|-
|8 bits Write & Fill
 
 
|00______ YYYY00XX
Writes the value XX to YYYY+1 consecutive byte-sized addresses,
starting with the address ba+______ To use po instead of ba, change the codetype from 00 to 10.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|16 bits Write & Fill
 
|02______ YYYYXXXX
 
Writes the value XXXX to YYYY+1 consecutive halfword-sized addresses, starting with the address ba+______
To use po instead of ba, change the codetype from 02 to 12.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|32 bits Write
 
|04______ XXXXXXXX
 
Writes the value XXXXXXXX to ba+______
To use po instead of ba, change the codetype from 04 to 14.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|String Write (Patch Code)
 
|06______ YYYYYYYY
d1d2d3d4 d5d6....
 
Writes each byte (d1, d2, d3, ...) consecutively, starting at address ba+______
YYYYYYYY is the number of bytes to write
 
To use po instead of ba, change the codetype from 06 to 16.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|Slider/Multi Skip (Serial)
 
|08______ XXXXXXXX
TNNNZZZZ VVVVVVVV
 
______ + ba = Initial Address
X = Initial value for the RAM write
T = Value Size (0 = byte, 1 = halfword, 2 = word)
N = Amount of additional addresses to write to (the first is assumed)
Z = Address Increment; in bytes (How many To skip By)
V = Value Increment (How much to add to the value after each additional RAM write)
 
 
To use po instead of ba, change the codetype from 08 to 18.
For values of ______ >= 0x01000000, add one to the codetype.
|-
| IF CODE TYPES
|-
|32 bits (endif, then) If equal
 
|20______ XXXXXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 32 bits at [ba+______]==XXXXXXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 20 to 30.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|32 bits (endif, then) If not equal
 
|22______ XXXXXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 32 bits at [ba+______]!=XXXXXXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 22 to 32.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|32 bits (endif, then) If greater than (unsigned)
 
|24______ XXXXXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 32 bits at [ba+______]>XXXXXXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 24 to 34.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|32 bits (endif, then) If lower than (unsigned)
 
|26______ XXXXXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 32 bits at [ba+______]<XXXXXXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 26 to 36.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|16 bits (endif, then) If equal
 
|28______ MMMMXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 16 bits at ([ba+______] & not(MMMM))==XXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 28 to 38.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|16 bits (endif, then) If not equal
 
|2A______ MMMMXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 16 bits at ([ba+______] & not(MMMM))!=XXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 2A to 3A.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|16 bits (endif, then) If greater than
 
|2C______ MMMMXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 16 bits at ([ba+______] & not(MMMM))>XXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 2C to 3C.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|16 bits (endif, then) If lower than
 
|2E______ MMMMXXXX
 
Adding 1 to ______ will make this code first apply an Endif.
(It will still use ______ for address calculation; without the added 1)
 
If 16 bits at ([ba+______] & not(MMMM))<XXXX,
then codes are executed (else code execution set to false)
 
To use po instead of ba, change the codetype from 2E to 3E.
For values of ______ >= 0x01000000, add one to the codetype.
|-
|BASE ADDRESS CODE TYPES
|-
| 0x33FA02
 
| banaoba.szp
|-
| 0x33FA02
 
| banaoba.szp
|}

Latest revision as of 09:22, 10 July 2024

With Gamecube/Wii there is code stored within dol memory locations, and we can actually edit and add to this compiled assembly code within memory with the use of gecko/ar codes. And this page will detail on how to make said codes with help of the documentation from BannerBomb. Now, to make a gecko code with the code types below dolphin debugger is recommended for looking at the compiled c++ assembly and experimenting with each function. and to make a code first grab the base address that you want to inject into and put what ever code type as 80 or 90, like for example lets say that the base address that we want to inject into is 800021c0 and the code type we want to use is 04 32 bit write to ram. the memory address would become 040021c0 and the second part of the code represents a instruction with its registers and parameters. like lets say that we want to insert a NOP to 800021c0 that code would look like "040021c0 60000000" which 60000000 being what represents the NOP instruction.

8 bits Write & Fill


00______ YYYY00XX

Writes the value XX to YYYY+1 consecutive byte-sized addresses, starting with the address ba+______ To use po instead of ba, change the codetype from 00 to 10. For values of ______ >= 0x01000000, add one to the codetype.

16 bits Write & Fill 02______ YYYYXXXX

Writes the value XXXX to YYYY+1 consecutive halfword-sized addresses, starting with the address ba+______ To use po instead of ba, change the codetype from 02 to 12. For values of ______ >= 0x01000000, add one to the codetype.

32 bits Write 04______ XXXXXXXX

Writes the value XXXXXXXX to ba+______ To use po instead of ba, change the codetype from 04 to 14. For values of ______ >= 0x01000000, add one to the codetype.

String Write (Patch Code) 06______ YYYYYYYY

d1d2d3d4 d5d6....

Writes each byte (d1, d2, d3, ...) consecutively, starting at address ba+______ YYYYYYYY is the number of bytes to write

To use po instead of ba, change the codetype from 06 to 16. For values of ______ >= 0x01000000, add one to the codetype.

Slider/Multi Skip (Serial) 08______ XXXXXXXX

TNNNZZZZ VVVVVVVV

______ + ba = Initial Address X = Initial value for the RAM write T = Value Size (0 = byte, 1 = halfword, 2 = word) N = Amount of additional addresses to write to (the first is assumed) Z = Address Increment; in bytes (How many To skip By) V = Value Increment (How much to add to the value after each additional RAM write)


To use po instead of ba, change the codetype from 08 to 18. For values of ______ >= 0x01000000, add one to the codetype.

IF CODE TYPES
32 bits (endif, then) If equal 20______ XXXXXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 32 bits at [ba+______]==XXXXXXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 20 to 30. For values of ______ >= 0x01000000, add one to the codetype.

32 bits (endif, then) If not equal 22______ XXXXXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 32 bits at [ba+______]!=XXXXXXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 22 to 32. For values of ______ >= 0x01000000, add one to the codetype.

32 bits (endif, then) If greater than (unsigned) 24______ XXXXXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 32 bits at [ba+______]>XXXXXXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 24 to 34. For values of ______ >= 0x01000000, add one to the codetype.

32 bits (endif, then) If lower than (unsigned) 26______ XXXXXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 32 bits at [ba+______]<XXXXXXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 26 to 36. For values of ______ >= 0x01000000, add one to the codetype.

16 bits (endif, then) If equal 28______ MMMMXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 16 bits at ([ba+______] & not(MMMM))==XXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 28 to 38. For values of ______ >= 0x01000000, add one to the codetype.

16 bits (endif, then) If not equal 2A______ MMMMXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 16 bits at ([ba+______] & not(MMMM))!=XXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 2A to 3A. For values of ______ >= 0x01000000, add one to the codetype.

16 bits (endif, then) If greater than 2C______ MMMMXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 16 bits at ([ba+______] & not(MMMM))>XXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 2C to 3C. For values of ______ >= 0x01000000, add one to the codetype.

16 bits (endif, then) If lower than 2E______ MMMMXXXX

Adding 1 to ______ will make this code first apply an Endif. (It will still use ______ for address calculation; without the added 1)

If 16 bits at ([ba+______] & not(MMMM))<XXXX, then codes are executed (else code execution set to false)

To use po instead of ba, change the codetype from 2E to 3E. For values of ______ >= 0x01000000, add one to the codetype.

BASE ADDRESS CODE TYPES
0x33FA02 banaoba.szp
0x33FA02 banaoba.szp