WIP: Playable Nintendo 64 Emulator Available


382 posts   Page 5 of 16   1, 2, 3, 4, 5, 6, 7, 8 ... 16
by Shredhed » Fri Nov 29, 2013 2:29 pm
yep, tried that. Here's my gles2n64.conf:

#Window Settings:
window xpos=0
window ypos=0
window width=800
window height=480
window refwidth=800
window refheight=480

#Framebuffer Settings:
framebuffer bilinear=0
framebuffer width=400
framebuffer height=240

#VI Settings:
video force=0
video width=320
video height=240

#Render Settings:
enable fog=1
enable primitive z=1
enable lighting=1
enable alpha test=1
enable clipping=0
enable face culling=1
enable noise=0

#Texture Settings:
texture 2xSAI=0
texture force bilinear=0
texture max anisotropy=0
texture use IA=0
texture fast CRC=1
texture pow2=1

#Frame skip:
auto frameskip=1
target FPS=20
frame render rate=1
vertical sync=0

#Other Settings:
update mode=4
print FPS=0
ignore offscreen rendering=0
force screen clear=0
flip vertical=0
tribuffer opt=1

#Hack Settings:
hack banjo tooie=0
hack zelda=0
hack alpha=0
hack z=0
Posts: 9
Joined: Fri Nov 29, 2013 12:41 pm
by welshy » Fri Nov 29, 2013 2:52 pm
Shredhed
It all looks OK. Try changing to these setings -

#VI Settings:
video force=0
video width=400
video height=240

I notice ric did make a change to the dev build one day ago but without a good look at the code I'm not sure what the difference is. I would try it again NOT from Emulation Station and run in Console to see if it is conflicting with the mupen configurations, I believe F4 exits Emulation Station. The reason gles2 is running faster is because its set to 20FPS where as rice renders at 30FPS. My testing posted here was at 30FPS so I compare/asses the plugins true rendering performance at an equal level.
Last edited by welshy on Fri Nov 29, 2013 3:03 pm, edited 1 time in total.
"The list of things I have heard now contains everything!"
Posts: 1648
Joined: Mon Oct 29, 2012 2:07 pm
by Shredhed » Fri Nov 29, 2013 3:01 pm
Hey Welshy thanks for the reply. I looked at the code differances and one of the changes concerns the screen resolution being set from the config file. The resolution used to be hard coded, now it's set dynamically based on config settings. below taken from code :

config.window.width, config.window.height, 32, M64VIDEO_FULLSCREEN

you can see he's grabbing values from the config file. but where does the FULLSCREEN value come from? is that from the mupen64.cfg file ?

Thanks for the help :-)
Posts: 9
Joined: Fri Nov 29, 2013 12:41 pm
by welshy » Fri Nov 29, 2013 4:40 pm
Shredhed
Ok, yes the new build 'Defaults' need changing as it is now correctly reading them from the gles2 config (It was rendering 400x240 in a 800x480 Window!).
In gles2n64.conf change to -

#Window Settings:
window xpos=0
window ypos=0
window width=640
window height=480
window refwidth=640
window refheight=480

#Framebuffer Settings:
framebuffer bilinear=0
framebuffer width=640
framebuffer height=480

#VI Settings:
video force=0
video width=640
video height=480

For another resolution say 320x240 (Actual N64 Hardware resolution) change all 640x480 to 320x240

#Other Settings:
update mode=1 (Default: 1, 4 now causes the 'intermittent' rendering issues!)
ignore offscreen rendering=0 (Default: 1, changing to 0 stops flickering NB Rendering is slower (See my previous 'Testing' Post))

If you are still having issues having made these changes then its definitely a config conflict with Emulation Station!
Last edited by welshy on Fri Nov 29, 2013 5:00 pm, edited 1 time in total.
"The list of things I have heard now contains everything!"
Posts: 1648
Joined: Mon Oct 29, 2012 2:07 pm
by Shredhed » Fri Nov 29, 2013 4:59 pm
Welshy, Brilliant !! Full Screen !! Thanks !

Since your testing this stuff out like me. Can you get Starfox64 to get pass the intro screen? This also used to work before this build. Now i get just a black screen after pressing Start. When i had the small window problem and i was changing the screen size versus buffer sizes, i got the main menu to come up. But now that the screen is nice and full size,i get the black screen. heh fix one thing break another ;-)
Posts: 9
Joined: Fri Nov 29, 2013 12:41 pm
by welshy » Fri Nov 29, 2013 5:05 pm
Shredhed
I tested Mario64 (USA) and StarFox64 (USA) on these settings (did you set: update mode=1?), both work fine!? Could be your ROM, I recall when previously testing PilotWings64 the USA Cart was fine but the JAP ROM didn't work properly.

'fix one thing break another'
Yup, that's one of the problems with N64 emulation as its HLE (High Level Emulation)!
Last edited by welshy on Fri Nov 29, 2013 5:22 pm, edited 2 times in total.
"The list of things I have heard now contains everything!"
Posts: 1648
Joined: Mon Oct 29, 2012 2:07 pm
by ric_rpi » Fri Nov 29, 2013 5:11 pm
Shredhed

Starfox definitely works, have you set auto frameskip to 1? Also fog works so can switch that on.

I will change the window resolution defaults before pushing into master later. I hard-coded gles2n64 to use fullscreen as I am only focusing on running in the terminal and only developers would probably want to run without fullscreen to see terminal output.

I pushed some more optimizations yesterday so it should run a little faster.

Shredhed, welshy are you running the very latest version?
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by welshy » Fri Nov 29, 2013 5:19 pm
ric_rpi
Yes its the latest Build, the Fog is working nicely and all the settings are now being read correctly for the gles2 plugin from the config (which is why it wasn't 'fullscreen' See above post). Nice work

'only developers would probably want to run without fullscreen to see terminal output'
Yup, thats the only reason I ever run programs in XWindows so I can analyse whats going on to asses issues/problems!
Last edited by welshy on Fri Nov 29, 2013 7:26 pm, edited 2 times in total.
"The list of things I have heard now contains everything!"
Posts: 1648
Joined: Mon Oct 29, 2012 2:07 pm
by Shredhed » Fri Nov 29, 2013 5:49 pm
Hi, I've tried 3 different roms of StarFox and same results, black screen after pressing start. While i was flip flopping between versions i did manage to get the main menu and enter training mode, but was unable to replicate it. When i exited the game and went back in i got the old black screen again.

I'm using the latest build. Prior to yesterdays build i was able to successfully start a StarFox game every time.
On a positive note Mario works wonderfully now !!!

Keep up the awesome work !

Here are my settings from .conf file:
#Frame skip:
auto frameskip=1
target FPS=20
frame render rate=1
vertical sync=0

#Other Settings:
update mode=1
print FPS=0
ignore offscreen rendering=0
force screen clear=1
flip vertical=0
tribuffer opt=1
Posts: 9
Joined: Fri Nov 29, 2013 12:41 pm
by welshy » Fri Nov 29, 2013 5:59 pm
Shredhed
Odd seeing as ric_rpi and myself don't seem to be having an issue? Mmm.....
"The list of things I have heard now contains everything!"
Posts: 1648
Joined: Mon Oct 29, 2012 2:07 pm
by ric_rpi » Fri Nov 29, 2013 7:01 pm
Have you changed any of the pi graphics settings e.g. cpu/gpu memory ratio, overscan, OS resolution? - i'm wondering if there is not enough memory for the graphics or some other setting that isn't compatible with what mupen64plus tries to do.

Do you get any messages out when you get the black screen after closing?
Is the screen entirely black or do you see mupen64plus stdout messages that stop around 'Core: EGL 1.4 initialized'?
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by Shredhed » Fri Nov 29, 2013 7:19 pm
ric, No i haven't changed anything on the pi's setup at all. Basically what happens is i start mupen, the rom loads, i get the intro movie(n64 logo, sun moving across background etc.), i press a button to kill the demo and are then presented with the "press Start" screen with all the characters standing there, music playing etc... I press Start and then i get a completely black screen and it stops, no sound or any text or otherwise displayed on screen. I have to press esc on keyboard to exit out of mupen.
Posts: 9
Joined: Fri Nov 29, 2013 12:41 pm
by ric_rpi » Fri Nov 29, 2013 9:01 pm
Shredhed

I've done a complete rebuild and tested with Lylat Wars (Starfox in EU) and can report it definitely works and gets past the point you mentioned.

Might be worth running with --verbose and piping the output to a file. If you attach it, I can check through it for you.
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by Lauszus » Sat Nov 30, 2013 9:07 pm
It just tried Super Mario 64 and it is running really smooth! Awesome work ric_rpi :)

For anyone that want to use a Xbox 360 wireless controller:

The default values in InputAutoCfg.ini did not work for me, so here is the steps I needed to do in order for it to work:

1. First you should install xboxdrv:

Code: Select all
sudo apt-get install xboxdrv


2. Now create a config file called xboxdrv.cfg with the following content:

Code: Select all
[xboxdrv]
silent=true
quiet=true
trigger-as-button=true

[ui-buttonmap]
guide=KEY_ESC

[axismap]
x2^deadzone:27000
y2^deadzone:27000


3. Now start the driver:

Code: Select all
sudo xboxdrv -c xboxdrv.cfg &


4. Now replace the "Microsoft X-Box 360 pad" entry in InputAutoCfg.ini with the following:

Code: Select all
[Microsoft X-Box 360 pad]
[Win32: Controller (XBOX 360 For Windows)]
[Win32: XBOX 360 For Windows (Controller)]
[Win32: XBOX 360 For Windows]
[Xbox 360 Wireless Receiver]
[OSX: Wireless 360 Controller]
[OSX: Controller]
[Linux: Xbox Gamepad (userspace driver)]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(9)
Z Trig = button(6)
B Button = button(2)
A Button = button(0)
C Button R = axis(2+)
C Button L = axis(2-)
C Button D = axis(3+)
C Button U = axis(3-)
R Trig = button(5)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)


For anyone else that want to add support for a different joystick, this how I did it:

1. First install the following packages:

Code: Select all
sudo apt-get install gcc build-essential libsdl1.2-dev


2. Add user to video group:

Code: Select all
sudo usermod -a -G video [your_username]


3. Now download the joystick test program:

Code: Select all
wget http://www.libsdl.org/release/SDL-1.2.15/test/testjoystick.c


4. Compile it:

Code: Select all
gcc `sdl-config --cflags` `sdl-config --libs` -o testjoystick testjoystick.c


5. Run the program:

Code: Select all
./testjoystick


This should give the following output:

Code: Select all
There are 1 joysticks attached
Joystick 0: Xbox Gamepad (userspace driver)
       axes: 4
      balls: 0
       hats: 1
    buttons: 12


Now you can run:

Code: Select all
./testjoystick 0


And it should start printing out when buttons are pressed etc.

Note that the SDL part is stolen from this guide: viewtopic.php?f=33&t=13789.

Regards
Lauszus
Posts: 7
Joined: Tue Feb 12, 2013 12:40 am
by baeckerman83 » Sun Dec 01, 2013 4:39 pm
ric_rpi wrote:I am surprised you're getting that error although it is related to the last optimization in the master branch. It would suggest that the config.cpp and confg.h files in gles2rice are not up-to-date.

I am currently doing a complete rebuild and if that is fine and no-one has reported any issues with the current ric_dev branch then I will push it into the master tonight.


Now all is fine and it's working. Thank you for your hard work!
Posts: 6
Joined: Fri Nov 29, 2013 7:42 am
by arimal » Mon Dec 02, 2013 10:24 pm
I'm finally getting around to testing a bit more pulled master and compiled last night, I'm getting a few strange results for one I keep seeing the audio plugin being initialized twice, sometimes followed by a warning of "multiple instances of event type 0x8 in interrupt que" I don't know the cause but I suspect its why I'm hearing a lot more garbage sound out of a few titles(Diddy Kong Racing and Harvest Moon in particular).

The strangest issue would have to be Link's model constantly blinking between two locations across all 3 NTSC roms(OOT, MM, and Master quest.) He's the only model I've seen with the problem and to make it even more perplexing it happens with both video plugins. Is anyone else seeing this behavior?

I'll be back with another post as I go through more titles with various settings.
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm
by ric_rpi » Tue Dec 03, 2013 11:24 am
The audio plugin has always initialized twice as it initializes with the default frequency then the frequency the rom specifies.

The error "multiple instances of event type 0x8 in interrupt que" started when I removed CHECK_INT. It is caused because an SI_INT is put in the interrupt queue and doesn't fire before another one is added to the queue. This is probably what is breaking Link's model. The time SI_INT waits has a value 0x900(?) but there is also 0x100 commented out in the original code.

I will test with diddy kong later
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by arimal » Tue Dec 03, 2013 3:55 pm
Thanks for the reply I suppose I just didn't notice the second frequency scroll by before, it was the interrupt que warning that drew my eye to it I guess.
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm
by ric_rpi » Tue Dec 03, 2013 5:07 pm
arimal

Thanks for commenting on the issue, I'll experiment with different values for SI_INT to remove the message and see if Zelda issue goes away too.

Where in Zelda does the graphics issue occur e.g. intro or in game at certain location?
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by arimal » Tue Dec 03, 2013 5:34 pm
As far as I've seen It is constant on the title screens, during cut scenes, and gameplay. If Link is on screen he is blinking between where he is supposed to be and a point below and to the left.
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm
by ric_rpi » Thu Dec 05, 2013 12:26 pm
I've tried changing the SI_INT wait time to 0x100 but it doesn't fix the 'blinking' Link.

I'm also having some trouble with the gles2n64 plugin. It screws up the GPU / GLES2 so I have to reboot to even get gles2rice working again. Deleting cfg and reloading off remote/rebuilding doesn't seem to work either :?

Edit1: Removed the gles2n64.conf and its now working...
Edit2: Used wrong plugin and I still having problems :-(
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by ric_rpi » Thu Dec 05, 2013 3:46 pm
Is anyone else having problems with gles2n64?

I am wondering if I need to rebuild the SD card but I will loose a few days if I try ...
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by arimal » Thu Dec 05, 2013 4:22 pm
I've had gles2n64 crashing mupen occasionally when you exit the emulator but only on zelda roms, it operates fine if your playing Mario or Starfox. But I've always still had ssh access even if it takes forever to respond.
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm
by ric_rpi » Thu Dec 05, 2013 4:27 pm
I can kill -9 mupen64plus remotely but I can't then open up a GLES instance, even with my small GLES testing binaries, until the pi is rebooted. gles2rice works normally though ...
Posts: 205
Joined: Thu Jul 11, 2013 2:33 pm
Location: Bedford, UK
by arimal » Thu Dec 05, 2013 4:38 pm
I can't say that I've seen that.
Posts: 38
Joined: Sun Jun 17, 2012 3:03 pm