Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in General Gaming. |
Acmlm's Board - I3 Archive - General Gaming - Diddy Kong Racing Code | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
Zeld Red Paragoomba Since: 11-05-06 Last post: 6434 days Last view: 6431 days |
| ||
Worked on this the past couple of days. I got into N64 assembly hacking just two days ago and this was the result.
803fffc0 - points to an address equal to the speed address -0xc4 Hook to from 80018DA0: j 80400000 nop (short) Get Speed Address: LUI T7, 0x8040 ADDIU T7, T7, 0xFFC0 LW T7, 0x0000 (T7) ADDIU T7, T7, 0x00C4 Get what goes in speed address and store it: LUI T6, 0x8040 ADDIU T6, T6, 0x002C LW T6, 0x0000 (T6) SW T6, 0x0000 (T7) Fix missing instructions and return: LUI T7, 0x8012 J 0x80018DA8 LW T7, 0xAE58 (T7) 80018DA0 0810 80018DA2 0000 80018DA4 2400 81400000 3C0F 81400002 8040 81400004 25EF 81400006 FFC0 81400008 8DEF 8140000A 0000 8140000C 25EF 8140000E 00C4 81400010 3C0E 81400012 8040 81400014 25CE 81400016 002C 81400018 8DCE 8140001A 0000 8140001C ADEE 8140001E 0000 81400020 3C0F 81400022 8012 81400024 0800 81400026 636A 81400028 8DEF 8140002A AE58 Above code pile allows for infinite max speed to hovercraft and plane; car can't move with this code active (really...you'll just drive in place. Dangerous...) Factor in button activated alterations of 8040002c and you can allow for instant acceleration/braking for the car and instant acceleration/infinite max speed for the other vehicles. This is the only way to make the car drivable. You must enter floats to the address, which means 4 codes per button combination...two for each 16 bits of the float, and 2 for the button conditions. You will need to know how to get the hex value of a float and convert it to the appropriate GS code. All vehicles use 0 for 0 speed, but entering 0 will not stop the plane or hovercraft. Instead, it will trick the game into thinking you're not moving and still let you move, allowing for infinite max speed. The car will just plain stop. As for actually going forward at high speeds, you can rely on infinite max speed, or enter 25 (as a float) for your speed to always go that fast when you press the appropriate buttons. 25 for the airplane and hovercraft is about 150+ km/h, and for the car, it is the same, only negative (the car drives backwards O_o). Conversely, entering -25 makes the plane and hovercraft go backwards insanely fast, and the car go forward. 25 is a bit too fast, actually; try 15... Try not to go out of the overworld maps when going that fast; it happens very easily. In actual races, however, the invisible walls will (from what I've seen every time so far) always be able to catch you, so you can just smash down the accelerator and plow through the race, Insane fun... I'll try to look into making some example button codes for reference on how to get the full use of this cheat. I apologize for the length, but hey, assembly hacks aren't only a couple of bytes long Edit: You're definitely going to need an expansion pak for this code to work, or else the game will start executing from memory that doesn't exist. You should know what that means...I think Sukasa trademarked it, though, so I can't say it myself. 'nother Edit: It appears that if you use this code to accelerate at anytime before the announcer says "Go", you can take off and even control which way you're turning to get a head start. A really, really big one. Damn... 'nother Edit: I hit "B" to brake while riding the hovercraft with 8040002c set to 25 (float). I went about three times faster. Apparently I can hit B to go through walls, now... Edit, again: Because of the way the codes are set up, the values only need to be set once and then they can be left alone until you feel like changing them again or need to. So, rather than making the button codes be A and/or B, it might be better to just use combinations of L and another button (is L even used in this game?). You will need to reset the speed value to 0 when entering new areas or when changing vehicles, or your loss of control will hinder playing experience (I was about to enter a boss door, but had left the code at a value that made me drive backwards back into the level I had just come from, in the middle of a cutscene). (edited by Zeld on 02-13-07 05:27 PM) (edited by Zeld on 02-13-07 05:30 PM) (edited by Zeld on 02-13-07 05:46 PM) (edited by Zeld on 02-13-07 06:03 PM) (edited by Zeld on 02-13-07 06:07 PM) |
|||
HyperHacker Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 6431 days Last view: 6431 days |
| ||
Interesting. So this is a global max speed modifier? Nice job, a few things I should point out though.
-What version is this for? -Codes would be better off in General Gaming, you're not modifying the ROM at all. -Floats are generally denoted by writing 25.0. -The standard for comments in ASM is to use a semicolon. Please also try to space out your code to make it readable. If you're using Renegade64, just write plain old "NOP" and it'll make a short NOP. So for example... 803fffc0 ;points to an address equal to the speed address -0xc4
Originally posted by Zeld It may not be safe to assume this value will be initialized to zero, especially since DKR doesn't use the Expansion Pak. If you get strange results using this method, you may have to add a line or two to zero this address if no buttons are pressed. Protip: Save a line like so: 8140002C 0000 D0123456 0078 8140002C 1234 this makes 8040002C be 1234 if 80123456 == 0078, and zero otherwise.
You can generally omit the low 16 bits of a float in hacks like this, nobody will notice. The value may vary by a whopping 0.00781.
See
Nope. (edited by HyperHacker on 02-13-07 09:27 PM) (edited by HyperHacker on 02-13-07 09:29 PM) (edited by HyperHacker on 02-13-07 09:36 PM) |
|||
FreeDOS + Giant Red Koopa Legion: freedos = fritos Since: 11-17-05 From: Seattle Last post: 6430 days Last view: 6430 days |
| ||
Originally posted by HyperHacker k |
|||
Zeld Red Paragoomba Since: 11-05-06 Last post: 6434 days Last view: 6431 days |
| ||
It's not just a max speed modifier and it isn't global if you count that it doesn't work in mutliplayer
I would take what you've said into consideration (as usual), but now is time for celebrate victoly, so I must play around with codez before I bother touching up my crummy coding. I'm really, really sloppy and lazy :\ |
|||
HyperHacker Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 6431 days Last view: 6431 days |
| ||
So it's a max speed modifier and....? |
|||
Zeld Red Paragoomba Since: 11-05-06 Last post: 6434 days Last view: 6431 days |
| ||
It was a pseudo-max speed mod as well as a speed setting code. Directly setting your speed is awesome.
Now, however, it is not a max speed code. It isn't even a speed code, anymore. It is now an acceleration code, but if you set it up right it will act as a speed code and be very flexible in its control. You'll be able to play normally should you choose or need to. Here is the new version: ;Hook to from 80018DA0: j 80400000 nop LUI T7, 0x8040 ADDIU T7, T7, 0xFFC0 LW T7, 0x0000 (T7) ADDIU T7, T7, 0x00C4 LUI T6, 0x8040 ADDIU T6, T6, 0x0058 ;This stuff is in lower case because I recently assembled it into my old source. Floating point addition ftw ;Also, I had to explain to HyperHacker why adding the float form of 1 to a number in plain hex is the same as multiplying by 2^127, and not the same as adding 1 with the aid of a FPP XD lui A0, $8040 addiu A0, A0, $0050 swc1 f0, $0000 (A0) swc1 f1, $0004 (A0) lwc1 f0, $0000 (T7) lwc1 f1, $0000 (T6) add.s f0, f0, f1 swc1 f0, $0000 (T7) lwc1 f0, $0000 (A0) lwc1 f1, $0004 (A0) ;Fix missing instructions and return: LUI T7, 0x8012 J 0x80018DA8 LW T7, 0xAE58 (T7) 80018DA0 0810 80018DA2 0000 80018DA4 2400 81400000 3C0F 81400002 8040 81400004 25EF 81400006 FFC0 81400008 8DEF 8140000A 0000 8140000C 25EF 8140000E 00C4 81400010 3C0E 81400012 8040 81400014 25CE 81400016 004C 81400018 3C04 8140001A 8040 8140001C 2484 8140001E 0050 81400020 E480 81400022 0000 81400024 E481 81400026 0004 81400028 C5E0 8140002A 0000 8140002C C5C1 8140002E 0000 81400030 4601 81400032 0000 81400034 E5E0 81400036 0000 81400038 C480 8140003A 0000 8140003C C481 8140003E 0004 81400040 3C0F 81400042 8012 81400044 0800 81400046 636A 81400048 8DEF 8140004A AE58 Set 8040004C to -.3 with C Left, .3 with C Down, and 0 with B for best tested control. that is, I took out my USB controller and, with the N64 controller layout in mind, I designed the key layout for this code that would best suit a regular player. W00tness. Edit: Yes, the code is just too damned long, but there's not anything that can be done about it from what I could see. There just aren't any routines that have the right values in the registers 100% of the time. DKR abuses routines for multi-functionality so bad it hurts. (edited by Zeld on 02-14-07 11:38 PM) (edited by Zeld on 02-14-07 11:40 PM) |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - General Gaming - Diddy Kong Racing Code | | |