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

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.

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

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:

Either way, if you want to be 100%, completely sure, go ahead and build Mupen64Plus yourself either using the easily verifiable build system, or by manually building from upstream.

* 2024 Jan 22 update: I might try optimizing the ROM myself some day. If you want to see that happen sooner, subscribe on Patreon to move that up the priority list :tro: - I plan on N64 compatibility, not just 64 MB, for that I'll need a console and a flashcart though.