NF3RN0
Posts: 36
Joined: Thu Jan 24, 2013 5:28 am
Location: Texas

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jul 03, 2014 1:54 am

That worked. Complie was successful. Thanks! Going to test out some roms and add to the compabablity list.

NF3RN0
Posts: 36
Joined: Thu Jan 24, 2013 5:28 am
Location: Texas

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Jul 08, 2014 7:26 am

Got Diddy Kong Racing to render correctly at almost full speed with gles2n64. 900 Mhz overclock, GPU memory at 128. Takes a minute or two to load but once it does it works almost flawlessly. Twinaphex from Libretro mentioned this in one of his changes to the Libretro repository. Recomplied just the plugin and it worked. No other adverse or positive affects to other games, I have not tested jet force gemini yet.
https://github.com/libretro/mupen64plus ... 37d8746aab
I have submitted a pull request to the ricrpi repository and hopefully I did it right. I am new to using git hub.

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Jul 08, 2014 5:13 pm

Cheers NF3RN0

I have accepted the merge, if you spot anymore please let me know :-D

NF3RN0
Posts: 36
Joined: Thu Jan 24, 2013 5:28 am
Location: Texas

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Jul 08, 2014 8:06 pm

ric_rpi

How are you able to determine the percentage of performance increase?

e.g.

Mario 64 runs at ~67% of full speed on introduction compared to 57% for mupen64plus-rpi.

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Jul 09, 2014 8:25 am

NF3RN0

I modified mupen64plus for an x86 machine (process load was ~10%) to record the time from 'start of execution of dynamically compiled code' to frame 501. Then in mupen64plus for the pi, I do the same and then calculate the percentage speed using the (hard-coded) delta time from earlier.

When I wish to do a performance test I run:

Code: Select all

sudo ./mupen64plus --testshots 501 [rom]
.

Where rom is either Super Mario 64 or Zelda 64. If you run with --nospeedlimit then if the pi is fast enough, you should get >100%

NF3RN0
Posts: 36
Joined: Thu Jan 24, 2013 5:28 am
Location: Texas

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jul 10, 2014 12:27 am

I am still have trouble getting past the Star Fox start screen with gles2n64. I had trouble with it in the past and it has been posted before. I can get past it sometimes by pressing the A button instead of START, which is kind of wierd but it works.

http://www.raspberrypi.org/forums/viewt ... 43#p461543

Edit: Rice is also doing the same thing.

SummitOfOlymPi
Posts: 1
Joined: Tue Jul 15, 2014 4:08 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Tue Jul 15, 2014 4:19 pm

I can't get Mupen64plus to launch properly from EmulationStation. It makes like it's starting up for a few seconds, then ends with this:

Core: Starting emulation at 1220
Core: Starting R4300 emulator: Dynamic Recompiler
Core: Init new dynarec
Core Status: Stopping emulation.
Core Status: Stopping emulation.
Core Status: Stopping emulation.
Core: R4300 emulator finished.
Core: Stopping emulation at 2142
Core Status: Rom closed.

If i run Mupen from the command line with the rom i want, it opens no questions asked. Performance is smooth other than slight audio distortion sometimes and texture blips. I am relatively new to Linux and Google has not availed me with this issue
Arm: 1150
Core: 525
h264: 350
v3d: 350
sdram: 600
overvolt: 8
GPU-mem: 128

warranty? wut is warranty?

NF3RN0
Posts: 36
Joined: Thu Jan 24, 2013 5:28 am
Location: Texas

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jul 17, 2014 12:57 am

I have not used emulation station in a while. ric_rpi or welshy might be able to help you out or maybe post it in the emulation forum by itself.

I have uploaded a video to youtube with the current build and how Super Mario 64 plays.
I did not enable --nospeedlimit, or use OMX in this one but I have not seen it actually help the sound when using OMX input. Maybe I am using it wrong.

https://www.youtube.com/watch?v=s2EumGXQ8Mw&

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jul 17, 2014 8:26 am

Afraid I don't use any front-ends so can't help with emulation station. The OMX plugin gives an extra 3-5% performance (so not very noticeable).

The --nospeedlimit argument won't speed up emulation, it will just allow you to run faster than real-time if the processing load is low.

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jul 25, 2014 12:47 pm

Hi all,

I was directed to this page from the Github page for Mupen64Plus:

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

This page states that the project is deprecated, but I can't find what has replaced it. Could anyone help me with a link?

Thanks in advance!

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jul 25, 2014 2:38 pm

mashley

You can use scripts from http://github.com/ricrpi/mupen64plus to automatically download/compile/install everything you need for the Raspberry PI.

To setup, run the following commands:
  1. sudo apt-get install git # to install git if you don't have it.
  2. git clone http://github.com/ricrpi/mupen64plus # to clone the repository
  3. cd mupen64plus
  4. ./build.sh # to build the binaries and shared libraries
  5. sudo ./install.sh # to install mupen64plus into /usr/local/bin
I have deprecated mupen64plus-rpi as I have now forked from the official repositories. It makes merging updates easier and allows me to push changes/optimizations back to the official release, for the benefit of others.

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jul 25, 2014 2:42 pm

Thanks ric_rpi! I was actually just working my way through those instructions hoping that they would be what I needed. I'm having a bit of difficulty as I'm running on Arch Linux and the install script doesn't seem to recognise the versions of GCC and GL (or I haven't installed them properly...) I'm battling with that right now and will report back what works.

Cheers!

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jul 25, 2014 3:14 pm

Ok, just got it to start compiling on Arch Linux on my RPi. Here's what I had to do:

Code: Select all

# install required packages
pacman -S git freetype2 freeglut glu

# download source
git clone http://github.com/ricrpi/mupen64plus
cd mupen64plus

# comment out references to apt-get to stop it failing due to incorrect gcc version
sed -i 's/apt-get/#apt-get/g' ./dev_build.sh

# substitute gnu stubs-soft.h
ln -s /usr/include/gnu/stubs-hard.h /usr/include/gnu/stubs-soft.h

# go!
./dev_build.sh
I'll report back once it's finished...

User avatar
krisnation2000
Posts: 38
Joined: Sun Mar 16, 2014 12:18 am

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jul 26, 2014 3:51 am

Hey welshy, Is there i way i can download the libsdl1.2-Dev or w/e Without the connecting to the internet by a deb?

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jul 26, 2014 8:06 am

I'm having a bit of trouble building this under Arch. It keeps hanging at the stage of linking libmupen64plus.so.2.0.0. I had to add a swap file to try to prevent it from running out of memory, but eventually after over an hour of running the whole machine seems to hang as I lose connection to all of my ssh sessions. Any ideas what might be going wrong?

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jul 26, 2014 6:36 pm

mashley

under raspbian you need around 750MB RAM + swap, to compile the core. Could you provide the system status that is output when you run ./build.sh please.

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jul 26, 2014 6:40 pm

IIRC I added a 4GB swap file on a USB stick. When I tried to build it again this afternoon I ran it directly on the pi rather than over SSH and saw that init died during compiling :shock: I'll try running build.sh next time I'm around the pi and let you know the output.

NBonaparte
Posts: 9
Joined: Tue Jul 01, 2014 4:33 am

Re: WIP: Playable Nintendo 64 Emulator Available

Sun Jul 27, 2014 3:26 am

I've successfully built, installed, and run mupen64plus, but the keyboard does not work. I do see "keyboard input: 1, 0x9c 0x0 -> SDL key 13 -1" when I press the return key but apparently it does not take action.

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Jul 28, 2014 8:55 am

NBonaparte

This is probably linked with moving to SDL2.

I don't have a fix for you yet and I currently have a dependency with sdl1.2-dev that needs removing too.

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Jul 28, 2014 3:57 pm

ric_rpi wrote:mashley

under raspbian you need around 750MB RAM + swap, to compile the core. Could you provide the system status that is output when you run ./build.sh please.
You're right, it was running out of memory. I increased the size of the swap file and it finished compiling successfully. The problem now is that it won't link libmupen64plus.so.2.0.0 as I get the following error:
/usr/bin/ld: error: libmupen64plus.so.2.0.0 uses VFP register arguments, /tmp/ccJtECfO.ltrans0.ltrans.o does not
From what I have read this is a hard/soft float issue, though I have no idea how to fix it :?

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Jul 28, 2014 4:10 pm

Sounds like you have just hit the issue I need to fix and push back to the official mupen64plus team.

Afraid I can't provide a software update due to the state of mupen64plus on my system however if you open mupen64plus/ricrpi/mupen64plus-core/src/ r4300/new_dynarec/linkage_arm.S and comment out .eabi_attribute 28,1 (line 30), You should then be able to link successfully.

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Jul 28, 2014 4:14 pm

ric_rpi wrote:Sounds like you have just hit the issue I need to fix and push back to the official mupen64plus team.

Afraid I can't provide a software update due to the state of mupen64plus on my system however if you open mupen64plus/ricrpi/mupen64plus-core/src/ r4300/new_dynarec/linkage_arm.S and comment out .eabi_attribute 28,1 (line 30), You should then be able to link successfully.
Thanks ric. Line 30 in that file for me reads:

.eabi_attribute 24, 1

I don't have anything that reads 28,1 in that file at all. Should I comment out the 24,1 line?

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Jul 28, 2014 4:20 pm

eabi_attribute 28 is the flag to the linker that states the file is using Hard floating point. Don't know why it is missing in your file as it is currently unmodified in mine. Is the core repository set to use the branch ric_dev? - ./build.sh will checkout the correct branch if it is wrong but ./dev_build.sh doesn't.

I can't remember what 24 does but compiling the linkage_arm.S with -S and (--verbose-asm???) will write comments next to the attributes.

mashley
Posts: 24
Joined: Tue Apr 15, 2014 7:15 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Jul 28, 2014 4:27 pm

ric_rpi wrote:eabi_attribute 28 is the flag to the linker that states the file is using Hard floating point. Don't know why it is missing in your file as it is currently unmodified in mine. Is the core repository set to use the branch ric_dev?
AFAIK yes. It creates a folder called "ricrpi" in the mupen64plus folder when I run dev_build.sh, and I get messages from git like "Downloading core from ricrpi to ./ricrpi/mupen64plus-core".
./build.sh will checkout the correct branch if it is wrong but ./dev_build.sh doesn't.
So should I use build.sh instead of dev_build.sh?
I can't remember what 24 does but compiling the linkage_arm.S with -S and (--verbose-asm???) will write comments next to the attributes.
Hold on, don't I want it to use hard float? I've got /usr/include/gnu/stubs-hard.h, so presumably gcc is using hard float. So shouldn't I add the flags in to make the compiler use hard float?

ric_rpi
Posts: 206
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Jul 28, 2014 7:38 pm

you are getting the right repository but ./dev_build.sh does not change the branch as I don't want to have to modify the defaultList file when developing something in a different branch.

./build.sh will set the correct branch according to the defaultList file so is recommended if you are not developing the software.

I am not familiar with Arch linux but after some looking I can see it supports hard floating point. The current code builds for hard floating point so you shouldn't need to modify the software.

if you run './allRepos git branch' it will run the command accross all the repositories and you will be able to tell what is being built.

One final note, the 'master' branch of ricrpi/mupen64plus-core does not work on the pi. I am currently using it to merge updates from the official repository.

Return to “Gaming”