How do you port codes?

Started by Dark Chaos, November 22, 2009, 06:56:28 PM

Previous topic - Next topic

shadowofchaos

#15
The easiest way I found when I had my USBGecko is to have memory dumps of each region... which is easier when you have a Gecko or know someone who does...

Anyways... Using your favorite hex editor... open up the memory dump file...

You just find the address of the code you want to port... Copy a few bytes and search it in the other region...

That ALMOST always works for me... There ARE exceptions...

For example:

QuoteY.S. has many codes originally in the JPN Version of Brawl... I apologize if he already posted it for the JPN, but I couldn't find it... so I ported it ._.

From the Brawl Plusery codeset... I lliked this:

Tags in replays [Y.S]
0404B140 38A00000

So I ported it to the JPN Version

Tags in replays [Y.S, ported by shadowofchaos]
0404B11C 38A00000

Almas

Hi five, I ported that code when it came out too.

Deathwolf

#17
I don't know how to do this!?

File Replacement v1.3: [Phantom Wings] [NTSC]
C2[0234B8] 0000000E <-- go offset 0234B8 [80 df 00 18 7f e3 fb 78] now search for these valuen.
3C807666 6084303A         PAL valuen are 02346C.
7C[042800] 41820058 <-- now go offset 042800 [fc 40 08 18 d0 21 00 80]. when I search for these valuen
3C807364 60843A2F         , offset is 0433A4 WTF but in PAL its the same offset "042800" whats wrong???
7C042800 41820048
3C806E61 60846E64
7C042800 41820038
80BE0000 2C050000
4182002C 3CA0805A
60A58500 80850044
7C04F000 41820018
80850048 7C04F000
4182000C 3CC0805A
60C68700 00000000
C20224C0 00000026
7F83E378 3E60805A
62728080 62738700
3E20805B 6231FAE0
A2310002 2C110000
40820098 A2330002
2C110000 4182008C
A2330000 2C110000
40820084 82330004
82110010 2C100000
41820018 81F00084
7E107A14 3A100080
39E00001 4800000C
8211000C 39E00000
39C00000 92120388
91F2038C 91D20390
91D20394 3A1202A9
39F2032F 9DD00001
7C0F8000 4082FFF8
3A310023 3A1202A9
8DF10001 9DF00001
2C0F0000 4082FFF4
3A200010 B2330000
3A200009 92320350
48000054 2C110001
4082004C 7E729B78
86330004 A2120002
39F0FFFF B1F20002
85F30004 95F20004
3A10FFFF 2C100000
4082FFF0 3E60805B
6273FAE0 A2530002
3A120001 B2130002
5652103A 7E739214
92330004 3E60805A
62738700 A2530000
2C120000 4182000C
3A52FFFF B2530000
60000000 00000000
C201C338 00000005
38A00020 3E60805A
62738080 82530394
2C120000 4182000C
80930390 83130390
60000000 00000000
C201C384 00000006
3E60805A 62738080
82530394 2C120000
41820010 3B400000
3A400000 48000008
541A0034 60000000
60000000 00000000
lolz

Almas

It would be prudent to start with a much simpler code to port. The File Replacement code is very intricate and complex. Without a fairly thorough understanding of what it is doing, you will not be able to make a functional port. That said, if you do want to port it you should at least port the latest version.

For example the block:

C20234B8 0000000E
3C807666 6084303A
7C042800 41820058
3C807364 60843A2F
7C042800 41820048
3C806E61 60846E64
7C042800 41820038
80BE0000 2C050000
4182002C 3CA0805A
60A58500 80850044
7C04F000 41820018
80850048 7C04F000
4182000C 3CC0805A
60C68700 00000000


Is all one C2-codetype. Later versions of the FRC use static RAM writes in place of ASM inserts so that various code segments can be re-routed to the injected code blocks.