The 96MB incident - and how to run B3313 on Mupen64Plus

This is optional!

Only Chris' v1.0.2 (and other >64MB ROMs, such as v0.9, Motos Factory accidentally whoops, etc) require this to get it running on Mupen-based emulators - the latest Unabandoned release as of 2024-12-24, A2 Anniversary Edition is compressed down to 48 MB and is fully playable, even on console; A3 is also aiming to fit within 64 MB with the extra content included!

Progress is being made!

There is proper big ROM work (as opposed to the B3313-specific hack below) being committed upstream to mupen64plus-core. Shoutouts to Rosalie - yep, the Mupen GUI one!

RMG ships with this patch already, so that is one way (besides the Parallel Launcher core, or non-Mupen emulators) to run big B3313 versions!

All of that said...


Q: why my bee no work :(

A: get epicly trolled by Mupen64Plus!

You might have noticed the abnormally large file size of the ROM.

Turns out, the developers of Mupen64Plus were not expecting a ROM above the size of 64 MB.
Let's check the source code, specifically src/device/cart/cart_rom.c:

0x03FFFFFF might not mean much at first, so let me convert it to decimal:

Huh...

...uhh...

...uh oh.

What this effectively means is every time the game requests data above the 64 MB barrier, the bitwise operator erases the 0x04000000 bit (for addresses >=64 MB), and it wraps right back around.

Reading data from the 65th megabyte will, with this code in effect, result in data being read from the 1st megabyte instead!

Think to trying to open a PNG file in a text editor.

The game feels the exact same way - it was expecting proper game data, and got something completely fucked instead, which it cannot deal with.
The result: crash.

This issue affects Mupen64Plus as well as forks of it - including the RetroArch Mupen64Plus-Next and ParaLLEl cores.
Parallel Launcher's version of the ParaLLEl core is unaffected as they already patch this issue.

The fix

It is literally as simple as changing this one line of code.

Update 2024-02-04: The Mupen64Plus developers added a check to prevent ROMs above 64 MB from being opened. This value is in src/device/memory/memory.h:

Build Mupen64Plus with these changes applied, and boom, working bee!

But why 96 MB?

Long story short: a combination of ROM Manager not knowing what MIO0 compression is, and Chris absolutely refusing to not bloat the ROM.

This has been solved on A2 Anniversary Edition which implements MIO0 compression. The ROM has been compressed all the way to 48 MB - beyond 64! That by itself was enough, but this version also optimizes the collision and visible geometry for playable performance on N64 console!

But I don't want to build Mupen, I just wanna play beeeeeeeee!

We got you. Download one of our prebuilt binaries according to your target platform:

Mupen64Plus

Windows x86_64 mupen64plus.dll
Windows x86 mupen64plus.dll
Linux x86_64 libmupen64plus.so.2.0.0
Android Mupen64PlusAE

RetroArch/Parallel Launcher

Windows x86_64 mupen64plus_next_libretro.dll
Windows x86 mupen64plus_next_libretro.dll
Linux x86_64 mupen64plus_next_libretro.so
Nintendo Switch mupen64plus_next_libretro_libnx.nro

Is this malware?????? You are kinda sus bro because umm uhh

I would be putting myself at high risk by directly hosting malware on a server that is legally bound to me, instead of anonymously on a random file uploading service.

Besides that, here's the source code where I not only did not add anything more malicious, but I also patched the RSP DMA potential vulnerability before upstream on certain platforms! Check the code and build it yourself if you'd like to be 100% sure (good security practice!)