Page 1 of 9

Mupen64Plus - N64 Emulator for the Pi

Posted: Mon May 28, 2012 1:12 pm
by PhonicUK
I've been working on porting the version of Mupen64Plus originally made for the Pandora to the Pi.

I've got it to compile and run (the GTK based ui works absolutely fine), and I can emulate a game with no video output, and using the interpreter instead of the dynarec.

Right now I'm trying to sort out the gles2n64 plugin, which has some ARMv7 assembler in that I'm rewriting as C to get it going and will then have to re-optimize later. The dynarec also has some minor issues stemming from being predominantly built around the Cortex chip.

You can download the original sources from:

git://gitorious.org/mupen64plus-arm/mupen64plus-arm.git
http://code.google.com/p/gles2n64/source/checkout

You'll also need to grab a copy of the gl2extimg.h header file.

Based on how it performs on the N900, I'm reasonably confident we can get Mario64 playable on it with some work.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Mon May 28, 2012 2:09 pm
by PhonicUK
Update:

Hexxeh and I have been pouring over it. He's managed to get the plugin compiled and we've got the dynarec to behave instead of using the interpreter. Now we're just struggling to get the gles2n64 plugin to work properly.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Tue May 29, 2012 7:23 pm
by Xero Xenith
Wow, sounds great! IIRC there was one working reasonably well on the Sony PSP (333MHz MIPS R4000) so I'm looking forward to trying this out once graphics are working :)

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Tue May 29, 2012 9:12 pm
by PhonicUK
The PSP has the slight advantage of being based on the same architecture as the N64 so its easier to emulate. Hexxeh managed to get the GPU plugin to compile and added a few pi-specific buts but we're getting no output.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Wed May 30, 2012 3:28 am
by benhofb
Xero Xenith wrote:Wow, sounds great! IIRC there was one working reasonably well on the Sony PSP (333MHz MIPS R4000) so I'm looking forward to trying this out once graphics are working :)
Yeah, but even this port was pretty basic. I have run Super Mario 64 on my 3000 and the sound is still rather choppy. I think once the plugins and all that jazz are implemented, the RPi will be a fantastic little emulator for N64. Maybe someone would get the idea to put one in a N64 cartridge...

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Wed May 30, 2012 11:52 pm
by abishur
Exciting, be sure to update this thread as things progress! Hopefully someone will be able to work out getting sound from the FCEUX emulator soon and we can have an NES and N64 emulator going :-)

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Thu May 31, 2012 2:37 am
by ikesmasher
Great work dude! i hope to see this become a reality very soon!

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Wed Jun 20, 2012 2:26 pm
by matthewbpt
Any updates on the status of this project? I finally received my pi and would love to help you guys get this working.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Mon Jun 25, 2012 1:13 am
by Endercraft4
This is awesome! :o I hope you have an n64 game at least some what playable by the time I get my PI.
By the way, did anyone else here order their PI from element14

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Fri Jun 29, 2012 9:48 am
by Izzeho
Hmm very interesting. I'd be thoroughly intrigued to know what performance will be like under armv6, I'd find it hard to believe it could be anything but bad =/ Can the much better GPU (as opposed to the SGX530) perhaps offset that?

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Sun Jul 01, 2012 9:36 pm
by Endercraft4
If You do not post an update we will think you are lairs :D
Just joking....ish

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Sat Jul 21, 2012 4:11 am
by portets
Any update yet?

@abishur has anyone got fceux to work yet? I got it compiled and working with sound, but it's slow. It runs at full speed without sound and all lowest settings. Crawls at fullscreen though.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Sun Jul 22, 2012 3:03 am
by abishur
portets wrote:Any update yet?

@abishur has anyone got fceux to work yet? I got it compiled and working with sound, but it's slow. It runs at full speed without sound and all lowest settings. Crawls at fullscreen though.
Not to my knowledge, which distro are you using and are you doing it from the console or within X?

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Fri Aug 03, 2012 9:12 pm
by yoonsikp
What has happened on this project? I'm extremely interested.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Fri Aug 03, 2012 9:17 pm
by ndrs
yoonsikp wrote:What has happened on this project? I'm extremely interested.
Same here. I've tried to make a build of mupen64plus but armv6 was not compatible.

So this would be a great work.

PCSX runs absolutely fine, so mupen64plus will run as well with some work. (I know i'ts totally different, it's just a tought).

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Fri Aug 03, 2012 10:00 pm
by marqs
Yeah, it'd be great if we'll get this one working soon.

BTW, N64's pads can be easily connected to RPi's GPIOs, since they need only 3 wires and use 3.3V :) . I've made a driver based on kernel's gamecon (originally for parallel port) to support N64 pads. with Raspberry's GPIOs. The 50mA limit should be enough for 4 pads, but I have to do some more testing. I'll put the code out in a few days. It'd be also quite easy to add support for other retro pads (nes,snes,etc.) there, assuming they would work at 3.3V.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Sat Aug 04, 2012 3:10 pm
by danboid
The git repo linked in the first post doesn't work for me an I've tried it at various times over the last few weeks so I suspect it no longer exists.

Code: Select all

git clone git://gitorious.org/mupen64plus-arm/mupen64plus-arm.git
Cloning into 'mupen64plus-arm'...
fatal: The remote end hung up unexpectedly
Hopefully PhonicUK is still working on it and can provide a link to a working repo or source tarball that I can try to build on my Pandaboard?

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Sat Aug 04, 2012 11:45 pm
by Pioni-Sensei
How is the progress on this project going?
I've got two pi's. intending to use one as a media/emu machine on my TV and the other one to power my 3D printer.
So far the first one has xbmc (smoothly) and the second one has most of the drivers.
Biggest thing I'm wanting is a N64 emu.
Please keep us posted Phonic! :D

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Sun Aug 05, 2012 4:07 am
by yoonsikp
We could always use the android version of mupen since we know android will soon be released for the pi.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Wed Oct 31, 2012 2:24 pm
by Norefall
Like everyone else here, I also want to know the status of this project. Is it dead?

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Sat Dec 29, 2012 6:43 pm
by taoofdre
Bump, curious as well! One of the best emulators I've had a pleasure of using (on Android).

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Mon Jan 28, 2013 7:30 pm
by HonkeyKong
I've been working on getting this emulator built and running, but I keep running into this roadblock during the linking stage:

Code: Select all

g++ main/main.o main/romcache.o main/util.o main/cheat.o main/config.o main/adler32.o main/md5.o main/plugin.o main/rom.o main/savestates.o main/zip/ioapi.o main/zip/unzip.o main/bzip2/bzlib.o main/bzip2/crctable.o main/bzip2/decompress.o main/bzip2/compress.o main/bzip2/randtable.o main/bzip2/huffman.o main/bzip2/blocksort.o main/lzma/buffer.o main/lzma/io.o main/lzma/main.o main/7zip/7zAlloc.o main/7zip/7zBuffer.o main/7zip/7zCrc.o main/7zip/7zDecode.o main/7zip/7zExtract.o main/7zip/7zHeader.o main/7zip/7zIn.o main/7zip/7zItem.o main/7zip/7zMain.o main/7zip/LzmaDecode.o main/7zip/BranchX86.o main/7zip/BranchX86_2.o memory/dma.o memory/flashram.o memory/memory.o memory/pif.o memory/tlb.o r4300/r4300.o r4300/bc.o r4300/compare_core.o r4300/cop0.o r4300/cop1.o r4300/cop1_d.o r4300/cop1_l.o r4300/cop1_s.o r4300/cop1_w.o r4300/exception.o r4300/interupt.o r4300/profile.o r4300/pure_interp.o r4300/recomp.o r4300/special.o r4300/regimm.o r4300/tlb.o r4300/empty_dynarec.o r4300/new_dynarec/new_dynarec.o r4300/new_dynarec/linkage_arm.o opengl/OGLFT.o opengl/osd.o opengl/screenshot.o main/translate.o -Wl,-export-dynamic -lz -lm -lpng -lfreetype -ldl -L/usr/lib/arm-linux-gnueabihf -lSDL -L/usr/X11R6/lib -lGL -lGLU -o mupen64plus
/usr/bin/ld: error: mupen64plus uses VFP register arguments, r4300/new_dynarec/linkage_arm.o does not
/usr/bin/ld: failed to merge target specific data of file r4300/new_dynarec/linkage_arm.o
collect2: ld returned 1 exit status
make: *** [mupen64plus] Error 1
Does anyone know of a way to fix this? I've found this problem when building a lot of software, but no way around it.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Mon Jan 28, 2013 8:38 pm
by Bramude
I'll definitely be looking out for this. Do you know by about when it'll be finished?

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Mon Jan 28, 2013 11:43 pm
by marqs
HonkeyKong wrote:I've been working on getting this emulator built and running, but I keep running into this roadblock during the linking stage:

Code: Select all

g++ main/main.o main/romcache.o main/util.o main/cheat.o main/config.o main/adler32.o main/md5.o main/plugin.o main/rom.o main/savestates.o main/zip/ioapi.o main/zip/unzip.o main/bzip2/bzlib.o main/bzip2/crctable.o main/bzip2/decompress.o main/bzip2/compress.o main/bzip2/randtable.o main/bzip2/huffman.o main/bzip2/blocksort.o main/lzma/buffer.o main/lzma/io.o main/lzma/main.o main/7zip/7zAlloc.o main/7zip/7zBuffer.o main/7zip/7zCrc.o main/7zip/7zDecode.o main/7zip/7zExtract.o main/7zip/7zHeader.o main/7zip/7zIn.o main/7zip/7zItem.o main/7zip/7zMain.o main/7zip/LzmaDecode.o main/7zip/BranchX86.o main/7zip/BranchX86_2.o memory/dma.o memory/flashram.o memory/memory.o memory/pif.o memory/tlb.o r4300/r4300.o r4300/bc.o r4300/compare_core.o r4300/cop0.o r4300/cop1.o r4300/cop1_d.o r4300/cop1_l.o r4300/cop1_s.o r4300/cop1_w.o r4300/exception.o r4300/interupt.o r4300/profile.o r4300/pure_interp.o r4300/recomp.o r4300/special.o r4300/regimm.o r4300/tlb.o r4300/empty_dynarec.o r4300/new_dynarec/new_dynarec.o r4300/new_dynarec/linkage_arm.o opengl/OGLFT.o opengl/osd.o opengl/screenshot.o main/translate.o -Wl,-export-dynamic -lz -lm -lpng -lfreetype -ldl -L/usr/lib/arm-linux-gnueabihf -lSDL -L/usr/X11R6/lib -lGL -lGLU -o mupen64plus
/usr/bin/ld: error: mupen64plus uses VFP register arguments, r4300/new_dynarec/linkage_arm.o does not
/usr/bin/ld: failed to merge target specific data of file r4300/new_dynarec/linkage_arm.o
collect2: ld returned 1 exit status
make: *** [mupen64plus] Error 1
Does anyone know of a way to fix this? I've found this problem when building a lot of software, but no way around it.
Which version (maemo / original) did you use? I managed to compile the 1.99.5 bundle for Pi some time ago with a couple of Makefile modifications. However, to make it usable, one would have to create a new gles plugin or wrap gles2n64 to mupen64plus plugin architecture.

I got it running with dummy video and sdl audio plugins (without any sound - perhaps some issue with OSS?), but haven't had much time to look at it properly.

Re: Mupen64Plus - N64 Emulator for the Pi

Posted: Tue Jan 29, 2013 12:56 am
by HonkeyKong
marqs wrote: Which version (maemo / original) did you use? I managed to compile the 1.99.5 bundle for Pi some time ago with a couple of Makefile modifications. However, to make it usable, one would have to create a new gles plugin or wrap gles2n64 to mupen64plus plugin architecture.

I got it running with dummy video and sdl audio plugins (without any sound - perhaps some issue with OSS?), but haven't had much time to look at it properly.
I'm using the maemo version. I couldn't find any other ones. If you could point me toward the original version, I would like to play around with getting it running. I was planning on trying to rewrite the ARMv7 ASM in GLES2N64 to work with ARMv6.