Welcome! Log In Create A New Profile

Advanced

I would like to learn how to port

Posted by Adman 
I would like to learn how to port
August 09, 2009 11:28AM
Hello!

I just got a USB Gecko and am making codes, I would like to learn how to port PAL to NTSC-US and visa versa. I already have a hex editor, RAM Dumps, and some knowlage on the Base and Pointer addresses. If you could show me a guide that'd be great!

Thanks!
Ad~man
Re: I would like to learn how to port
August 11, 2009 10:44AM
My guess would be that the codes contain an address and a value. The address is where the value is applied. So basically, go to that address in the region you have the code for, find what is there to begin with, then find that in the other one and put the address its at in the code, with the same original value. This all just a guess, I've never even seen a Gecko OS cheat, so don't know the format. I'll try and find one, and post back later with a better idea of whats going on.

EDIT: OK, I had a look at some codes, and this is what I reckon. The first 8 numbers on each line is the address, the last 8 are the new value.

For example, here is a Wii Sports Jap code:
Ball Height Up (UP button) [ZiT]
283D482A 00000008
4A000000 92000000
1413875C 41F00000
E0000000 80008000

In red are the addresses, in blue the values. The values stay the same, you need to find the new addresses.
This is relatively easy. Open up the RAM dump you have for the region you have the code for in a hex editor. Goto the address of the first line of the code. Copy 8 numbers (4 boxes) from that address on. (You may need to copy a few either side as well). Then open up the one you want to port to, and search for what you copied. When its found, search again. If it is found again, go back and copy a few more values either side. Do this until it is only found once. Then take the address of the first number from the original 8 numbers, and put it in the code, with the same value as the code has already. Do this for each line of the code.

In reality, its probably slightly trickier than this, because there is probably an offset which you need to take off the address at the start, and add to it at the end, but I don't know that offset. The process is very similar to porting preloader patches, and I have written a guide to that here

EDIT: OK, I think you need to subtract 80000000 from the address, provided the code doesn't change the base address. If the first line is 4200000000, the base address is changed. If it isn't, take 80000000 from each address, and do what I said above. Then, when you get the final address, add 80000000. Make sure you do both calculations in a hex calculator, you can use the calculator built in to Windows. Oh, and if the first line IS 42000000, like in the example below, I think what you need to do is this:

Let's take this code as an example.

Unlock all Characters [eric]
42000000 90000000
0417B640 FFFFFFFF
0417B644 FFFFFFFF
E0000000 80008000

The first line changes the base address to 90000000. Copy this. The last line resets it to 80000000. Copy it. Then port the lines in between, by subtracting 90000000 from the addresses, going to that address, copying the value there, finding it in the other dump, and adding 90000000 to the address. Then copy the value from the original code after it. Do this process for each line. If the code doesn't have a first line starting 42000000, it uses the default base address, and every line must be ported.



Edited 3 time(s). Last edit at 08/11/2009 01:28PM by SifJar.
Re: I would like to learn how to port
August 13, 2009 09:16PM
Hey man, did you try it? Can anyone confirm if this information is right, or correct anything that's wrong?
Sorry, only registered users may post in this forum.

Click here to login