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

Re: WIP: Playable Nintendo 64 Emulator Available

Sat Nov 02, 2013 11:58 am

Takenover83

The code you provided for ES worked perfectly! Thank you. Trying a few roms now. From what I've tried most (Kart64,Mario64) are running at around roughly 70% with sound drops. This is really impressive. Hopefully eventually these games will be running near 100%!

Thank you ric_rpi! :)

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 04, 2013 4:22 pm

KitchUK wrote:Takenover83

The code you provided for ES worked perfectly! Thank you. Trying a few roms now. From what I've tried most (Kart64,Mario64) are running at around roughly 70% with sound drops. This is really impressive. Hopefully eventually these games will be running near 100%!

Thank you ric_rpi! :)
Thank you,

I have still got some more ideas up my sleeve as well as the multi-threading to continue.

I found a bug in the audio resampling (both original and rpi) that I have now corrected but not pushed into the ric_dev branch yet. If audio plays correctly at 22kHz then expect around 10fps extra! - sound should then start working on Mario 64 when outside of the castle ...

However I am beginning to think the likes of Golden Eye may be too much for mupen64plus-rpi though.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 04, 2013 4:37 pm

That sounds fantastic. Another 10fps would be welcomed! :D

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

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Nov 06, 2013 11:15 am

KitchUK wrote:That sounds fantastic. Another 10fps would be welcomed! :D
The audio sampling doesn't give the performance boost I was hoping for but its probably around 1-3fps extra for HDMI output...

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

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Nov 06, 2013 12:35 pm

Yeah I was going to post pretty much the same thing. The performace is slightly better (I can notice it playing Mario Kar 64) but the sound is constantly dropping over HDMI for me. This is with all the default settings of the config file. I did notice I still get some warnings about buffer under run at the emulator loading command line.

It might be my mind playing tricks on me but I felt that forcing the sample rate to 10,000 meant the performance seemed a little worse than it would if I left the rate at the ROM default of 1.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Nov 06, 2013 12:54 pm

KitchUK
I discussed this with ric -

Analogue vs Digital
I have tested the latest code and altering the Fz rate does now indeed work. However, using HDMI (Digital sound) makes little to no difference in FPS (along with a an 'HDMI does not support audio at 'XXXX' Hz'). Analogue sound is a different matter, the RPi struggles with the CPU performance increase when outputting to the audio jack, this is common with ALL programs so changing the Fz WILL make a marked difference. I will edit the config notes on the Thread for users who don't realise this common issue.


Basically if you are using HDMI there is little difference in performance with the added problem of HDMI Fz support, 8000Hz is fine but it doesn't like 10000 resulting in worse performance AND poorer sound! If running via analogue as the Fz can now be changed the result is better performance, which s common to all emulation/emulators on the RPi.

PS I have as yet to change the Thread!
"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

Wed Nov 06, 2013 1:07 pm

Welshy

Do I need to set a lower limit e.g. 8kHz in the audio plug-in then because it is limited to 10kHz.

There should be a (slight) improvement on HDMI as the audio only needs to copy a third of the data into the buffers (at 10kHz) so gives more processing time for graphics/core - although copying 80KB/sec less is small compared to the rest of the emulator.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Nov 06, 2013 1:49 pm

ric_rpi
When I set it to 8000Hz there wasn't the 'HDMI does not support audio at 'XXXX' Hz' warning as there was with 10000 (and others) and I also tried the 'standard' emulator settings of 11025, 22050 etc, but as I said the performance increase is negligible and obviously the sound quality is poor (some samples sounded weird e.g the ping ping before 'Its me Mario' in Mario 64!). For HDMI users I would suggest leaving the DEFAULT_MODE setting as 1 (Its default setting, ROM Fz), but its nice to have the option!
Last edited by welshy on Wed Nov 06, 2013 2:10 pm, edited 2 times in total.
"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

Wed Nov 06, 2013 2:08 pm

I have to say that I have not noticed any audio distortions, but would start to expect them below 12-14kHz.

I guess it could be a function of a connected TV, maybe some devices use a low-pass filter configured by the audio frequency and therefore remove any aliasing in the data caused by re-sampling to lower frequencies ...

The frequency support/not supported messages don't appear if you set a value below 10k. I have found my TV always says 'not supported' even though the sound is fine.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Nov 06, 2013 2:13 pm

ric_rpi
My monitor was affected the most (no doubt it has no extra filtering/post processing most 'TV's' contain and is outputting raw data). Though even on the monitor the 'not supported' msg still produced sound

On another note, I did say there would be a lot of interest in N64 emulation, Shea Silverman has added Mupen64plus-Rpi to PiMAME and Takenover83‘s New UltraSlim Image has also included it with BOTH noting its an 'Alpha'. I do hope they asked permission from you out of courtesy?
"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

Wed Nov 06, 2013 2:21 pm

I'm not fussed so long as people know it is not 'complete' so that we don't start getting pestered for feature x/y/z.

Given I regularly upload minor changes to both branches, they ideally need to keep re-validating that it works to keep the latest in their set-ups, but if they want to do that, then they are welcome.

It does provide awareness of what has been done so others may feel more inclined to look for optimizations like mystara.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Wed Nov 06, 2013 7:25 pm

Both Retropie and UltraSlim have update script's in place to snag the latest from git.

Museste
Posts: 31
Joined: Sun May 19, 2013 5:58 am
Location: Christchurch NZ

Re: WIP: Playable Nintendo 64 Emulator Available

Sun Nov 10, 2013 9:08 pm

Hi Welshy

Amazing work. Im trying to play mario, runs smoothly. Im just having a little trouble with the keyboard, its as if the direction control is stuck in the right down position. Is there any configuration I can do?

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

Re: WIP: Playable Nintendo 64 Emulator Available

Sun Nov 10, 2013 9:21 pm

Museste
Unfortunately the keyboard input is still not working correctly, until its fixed a Joypad/Joystick is preferable for control.
"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

Mon Nov 11, 2013 10:01 am

If people feel the keyboard is more urgent than optimization I can have a look into it.

Also, I was thinking about implementing some code to scale the sound in the audio-plugin so that it doesn't under-run, at the expense of lowering frequency (like a tape recorder with low batteries). With games almost running at full speed it should sound a lot better and not drop-out/glitch but other games that run slower will sound quite funny, any thoughts?

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 10:23 am

ric_rpi
I think your 'stuck between a rock and a hard place' in regards to keyboard input. Some users are suggesting it but in my opinion its useless really as the N64 uses Analogue input and it practically uncontrollable in practice, just try playing Mario 64 on a PC emulator using the keys! Some input methods are just integral to the experience of the game and are not a 'gimmick', again try playing Star Wars in MAME using keys! Scaling sound in the audio-plugin so that it doesn't under-run may be of benefit, perhaps you could try it in the dev branch?
"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

Mon Nov 11, 2013 10:29 am

Personally I'd like the focus on optimisations as I'm using a Xbox pad and the controls are fine. The sounds drops and framerate would be my personal priority. Just my opinion :)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5422
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 10:57 am

welshy wrote:Scaling sound in the audio-plugin so that it doesn't under-run may be of benefit, perhaps you could try it in the dev branch?
For my own benchmarking video playback reasons, I added a gencmd to scale the analogue audio.

Code: Select all

vcgencmd pwm_speedup 0x10000
The parameter is a 16.16 fixed point scale factor. So, if you set it to:

Code: Select all

vcgencmd pwm_speedup 0xe000
then the PWM audio will play 1/16 slower.

You would use this to confirm the audio would be glitch free, if you were X% faster and to determine the X% required.

jacobsson
Posts: 9
Joined: Wed Mar 13, 2013 5:37 pm

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 11:05 am

Personally I think performance should be the highest priority, hopefully people will understand that gamepad is the obvious option.
I'm so impressed and happy that you guys are doing this, I always wanted a n64 as a kid but could never afford it =)

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 11:09 am

jacobsson wrote:Personally I think performance should be the highest priority, hopefully people will understand that gamepad is the obvious option.
I'm so impressed and happy that you guys are doing this, I always wanted a n64 as a kid but could never afford it =)
If you never played Mario 64 before or Ocarina of Time then you're in for a treat. Some classic titles on this console!

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 11:49 am

KitchUK wrote:You're in for a treat. Some classic titles on this console!
Agreed, the PlayStation changed the face of gaming by embracing a more 'Grown Up' approach to the activity, unfortunately due to this many missed out on the N64 due to it being perceived as a 'childish' system due to the continued use of cute characters etc. However, from a purely gaming standpoint the N64 played host to many of the finest Titles EVER, on ANY System.
"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

Mon Nov 11, 2013 11:59 am

welshy wrote:
KitchUK wrote:You're in for a treat. Some classic titles on this console!
Agreed, the PlayStation changed the face of gaming by embracing a more 'Grown Up' approach to the activity, unfortunately due to this many missed out on the N64 due to it being perceived as a 'childish' system due to the continued use of cute characters etc. However, from a purely gaming standpoint the N64 played host to many of the finest Titles EVER, on ANY System.
I have to agree to that.

What gets me is how some great titles like Zelda now use 'cartoon' style graphics on newer consoles. The N64 was definitely the best.

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 12:28 pm

The Nintendo Seal of quality! :D

Image

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 12:52 pm

I need to test it but the dynamic frequency mod is available if someone else wants to give it a go ...
set the DEFAULT_MODE to a low frequency e.g. 10000 and set DYNAMIC_FREQ to TRUE.

Note: If you use the ROM frequency then it will not work, Ideally the output frequency should be less than ROM freq/2.

I wish the old laptop I want to use would start running mupen64plus so I can develop and test faster on it

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

Re: WIP: Playable Nintendo 64 Emulator Available

Mon Nov 11, 2013 2:39 pm

ric_rpi
Its SLOWER than the Master even with the changes suggested, also the sound is terrible (Princess Toadstool sounds like Barry White!) and it crashes/freezes after a few seconds (tested with Mario 64) both with DEFAULT_MODE=10000 and 1 (ROM Fz).
"The list of things I have heard now contains everything!"

Return to “Gaming”