welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

WIP: Playable Nintendo 64 Emulator Available

Wed Oct 16, 2013 3:34 pm

MUPEN64PLUS-RPI
As I have written on previous occasions N64 emulation is probably the zenith of what may be possible on the Raspberry Pi. Well, ric_rpi has taken on the challenge of making a usable/playable N64 emulator and has comprehensively succeeded! It is still in an ‘Alpha’ stage but if you want to test it for yourself the process isn't onerous as the latest version will auto compile and build not just the emulator core, but all the required plugins. It will run in XWindows, although for the best results run in Console (as with ALL emulators!), this also has the advantage of running in fullscreen and at a higher resolution with no detrimental effect on performance. Rendering performance is dependent on the complexity of geometry being displayed combined with graphical effects applied (so don’t be put off by the Mario Head* ‘attract screen’ in Super Mario 64 or ‘animatic scenes’ in other titles) but often reaches ‘almost’ fullspeed and the games listed below are completely playable (although not perfect)! Further work is required to increase performance/ROM compatibility, if you can assist the author please contact him as, so far, this is all his own work as a ‘lone’ programmer.

*Trivia - This was actually not originally included in the title but an early motion capture ‘Tech Demo’ by Giles Goddard, co-programmer of Argonaut’s Star Fox/Wing on the Super Famicom/SNES with Dylan Cuthbert and now a Nintendo employee, to flaunt the hardware to prospective publishers (he also programmed the infamous ‘Zelda’ demo when the system was in its infancy and still called Ultra64 See Here - https://www.youtube.com/watch?v=oav_0MiyJpA). When a bemused Shigeru Miyamoto witnessed Giles at his desk with ‘florescent ping-pong balls’ attached to his face, inquired on what he was doing, suitably impressed Shigeru insisted it was included in the finished game!

BEST TITLES - Run Excellently (See cfg Settings Below)
Super Mario 64
Mario Kart 64
Star Fox 64
The Legend of Zelda: The Ocarina of Time
Turok Dinosaur Hunter

GOOD TITLES - Run Well, But With Performance and/or other Issues (See cfg Settings Below)
The Legend of Zelda: Majora’s Mask - Black screen when opening the inventory/menu
Diddy Kong Racing - Slow but playable
PilotWings 64 - Slow but playable
Goldeneye 64* - Black screen on Start/Mission Select, slow but playable

NON WORKING TITLES - Have Issues causing them not to run correctly
Super Smash Bros 64 - Runs then crashes/freezes
F-Zero 64 - Runs then crashes/freezes
Wave Race 64 - Runs then exits on error when selecting game
Castlevania 64 - Runs then exits on error when selecting game

*Trivia - Originally dismissed as an Aprils Fools Day Joke, there actually is a full ZX Spectrum emulator in the Goldeneye 64 code (along with the entire back catalogue of Ultimate games, Jet Pack, Night Lore etc.). Although deactivated before final release it can be accessed via a patch using an Everdrive cartridge on the original hardware (USA and JAP releases only, it was removed from the EUR ROM).

This is not a comprehensive list, just an indication of the better performing popular ROMS, all titles tested at a 900MHz overclock. Many more titles run and then crash/freeze or exit on error, others don’t work at all (this is often due to Mupen64plus itself, Blast Corps for instance). The compatibility list for Mupen64plus is Here - http://code.google.com/p/mupen64plus/wi ... patibility

TO BUILD/RUN
Hardware - Mupen64plus-Rpi will build on a 512 or 256MEG Raspberry Pi, if you have a 256MEG variety make sure you have the RAM split attributing a MAXIMUM of 64MEG to the GPU (use the config (sudo raspi-config))
Operating System - Raspbian Wheezy
Over Clock - Due to the processing power required it is advised to run Mupen64plus-Rpi with the fastest Over Clock that is stable on your System (use the config (sudo raspi-config))
Dependencies Required - SDL1.2-dev
Additional Files Required - Game ROMS
RAM Split - At least 64MEG to the GPU
Build Time - Approximately 45 minutes to 1 Hour depending on overclock

Install the required dependancies
sudo apt-get install libsdl1.2-dev

Download the source code from Github (on the right you will see a Cloud symbol with Download ZIP, that's the link for the master folder) and extract (uncompress).
Download Link - https://github.com/ricrpi/mupen64plus-rpi

CD into the folder and run the build script
./m64p_build.sh

Once completed add some ROMs and extract them to an appropriate folder (I called mine n64roms),
then CD into the test folder mupen64plus-rpi-master/test (where the executable and plugins are located ) and run the program along with the name and location of the ROM
e.g. ./mupen64plus /home/pi/n64roms/mario.n64 (you can change the file name for easy typing)

CONFIGURATION FILE SETTINGS
The cfg file is located at /home/pi
.confg (Hidden Folder)
mupen64plus/mupen64plus.cfg

Basic changes are identified below, If you are familiar with emulator cfg files feel free to experiment with other settings and report your findings (this will assist with emulator development).

[Video-General]
# Width of output window or fullscreen width
ScreenWidth = (Default: 640)
# Height of output window or fullscreen height
ScreenHeight = (Default: 480)

Change values to alter output resolution, 320x240 is the original hardware res (in most cases), and up to 1024x768 has a minimal impact on performance (1-2% when running from Console)

[Video-Rice]
# Control when the screen will be updated (0=ROM default, 1=VI origin update, 2=VI origin change, 3=CI change, 4=first CI change, 5=first primitive draw, 6=before screen clear, 7=after screen drawn)
ScreenUpdateSetting = (Default: 6)

Change value to alter screen update, can influence correct game performance (a setting of 4 will allow Star Fox 64 to render correctly and PilotWings 64 to display for example)

# Force to use texture filtering or not (0=auto: n64 choose, 1=force no filtering, 2=force filtering)
ForceTextureFilter = (Default: 1)

Change value to enable filtering, smooth’s textures with minimal impact on performance

# Force to use normal alpha blender
NormalAlphaBlender = (Default: False)

Change to True fixes some games so environments display correctly
e.g.
Turok Dinosaur Hunter

# If this option is enabled, the plugin will skip every other frame
SkipFrame = (Default:True)

Change to False fixes some games in conjunction with ScreenUpdateSetting, however, due to every frame being displayed slows emulation
e.g.
Goldeneye 64
The Legend of Zelda: Majora’s Mask

Set ScreenUpdateSetting=1, SkipFrame = False


Enjoy!
Last edited by welshy on Fri Jan 17, 2014 1:15 pm, edited 21 times in total.
"The list of things I have heard now contains everything!"

arimal
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Oct 16, 2013 7:38 pm

In theory you should be able to set the ScreenUpdateSetting=# in the RiceVideoLinux.ini file to have it set on a per game basis. As of now all my attempts to do so have been thwarted and the emulator insists on using whatever is set in mupen64plus.cfg

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 17, 2013 7:26 am

arimal
Probably, although this could be due to the current fractured nature of Mupen64plus, ric_rpi has re-written much of the emulator core to achieve acceptable performance and this may currently be broken. I believe the program is reading the ini as when testing the Glide plugin it would not continue unless the Glide ini was present. Perhaps you could log this as an Issue?

Here - https://github.com/ricrpi/mupen64plus-rpi/issues

Increasing emulator rendering performance and addressing keyboard control is currently the priority, how did you find the actual emulation?
"The list of things I have heard now contains everything!"

arimal
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 17, 2013 4:19 pm

I'm very impressed with whats been accomplished, and can't wait to see where it goes. My kids and I played Mario for a few hours after I got it compiled and running. It was full speed including sound even with my modest 850 overclock(as my pi eats cards if I push for 900). I got excited while trying to start Castlevania64 as all the intro scenes and menus worked without a hint of sound problems and then got a seg fault upon starting a new game.

I'll take any other issues I find to the git page, and I'll be compiling the new branch today.

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 17, 2013 4:38 pm

arimal
Thanks on behalf of the author, glad you enjoyed it! I found a few games crash/error/seg fault post attract screen as can be seen from my testing above, which is so disheartening, which is why testing included many of the best/biggest selling titles to try and prevent disappointment. As I have discussed with the author, this is a constant issue in N64 emulation, F-Zero for instance worked a few revision back (but very slowly), fix one game, break another! But I believe the speed increases acquired by the changes in other titles more than made up for this, better to have a few games running excellently that a lot running poorly/slowly.
"The list of things I have heard now contains everything!"

arimal
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 17, 2013 5:04 pm

Of course I agree having a few titles run acceptably is better than a bunch running like crap. I'm not a stranger to the peculiarities of n64 emulation, even on a beefy desktop pc you can easily spend as much time configuring mupen to run one particular game as you do playing.

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 17, 2013 5:28 pm

arimal
Try Project 64 for your PC, much better ROM compatibility and less (if any) config changes required! (shame there is no ARM version!)
"The list of things I have heard now contains everything!"

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Oct 19, 2013 7:28 am

I have edited the original text to include fixes for certain games when altering the mupen64plus.cfg file
"The list of things I have heard now contains everything!"

gyeben
Posts: 150
Joined: Tue Jun 19, 2012 6:38 pm
Location: Hungary, Eger

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Oct 19, 2013 1:19 pm

I have tried Super Mario 64, Toy Story 2, LEGO Racers and Tony Hawk's Pro Skater 3 (which is the last game released for the Nintendo 64, by the way) with this emulator. Mario 64 works great out of the box, although Mario's voice is slow and low-pitched. THPS3 works with ScreenUpdateSetting set to 4 in mupen64plus.cfg. LEGO Racers starts but the graphics are all messed up. Toy Story 2 starts with ScreenUpdateSetting set to 4 in mupen64plus.cfg, but I can't to play the actual game.

I also recorded some gameplay:
Super Mario 64 (#1): http://www.youtube.com/watch?v=fGkHx3CvLUo
Super Mario 64 (#2): http://www.youtube.com/watch?v=7zkUnkgIDJE
Tony Hawk's Pro Skater 3: http://www.youtube.com/watch?v=akn17cYmedc

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Oct 19, 2013 1:29 pm

gyeben
From the vids it looks like you are running it in XWindows, it will run MUCH faster/better straight from Console and not have to alter the cfg settings for it to be Full Screen (even at 320x240), with the frame buffer set at Maximum (1920x12000).
"The list of things I have heard now contains everything!"

arimal
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Oct 19, 2013 11:07 pm

Some people might be interested to know(I was certainly pleased) Harvest Moon 64 runs flawlessly. With just

Code: Select all

ScreenUpdateSetting = 4
and

Code: Select all

NormalAlphaBlender = True
This just corrects a transparency problem with sprites in outdoor spaces, look to this option for other titles that might have transparency problems.

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Sun Oct 20, 2013 8:01 am

arimal
If also fixes Turok Dinosaur Hunter, have edited post to reflect this. If you have tested any other popular titles that are not reflected in the original post please let me know and I will add them.
"The list of things I have heard now contains everything!"

Takenover83
Posts: 166
Joined: Mon Sep 02, 2013 5:39 am

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Oct 25, 2013 6:23 pm

Pretty awesome to actually test this. One problem I found, not sure if other's experience the same thing. The emulator will only run correctly when ran from it's own directory.

Works

Code: Select all

cd /home/pi/mupen64plus-rpi/test
./mupen64plus /location/of/rom.n64
Does not Work

Code: Select all

cd /home/pi
/home/pi/mupen64-rpi/test/mupen64plus /location/of/rom.n64

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Oct 25, 2013 6:42 pm

Takenover83 wrote:Pretty awesome to actually test this. One problem I found, not sure if other's experience the same thing. The emulator will only run correctly when ran from it's own directory.

Does not Work

Code: Select all

cd /home/pi
/home/pi/mupen64-rpi/test/mupen64plus /location/of/rom.n64
No, of course it wont run like that!? Where is your run command? No doubt you received a 'not a directory' error!
Last edited by welshy on Fri Oct 25, 2013 6:47 pm, edited 1 time in total.
"The list of things I have heard now contains everything!"

Takenover83
Posts: 166
Joined: Mon Sep 02, 2013 5:39 am

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Oct 25, 2013 6:45 pm

Maybe I did not type the command right above, but the program/emu does execute, it just gives a bunch of errors about not finding lib's, etc.. Even if I copy the lib is complaining about to say /lib, I get even more errors. All that goes away if I just nagivate to the program/emu directory first, before launching.

I never recieved not a directory error, are we talking about two different errors?

Edit: BTW, I did add it to emulationstation for easier launching with the following added to es_systems.cfg. (works fine btw)
Yes, I did copy the test directory to a directory called n64

Code: Select all

DESCNAME=Nintendo 64
NAME=Nintendo 64
PATH=/home/pi/RetroPie/roms/n64
EXTENSION=.n64 .z64 .N64 .Z64
COMMAND=cd /home/pi/RetroPie/emulators/n64/ && ./mupen64plus %ROM% && cd /home/pi/

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Oct 25, 2013 6:58 pm

Takenover83
Ok, that makes more sense! Could be an error in the Emulation Station script (Couldn't say, don't use it). But I will try adding to AdvMENU which is the front end I use (I haven't added to test it yet) and see if there is a problem. Thanks!
"The list of things I have heard now contains everything!"

Takenover83
Posts: 166
Joined: Mon Sep 02, 2013 5:39 am

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Oct 26, 2013 4:32 am

Looking at the config, I think I could of resolved some of the problems by editing the config... Maybe by setting the full directory path?

Code: Select all

[UI-Console]

# Mupen64Plus UI-Console config parameter set version number.  Please don't change this version number.
Version = 1
# Directory in which to search for plugins
PluginDir = "./"
# Filename of video plugin
VideoPlugin = "mupen64plus-video-rice.so"
# Filename of audio plugin
AudioPlugin = "mupen64plus-audio-rpi.so"
# Filename of input plugin
InputPlugin = "mupen64plus-input-sdl.so"
# Filename of RSP plugin
RspPlugin = "mupen64plus-rsp-hle.so"

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Oct 26, 2013 7:50 am

Takenover83
Yes, that would solve the issue, as you have not CD'd into the mupen64plus folder, the config is not looking in the correct directory for the plugins, so the FULL path would indeed required.
"The list of things I have heard now contains everything!"

User avatar
NITROgaming
Posts: 18
Joined: Fri May 17, 2013 12:01 am
Location: North America-U.S.A-Kentucky

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Oct 29, 2013 3:52 pm

THIS IS AWSOME!!! I cant find any issues with it yet. Using a custom input joy config to use my ps2 controllers through usb, non overclock, with sound disabled. I have plans to personally add it to retro pie and maybe even repost the finished product. Overall great project.

One question, does goldeneye multiplayer work?
Visit my site at www.n2o1gaming.weebly.com to download my music and see some cool projects!

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Oct 29, 2013 4:09 pm

NITROgaming
Unfortunately due to using lots of 'custom' micro code in the program GoldenEye does render slowly often struggling to reach 20 FPS (this is common in ALL N64 emulation, in fact, I don't know of ANY emulator in which it works 'perfectly'). It was added to the list as I knew many users would try it, it should work but it will be slow. I have discussed this with ric_rpi, the problem is often fixing or improving performance in one title will 'break' another (again common), better to have many titles working well that one or two excellently. However, this is still an 'Alpha' Build and ric is hoping to improve the emulator further
"The list of things I have heard now contains everything!"

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Oct 29, 2013 9:19 pm

Takenover83

Did you manage to get it to work from emulation station? I'm having some trouble. Iv'e set everything in the es_systems.cfg....all good.

Code: Select all

DESCNAME=Nintendo 64
NAME=Nintendo 64
PATH=/home/pi/RetroPie/roms/n64
EXTENSION=.n64 .z64 .N64 .Z64
COMMAND=/home/pi/RetroPie/emulators/mupen64plus-rpi/test/mupen64plus %ROM%
When I try to run from ES it says cannot open libmupen64plus.so.2 no file or directory exists. I've changed the directory in the mupen64plus config file to the test folder. Still no luck! Below is what I have input.

Code: Select all

[UI-Console]

# Mupen64Plus UI-Console config parameter set version number.  Please don't change this version number.
Version = 1
# Directory in which to search for plugins
PluginDir = "/home/pi/RetroPie/emulators/mupen64plus-rpi/test"
# Filename of video plugin
VideoPlugin = "mupen64plus-video-rice.so"
# Filename of audio plugin
AudioPlugin = "mupen64plus-audio-rpi.so"
# Filename of input plugin
InputPlugin = "mupen64plus-input-sdl.so"
# Filename of RSP plugin
RspPlugin = "mupen64plus-rsp-hle.so"

Takenover83
Posts: 166
Joined: Mon Sep 02, 2013 5:39 am

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Oct 29, 2013 9:53 pm

Yes, it works fine from emulationstation. But I just left that part of the config alone and stuck with the command I used above. Try this, it should work.

Code: Select all

DESCNAME=Nintendo 64
NAME=Nintendo 64
PATH=/home/pi/RetroPie/roms/n64
EXTENSION=.n64 .z64 .N64 .Z64
COMMAND=cd /home/pi/RetroPie/emulators/mupen64plus-rpi/test/ && ./mupen64plus %ROM% && cd /home/pi/

User avatar
NITROgaming
Posts: 18
Joined: Fri May 17, 2013 12:01 am
Location: North America-U.S.A-Kentucky

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 31, 2013 2:28 am

:?: okay i entered the code that takenover83 said work and moved mupen to the emulator files in retro arch, even made an xml theme for the 64, and it isnt appearing in emulationstation, cant figure out my mistakes. Help???

By the way, tested top gear overdrive, appears to work fine up to season 2 (havent played long) a little slower than the original. The car and track selection menus disapear after a second but reapear with every button press (odd :( ) and the z button that works in all my other games, fails to work at all, so no color change or boosts, bummer.

Multiplayer analasis:
Starfox 64: experienced no limits to gameplay until four players joined, slightly slower.
Top gear overdrive: cant exacly test, the volts wagon seemed to lag in the original game
OO7 goldeneye: multiplayer on stack ran the fastest with grenade launchers as weapon, ran faster than single player campain with 2 players, have not tested 3, 4, or other game types than the normal, will try to activate fast bond cheat, no radar, and dk mode, to decrease # of polygons and increase play speed.

Personally I have had 0 issues related to the emulator itself and believe it is almost ready for a beta release. ALL HAIL ITS CREATOR!!!

Off topic, anyone looked back into emulating the psp with ppssps lately?
Visit my site at www.n2o1gaming.weebly.com to download my music and see some cool projects!

Takenover83
Posts: 166
Joined: Mon Sep 02, 2013 5:39 am

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 31, 2013 2:40 am

If you don't have rom's in the directory you specified in es_systems.cfg, then emulationstation will not show that emu. So if your path was "PATH=/home/pi/RetroPie/roms/n64" then throw some rom's in there, with extension ".n64 .z64 .N64 .Z64".

User avatar
NITROgaming
Posts: 18
Joined: Fri May 17, 2013 12:01 am
Location: North America-U.S.A-Kentucky

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Oct 31, 2013 3:00 am

I have 5 roms in that directory, i will check my code tomarrow, probably did something dumb like i did with retropie, spent 3 weeks reading forms and looking for help on exiting the emulator, to later discover this:

System_hokey:...
Exit:...

Ir something like that, i had miss-spelt hotkey and put hockey... Probobly typed rooms rather than roms :lol: . Will check, thanks for fast response.
Visit my site at www.n2o1gaming.weebly.com to download my music and see some cool projects!

Return to “Gaming”