What's new

mupen64plus-video-videocore: a WIP optimized mobile graphics plugin

tachiweasel

New member
Hi everyone,

I've been unhappy for a while with the slow performance of existing plugins on mobile, especially on the Raspberry Pi, and for a few weeks now I've been working on a fork of glN64 that's optimized for mobile GPUs. I'm now ready to share the results. I don't have a huge amount of time to work on it, and compatibility is very poor right now. But speed is very good: it's the only plugin I'm aware of that can run most games at full speed on a Raspberry Pi 2. I expect it might also be useful for mobile emulation in general, because the optimizations for the VideoCore IV apply equally well to other mobile GPUs.

The code is here: https://github.com/tachiweasel/mupen64plus-video-videocore

Pull requests are very welcome! I'm pretty sure most of the graphical issues will be fixable without regressing speed if done properly, and most of the slowdowns should be fixable as well with batching and texture caching improvements.

Here's an excerpt from the readme:

mupen64plus-video-videocore is a Nintendo 64 graphics plugin for Mupen64Plus optimized for modern mobile GPUs, especially the Broadcom VideoCore IV used in the Raspberry Pi (though it is not just limited to the Pi and should improve speed on any mobile GPU). Using it, many games run at full speed or nearly full speed on the Raspberry Pi 2. It's descended from the venerable glN64 plugin, like mupen64plus-video-gles2n64. Unlike that plugin, the rendering backend has been fully rewritten and features the following optimizations:

  • An "ubershader" that replicates the functionality of the RDP color combiner without the need to generate shaders on the fly. This eliminates shader changes while rendering the scene.
  • A texture atlas manager that reduces the number of texture state changes during scene rendering to zero.
  • A dedicated rendering thread to work around driver stalls (which are very frequent using Broadcom's drivers).
  • A modern batcher that tries to minimize the number of draw calls and make optimum use of vertex buffer objects.
  • A renderer that renders at the N64 native resolution (320x240) and scales that picture up to the desired resolution. This reduces fragment shading and raster operation load (at the expense of picture quality).

This plugin is incomplete and has many bugs. Most games have varying degrees of graphical issues.

A partial compatibility list:

  • Super Mario 64: very good, a few minor graphical issues, full speed
  • Star Fox 64: good, a few minor graphical issues, some slowdown in non-critical places
  • Mario Kart 64: good, a few minor graphical issues, some slowdown in non-critical places
  • The Legend of Zelda: Ocarina of Time: playable, major graphical issues, occasional slowdown
  • Super Smash Bros.: playable, severe graphical issues
  • Banjo-Kazooie: playable, severe graphical issues, some slowdown in non-critical places
  • GoldenEye 007: not working, severe graphical issues, major slowdown
  • Mario Party: not working due to incorrect VI emulation
 

Richard42

Emulator Developer
This is awesome, it's great to see your work on this new video plugin. A lot of people want to run Mupen64Plus on the raspberry Pi, so I'm sure this video plugin will generate some interest.
 

Top