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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Dec 12, 2013 9:01 pm

Well I've tried rebuilding the SD card and cloning mupen64plus-rpi but still have an issue with gles2n64 and Zelda.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Dec 13, 2013 8:22 am

ric_rpi
Yup, I've also noticed Zelda OOT tends to cause problems when run with the gles2 plugin. On occasion it seems to break Mupen completely, probably best to stick with Rice for this Title. I may add a caveat for now on the compatibility list. As I have said before, this is a common problem with Mupen and N64 emulation in general, never a 'standard' way of running game Titles which gives the best results. If you look at the compatibility list on Mupen's Home Page it notes different plugins for different game Titles and even differing settings on specific plugins! That's why I use Project64 on my PC, less 'fiddly'.
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Dec 13, 2013 12:22 pm

I'm sure I had Zelda OoT and gles2n64 working at some point so will try an older cut of code next.

At least I can now get back to coding/debugging ...

Doesn't look like older cuts work either. I have tested back to commit '69aeaf39' (24th Nov).

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Dec 13, 2013 3:45 pm

I wonder if the gles2 problem is related to http://www.raspberrypi.org/phpBB3/viewt ... 2&p=415986.

It sounds very similar. Maybe I won't have to fix it... ;)

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Dec 13, 2013 4:01 pm

ric_rpi
Mmm, sounds familiar doesn't it? It does say on the Homepage compatibility list under plugins 'Works Best With' RiceVideo & Glide.
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Dec 13, 2013 4:17 pm

The code gets stuck in a sem_wait on the GPU from a call to glFinish()...

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 1:03 pm

I have three issues that are ready to be tested but can't do two of them remotely and the third I would like someone else to verify (for my sanity): https://github.com/ricrpi/mupen64plus-r ... state=open

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 1:36 pm

ric_rpi
Compiling now, will post details of the Testing when complete.

Q. As far as 'audio-omx fails' what exactly were you looking to test for?
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 2:23 pm

It didn't work when running as sudo/root and would crash mupen64plus.

It no longer crashes when run with sudo and root but I cant check it plays sound to the tv at the moment. It played sound last night when running as a normal user (but needs to be checked before the issue is closed).

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 2:38 pm

ric_rpi
Q. Is it an additional plugin or an option in the config?
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 2:48 pm

audio-omx was based on my old audio-sdl (which no longer used SDL) and has the 'ilclient' demo code stripped out. I am only expecting a 1-5% increase with the new code but the plugin is smaller and uses less CPU and GPU memory.

mupen64plus-audio-omx.so should be built and this is set as the new default if regenerating the cfg file.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 3:42 pm

ric_rpi
Yup, I can see now its compiled! It doesn't crash when running as root or user but seems a little 'scratchy' compared to the old plugin, also changed some settings in the rice plugin which are being correctly read from the config. I am compiling an older revision to do some comparison testing and checking keyboard/joypad functionality and read/write in the dev build from the config. Results to follow...
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 3:50 pm

Thank you

Could you try increasing the latency for audio-omx to 200ms to see if that reduces the 'scratching' sound?
If the audio buffer is low, the plugin 'repeats' the audio data to fill it up quickly but obviously if the sound is changing, the output will not sound so good.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Thu Jan 16, 2014 5:55 pm

ric_rpi
Ok, increasing latency to 200ms improves sound nominally but not significantly (tested to 500ms). The Keyboard is still not functioning correctly, certain keys like Start work, but Analogue Stick codes 273-276 (Direction Keys) and A/B 306 & 304 (Left Ctrl & L Shift) don't. Ransak mentioned (in another Thread) the config doesn't read his settings, the problem seems to be when altering the settings (for Joypad or Keyboard) on re initialising, Mupen over writes them to their Default again.
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jan 17, 2014 9:16 am

A and B (LCtrl/LShift) work for me. The debug output for the arrow keys is looking 'more' correct but I might have a sign issue on the value pushed into N64 memory. I am hopeful this will be fixed by end of weekend :-)

On games with a cursor e.g. Super Mario Start Screen, does the cursor stop moving when no arrow keys are pressed?

And does the cursor only move in two directions e.g. down and right?

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jan 17, 2014 9:26 am

ric_rpi
They don't work at all! It could be as I used the latest version of Raspbian for the Build certain updates (the changes log doesnt list them, it just says 'many driver updates') have broken Mupen, I seem to recall they did work (although intermittently) previously.

Edit - OK, I have just booted my Pi and for some reason all the Keys now work! lol Very odd
Edit 2 - Right, think I know why, jumping from the dev to master builds when testing in Terminal perhaps I was jumping into the WRONG folder (I was lazy and used up/down to get the previous text in the command line). In the DEV build all the keys work fine, in the MASTER build Keys work fine with the exception of the direction arrows which work but are delayed/intermittent. Sorry about that erroneous info!


Edit 3 - Right, discovered the problem, Keyboard works correctly in Console but NOT in XWindows! In the DEV build all the keys work fine, in the MASTER build Keys work fine with the exception of the direction arrows which work but are delayed/intermittent and incorrectly configured (e.g. left is right etc.).

So, in summary -
Issue #21 - Fixed
Issue #7 - Fixed
Issue #5 - Fixed

OMX Sound plugin - In My opinion the previous plugin is better, the new one is: 'Scratchy', also causes the music to slow and gives little to no improvement in Graphics Rendering Speed.

One other thing I noticed, using the keyboard does occasionally effect rendering speed (although not considerably). I do know Mednafen suggests using a Joypad rather than Keyboard due to latency, could be the same issue? Either way, at least it now works! Good Job!
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jan 17, 2014 10:44 am

With regards to audio-omx, setting the Underrun mode to 0 should make it behave the same as the original audio plugin when it comes to handling sound and populating the audio buffers.

I wasn't expecting much of an improvement in speed (the old plugin only used around 5% of mupens processing time). But this new one uses less GPU and CPU memory and is now as streamlined as I can make it.

As issue #15 covers keyboard in X windows, I'm going to close 21, 7 & 5.

Are there any other issues people feel need to be sorted before moving to Beta?
I did wonder about cfg issue #12 and the possible new one with input cfg being reset.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jan 17, 2014 1:33 pm

ric_rpi
The Underrun mode is set by Default to 0, 1 (ROM Frequency) makes it sound as if being 'gargled' through water, 2 (Repeat) makes it slow. I have also 'tweaked' the forward removing mention of the keyboard not working on the assuming you are going to merge the dev branch along with some other minor changes.
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Fri Jan 17, 2014 2:27 pm

Master is up-to-date now.

I have started to create a wiki page for 'best settings per game', if anyone has a good list then I would really appreciate having this page updated.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jan 18, 2014 11:38 am

YAY! Arrow keys now work perfectly! :D

If I run Mupen64plus from the console, it runs full screen. I am using a Full HD monitor, so does the video plugin render at 1920x1080? Is it possible to change the resolution the graphics are rendered at? Maybe it would be a good idea to implement rendering at a certain resolution (the one that the N64 originally used) and then resizing the video to fill the screen using dispmanx.
Also, the current video plugin doesn't seem to respect the aspect ratio when ran from console.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jan 18, 2014 1:28 pm

ric_rpi
Do you have an address for the wiki page? Thanks.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jan 18, 2014 1:36 pm

gyeben wrote:I am using a Full HD monitor, so does the video plugin render at 1920x1080? Is it possible to change the resolution the graphics are rendered at? Also, the current video plugin doesn't seem to respect the aspect ratio when ran from console.
If you read the Front page its explained in CONFIGURATION FILE SETTINGS.

[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).

'Also, the current video plugin doesn't seem to respect the aspect ratio when ran from console'
Unfortunately neither plugin does at this time in development, it just fills the Framebuffer Settings in the raspi-config. This is common in N64 emulation, I don't know of one that respects the Aspect Ratio in 'Fullscreen' (I have 5 different ones!).
Last edited by welshy on Sat Jan 18, 2014 2:43 pm, edited 1 time in total.
"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 Jan 18, 2014 1:48 pm

KitchUK
It will be on the right hand side of the GitHub Page - https://github.com/ricrpi/mupen64plus-rpi

Here - https://github.com/ricrpi/mupen64plus-rpi/wiki
"The list of things I have heard now contains everything!"

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

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Jan 18, 2014 4:02 pm

It should be fairly straight forward to set dispmanx up to respect the aspect ratio if people want that functionality.

I haven't tried setting a 16:9 aspect ratio for the source (cfg) resolution. It might work and look better.

I have also seen posts referring to SDL2 on the PI. I don't know what state it is in but mupen64plus has #defines for SDL2 including for mouse support. If anyone wants to investigate it would be interesting to know how/if mupen64plus runs with SDL2.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Sun Jan 19, 2014 3:54 pm

Experimental mode on audio-omx.

I had an idea last night for audio-omx. I have coded it up and it can be used by setting Underrun Mode to 3. This will result in omx trying to play the audio data in the N64 memory block, instead of copying and building up a buffer to play. Underrun mode 3 will also force the output to the ROM frequency as it cannot be resampled.

It works with super Mario and I get sound playing more often :-D.

For those that have compiled my near latest code you can use

$>M64P_COMPONENTS="audio-omx" ./m64p_build.sh

to build the audio plugin only

Return to “Gaming”