Page 1 of 2
N64 game patches to increase N64 Core compatibility
Posted: Sun Jun 30, 2024 11:29 am
by Ruleset
I made some patches for Jet Force Gemini, Resident Evil 2 and others to circumvent some of the limitations of the DE-10 nano that the N64 core suffers from. These are .BPS patches, you can use software like "beat" to patch your original .z64 files. I included patches for both NTSC and PAL.
We have been testing these games in the mister discord and so far I haven't had any crash reports yet but it is very possible there are still some issues.
For those curious what I changed:
Conker's bad fur day / Gauntlet legends:
These games are fixed in the latest N64 Core release.
Jet Force Gemini:
This one is pretty simple, there is a RSP timing check that the game does, which is documented here: https://github.com/ares-emulator/ares/issues/129
I just removed any conditionals in this check so it always passes. So far the patch seems pretty stable with multiple people finishing the game.
Resident Evil 2:
I added a 16k cycle wait for the main CPU every time the RSP is resumed. This gives the RSP more time to do its thing, including DMA's which might suffer from random latency due to DE-10 Nano DDR3.
Polaris Snocross:
Essentially same fix as RE2.
Batman Beyond:
It looks like the devs just forgot to enable a 30 fps framecap for the main game and never noticed because a real n64 isn't fast enough for 60 fps. Luckily the autorun demo does have the cap enabled so I was able to find that and use it for the regular game.
Knife Edge:
theboy181 on github https://github.com/mupen64plus/mupen64p ... 1989025250 had previously made some cheat codes to slow down the game on emulator but they weren't really suited for the mister core. It did send me in the right direction, there is a framerate limiter that sets the limit to 20fps when there is text displayed. I modified this to also limit the framerate to 30 fps during normal gameplay. I got pretty far into the game and the speed seemed normal compared to real n64 footage I found.
Rugrats in Paris:
This game needed a delay before RSP resume but also after a PI DMA starts.
Mario Kart 64 (for Turbo core):
In certain multiplayer modes the game speeds up the gameplay to compensate for low framerates. In the turbo core (and Project 64 where these changes are always enabled) the game can run full speed making the game run too fast, so these patches revert this speedup. In the regular core the game can also run a little too fast but not always, so these patches may not be appropriate in that case. I added them in a "Turbo Core" folder in the archive.
Blues Brothers 2000:
Adjusted speed of alligator. There is another chase level later on which will probably need adjusting as well. If anyone ever gets there send me a save file so I can have a look at it.
Nintama Rantarou Game Gallery 64:
This needed a somewhat long delay before RSP resume. Don't really know why this fixes the crash since it is also broken in Ares. Didn't test this for very long, might need some more delay if it still crashes.
Thanks everyone for testing!
edit 01/07/2024: Added Spanish CBFD patch, use the original NTSC ROM.
edit 02/07/2024: Added Portuguese CBFD patch.
edit 04/07/2024: Added Resident Evil 2 NTSC (1.0) and (1.1), PAL and JP (Biohazard 2).
edit 02/08/2024: Added Polaris Snocross.
edit 07/08/2024: Added Gauntlet Legends.
edit 08/08/2024: Added Gauntlet Legends PAL and JP.
edit 12/08/2024: Added Batman Beyond.
edit 13/08/2024: Added Batman Beyond PAL.
edit 15/08/2024: Added Knife Edge.
edit 16/08/2024: Added Star Twins (Jet Force Gemini JP) and Knife Edge JP/PAL .
edit 18/08/2024: Added Rugrats in Paris and Mario Kart 64 (for turbo core) .
edit 23/08/2024: Deleted Conker and Gauntlet Legends since they are fixed on the core now. Added Blues brothers and Nintama Rantarou Game Gallery 64.
edit 18/09/2024: Added portuguese patch for Jet Force Gemini. To get this to work you will have to first patch a NTSC .z64 rom with the translation patch (Translations folder) and then patch it with the fix for the N64 Core. Once yxkalle updates the n64 database only the first step is needed.
IMPORTANT NOTE 05/09/2024: Thanks to yxkalle the patch data is now included in N64-database.txt and the latest mister main will apply them automatically. So no manual patching is required when using the latest mister main.
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Jun 30, 2024 12:36 pm
by bootsector
THANK YOU for your outstanding work on these, Ruleset!!! You’re awesome!!!!!
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Jun 30, 2024 3:19 pm
by fabrisco
Thank you!!!! Amazing work!!
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Jun 30, 2024 5:33 pm
by owlnonymous
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Jun 30, 2024 6:24 pm
by naxeras
Than you, it is possible to port the patch for the translated to spanish rom for conker?
This is the spanish patch: https://www.romhacking.net/translations/2940/
I have tried patching the rom with the translation or patching it and then translating it but without success.
Thank you so much for the work.
Regards
Re: N64 game patches to increase N64 Core compatibility
Posted: Mon Jul 01, 2024 1:37 pm
by Ross_Jolet
Does anyone know what the CRC is of CBFD (Uncensored) version that is compatible with the patch?
Re: N64 game patches to increase N64 Core compatibility
Posted: Mon Jul 01, 2024 1:46 pm
by Lightwave
Ross_Jolet wrote: ↑Mon Jul 01, 2024 1:37 pm
Does anyone know what the CRC is of CBFD (Uncensored) version that is compatible with the patch?
You need to use the standard ROM, with the uncensored-specific patch (the patch itself will add the uncensored bits)
Re: N64 game patches to increase N64 Core compatibility
Posted: Mon Jul 01, 2024 1:48 pm
by Ruleset
naxeras wrote: ↑Sun Jun 30, 2024 6:24 pm
Than you, it is possible to port the patch for the translated to spanish rom for conker?
This is the spanish patch: https://www.romhacking.net/translations/2940/
I have tried patching the rom with the translation or patching it and then translating it but without success.
Thank you so much for the work.
Regards
I added the Spanish patch, use the original NTSC ROM.
Re: N64 game patches to increase N64 Core compatibility
Posted: Mon Jul 01, 2024 7:00 pm
by PistolsAtDawn
This is excellent news! Thank you so much for this, Ruleset!
Re: N64 game patches to increase N64 Core compatibility
Posted: Mon Jul 01, 2024 9:38 pm
by Primeira_Fase
Ruleset wrote: ↑Sun Jun 30, 2024 11:29 am
I made some patches for Conker's bad fur day and Jet Force Gemini to circumvent some of the limitations of the DE-10 nano that the N64 core suffers from. These are .BPS patches, you can use software like "beat" to patch your original .z64 files. I included patches for both NTSC and PAL. The uncensored patch needs to be used with the original NTSC release, not the already uncensored ROM.
We have been testing these games in the mister discord and so far I haven't had any crash reports yet but it is very possible there are still some issues.
For those curious what I changed:
Conkers bad fur day:
The game does not load all instruction data in RAM all at once. It uses the TLB to swap data in and out, so when the program jumps to a part of memory that hasn't been filled yet a TLB exception is called to handle this. Here the game looks for the least used block of assigned memory, removes it from the memory map and eventually copies the new instruction data to this block. It also removes the entry from the TLB.
I am not exactly sure what goes wrong on the mister core but instead of removing the entry in the memory map and the TLB I just point the refill code to the expansion pack and increment a pointer by 0x1000 every time such a refill happens. When the expansion pack is full I reset this expansion pack pointer and purge the entire memory map as well as the TLB. This can cause a small hitch every hour or so but conker is full of these small hitches so I doubt you'll notice.
Jet Force Gemini:
This one is pretty simple, there is a RSP timing check that the game does, which is documented here: https://github.com/ares-emulator/ares/issues/129
I just removed any conditionals in this check so it always passes. I haven't played the game past the second level but it seems to work for now.
Thanks everyone for testing!
edit 01/07/2024: Added Spanish CBFD patch, use the original NTSC ROM.
Can you make a patch for Brazilian Uncensored ROM?
Re: N64 game patches to increase N64 Core compatibility
Posted: Tue Jul 02, 2024 12:15 am
by Waifu4Life
Re: N64 game patches to increase N64 Core compatibility
Posted: Tue Jul 02, 2024 1:12 pm
by naxeras
Ruleset wrote: ↑Mon Jul 01, 2024 1:48 pm
naxeras wrote: ↑Sun Jun 30, 2024 6:24 pm
Than you, it is possible to port the patch for the translated to spanish rom for conker?
This is the spanish patch: https://www.romhacking.net/translations/2940/
I have tried patching the rom with the translation or patching it and then translating it but without success.
Thank you so much for the work.
Regards
I added the Spanish patch, use the original NTSC ROM.
thanks a lot ruleset
Re: N64 game patches to increase N64 Core compatibility
Posted: Tue Jul 02, 2024 2:44 pm
by Ruleset
Primeira_Fase wrote: ↑Mon Jul 01, 2024 9:38 pm
Can you make a patch for Brazilian Unsensored ROM?
I added the Portuguese patch.
Re: N64 game patches to increase N64 Core compatibility
Posted: Tue Jul 02, 2024 4:59 pm
by Neocaron
I know european versions crash less probably because they are running at a lower max framerates causing less memory issues? But notheless it would be nice to have patches for these versions as well, thanks for all the work here. Amazing!
Re: N64 game patches to increase N64 Core compatibility
Posted: Tue Jul 02, 2024 5:19 pm
by Primeira_Fase
Ruleset wrote: ↑Tue Jul 02, 2024 2:44 pm
Primeira_Fase wrote: ↑Mon Jul 01, 2024 9:38 pm
Can you make a patch for Brazilian Unsensored ROM?
I added the Portuguese patch.
Legend! Thanks
Re: N64 game patches to increase N64 Core compatibility
Posted: Wed Jul 03, 2024 5:23 pm
by ADV7842
thank you man, really hyped to test these out!
Re: N64 game patches to increase N64 Core compatibility
Posted: Thu Jul 04, 2024 4:18 pm
by Ruleset
I added Resident Evil 2 NTSC (1.0) and (1.1), PAL and JP (Biohazard 2). So far no crashes reported.
Re: N64 game patches to increase N64 Core compatibility
Posted: Fri Jul 05, 2024 1:17 am
by rhester72
Ruleset wrote: ↑Thu Jul 04, 2024 4:18 pm
I added Resident Evil 2 NTSC (1.0) and (1.1), PAL and JP (Biohazard 2). So far no crashes reported.
Would you mind indicating what the problems are you're fixing? It's both fascinating as a user and potentially valuable to core developers. I don't think Robert's core was as bad off as he seemed to think.
Re: N64 game patches to increase N64 Core compatibility
Posted: Fri Jul 05, 2024 3:31 am
by Krypto
rhester72 wrote: ↑Fri Jul 05, 2024 1:17 am
Would you mind indicating what the problems are you're fixing? It's both fascinating as a user and potentially valuable to core developers. I don't think Robert's core was as bad off as he seemed to think.
Check out Ruleset's first post.
Thanks for posting the patches in this forum Ruleset! Some of us don't want to join yet another venue...
Re: N64 game patches to increase N64 Core compatibility
Posted: Fri Jul 05, 2024 9:14 am
by PhDTenma
Thank you very much for these patches!
Re: N64 game patches to increase N64 Core compatibility
Posted: Fri Jul 05, 2024 10:20 am
by pbsk8
CBFDforN64CorePatchNTSCUncensoredv2
this uncensored is prototype or a final retail?
Re: N64 game patches to increase N64 Core compatibility
Posted: Fri Jul 05, 2024 10:39 am
by Ruleset
pbsk8 wrote: ↑Fri Jul 05, 2024 10:20 am
CBFDforN64CorePatchNTSCUncensoredv2
this uncensored is prototype or a final retail?
Are there multiple versions? As far as I know there is one dump of the uncensored version which this patch is based of. Use with regular NTSC ROM.
Re: N64 game patches to increase N64 Core compatibility
Posted: Fri Jul 05, 2024 11:43 am
by rhester72
Krypto wrote: ↑Fri Jul 05, 2024 3:31 am
Check out Ruleset's first post.
Oops! Thank you =)
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Jul 07, 2024 8:30 pm
by fabrisco
Ruleset wrote: ↑Sun Jun 30, 2024 11:29 am
I made some patches for Conker's bad fur day, Jet Force Gemini and Resident Evil 2 to circumvent some of the limitations of the DE-10 nano that the N64 core suffers from. These are .BPS patches, you can use software like "beat" to patch your original .z64 files. I included patches for both NTSC and PAL. The uncensored Conker patch needs to be used with the original NTSC release, not the already uncensored ROM.
We have been testing these games in the mister discord and so far I haven't had any crash reports yet but it is very possible there are still some issues.
For those curious what I changed:
Conker's bad fur day:
The game does not load all instruction data in RAM all at once. It uses the TLB to swap data in and out, so when the program jumps to a part of memory that hasn't been filled yet a TLB exception is called to handle this. Here the game looks for the least used block of assigned memory, removes it from the memory map and eventually copies the new instruction data to this block. It also removes the entry from the TLB.
I am not exactly sure what goes wrong on the mister core but instead of removing the entry in the memory map and the TLB I just point the refill code to the expansion pack and increment a pointer by 0x1000 every time such a refill happens. When the expansion pack is full I reset this expansion pack pointer and purge the entire memory map as well as the TLB. This can cause a small hitch every hour or so but conker is full of these small hitches so I doubt you'll notice.
Jet Force Gemini:
This one is pretty simple, there is a RSP timing check that the game does, which is documented here: https://github.com/ares-emulator/ares/issues/129
I just removed any conditionals in this check so it always passes. So far the patch seems pretty stable with multiple people finishing the game.
Resident Evil 2:
I added a 16k cycle wait for the main CPU every time the RSP is resumed. This gives the RSP more time to do its thing, including DMA's which might suffer from random latency due to DE-10 Nano DDR3.
Thanks everyone for testing!
edit 01/07/2024: Added Spanish CBFD patch, use the original NTSC ROM.
edit 02/07/2024: Added Portuguese CBFD patch.
edit 04/07/2024: Added Resident Evil 2 NTSC (1.0) and (1.1), PAL and JP (Biohazard 2).
Hi! Is it possible to port the patch for the 2 Conker’s Beta ROM? Just finish the rental game and I curious to explore the differences between the rentail and the prototypes, especially the one that game esoterica use at his channel.
Your patch is the best thing that happens since the core has a public release. Thank you for you work!
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Aug 18, 2024 3:09 pm
by mike911
Thank you very much Ruleset! Thanks to the patches as of today, all games are now playable on the core?
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Aug 18, 2024 4:10 pm
by Ruleset
mike911 wrote: ↑Sun Aug 18, 2024 3:09 pm
Thank you very much Ruleset! Thanks to the patches as of today, all games are now playable on the core?
You can look at the issues page for any remaining bugs. Most games on there have been fixed either with the new core or with the patches but there are still some minor bugs/glitches left.
https://github.com/MiSTer-devel/N64_MiSTer/issues
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Aug 18, 2024 9:41 pm
by rhester72
Was a new core released yet? I know some fixes were discussed but never saw a core release announcement.
Re: N64 game patches to increase N64 Core compatibility
Posted: Sun Aug 18, 2024 11:23 pm
by Bio
rhester72 wrote: ↑Sun Aug 18, 2024 9:41 pm
Was a new core released yet? I know some fixes were discussed but never saw a core release announcement.
I just ran update all and there's a new core with today's date.
Re: N64 game patches to increase N64 Core compatibility
Posted: Mon Aug 19, 2024 9:18 pm
by nymous
Do we still need patches for games with the last update?
Re: N64 game patches to increase N64 Core compatibility
Posted: Tue Aug 20, 2024 6:53 am
by FPGA64
nymous wrote: ↑Mon Aug 19, 2024 9:18 pm
Do we still need patches for games with the last update?
Yes