Author Topic: New Mario Kart 64 hack - The CPUs use human items including shells  (Read 3865 times)

0 Members and 1 Guest are viewing this topic.

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1558
  • Karma: +154/-3
    • View Profile
A new mod for Mario Kart 64 has been released, one that allows the computer controlled players to use the same items as the human players.

From the readme.txt file:

What is this patch?

This patch for Mario Kart 64 (USA/NTSC) gives the CPUs in Grand Prix mode some of the same items a human can use.  CPUs can finally fire shells, use multibananas, and triple mushrooms.  Normally CPUs can only use single bananas, stars, ghosts, fake item boxes, single mushroom boosts, and lightning.  They spawn the items all at the same time up to three times per lap and draw from their own item probability tables.  CPUs never used shells, multi-bananas, triple mushrooms, or golden mushrooms.  Through an exhaustive look into the game's code, micro500 and I were able to deduce how CPU players spawn items.  It turns out that a lot of this code never made it into the final game, and has remained hidden for over 20 years in the inside the game's rom.  Some of it it was never fully debugged or finished.  This patch takes most of the unused CPU item spawning code that works and adds it back into the game with some custom assembly code.  If you want to know more about the game's CPU item spawning code, I recommend you look at micro500's excellent notes on the subject here:

https://github.com/micro500/mariokart64/wiki/CPU-Item-Spawning



So what has been tweaked/added?

- CPUs now use the human item probability table instead of their own table.

- CPUs can now use single green shells, single red shells, multibanans, and triple mushrooms.  These items have fully functional (or nearly fully functional) code to handle the logic of CPUs using them.

- The CPU item spawn timing has been staggered so all the characters don't spawn items all at once, giving the game a more "natural" feel.

- Lightning probability for CPUs has been toned down from human values to make the game way less annoying to play.

- If a CPU gets triple shells, they are replaced with single shells of the same type since the game's code lacks a way to handle triple shells for CPUs.

- If a CPU gets a blue shell, it is replaced by a red shell, since the game's code lacks CPU blue shell usage.

- Golden mushrooms are replaced with triple mushrooms because the golden mushroom code for CPUs is unfinished.  If a CPU uses a golden mushroom, there is no timer to stop them from boosting infinitely so they will just zoom past you and win the race."



To download the patch go to:

https://www.romhacking.net/hacks/4802/

Offline nuu

  • Hero Member
  • *****
  • Posts: 1586
  • Karma: +74/-2
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #1 on: November 21, 2019, 08:42 PM »
Nice! Sounds like this finally could add some challenge to this game. I didn't know computer drivers couldn't even use green shells. Still it was a good upgrade to Super Mario Kart where CPUs could only use their own unique items that was mostly just variants of banana peels.

Now the big question: Anyone tried it if it works on a real N64?

Offline CrashOveride

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +7/-0
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #2 on: November 21, 2019, 11:05 PM »
It does work, during development it was tested on ED64

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1558
  • Karma: +154/-3
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #3 on: November 21, 2019, 11:29 PM »
It does work, during development it was tested on ED64

Were you part of the hack in any way? Are you aware of any upcoming, or recent hacks for any N64 games that aren't mentioned on this forum, please?

Since there doesn't seem to be any central news website for N64 game hacks, there are probably quite a few mods and hacks that most n64 fans never get to hear about, sadly.

Offline triclon

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #4 on: November 21, 2019, 11:37 PM »
I made the hack.  It works on real hardware.  Let me know if you have any questions.

Edit: I'm open to suggestions on the best way to release these kind of hacks.  I have more in the works for MK64.
« Last Edit: November 21, 2019, 11:49 PM by triclon »

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1558
  • Karma: +154/-3
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #5 on: November 22, 2019, 12:52 AM »
I made the hack.  It works on real hardware.  Let me know if you have any questions.

Edit: I'm open to suggestions on the best way to release these kind of hacks.  I have more in the works for MK64.

Thanks for this, it's really impressive. Have you released any other hardware compatible mods for the N64, for any games? And since you're in the loop, do you know of any good forums or websites with details of N64 rom hacks, please?

Offline nuu

  • Hero Member
  • *****
  • Posts: 1586
  • Karma: +74/-2
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #6 on: November 22, 2019, 04:13 PM »
Thanks for making it triclon! It's great news that it works on hardware!

Offline Grizzmeister

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #7 on: November 26, 2019, 04:16 AM »
I tried this a couple of months ago and kept having issues. The game would lock up on Luigi Raceway just before the tunnel when I would use Wario. Has that been fixed?

Offline triclon

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #8 on: November 27, 2019, 12:23 AM »
Yes those issues should now be fixed.  It was a nasty crash I was finally able to debug.

Offline Grizzmeister

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Re: New Mario Kart 64 hack - The CPUs use human items including shells
« Reply #9 on: November 27, 2019, 12:35 AM »
Have you made a new gameplay video yet triclon?

By the way, Mario Kart 64 is probably one of my favorite N64 games. I have wonderful memories of playing it for hours with friends. Then there's this memory which is just as special.

During the holiday season of 1997 my local Blockbuster Video had replaced Super Mario 64 in the promotional kiosk with Mario Kart 64. As some of you may be aware, MK64 is my favorite game on the N64 having spent literally hundreds if not thousands of hours playing it with friends. I was in Blockbuster browsing around Christmas time because N64 games were still rather pricey back then so I tended to rent before committing to a purchase.

There was a hardcore gamer looking guy of about 19 years old playing Mario Kart 64 and I could tell he had some skills because he was pulling off mini-turbos around just about every corner. He must have noticed me watching him because he arrogantly mentioned that MK64 was also a multiplayer game and would I like to race against him. I hesitated for just a brief moment but instinct got the better of me and before I knew it I had controller number 2 clutched tightly in my hands and I was counter-picking Wario to his choice of Donkey Kong. I guess in the heady moments leading up to our race I reckoned he'd try to bump me off the track if I picked a lighter yet more forgiving character like Toad or Yoshi. I let him pick the track and engine size for our Versus bout - he showed absolutely no mercy by picking Royal Raceway and 150cc so immediately I knew this guy meant business.

We both got the turbo at the start of the race which seemed to take my opponent by surprise and I felt him hesitate ever so slightly as we approached the first turn. He compounded his error further by not getting a full mini-turbo which allowed me to pull ahead as we made our way down to the edge of the lake which rests tranquilly at the center of the track. As luck would have it, I had picked up a single banana as my item and I opted to gamble by dropping it at the bend rather than dragging it behind me. My gambit paid off as I heard DK squeal in distress as he spun out of control and in to the lake. Within ten seconds of the start of the race my opponent standing next to me was already grumbling under his breath. He was far too skilled and hardened a warrior to admit defeat so early as he knew that Mario Kart 64 offers up a wicked level of handicap advantage to those who fall behind, and sure enough his next trip through an item box rewarded him with a deadly red homing shell. By this point I had also been granted a practical implement, given the fact that I was in first place, in the form of a green shell and this time I wisely chose to drag it behind me for defense. Yeah, this guy was quite the tactician as he showed the patience to wait until I was on the other side of the ramp and in the S-turn before launching his homing shell but to no avail as it harmlessly hit the green shell I had in tow.

By now a small crowd had gathered behind us to take in the spectacle. I never dared look back at them as I knew a victory would take every ounce of concentration I could muster but I was aware of the spectators at a near subconscious level. Besides, they occasionally made their presence known by their guttural gasps whenever they sensed a possible lead change.

Royal Raceway is a very long track and we did jockey for position several times as the slightest error on either of our behalves would cost us the lead. It became apparent the winner of this race wasn't going to be the person with the better driving ability but the challenger with the sharper mind and an edge in luck. Much luck was needed too as Versus also ramps up the excitement by placing yellow bombs on the track which can be, and often are game-changers if one errantly collides with them.

On that day chance was on my side as I was able to lay down a suppressing field of bananas near the end of the track. In fact, there were so many bananas strewn about that we both started to slide on them as we headed down the homestretch. My victory was assured only because I was able to pull myself out of the slide by a deft tap of the brake and regain just enough control to stay on the course. As I did - the half dozen or so people watching erupted in to a roar with some of them even stepping forward to pat me on the back.

Yeah... that was a moment that I'll never forget and part of the reason why the N64 will always hold a special place in my heart.

Offline everpuff

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Hey, this is exactly what I am looking for! I am looking for a Gameshark Injector to create ROMs so I can play them in my Wii with Not64 with certain hacks enabled, since Wii64/Not64 lacks support for cheats but it seems this is very hard to do and no one want to spend time on this.

I got  all the codes I wanted to work on, but I actually wouldn't need this if abitalive updates his Mario Kart 64 ROM Hack to enable proper 60FPS without fast forwarding to 200%, also his mod is missing the "Remove Bomb Karts" cheat, which I use for multiplayer versus match races, I tried to inject the two-lines of code that removes the bomb karts into his mod, and viceversa, but the new repatched ROM doesn't boot (stuck at white screen after the Nintendo Logo), it seems that both methods are incompatible and I must resort to manually adding cheat codes to make multiple instances of Mario Kart 64, so I can have one patch for single player and two-player 60FPS, other patch for standard 30FPS and lagfix with the remove bombs cheat, and also some other patches to test wacky stuff. It would be neat if someone could take a look to abitalive's mod and could find the way to insert an option to remove the bomb karts, since he himself was planning to do so anyways but it has been 4 years since his last release and there are no signs of him being active on that either, so either I gotta do that myself at some point once I can gather the resources and the time to learn ASM, MIPS and get it done myself, but for the time being I can't do that for now.
https://prnt.sc/ta2s8y
Does anyone have the Gameshark codes to enable the CPU fire more than just single green shells? Since I got another cheat code to enable the CPU to fire green shells, but it only will shoot them forward and they only get one round of green shells, there is also another cheat for making the other 5 CPUs that normally fall back behind the race, to also keep the pace with the first two leading racers, making the other 5 CPUs more competent overall and with the green shells they can be quite challenging sometimes.
If anyone is interested here is abitalive's Custom Mario Kart 64 https://github.com/abitalive/MarioKart64
Forever Smash 64

Offline triclon

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Hey, this is exactly what I am looking for! I am looking for a Gameshark Injector to create ROMs so I can play them in my Wii with Not64 with certain hacks enabled, since Wii64/Not64 lacks support for cheats but it seems this is very hard to do and no one want to spend time on this.

I got  all the codes I wanted to work on, but I actually wouldn't need this if abitalive updates his Mario Kart 64 ROM Hack to enable proper 60FPS without fast forwarding to 200%, also his mod is missing the "Remove Bomb Karts" cheat, which I use for multiplayer versus match races, I tried to inject the two-lines of code that removes the bomb karts into his mod, and viceversa, but the new repatched ROM doesn't boot (stuck at white screen after the Nintendo Logo), it seems that both methods are incompatible and I must resort to manually adding cheat codes to make multiple instances of Mario Kart 64, so I can have one patch for single player and two-player 60FPS, other patch for standard 30FPS and lagfix with the remove bombs cheat, and also some other patches to test wacky stuff. It would be neat if someone could take a look to abitalive's mod and could find the way to insert an option to remove the bomb karts, since he himself was planning to do so anyways but it has been 4 years since his last release and there are no signs of him being active on that either, so either I gotta do that myself at some point once I can gather the resources and the time to learn ASM, MIPS and get it done myself, but for the time being I can't do that for now.
https://prnt.sc/ta2s8y
Does anyone have the Gameshark codes to enable the CPU fire more than just single green shells? Since I got another cheat code to enable the CPU to fire green shells, but it only will shoot them forward and they only get one round of green shells, there is also another cheat for making the other 5 CPUs that normally fall back behind the race, to also keep the pace with the first two leading racers, making the other 5 CPUs more competent overall and with the green shells they can be quite challenging sometimes.
If anyone is interested here is abitalive's Custom Mario Kart 64 https://github.com/abitalive/MarioKart64

Well it's your lucky day.  I have written a gameshark code injector for MK64.  You'll need python to run it.  You can download it here https://sites.google.com/view/triclons-mario-kart-64-page/utilities/mario-kart-64-gameshark-code-injector

If you want to try adding gameshark codes to the " The CPUs use human items including shells" hack above, open up the python script for it and look for the python list called "gameshark_codes".  You can add more codes in there and they should work.  Check the readme file for how to use the python script to patch a rom.

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1558
  • Karma: +154/-3
    • View Profile
Triclon, have you updated this hack since last September? I've tried to download it from your webpage (https://sites.google.com/view/triclons-mario-kart-64-page/rom-hacks/cpus-use-human-items), to see if it's a later version, but for some reason the download link doesn't seem to exist on that page.

Offline triclon

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
The hack hasn't been updated.  The link at the top of this thread is the best place to get it still.

I need to update my webpage.... weekend project I suppose.