Snes9x port to SDL (and Dingux)

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
Post Reply
SiENcE
Snes9x White Belt
Posts: 7
Joined: Wed Apr 07, 2010 10:35 am

Snes9x port to SDL (and Dingux)

Post by SiENcE »

hi.

i'm new to this forum.

currently i'm developing the Snes9x port for Dingux (a Linux variant for the handheld "Dingoo Digital a320").

This port is based on 1.39 release of Snes9x. It uses SDL and Software Surfaces.

Now i want to port the newest 1.52 src of Snes9x to SDL and then to Dingux. It already works on SDL and Ubuntu and on Dingux. 1.52 is compiled with -DNOSOUND (so no sound support yet). But i have some questions and issues.

Issue 1:
with Snes9x configuration File
* Screen is rendered fine in Dingux.

without Snes9x configuration File:
* I can start Snes9x on Ubuntu and all works.
If i start it on Dingux, the Screen is rendered black.

Issue 2:
* The Speed is really slow compared to 1.39 port. I use the same SDL initialization and render methods in 1.52 but i only get ~6-7fps.

Frameskip = Auto (on 1.39 i get about 25-45fps also Frameskip = Auto).

I also tried several configuration settings in Snes9x configuration file.

-Frameskip = 0, 1, 2 ... all of them smooth the fps ... this is not the solution, just because AUTO must work.

-Sync sound is turned to False

-...

Does anyone have some hints?

thanks
SiENcE
Last edited by SiENcE on Fri Jun 04, 2010 8:28 am, edited 1 time in total.
SiENcE
Snes9x White Belt
Posts: 7
Joined: Wed Apr 07, 2010 10:35 am

Post by SiENcE »

Has non of the developers a reason, why the emulation speed is so slow compared to 1.39 of Snes9x?

I investigate more research into it. I will try all from 1.39 - 1.52.

Maybe it has todo with better, more complex emulation of special chips or sound?

Please give me a hint. I didn't changed anything to the Snes9x code. Only the things i have to implement for a port.
Screwtape
Snes9x White Belt
Posts: 49
Joined: Thu May 26, 2005 12:59 pm

Post by Screwtape »

I believe the sound emulation in 1.5.2 is much, much more accurate (and slow) than older versions; there may be other updates since 1.3.9 that contribute as well.
SiENcE
Snes9x White Belt
Posts: 7
Joined: Wed Apr 07, 2010 10:35 am

Post by SiENcE »

I already compiled with -DNOSOUND option, but this makes no difference.

I reduced everything in my Mainloop and only left in the Snes9x Mainloop. Still only 6/60 fps. So i think it's somewhere in the mainloop.

But i wonder why it's so much slower. But thanks for an answer.
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Post by OV2 »

There have been many emulation improvements since 1.39 - that version is from 2002. Just take a look at changes.txt for a list of changes.
I think there is no specific change that is responsible for the slowdown.
SiENcE
Snes9x White Belt
Posts: 7
Joined: Wed Apr 07, 2010 10:35 am

Post by SiENcE »

Ok. Now i also ported 1.51.

1.51 uses a different APU. Now i get nice rendered sound. But still no fps increase.

I noticed, that the configuration options influence the emulation speed. How does Auto Frameskip work? Did it work, regardless if the LCD has an VSync?
Post Reply