What's new

Mario Kart multiplayer Grand Prix?

Hi there,

I've been playing Mario Kart 64 a lot lately and I was wondering if it was possible to hack the game so that you can play a proper Grand Prix with CPU opponents and everything in 3 player or 4 player mode. It's probably not a new idea but would be a major/complicated hack, I guess, right?
 

smcd

Active member
No idea, but I would guess there might be some lag if it were possible due to running the CPU players as well as the input for multiple players
 

zoinkity

New member
Well, the only real issue would be total ram, and you would definately recieve some lag when things like the replay screens are on screen (they display old display buffers, if memory serves). Honestly, you could probably just remove a bot or two to fix it or kill specific annoying objects.

The only thing I've ever done with the game was a small patch to allow same-character selections, but chances are this would involve little more than killing a branch when player count exceeds 2. Actually, I've been somewhat interested in getting it to play music in 3-4 player multi.

The best guy to ask about this would be HyperHacker, who was making a course editor some time back with what had to be the worst click detection ever. Still, he did hack the snot out of the game so he might have happened across exactly the spot you'll need to poke at.
 
Last edited:

zoinkity

New member
This kinda piqued my interest, so taking a look at it.
Just testing by forcing 3-4 player VS into GP, and there's only maybe two problems to work out. By the way, for a Nintendo game the code is surprisingly redundant. That really works in our favour, simply because it means there's a lot of potential room that can be cleaned out for custom code. Addresses mentioned below are from NMKE00

The reason it doesn't inherantly work is that there isn't a specific handler for GP 3-4 player. The racers are never initialized, so you'd get whatever racer setup happened to be loaded last--they don't reinitialize memory inbetween.
Initialization occurs via 8003C0F0. At 8003C1F0 it branches outward into the specific setups, and each of these branches based on mode. The funny thing about that is the redundant code. Not only is almost everything leading up the initializer routines about the same, but the initializers themselves (80039F44: 1P, 7NPC; 8003A9F0: 2P, 6NPC) are virtually mirrors of one another.
For testing purposes, rerouting 3-4 player to one of these will load 3-4 player screen setup with the given number of bots for whichever initializer you called. So, yes, you'd be watching a bot in said slot.
If you wanted to patch it really quick, just pass 800393C0 E000 instead of B000 in SP+1C. The flags indicate which are player or bot controlled, and this is part of the change required to patch it up.

This is surprisingly easy to fix. Since both initializers are little more than clones, you only need to write one that loops for the number of players with player initialization values, then loops for remaining count with bot values.

There is one other bug that hasn't been traced yet. Although the full compliment of bots is loaded in a 3-4P GP and they appear in the little bar at the bottom, only four racers are used in the race. The rest are spawned in but not rendered, though collisions obviously would work fine. Probably nothing more than a #players branch someplace. Until it gets fixed though none of these courses would ever finish. The horror!

So, I'll take a whack at it Sunday and see if it can't be patched in. Oh, and I'll see what's involved in doing the menu. Depends how they built it, but probably not a huge ordeal.
 
OP
B

Bad Randolph

Member
Whoa. To be honest, I didn't understand everything you said but it sounds like you really know what you're doing :satisfied
It's great you care about the issue!
 

zoinkity

New member
Part way there. Annoyingly, before checking game mode they always sort things out by screen mode.
So far, got all 8 sims in a GP setup match, balloons and everything, all ranked up right and each one unique, and they drive around properly. The remaining issues are:
  • Stage doesn't end. In other words, not really running the GP race finished check.
  • Lower screens don't update properly, so there's graphics glitches when multiple racers are involved. They specificly update certain screens on certain setups, so just need to loop it to fix it. Rather easy to do.
  • UI is specific to mode, so you don't have the lap time, proper place number, etc. Again, just need to tell it to do by mode, not screen.
  • I doubt very much that it will track all the GP stats from level to level right.
So far, you can do one fantastic GP course with 3-4 players with only minor errors.
 

Attachments

  • really!.PNG
    really!.PNG
    380.7 KB · Views: 19,472
Last edited:

theboy181

New member
Part way there. Annoyingly, before checking game mode they always sort things out by screen mode.
So far, got all 8 sims in a GP setup match, balloons and everything, all ranked up right and each one unique, and they drive around properly. The remaining issues are:
  • Stage doesn't end. In other words, not really running the GP race finished check.
  • Lower screens don't update properly, so there's graphics glitches when multiple racers are involved. They specificly update certain screens on certain setups, so just need to loop it to fix it. Rather easy to do.
  • UI is specific to mode, so you don't have the lap time, proper place number, etc. Again, just need to tell it to do by mode, not screen.
  • I doubt very much that it will track all the GP stats from level to level right.
So far, you can do one fantastic GP course with 3-4 players with only minor errors.

Update please..

Were you able to get any further with this? Can you share the patch?

Thanks
 

Top