Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 644
» Latest member: Marmon
» Forum threads: 1,816
» Forum posts: 13,980
Full Statistics
|
Online Users |
There are currently 149 online users. » 0 Member(s) | 146 Guest(s) Applebot, Bing, Google
|
Latest Threads |
Item Reset Code with Time...
Forum: Code Support / Help / Requests
Last Post: WaluigiisFluffy
7 hours ago
» Replies: 6
» Views: 170
|
Make it to 10,000
Forum: General Discussion
Last Post: Vega
11 hours ago
» Replies: 7,328
» Views: 5,644,799
|
Racer Count Modifier
Forum: Offline Non-Item
Last Post: Vega
11 hours ago
» Replies: 1
» Views: 32
|
Motion Sensor Bomb (Hamst...
Forum: Incomplete & Outdated Codes
Last Post: Vega
11 hours ago
» Replies: 1
» Views: 23
|
Thunder Cloud Effect Modi...
Forum: Offline; Item
Last Post: JerryHatrick
01-06-2025, 06:46 PM
» Replies: 7
» Views: 873
|
Kart Status Stacker [Ro]
Forum: Offline Non-Item
Last Post: _Ro
01-06-2025, 09:57 AM
» Replies: 0
» Views: 57
|
Static Analysis with Ghid...
Forum: Other
Last Post: Warwick92xD
01-06-2025, 03:48 AM
» Replies: 15
» Views: 40,019
|
Clear Items / Item Reset ...
Forum: Online; Item
Last Post: WaluigiisFluffy
01-04-2025, 04:03 PM
» Replies: 1
» Views: 298
|
Code request???
Forum: Code Support / Help / Requests
Last Post: Warwick92xD
01-03-2025, 10:59 PM
» Replies: 2
» Views: 4,867
|
Always Show Friend Code o...
Forum: Visual & Sound Effects
Last Post: Vega
01-03-2025, 01:51 PM
» Replies: 2
» Views: 117
|
|
|
CPU Bot (Online) v1.5 [marito_yo] |
Posted by: marito_yo - 08-29-2024, 08:07 PM - Forum: Online Non-Item
- Replies (5)
|
|
CPU Bot (Online) v1.5 [marito_yo]
Change: Changed C2 hook to one liner. The C2 hook set it to 1 regardless of case.
Addition: Made "isCpu" bool true. This bool sets some important stuff that CPUs have and it fixes the respawn route issue. Also, it was modified in a way that it will only affect human players so it will not cause online players to have CPU stuff (example: turning).
Change and Addition by Ro
NTSC-U
0452AA1C 60000000
04721E4C 38600001
04589E4C 70030003
PAL
0452F564 60000000
0472627C 38600001
04590670 70030003
NTSC-J
0452EEE4 60000000
047258e8 38600001
0458FFF0 70030003
NTSC-K
0451D5BC 60000000
04714624 38600001
0457E6C8 70030003
Code creator: marito_yo
Code credits: Dea00 [CPU bot[Dea]]
Code credits: Ro (isCPU fix)
|
|
|
Item Effect Randomizer [TheLordScruffy] |
Posted by: Unnamed - 08-28-2024, 09:47 AM - Forum: Offline; Item
- No Replies
|
|
Item Effect Randomizer [ TheLordScruffy ]
When you drive over a dropped item, you will have a random item effect.
NTSC-U
C256D91C 00000024
7D8C42E6 718B00F0
718C000F 3CA0809C
80A58F68 80A50B70
2C050003 4082001C
2C0C000D 38600001
418200F4 2C0C000E
40820008 39800008
2C0C000E 40820010
2C0B0080 40800008
39800008 2C0C000C
38600006 418200C8
2C0C0009 38600007
418200BC 2C0C0005
3860000B 418200B0
2C0C000F 3860000C
418200A4 48000015
00010204 09070803
0B060C0D 0A0F0E00
7CE802A6 7E038378
3D00809B 6108EEB0
7CE760AE 1CE7001C
7D88382E 2C0C0000
40820028 3D00808B
61080D30 1CEC000C
7D874214 3CA08002
60A508F0 7CA903A6
4E800421 48000048
80D00004 3C80809C
8084EE20 80840014
38600000 80A40000
7C053000 41820018
38840248 38630001
2C03000C 41820014
4BFFFFE4 7C832378
7D8903A6 4E800421
3860FFFF 00000000
PAL
C257276C 00000024
7D8C42E6 718B00F0
718C000F 3CA0809C
80A5D728 80A50B70
2C050003 4082001C
2C0C000D 38600001
418200F4 2C0C000E
40820008 39800008
2C0C000E 40820010
2C0B0080 40800008
39800008 2C0C000C
38600006 418200C8
2C0C0009 38600007
418200BC 2C0C0005
3860000B 418200B0
2C0C000F 3860000C
418200A4 48000015
00010204 09070803
0B060C0D 0A0F0E00
7CE802A6 7E038378
3D00809C 610836B8
7CE760AE 1CE7001C
7D88382E 2C0C0000
40820028 3D00808B
61085468 1CEC000C
7D874214 3CA08002
60A51450 7CA903A6
4E800421 48000048
80D00004 3C80809C
80843618 80840014
38600000 80A40000
7C053000 41820018
38840248 38630001
2C03000C 41820014
4BFFFFE4 7C832378
7D8903A6 4E800421
3860FFFF 00000000
NTSC-J
C25720EC 00000024
7D8C42E6 718B00F0
718C000F 3CA0809C
80A5C788 80A50B70
2C050003 4082001C
2C0C000D 38600001
418200F4 2C0C000E
40820008 39800008
2C0C000E 40820010
2C0B0080 40800008
39800008 2C0C000C
38600006 418200C8
2C0C0009 38600007
418200BC 2C0C0005
3860000B 418200B0
2C0C000F 3860000C
418200A4 48000015
00010204 09070803
0B060C0D 0A0F0E00
7CE802A6 7E038378
3D00809C 61082718
7CE760AE 1CE7001C
7D88382E 2C0C0000
40820028 3D00808B
610845C8 1CEC000C
7D874214 3CA08002
60A51374 7CA903A6
4E800421 48000048
80D00004 3C80809C
80842678 80840014
38600000 80A40000
7C053000 41820018
38840248 38630001
2C03000C 41820014
4BFFFFE4 7C832378
7D8903A6 4E800421
3860FFFF 00000000
NTSC-K
C25607C4 00000024
7D8C42E6 718B00F0
718C000F 3CA0809B
80A5BD68 80A50B70
2C050003 4082001C
2C0C000D 38600001
418200F4 2C0C000E
40820008 39800008
2C0C000E 40820010
2C0B0080 40800008
39800008 2C0C000C
38600006 418200C8
2C0C0009 38600007
418200BC 2C0C0005
3860000B 418200B0
2C0C000F 3860000C
418200A4 48000015
00010204 09070803
0B060C0D 0A0F0E00
7CE802A6 7E038378
3D00809B 61081CF8
7CE760AE 1CE7001C
7D88382E 2C0C0000
40820028 3D00808A
610838E0 1CEC000C
7D874214 3CA08002
60A514B8 7CA903A6
4E800421 48000048
80D00004 3C80809B
80841C58 80840014
38600000 80A40000
7C053000 41820018
38840248 38630001
2C03000C 41820014
4BFFFFE4 7C832378
7D8903A6 4E800421
3860FFFF 00000000
Code Creator: TheLordScruffy
|
|
|
How to port more complex codes with non standard porting |
Posted by: Unnamed - 08-28-2024, 09:44 AM - Forum: Coding (Non-ASM) and Dolphin
- No Replies
|
|
How to port more complex codes with non standard porting
NOTE: This Tutorial is for intermediate to advanced coders. Beginners should view THIS Tutorial first.
Introduction
When porting more complex codes with auto porters, it can happen that the finished codes do not work or crash the game. Then this code will almost certainly need non-standard porting.
Non-standard porting is when not only the hook address has to be ported, but there are also addresses in the (ASM) code that have to be ported. These can be pointers or in-game functions, for example. Non-standard porting is more time-consuming, as it is more difficult to find the ported address. Especially if it is in an environment that also contains function addresses or pointers.
This tutorial will show you some attempts how to port such codes.
What you will need:
-This Forum
-Hex Editor (I will choose online hex Editor HexEd.it)
-Decent knowledge about ASM (some instructions, see THIS tutorial how to learn ASM)
-RAM Dumps (you neet at least the RAM Dump of the region the code is from and the region you want to port to, see THIS tutorial how to get RAM Dumps)
-Disassembler (I will use online Disassembler disasm pro)
-{Optional} Hex Calculator
Chapter 1: The Code we want to port
For our test I have chosen a code that is not finished porting yet, it is called "Item Effect Randomizer" by TheLordScruffy. The code is given in PAL region and we want to port it to NTSC-U.
Here is our code in PAL:
Code: C257276C 00000024
7D8C42E6 718B00F0
718C000F 3CA0809C
80A5D728 80A50B70
2C050003 4082001C
2C0C000D 38600001
418200F4 2C0C000E
40820008 39800008
2C0C000E 40820010
2C0B0080 40800008
39800008 2C0C000C
38600006 418200C8
2C0C0009 38600007
418200BC 2C0C0005
3860000B 418200B0
2C0C000F 3860000C
418200A4 48000015
00010204 09070803
0B060C0D 0A0F0E00
7CE802A6 7E038378
3D00809C 610836B8
7CE760AE 1CE7001C
7D88382E 2C0C0000
40820028 3D00808B
61085468 1CEC000C
7D874214 3CA08002
60A51450 7CA903A6
4E800421 48000048
80D00004 3C80809C
80843618 80840014
38600000 80A40000
7C053000 41820018
38840248 38630001
2C03000C 41820014
4BFFFFE4 7C832378
7D8903A6 4E800421
3860FFFF 00000000
Chapter 2: Finding Location of the Hook adress in RAM
What we want to do is find the Code's RAM Address (offset & column location) within the RAM Dump. To figure this out, simply remove the first 2 digits off the first line (the C2, 06 or 04 line) of the code. If you did the conversion correctly, you should come up with a value of "57276C".
Now open HexEdIt and open your PAL RAM dump with the option "open file". On the right you find "go to". Click on the box and type in the adress with "0x" as prefix. Click Enter.
You should navigate to the adress now, that means the cursor should be at this adress.
Chapter 3, Section 1: Decide which bytes to search for
To find the correct adress on other region RAMs, you need to decide for what bytes you want to search for. Some good instructions are cmpwi, li, stw, sth, mulli or also mr. Bad instructions to search for are bl (function calls), lwz (sometimes, not always), lis. The reason why this instruction are bad to search for is that they vary in different ports and you will not be able to find the correct adress.
So before we continue, let's disassemble the environment of this adress. I will choose the bytes from 0x572740 to 0x57279F.
The 4 bytes at our adress are 4BAAECE5. This is a bl instruction, which means that is likely to be a function call. So this is not a good instruction to search for. But we have some mulli and mr instructions in a row, so lets take the three instructions
mr r3, r16
mr r4, r31
mulli r0, r0, 0xc
to search for, in bytes that would be 7E0383787FE4FB781C00000C starting at adress 0x0057275C. That will be our bytes to search for.
Chapter 3, Section 2: Searching the bytes
Now we search this bytes in the NTSC-U RAM Dump. Open this Dump. On the right of HexEdIt you will see a "search for" box, type* this bytes with spaces in. Then make sure only "Hexadecimal Values" is checked on Data Types and "List all occurences" is also checked.
Finally click on "Search now" - You should find one adress.
0x0056D90C
*NOTE: Seems like HexEd.it has no copy Function, so you have to type the bytes, but that shouldn't be a problem at all.
That means we found one adress matching with our bytes. Now we want to get our ported adress, for this, we need first the difference of our search start adress and our adress we want to port. The adress we want to port is 0x0057276C, and our search start adress was 0x0057275C, means that our port adress is 0x10 bytes after the search start adress.
Now we have found the adress matching with our bytes. To get our ported adress (which is 0x10 after the adress of our bytes), we add the difference of 0x10 and find our adress:
0x0056D91C
Navigate to this adress in HexEd.it. You will see the Bytes 4BAB2FD5. This is a bl instruction and means that we probably found the correct adress.
I will tell you that this is our hook adress ported to NTSC-U!
Chapter 4: Find addresses contained in the ASM code
We already have our hook adress ported. Now we want to port the adresses in the ASM code. Before we can do this, we have to find them before. For this, we need to disassemble our code.
Code: mftb r12, 0x10c
andi. r11, r12, 0xf0
andi. r12, r12, 0xf
lis r5, 0x809c
lwz r5, -0x28d8(r5)
lwz r5, 0xb70(r5)
cmpwi r5, 3
bne 0x38
cmpwi r12, 0xd
li r3, 1
beq 0x11c
cmpwi r12, 0xe
bne 0x38
li r12, 8
cmpwi r12, 0xe
bne 0x4c
cmpwi r11, 0x80
bge 0x4c
li r12, 8
cmpwi r12, 0xc
li r3, 6
beq 0x11c
cmpwi r12, 9
li r3, 7
beq 0x11c
cmpwi r12, 5
li r3, 0xb
beq 0x11c
cmpwi r12, 0xf
li r3, 0xc
beq 0x11c
bl 0x90
.word 0x00010204
.word 0x09070803
.word 0x0B060C0D
.word 0x0A0F0E00
mflr r7
mr r3, r16
lis r8, 0x809c
ori r8, r8, 0x36b8
lbzx r7, r7, r12
mulli r7, r7, 0x1c
lwzx r12, r8, r7
cmpwi r12, 0
bne 0xd8
lis r8, 0x808b
ori r8, r8, 0x5468
mulli r7, r12, 0xc
add r12, r7, r8
lis r5, 0x8002
ori r5, r5, 0x1450
mtctr r5
bctrl
b 0x11c
lwz r6, 4(r16)
lis r4, 0x809c
lwz r4, 0x3618(r4)
lwz r4, 0x14(r4)
li r3, 0
lwz r5, 0(r4)
cmpw r5, r6
beq 0x10c
addi r4, r4, 0x248
addi r3, r3, 1
cmpwi r3, 0xc
beq 0x118
b 0xec
mr r3, r4
mtctr r12
bctrl
li r3, -1
Most ASM or string write codes that will load adresses (of functions or pointers) that need to be ported have the following structure:
lis rX, 0x80GG
lwz rY, 0xSIMM(rX)
or
lis rX, 0x80GG
ori rY, rX, 0xUIMM
where GG can be from 02 to 9C, rX and rY arbitary GPR. That means a lis instruction followed by a lwz or an ori instruction mostly indicates function calls or the use of pointers. If we search for these in our disassembled code, we find 5 occurences:
1.
lis r5, 0x809C
lwz r5, -0x28D8(r5)
2.
lis r8, 0x809C
ori r8, r8, 0x36B8
3.
lis r8, 0x808B
ori r8, r8, 0x5468
4.
lis r5, 0x8002
ori r5, r5, 0x1450
5.
lis r4, 0x809C
lwz r4, 0x3618(r4)
That means these five adresses needs to be ported now.
0x809BD728
0x809C36B8
0x808B5468
0x80021450
0x809C3618
Chapter 5. Using the Forum as help
If you are lucky, some of the codes of the forum have already used (and ported) adresses. For example, if you use the forum search for "D728", you will look at the sources of other codes that this pointer is called "race_data".
Indeed, the first two adresses and the last adress were already used by other codes. We can extract these adresses e.g. from my "Call Item Function Anytime" code. The NTSC-U adresses are:
PAL --> NTSC-U
0x809BD728 --> 809B8F68 (race_data)
0x809C36B8 --> 809BEEB0 (item_functions)
0x809C3618 --> 809BEE20 (player_holder)
Chapter 6. Porting the rest
Two adresses are missing, and we need to port them manually. The adress 808B5468 is harder to port. If you go to this adress you will see the bytes 00000000, but also surrounding values starting with 0x80.
That means these are most likely function adresses, and a search with these values on other RAM Dumps will not work. Also, there is no ASM code in environment. So what you can do is to scroll up or down a bit, to find either assembly or some text. If you scroll down a bit you will notice some text appearing, starting with
"FSqrt: Input is..."
Ok, we have a string at starting adress 0x808B56D0 we can search for. Do a search for at least 6 of the bytes on the NTSC-U RAM Dump, so we do a search for "46537172743a".
If you do this you should come up with 13 occurences. Obviously, if there is more than one occurence, it will be hard to find the correct one.
To do so, run the search on the PAL RAM Dump too. The occurences are listed in order, so take a look at the position of your adress. You will notice: On PAL, the first occurence holds the bytes you use to search.
That means: On NTSCU Dump, also the first adress 0x008B0F98 is the one we want to look at. Now to get our ported adress, we need to calculate the difference of our search start adress and our adress we want to port, like in Chapter 3 again. This is a bit harder, you might need a hex calculator for this.
You will find the difference of -0x268. If we now add this to our found adress 0x008B0F98, we get the result 0x008B0D30, so 808B0D30 is our ported adress.
To check it, open NTSC-U dump and look at the adress 0x008B0D30, you will find 00000000 as bytes after a bunch of 0x80 adresses, so chances are high that this is the correct adress.
The adress 80021450 is easier to port, so you might try this one alone. HINT: Use the 12 bytes at adress 0x002145C in PAL dump as search bytes.
If you have done all correctly, you must find 800208F0 as the correct adress.
Chapter 7: Setup the Ported code
So we have all adresses ported now.
0x8057276C --> 0x8056D91C (hook adress)
0x809BD728 --> 0x809B8F68 (race_data)
0x809C36B8 --> 0x809BEEB0 (item_functions)
0x808B5468 --> 0x808B0D30
0x80021450 --> 0x800208F0
0x809C3618 --> 0x809BEE20 (player_holder)
To setup the new ported code, replace all the old adresses with the new adresses, be careful to also replace the lis-instructions.
Chapter 8: Testing
Now test the code on console and on dolphin to make sure it works. If the code isn't working or crashing, you have either made a mistake when porting or you have overlooked an address that needs to be ported. Then look at the code again and check whether you may have made a mistake or overlooked something.
Conclusion
Two main problems occur with porting more complex codes:
1. Find the instructions that will need porting
2. When attempting to port, choose the correct bytes to search for
I hope this tutorial helps you to figure these two things out in future and with that to port more complex code to other regions, as auto porters do not support (yet) non standard porting.
Happy Coding!
Tutorial written by: Unnamed; Credits: Vega for further tutorials
|
|
|
Force First Place |
Posted by: andreMKW - 08-16-2024, 09:56 PM - Forum: Incomplete & Outdated Codes
- Replies (5)
|
|
Hi, I made this code and I wanted to share with yall. It forces the player to be in first place (Grand Prix and VS) by pressing a button before the 5 seconds at the start of a game.
Sorry if it is made not well, but i'm new to Gecko code creation.
I wanted to do special thanks to Vega for writing an awesome guides to learn Code Coding, PPC ASM, Controllers in memory and Anarion's Force Respawn, where I looked how to use statements with buttons state.
I only could make PAL code bc I don't have other regions ISO.
rrrr = 8034 (Nunhuck, Wheel, Classic)
rrrr = 8035 (GameCube)
XXXX = Controller address value
ZZZZ = Activator button value
(PAL)
C2533AC4 00000006
3D60rrrr A14BXXXX
280AZZZZ 40A20018
39000001 99040020
816C0014 656B0001
916C0014 7F83E378
60000000 00000000
|
|
|
Leaf Piles Freeze the Timer [LucioWins] |
Posted by: LucioWins - 08-13-2024, 08:13 PM - Forum: Time Trials & Battle
- No Replies
|
|
Leaf Piles Freeze the Timer [LucioWins]
This code makes any leaf piles hit freeze the timer as well as stopping leaf piles from respawning.
This code makes uses address 0x800009D0. Make sure no other codes use this address.
PAL:
0476ED40 38000000
C2535C78 00000007
3FC08000 83FE09D0
2C1F0000 41820024
2C030000 4181000C
3BE00001 38600001
3BFFFFFF 93FE09D0
38030000 48000008
38030001 00000000
C2555620 00000004
3C808000 80A409D0
2C050000 4182000C
38600000 48000008
7C601A14 00000000
C2767554 00000003
3FC08000 83FE09D0
3BFFXXXX 93FE09D0
3C60808D 00000000
NTSC-U:
0477b218 38000000
C2531130 00000007
3FC08000 83FE09D0
2C1F0000 41820024
2C030000 4181000C
3BE00001 38600001
3BFFFFFF 93FE09D0
38030000 48000008
38030001 00000000
C254f600 00000004
3C808000 80A409D0
2C050000 4182000C
38600000 48000008
7C601A14 00000000
C2777288 00000003
3FC08000 83FE09D0
3BFFXXXX 93FE09D0
3C60808D 00000000
NTSC-J:
0476e3ac 38000000
C25355f8 00000007
3FC08000 83FE09D0
2C1F0000 41820024
2C030000 4181000C
3BE00001 38600001
3BFFFFFF 93FE09D0
38030000 48000008
38030001 00000000
C2554fa0 00000004
3C808000 80A409D0
2C050000 4182000C
38600000 48000008
7C601A14 00000000
C2766bc0 00000003
3FC08000 83FE09D0
3BFFXXXX 93FE09D0
3C60808D 00000000
NTSC-K:
0475d100 38000000
C2523cd0 00000007
3FC08000 83FE09D0
2C1F0000 41820024
2C030000 4181000C
3BE00001 38600001
3BFFFFFF 93FE09D0
38030000 48000008
38030001 00000000
C2543678 00000004
3C808000 80A409D0
2C050000 4182000C
38600000 48000008
7C601A14 00000000
C2755914 00000003
3FC08000 83FE09D0
3BFFXXXX 93FE09D0
3C60808D 00000000
XXXX = Number of frames the timer will freeze for when a leaf pile is hit
Some Possible X Values:
0.1 Seconds = 0006
0.5 Seconds = 001E
1 Second = 003C (Recommended)
2 Seconds = 0078
3 Seconds = 00B4
5 Seconds = 012C
Code Credits: Gaberboo (providing a code to disable randomisation in the milliseconds)
|
|
|
KCL Flag Modifier [Unnamed] |
Posted by: Unnamed - 08-09-2024, 09:05 AM - Forum: Offline Non-Item
- No Replies
|
|
KCL Flag Modifier [Unnamed]
With this code you can replace a KCL Flag you are driving on with one of your choice. Simply put in the KCL Flag you want to replace with the one you wish.
NTSC-U
C27B26B8 00000004
A165000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D635B78 00000000
C27B1FE4 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D645B78 00000000
C27B2C70 00000004
A179000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D635B78 00000000
C27B242C 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
C27B3038 00000004
A179000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
PAL
C27C1118 00000004
A165000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D635B78 00000000
C27C0A44 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D645B78 00000000
C27C16D0 00000004
A179000E KKKKKKKK
280CSSSS 4182000C
3D600000 616BTTTT
7D635B78 00000000
C27C0E8C 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
C27C1A98 00000004
A179000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
NTSC-J
C27C0784 00000004
A165000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D635B78 00000000
C27C00B0 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D645B78 00000000
C27C0D3C 00000004
A179000E KKKKKKKK
280CSSSS 4182000C
3D600000 616BTTTT
7D635B78 00000000
C27C04F8 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
C27C1104 00000004
A179000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
NTSC-K
C27AF4D8 00000004
A165000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D635B78 00000000
C27AEE04 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D645B78 00000000
C27AFA90 00000004
A179000E KKKKKKKK
280CSSSS 4182000C
3D600000 616BTTTT
7D635B78 00000000
C27AF24C 00000004
A176000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
C27AFE58 00000004
A179000E KKKKKKKK
280CSSSS 4082000C
3D600000 616BTTTT
7D605B78 00000000
Values
SSSS: KCL Flag you want to replace
TTTT: KCL Flag replaced with
For more information about KCL flags go here.
KKKKKKKK: an assembly instruction you can choose what you want to replace
Default Value is 7D6C5B78 (mr r12, r11)
If you want to modify KCL Flags e.g. having all the same Base Type, you have to mask out bits. The instruction should follow this structure
rlwinm r12, r11, 0, m, n
For this, you need to learn PowerPC assembly to assemble your instruction and how to and a register with a mask. Helpful Tutorials for this you find in Vegas Assembly Tutorial and in Tutorial about Bit Rotation.
Here are some Examples
SSSS = 0004, TTTT = 0006, KKKKKKKK = 7D6C5B78 (Heavy offroad "Sand" is now Boost Panel)
SSSS = 0006, TTTT = 0000, KKKKKKKK = 7D6C5B78 (Boost Panel is now normal road, this way, you disable boost panels)
SSSS = 2000, TTTT = 0000, KKKKKKKK = 556C04A4 (Disable all trickable KCL Flags)
If you get more knowledge about assembly language, you can also extend this code to make it work for more than one KCL flag.
Code Creator: Unnamed
|
|
|
No Camera Height Shift in Air [Ro] |
Posted by: _Ro - 08-05-2024, 02:11 AM - Forum: Visual & Sound Effects
- No Replies
|
|
No Camera Height Shift in Air [Ro]
This code will make the camera height not shift in air, making it be behind your kart as if you were on the ground instead of making it go a bit higher. This code can be used with Future Fly for better view.
NTSC-U
04599670 60000000
PAL
045A46A8 60000000
NTSC-J
045A4028 60000000
NTSC-K
04592700 60000000
Code creator: Ro
|
|
|
Future Fly (Classic Controller) [TheMrx1983, Skullface, Ro] |
Posted by: _Ro - 08-05-2024, 02:05 AM - Forum: Offline Non-Item
- Replies (2)
|
|
Future Fly (Classic Controller) [TheMrx1983, Skullface, Ro]
For Classic Controller only. You can find for other controllers in this site.
Skullface edited Future Fly Lite to work on Classic Controller but since it's the lite version it lacked straffing up/down/left/right. From his source, I added straffing and cleaned up Future Fly code, some unnecessary parts were improved and I also the code be a single C2 hook, it no longer needs the extra C2 hook which writes your player ID to free memory to be read in Future Fly and the flight values such as speed, turning strength etc being written in free memory addresses.
The code works like the GameCube version. To activate the code, push the right stick up to go up and enable. Press A and B at the same time to disable.
Can be used with "No Camera Height Shift in Air" for better view (Normal camera in air, https://mariokartwii.com/showthread.php?tid=2222)
To change activator, change 2434XXXX 3C800000 to 2834XXXX YYYYZZZZ and the deactivator 2834XXXX FFAF0050 to 2834XXXX YYYYZZZZ (ZZZZ: Button value, YYYY: FFFF - Button value). XXXX: Controller Address (First line one is different because it is stick address instead of button, modify to button one if you want to enable with button), ZZZZ: Button value, YYYY: FFFF - Button value) Button values: https://mariokartwii.com/showthread.php?...ton+values
NTSC-U
243414D8 3C800000
C25AA6FC 00000027
EC7A01F2 3D80809C
818CD110 818C0020
3D60809C 816B8F68
896B0B84 1D6B0004
7D8C5A14 818C0000
818C0024 818CFFF8
818C0008 818C0008
398C0010 7C0CF000
408200F0 4800001D
43700000 42F00000
43400000 43700000
BD500000 BD800000
7E4802A6 3DE08034
C03E0068 C33E006C
C2FE0070 3DC0808B
C20E053C A1CF14C2
C2520010 FE209050
FE508CAE C2320000
C28F14D4 FDE0A050
FE907D2E C1F2000C
EDF403F2 C27EFF8C
EE7303F2 EC219828
C27EFFAC EE7303F2
EEF79828 C20F14D8
C1F20008 EE1003F2
EF39802A 71CC0040
41820014 C2320004
FE208850 FE409050
4800000C 71CC0010
41820028 C27EFF94
EE730472 EC21982A
C27EFFA4 EE730472
EF39982A C27EFFB4
EE730472 EEF7982A
C26F14CC EE5204F2
D25E00E8 C26F14D0
FE609850 C2320014
EE3104F2 D23E00E4
60000000 00000000
E0000000 00000000
283414C2 FFAF0050
045AA6FC EC7A01F2
E0000000 00000000
PAL
24345858 3C800000
C25B5624 00000027
EC7A01F2 3D80809C
818C18F8 818C0020
3D60809C 816BD728
896B0B84 1D6B0004
7D8C5A14 818C0000
818C0024 818CFFF8
818C0008 818C0008
398C0010 7C0CF000
408200F0 4800001D
43700000 42F00000
43400000 43700000
BD500000 BD800000
7E4802A6 3DE08034
C03E0068 C33E006C
C2FE0070 3DC0808B
C20E4BEC A1CF5842
C2520010 FE209050
FE508CAE C2320000
C28F5854 FDE0A050
FE907D2E C1F2000C
EDF403F2 C27EFF8C
EE7303F2 EC219828
C27EFFAC EE7303F2
EEF79828 C20F5858
C1F20008 EE1003F2
EF39802A 71CC0040
41820014 C2320004
FE208850 FE409050
4800000C 71CC0010
41820028 C27EFF94
EE730472 EC21982A
C27EFFA4 EE730472
EF39982A C27EFFB4
EE730472 EEF7982A
C26F584C EE5204F2
D25E00E8 C26F5850
FE609850 C2320014
EE3104F2 D23E00E4
60000000 00000000
E0000000 00000000
28345842 FFAF0050
045B5624 EC7A01F2
E0000000 00000000
NTSC-J
243451D8 3C800000
C25B4FA4 00000027
EC7A01F2 3D80809C
818C18F8 818C0020
3D60809C 816BC788
896B0B84 1D6B0004
7D8C5A14 818C0000
818C0024 818CFFF8
818C0008 818C0008
398C0010 7C0CF000
408200F0 4800001D
43700000 42F00000
43400000 43700000
BD500000 BD800000
7E4802A6 3DE08034
C03E0068 C33E006C
C2FE0070 3DC0808B
C20E3D4C A1CF51C2
C2520010 FE209050
FE508CAE C2320000
C28F51D4 FDE0A050
FE907D2E C1F2000C
EDF403F2 C27EFF8C
EE7303F2 EC219828
C27EFFAC EE7303F2
EEF79828 C20F51D8
C1F20008 EE1003F2
EF39802A 71CC0040
41820014 C2320004
FE208850 FE409050
4800000C 71CC0010
41820028 C27EFF94
EE730472 EC21982A
C27EFFA4 EE730472
EF39982A C27EFFB4
EE730472 EEF7982A
C26F51CC EE5204F2
D25E00E8 C26F51D0
FE609850 C2320014
EE3104F2 D23E00E4
60000000 00000000
E0000000 00000000
283451C2 FFAF0050
045B4FA4 EC7A01F2
E0000000 00000000
NTSC-K
24333858 3C800000
C25A367C 00000027
EC7A01F2 3D80809B
818CFF38 818C0020
3D60809B 816BBD68
896B0B84 1D6B0004
7D8C5A14 818C0000
818C0024 818CFFF8
818C0008 818C0008
398C0010 7C0CF000
408200F0 4800001D
43700000 42F00000
43400000 43700000
BD500000 BD800000
7E4802A6 3DE08033
C03E0068 C33E006C
C2FE0070 3DC0808A
C20E3064 A1CF3842
C2520010 FE209050
FE508CAE C2320000
C28F3854 FDE0A050
FE907D2E C1F2000C
EDF403F2 C27EFF8C
EE7303F2 EC219828
C27EFFAC EE7303F2
EEF79828 C20F3858
C1F20008 EE1003F2
EF39802A 71CC0040
41820014 C2320004
FE208850 FE409050
4800000C 71CC0010
41820028 C27EFF94
EE730472 EC21982A
C27EFFA4 EE730472
EF39982A C27EFFB4
EE730472 EEF7982A
C26F384C EE5204F2
D25E00E8 C26F3850
FE609850 C2320014
EE3104F2 D23E00E4
60000000 00000000
E0000000 00000000
28333842 FFAF0050
045A367C EC7A01F2
E0000000 00000000
Code: #============================================================#
# Source #
#------------------------------------------------------------#
# Future Fly Address Ports: #
# RMCE - 0x805AA6FC #
# RMCP - 0x805B5624 #
# RMCJ - 0x805B4FA4 #
# RMCK - 0x805A367C #
#============================================================#
.set region, '' #Plug in e,p,j,k for compilation region
.set _AccelButton, 0x0010
.set _BackButton, 0x0040
.set _ForwSpeed, 0x0000
.set _BackSpeed, 0x0004
.set _UDStrafe, 0x0008
.set _LRStrafe, 0x000C
.set _LRTurnStrength, 0x0010
.set _UDTurnStrength, 0x0014
.if (region == 'E' || region == 'e')
.set ptr_raceData, 0x809B8F68
.set ptr_playerBase, 0x809BD110
.set addr_controllerButtons, 0x803414C2
.set addr_controllerRightUDStick, 0x803414D8
.set addr_controllerRightLRStick, 0x803414D4
.set addr_controllerLeftUDStick, 0x803414D0
.set addr_controllerLeftLRStick, 0x803414CC
.set addr_floatUsedForMirroring, 0x808B053C
.elseif (region == 'P' || region == 'p')
.set ptr_raceData, 0x809BD728
.set ptr_playerBase, 0x809C18F8
.set addr_controllerButtons, 0x80345842
.set addr_controllerRightUDStick, 0x80345858
.set addr_controllerRightLRStick, 0x80345854
.set addr_controllerLeftUDStick, 0x80345850
.set addr_controllerLeftLRStick, 0x8034584C
.set addr_floatUsedForMirroring, 0x808B4BEC
.elseif (region == 'J' || region == 'j')
.set ptr_raceData, 0x809BC788
.set ptr_playerBase, 0x809C18F8
.set addr_controllerButtons, 0x803451C2
.set addr_controllerRightUDStick, 0x803451D8
.set addr_controllerRightLRStick, 0x803451D4
.set addr_controllerLeftUDStick, 0x803451D0
.set addr_controllerLeftLRStick, 0x803451CC
.set addr_floatUsedForMirroring, 0x808B3D4C
.set addr_controllerUDStick, 0x803414D8
.elseif (region == 'K' || region == 'k')
.set ptr_raceData, 0x809ABD68
.set ptr_playerBase, 0x809AFF38
.set addr_controllerButtons, 0x80333842
.set addr_controllerRightUDStick, 0x80333858
.set addr_controllerRightLRStick, 0x80333854
.set addr_controllerLeftUDStick, 0x80333850
.set addr_controllerLeftLRStick, 0x8033384C
.set addr_floatUsedForMirroring, 0x808A3064
.else
.err
.endif
fmuls f3,f26,f7 # Original instruction
#Only apply to Player 1
lis r12, ptr_playerBase@ha
lwz r12, ptr_playerBase@l (r12)
lwz r12, 0x20 (r12)
lis r11, ptr_raceData@ha
lwz r11, ptr_raceData@l (r11)
lbz r11, 0xB84 (r11)
mulli r11, r11, 4
add r12, r12, r11
lwz r12, 0 (r12)
lwz r12, 0x24 (r12)
lwz r12, -0x8 (r12)
lwz r12, 0x8 (r12)
lwz r12, 0x8 (r12)
addi r12, r12, 0x10
cmpw r12, r30
bne end
bl FlightValues
.long 0x43700000 #Forward speed value
.long 0x42F00000 #Backward speed value
.long 0x43400000 #Strafe Up/Down speed value
.long 0x43700000 #Strafe Left/Right speed value
.long 0xBD500000 #Left/Right turn strenght value
.long 0xBD800000 #Up/Down turn strenght value
FlightValues:
mflr r18
lis r15, addr_controllerButtons@ha
# Load coordinates
lfs f1, 0x0068 (r30)
lfs f25, 0x006C (r30)
lfs f23, 0x0070 (r30)
#Invert turning in Mirror Mode
lis r14, addr_floatUsedForMirroring@ha
lfs f16, addr_floatUsedForMirroring@l (r14)
#Fly Forward/Backwards
#Controller Address
lhz r14, addr_controllerButtons@l (r15)
lfs f18, _LRTurnStrength (r18)
fneg f17, f18
fsel f18, f16, f18, f17
lfs f17, _ForwSpeed (r18)
strafe:
# Strafe Left/Right
lfs f20, addr_controllerRightLRStick@l (r15)
fneg f15, f20
fsel f20, f16, f20, f15
lfs f15, _LRStrafe (r18)
fmuls f15, f20, f15
lfs f19, -0x74 (r30)
fmuls f19, f19, f15
fsubs f1, f1, f19
lfs f19, -0x54 (r30)
fmuls f19, f19, f15
fsubs f23, f23, f19
# Strafe Up/Down
lfs f16, addr_controllerRightUDStick@l (r15)
lfs f15, _UDStrafe (r18)
fmuls f16, f16, f15
fadds f25, f25, f16
andi. r12,r14, _BackButton
beq forward
lfs f17, _BackSpeed (r18)
fneg f17, f17
fneg f18, f18
b moveCalc
forward:
andi. r12, r14, _AccelButton
beq turning
moveCalc:
lfs f19, -0x6C (r30)
fmuls f19, f19, f17
fadds f1, f1, f19
lfs f19, -0x5C (r30)
fmuls f19, f19, f17
fadds f25, f25, f19
lfs f19, -0x4C (r30)
fmuls f19, f19, f17
fadds f23, f23, f19
turning:
#Turn left/right
lfs f19, addr_controllerLeftLRStick@l (r15)
fmuls f18, f18, f19
stfs f18, 0x00E8 (r30)
#Turn up/down
lfs f19, addr_controllerLeftUDStick@l (r15)
fneg f19, f19
lfs f17, _UDTurnStrength (r18)
fmuls f17, f17, f19
stfs f17, 0x00E4 (r30)
end:
#============================================================#
Code credits: mdmwii (Original Free Fly code), TheMrx1983 (Made Future Fly out of Free Fly code), Skullface (Future Fly Light for Classic Controller), Ro (Added straffing, improved code and source, made it be a single C2 write code)
|
|
|
|