N64 game patches to increase N64 Core compatibility

Ruleset
Posts: 26
Joined: Fri Dec 01, 2023 1:45 pm
Been thanked: 100 times

N64 game patches to increase N64 Core compatibility

Unread post 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.

Attachments
N64CorePatches20240918.zip
(27.16 KiB) Downloaded 178 times
User avatar
bootsector
Posts: 170
Joined: Sun May 24, 2020 6:58 pm
Has thanked: 4 times
Been thanked: 30 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by bootsector »

THANK YOU for your outstanding work on these, Ruleset!!! You’re awesome!!!!!

fabrisco
Posts: 4
Joined: Tue Jun 23, 2020 12:07 am
Has thanked: 1 time
Been thanked: 1 time

Re: N64 game patches to increase N64 Core compatibility

Unread post by fabrisco »

Thank you!!!! Amazing work!!

User avatar
owlnonymous
Posts: 21
Joined: Sun May 24, 2020 6:48 pm
Has thanked: 3 times
Been thanked: 11 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by owlnonymous »

Thanks for making these!

naxeras
Posts: 4
Joined: Tue Feb 06, 2024 11:47 am
Been thanked: 3 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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

Ross_Jolet
Posts: 19
Joined: Sun Jul 12, 2020 2:35 pm
Has thanked: 19 times
Been thanked: 2 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by Ross_Jolet »

Does anyone know what the CRC is of CBFD (Uncensored) version that is compatible with the patch?

Lightwave
Posts: 261
Joined: Sun May 24, 2020 10:06 pm
Has thanked: 136 times
Been thanked: 78 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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)

Ruleset
Posts: 26
Joined: Fri Dec 01, 2023 1:45 pm
Been thanked: 100 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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.

User avatar
PistolsAtDawn
Posts: 358
Joined: Fri Feb 18, 2022 7:29 pm
Has thanked: 303 times
Been thanked: 100 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by PistolsAtDawn »

This is excellent news! Thank you so much for this, Ruleset!

Primeira_Fase
Posts: 38
Joined: Sun Jul 17, 2022 4:13 pm
Has thanked: 6 times
Been thanked: 6 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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?

User avatar
Waifu4Life
Posts: 271
Joined: Fri Jun 19, 2020 5:30 am
Has thanked: 21 times
Been thanked: 47 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by Waifu4Life »

Good stuff, thanks mate!

naxeras
Posts: 4
Joined: Tue Feb 06, 2024 11:47 am
Been thanked: 3 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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

Ruleset
Posts: 26
Joined: Fri Dec 01, 2023 1:45 pm
Been thanked: 100 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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.

Neocaron
Top Contributor
Posts: 375
Joined: Sun Sep 27, 2020 10:16 am
Has thanked: 209 times
Been thanked: 87 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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!

Remastering Classic Game Cinematics: My new Youtube fun, check it out :D
https://www.youtube.com/@neocaron87

Primeira_Fase
Posts: 38
Joined: Sun Jul 17, 2022 4:13 pm
Has thanked: 6 times
Been thanked: 6 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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

User avatar
ADV7842
Posts: 10
Joined: Sat Jan 23, 2021 11:48 am
Has thanked: 4 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by ADV7842 »

thank you man, really hyped to test these out!

Ruleset
Posts: 26
Joined: Fri Dec 01, 2023 1:45 pm
Been thanked: 100 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by Ruleset »

I added Resident Evil 2 NTSC (1.0) and (1.1), PAL and JP (Biohazard 2). So far no crashes reported.

rhester72
Top Contributor
Posts: 1321
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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.

User avatar
Krypto
Posts: 26
Joined: Thu Mar 25, 2021 12:22 am
Has thanked: 27 times
Been thanked: 6 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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...

PhDTenma
Posts: 51
Joined: Thu Oct 20, 2022 9:16 am
Has thanked: 52 times
Been thanked: 9 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by PhDTenma »

Thank you very much for these patches!

pbsk8
Posts: 289
Joined: Mon Dec 28, 2020 4:23 pm
Has thanked: 75 times
Been thanked: 33 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by pbsk8 »

CBFDforN64CorePatchNTSCUncensoredv2

this uncensored is prototype or a final retail?

Ruleset
Posts: 26
Joined: Fri Dec 01, 2023 1:45 pm
Been thanked: 100 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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.

rhester72
Top Contributor
Posts: 1321
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by rhester72 »

Krypto wrote: Fri Jul 05, 2024 3:31 am

Check out Ruleset's first post.

Oops! Thank you =)

fabrisco
Posts: 4
Joined: Tue Jun 23, 2020 12:07 am
Has thanked: 1 time
Been thanked: 1 time

Re: N64 game patches to increase N64 Core compatibility

Unread post 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!

mike911
Posts: 59
Joined: Fri Aug 25, 2023 4:29 pm
Has thanked: 6 times
Been thanked: 17 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by mike911 »

Thank you very much Ruleset! Thanks to the patches as of today, all games are now playable on the core?

Ruleset
Posts: 26
Joined: Fri Dec 01, 2023 1:45 pm
Been thanked: 100 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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

rhester72
Top Contributor
Posts: 1321
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by rhester72 »

Was a new core released yet? I know some fixes were discussed but never saw a core release announcement.

Bio
Posts: 8
Joined: Mon Aug 28, 2023 6:20 pm
Has thanked: 17 times
Been thanked: 6 times

Re: N64 game patches to increase N64 Core compatibility

Unread post 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.

nymous
Posts: 28
Joined: Sat Sep 25, 2021 10:13 pm
Been thanked: 3 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by nymous »

Do we still need patches for games with the last update?

FPGA64
Top Contributor
Posts: 937
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 374 times

Re: N64 game patches to increase N64 Core compatibility

Unread post by FPGA64 »

nymous wrote: Mon Aug 19, 2024 9:18 pm

Do we still need patches for games with the last update?

Yes

Post Reply