If it runs Quake..why not SNES?


36 posts   Page 2 of 2   1, 2
by eix » Sun Jan 06, 2013 12:41 pm
andrego wrote:
eix wrote:...I am currently adding OpenGL ES support to snes9x, in a bare metal version...


That's an exciting prospect and I'm really looking forward to your work on that!

Running the emulator directly on the hardware means less overhead and a much faster (nearly instant) boot time. Coupled with support for something like this GPIO adapter, and you'd end up with (in theory) a modern SNES appliance that could even use actual controllers for an authentic experience.

I think there was a misunderstanding: I just mean that I am using OpenGL ES for the video rendering, without X11. Sorry for using an ambiguous wording.

andrego wrote:Using a similar approach (bare metal) a SNES emulator was even possible on a Nintendo DS, which had just 2 67Mhz ARM9 chips. Granted it wasn't perfect but many games worked and ran full-speed.

Embedded/low power systems involve compromise, but with optimization/speed hacks, certainly the RPi, with it's MUCH more powerful hardware, is capable enough to do it.

Here's a video of that emulator (snemulds) in action for anyone that is curious.

Yes, that would be a truly graal - also in reference to what Toad King said
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by eix » Sun Jan 06, 2013 12:53 pm
Toad King wrote:The issue is all those steps are done in software, and so far all the emulators I know of only use SDL/OpenGL for drawing the final frame to the screen, a very simple task compared to everything else. and one that GLES acceleration will not improve much.

100% agree. Nonetheless I'd like to get rid of the X11 layer here.

Toad King wrote:The issue is there are no emulators as performance-light as ZSNES for ARM. There are some that get close, but the fact of them being partial ports of SNES9x and the fact that clock-for-clock x86 (even old Pentiums) perform better than the ARM11 in the Raspberry Pi mean that it will take a new project to get fullspeed.

Most of the closed source ones I talk about are ports for the GPX2 consoles, where I can't seem to find the sources for, so I assume they just never release them.

Any snes9x variant must indeed be a bad loose emulation. Let's say we wanted to write ZSNES for ARM (please: just a thought exercise). You take for example snes9x and then profile it on the target ARM11 architecture, then you rewrite the "slow" parts, and iterate till...end of time?

This is what I would expect to find in any optimized ARM port.

I think, however, that we are not on the same page: I posted early on this thread 4 (with sourcecode) ARM-based snes9x ports, did you notice?

Although I have not yet considered them, I will indeed start looking at them when I focus the emulation problem.

NOTE: in that same post there is one with ARM optimizations for DSP emulation, that I am indeed going to consider
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by eix » Thu Jan 10, 2013 8:48 pm
Let me add another interesting port to the list:

DrNokSnes - http://drnoksnes.garage.maemo.org/
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by eix » Fri Jan 11, 2013 12:45 am
Step number 1 complete - here you can take a bite of Snes9x with native OpenGL :)

viewtopic.php?f=78&t=29242&p=257055

I will keep this thread open for forks/ports discussion
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by dasmau89 » Fri Jan 18, 2013 5:11 pm
I will try this out, thank you for your work 8-)
btw, you might want to check out http://www.openpandora.org/, this is an arm8 600/1000 MHz device with fullspeed snes emulation (on top of X11 :o)
https://www.youtube.com/watch?v=RiTD9EMxjMI
thou shalt not kill -9
User avatar
Posts: 13
Joined: Wed Jan 02, 2013 3:19 pm
by steev » Fri Jan 18, 2013 11:49 pm
dasmau89 wrote:btw, you might want to check out http://www.openpandora.org/, this is an arm8 600/1000 MHz device with fullspeed snes emulation (on top of X11 :o)
https://www.youtube.com/watch?v=RiTD9EMxjMI


Note that the pandora uses a Cortex A8 ARM, which is likely quite a bit faster than our Pi's old ARM11.
I wish these devs luck though and appreciate the hard work they're doing. I would love to see full speed emulation of some of the newer systems like SNES and Genesis on the Pi.
Posts: 57
Joined: Fri Jan 27, 2012 5:08 pm
by eix » Sat Jan 19, 2013 8:19 am
After adding direct OpenGL ES rendering I merged the spc700 codebase from a snes9x 1.40 fork; this was an optimized ARM spc700 core written by notaz

Technically this was a backport because snes9x 1.53, the main codebase I am using, is more advanced than 1.40 and contains the bsnes sound emulation core. So I had to "rewire" the old snes9x 1.40 core into the new 1.53, and I must have introduced several bugs because the sound buffer is barely populated when being played, resulting in no sound at all. I would need some special debugging attention to find the problems there, but I am not strongly motivated in doing so thus I will put the remaining commits on github and focus on the problem from some other perspective. Let's say that I do not have the skills/time/motivation to make this 1.40 ARM sound core work in 1.53

Thanks for the link, will give it a try and report back! It's probably comparable to the other ARM ports posted in page 1
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by eix » Sat Jan 19, 2013 8:45 am
steev wrote:
dasmau89 wrote:btw, you might want to check out http://www.openpandora.org/, this is an arm8 600/1000 MHz device with fullspeed snes emulation (on top of X11 :o)
https://www.youtube.com/watch?v=RiTD9EMxjMI


Note that the pandora uses a Cortex A8 ARM, which is likely quite a bit faster than our Pi's old ARM11.
I wish these devs luck though and appreciate the hard work they're doing. I would love to see full speed emulation of some of the newer systems like SNES and Genesis on the Pi.

I agree with steev here, altough I want to "touch with hands" in this case, I think there is hope.

I have grabbed the sources, so I will post another update when I make progress with my "self-assignments" :)
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by eix » Sun Jan 20, 2013 5:02 pm
I have published the sources of my snes9x works here:

https://github.com/neagix/snes9x-rpi

This is a fork of current (as of December 2012) snes9x git repository, with the following changes:
  • support of OpenGL ES direct rendering (added by neagix)
  • SDL input and audio code from snes9x-sdl (merged from https://github.com/domaemon/snes9x-sdl)
  • SPC700 ARM-optimized core from a snes9x-0.40 fork (by notaz)

Audio does not work..but instead of trying to make this work I have now started working on an older version 1.39/1.40 as per fork of I.Wesnoth's Snes9x4P
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by eix » Sun Jan 20, 2013 10:29 pm
My hacking around Pandora's snes9x has been mildly successful.

Sound is not any good, but I will focus on that later. There is hope because I am not yet using the SPC700 ASM core (also available there) and I think something more can be done for audio synchronization

There is currently a video glitch but I have not yet been able to find the issue. Feel free to give a look at https://github.com/neagix/snes9x-rpi/tree/perf (perf branch).
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am
by eix » Wed Feb 20, 2013 7:21 pm
I've stopped working on this port, however I want to add some more meat (so to make this thread complete in regards of projects to look at):

https://github.com/nezticle/EmuMasterPi

I've recently tried this one on Android and it sports 2 cores (a C core and native dalvik):

https://github.com/Pretz/SNesoid
User avatar
Posts: 82
Joined: Sat Sep 15, 2012 8:09 am