LAG LAG and more LAG
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
LAG LAG and more LAG
Would somebody tell me please why does snes 9x 1.53 run slow on my pc?, I mean, as I show on the video, I've run both, my xbox and my pc at the same time, the same rom, and after like 10 minutes desynchronization becomes evident to the naked eye, besides that, I experiment a microlag in controller response... if I want both marios jumping at the same time I have to press the pc's controller's button first.
Of course I speed up the video so you don't have to see the same thing for 10 minutes.
PC specs:
amd phenom 9600 agena quad core black edition
6gb ram ddr2 corsair
nvidia 9500 gt 512 mb ddr3 (evga)
asus m3n ws
monitor res 1920x1080 set at a frequency of 60hz
I have sync video and sync audio activated on the emulator
both pc and xbox are running at 60fps
so whats the problem? I just don't understand.
And for those who think that this could be a filter and resolution matter, I've done the test with the lowest res and without filters.
http://www.youtube.com/watch?v=z2wy49YavD8
Of course I speed up the video so you don't have to see the same thing for 10 minutes.
PC specs:
amd phenom 9600 agena quad core black edition
6gb ram ddr2 corsair
nvidia 9500 gt 512 mb ddr3 (evga)
asus m3n ws
monitor res 1920x1080 set at a frequency of 60hz
I have sync video and sync audio activated on the emulator
both pc and xbox are running at 60fps
so whats the problem? I just don't understand.
And for those who think that this could be a filter and resolution matter, I've done the test with the lowest res and without filters.
http://www.youtube.com/watch?v=z2wy49YavD8
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
What xbox port are you using? What settings? What have you set in the display and sound settings in the windows port? There are many factors that change the emulation speed.
Syncing to vsync will definitely get you different results, since your monitor and tv most likely differ in their refresh rates.
Syncing to vsync will definitely get you different results, since your monitor and tv most likely differ in their refresh rates.
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
OV2 wrote:What xbox port are you using? What settings? What have you set in the display and sound settings in the windows port? There are many factors that change the emulation speed.
Syncing to vsync will definitely get you different results, since your monitor and tv most likely differ in their refresh rates.

well i just said my monitor is set to a refresh rate of 60hz, the xbox port is
xSnes9x v1.42 wip 17 june 2004
main coder: lantus
www.lantus-x.com/xsnes9x
I put all the settings I could the same, in the xbox and pc.
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
-
- Hero of Hyrule | Official Port Recruiter
- Posts: 2586
- Joined: Mon May 24, 2004 5:06 pm
- Location: 255.255.255.255
it's a spambot. and you just replied to it.blackprince wrote:what do I mean by what?sunaiza wrote:what do u mean by it.................?

Unofficial Test Monkey For:
* Snes9X GX (Wii)
* Snes9X EX (Android)
* Snes9X 64-bits (PC/Mac)
ZSNES|Ben Heck|NSRT|Bob Smiley
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
-
- Official Android Porter
- Posts: 303
- Joined: Mon Feb 07, 2011 9:20 pm
- Location: All up in your business
There's a bazillion different factors that could contribute to the difference.
First off, the Xbox doesn't have anything running on it besides the emulator and the hypervisor. The PC, on the other hand, has a buttload of stuff running in the background that could soak up CPU time and slow down the emulator just enough to cause the sync issues.
the PC's running a new version of SNES9x, which is more processor intensive.
The sync on the monitor versus the TV might be slightly different. NTSC TVs have a refresh rate of 59.94 frames per second, whereas your PC monitor might be exactly 60 frames per second. If the emulator is compensating for the difference, that could cause the difference.
As for the controller, I would suggest making sure no other programs on your PC have that slight input lag. Some controller drivers have a lot of processing involved in them that can cause that sort of issue, and I wouldn't be surprised if the Xbox simply handles the inputs faster since it's designed as a gaming rig. It's also possible that the newest version of SNES9x is slightly slower on the controller input.
First off, the Xbox doesn't have anything running on it besides the emulator and the hypervisor. The PC, on the other hand, has a buttload of stuff running in the background that could soak up CPU time and slow down the emulator just enough to cause the sync issues.
the PC's running a new version of SNES9x, which is more processor intensive.
The sync on the monitor versus the TV might be slightly different. NTSC TVs have a refresh rate of 59.94 frames per second, whereas your PC monitor might be exactly 60 frames per second. If the emulator is compensating for the difference, that could cause the difference.
As for the controller, I would suggest making sure no other programs on your PC have that slight input lag. Some controller drivers have a lot of processing involved in them that can cause that sort of issue, and I wouldn't be surprised if the Xbox simply handles the inputs faster since it's designed as a gaming rig. It's also possible that the newest version of SNES9x is slightly slower on the controller input.
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
well, I don't think I'm lacking of processing power, it's a amd phenom quad core at 2.3 ghz running windows 7 x64, right now I could run call of duty black ops, need for speed hot pursuit and snes9x at the same time and there's no chance for one of them to slow down, I could probe it just by monitoring the performance with the task manager. I don't think there's a controller problem neither, cuz i have a xbox360 controller, genius usb minipad, original xbox controller, logitech wireless rumblepad 2 controller, a ps2 controller with its usb adapter and none of them have presented lag on any other emulator or gameSparroHawc wrote:There's a bazillion different factors that could contribute to the difference.
First off, the Xbox doesn't have anything running on it besides the emulator and the hypervisor. The PC, on the other hand, has a buttload of stuff running in the background that could soak up CPU time and slow down the emulator just enough to cause the sync issues.
the PC's running a new version of SNES9x, which is more processor intensive.
The sync on the monitor versus the TV might be slightly different. NTSC TVs have a refresh rate of 59.94 frames per second, whereas your PC monitor might be exactly 60 frames per second. If the emulator is compensating for the difference, that could cause the difference.
As for the controller, I would suggest making sure no other programs on your PC have that slight input lag. Some controller drivers have a lot of processing involved in them that can cause that sort of issue, and I wouldn't be surprised if the Xbox simply handles the inputs faster since it's designed as a gaming rig. It's also possible that the newest version of SNES9x is slightly slower on the controller input.

however thank you so much for your answer and for your time, i appreciate it.
-
- Official Android Porter
- Posts: 303
- Joined: Mon Feb 07, 2011 9:20 pm
- Location: All up in your business
Hm. The controller lag intrigues me, especially since you mention it doesn't exist in any other software. That may be something we'll have to delve further into.
I suspect it's related to the fact that SNES9x doesn't actually use DirectInput (I think). Might have to ask the other guys about that one.
I'm going to let you in on something that may or may not blow your mind though.
Quad-core does absolutely nothing for SNES9x.
I suppose I should clarify; it does allow other programs to move to other cores and get out of the way of SNES9x, but the emulator itself doesn't have any way to take advantage of multiple cores. It can't, thanks to how the emulation has to work. You can run Black Ops and NFS at the same time because they'll take two of the other three cores, Windows itself will mostly take up the last core, and you won't see -much- slowdown... but Black Ops and Need for Speed are far more forgiving when it comes to timing. If they take a bit too long to render a frame, they just figure out where everything's supposed to be after the frame's done and calculate the physics with that new timestamp. The emulator doesn't have that luxury. There's no vector physics to calculate, only CPU cycles - and if it takes a little too long to emulate the chip for that frame, it has two options - either finish late (which causes your slight emulator slowdown) or drop a frame of drawing to the screen in an effort to give it enough time to go through the additional clock cycles it has to go through to draw the next frame.
Oof, that was a wall of text.
One more thing to consider... Your Xbox might be running the emulator too fast.
Back to the controller, though - if you use the keyboard instead of a controller, does it still have the input delay?
I suspect it's related to the fact that SNES9x doesn't actually use DirectInput (I think). Might have to ask the other guys about that one.
I'm going to let you in on something that may or may not blow your mind though.
Quad-core does absolutely nothing for SNES9x.
I suppose I should clarify; it does allow other programs to move to other cores and get out of the way of SNES9x, but the emulator itself doesn't have any way to take advantage of multiple cores. It can't, thanks to how the emulation has to work. You can run Black Ops and NFS at the same time because they'll take two of the other three cores, Windows itself will mostly take up the last core, and you won't see -much- slowdown... but Black Ops and Need for Speed are far more forgiving when it comes to timing. If they take a bit too long to render a frame, they just figure out where everything's supposed to be after the frame's done and calculate the physics with that new timestamp. The emulator doesn't have that luxury. There's no vector physics to calculate, only CPU cycles - and if it takes a little too long to emulate the chip for that frame, it has two options - either finish late (which causes your slight emulator slowdown) or drop a frame of drawing to the screen in an effort to give it enough time to go through the additional clock cycles it has to go through to draw the next frame.
Oof, that was a wall of text.
One more thing to consider... Your Xbox might be running the emulator too fast.
Back to the controller, though - if you use the keyboard instead of a controller, does it still have the input delay?
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
good explanation, id like to know if you are a snes9x developer or something, so i know more or less what your pc skill level is and how i could speak to you in order to receive a more efficient help. yes, using the keyboard it still has the lagSparroHawc wrote:Hm. The controller lag intrigues me, especially since you mention it doesn't exist in any other software. That may be something we'll have to delve further into.
I suspect it's related to the fact that SNES9x doesn't actually use DirectInput (I think). Might have to ask the other guys about that one.
I'm going to let you in on something that may or may not blow your mind though.
Quad-core does absolutely nothing for SNES9x.
I suppose I should clarify; it does allow other programs to move to other cores and get out of the way of SNES9x, but the emulator itself doesn't have any way to take advantage of multiple cores. It can't, thanks to how the emulation has to work. You can run Black Ops and NFS at the same time because they'll take two of the other three cores, Windows itself will mostly take up the last core, and you won't see -much- slowdown... but Black Ops and Need for Speed are far more forgiving when it comes to timing. If they take a bit too long to render a frame, they just figure out where everything's supposed to be after the frame's done and calculate the physics with that new timestamp. The emulator doesn't have that luxury. There's no vector physics to calculate, only CPU cycles - and if it takes a little too long to emulate the chip for that frame, it has two options - either finish late (which causes your slight emulator slowdown) or drop a frame of drawing to the screen in an effort to give it enough time to go through the additional clock cycles it has to go through to draw the next frame.
Oof, that was a wall of text.
One more thing to consider... Your Xbox might be running the emulator too fast.
Back to the controller, though - if you use the keyboard instead of a controller, does it still have the input delay?


thanks again for your time.
-
- Official Android Porter
- Posts: 303
- Joined: Mon Feb 07, 2011 9:20 pm
- Location: All up in your business
Your English is good enough to get the message across. That's good enough for me. 
I'm not an actual developer for SNES9x, but I -am- familiar with a few different programming languages, as well as a bit of experience working with the Win32 API and such. I just like to be helpful.
Now then - back to the issue at hand.
You mention that other people don't have problems with crackling audio. Do you currently have that problem?
Here's something to try as well - when SNES9x is running, press CTRL-ALT-DEL and bring up the task manager. Hit the Processes tab, find SNES9x and right click on it, then select 'Set Affinity...' Uncheck all but one check-box. That'll rule out any possible issues with the process getting shuffled between CPU cores.

I'm not an actual developer for SNES9x, but I -am- familiar with a few different programming languages, as well as a bit of experience working with the Win32 API and such. I just like to be helpful.
Now then - back to the issue at hand.
You mention that other people don't have problems with crackling audio. Do you currently have that problem?
Here's something to try as well - when SNES9x is running, press CTRL-ALT-DEL and bring up the task manager. Hit the Processes tab, find SNES9x and right click on it, then select 'Set Affinity...' Uncheck all but one check-box. That'll rule out any possible issues with the process getting shuffled between CPU cores.
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
-
- Official Android Porter
- Posts: 303
- Joined: Mon Feb 07, 2011 9:20 pm
- Location: All up in your business
So it did help a little, especially with the audio... but your controller input's still lagging.
When I get some free time, I think I'm going to see if I can cobble together a quick-and-dirty branch of SNES9x that uses DirectX for controls, and see if that fixes the problem. If it does, that means something's doing some weird input processing on Windows.
Sorry I don't have an immediate solution.
When I get some free time, I think I'm going to see if I can cobble together a quick-and-dirty branch of SNES9x that uses DirectX for controls, and see if that fixes the problem. If it does, that means something's doing some weird input processing on Windows.
Sorry I don't have an immediate solution.
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
-
- Official Android Porter
- Posts: 303
- Joined: Mon Feb 07, 2011 9:20 pm
- Location: All up in your business
Well, Windows itself has the DirectX set of APIs which are designed to bypass a lot of the operating system's layers of handling for input and output. There may be something running on your computer that's messing with your input and making it lag, and I know that SNES9x uses raw input instead of DirectX. The fact that bsnes still lags either way might be attributed to the fact that bsnes just sucks up a lot more CPU time.
I'm just calling it a quick-and-dirty branch 'cause it's going to be a horrible hack as a proof of concept. I make no claims of being a five-star programmer. (No, I haven't started yet.)
--edit--
I just remembered that 'five-star programmer' isn't exactly a compliment when it comes to C. Oh well, you know what I mean.
I'm just calling it a quick-and-dirty branch 'cause it's going to be a horrible hack as a proof of concept. I make no claims of being a five-star programmer. (No, I haven't started yet.)
--edit--
I just remembered that 'five-star programmer' isn't exactly a compliment when it comes to C. Oh well, you know what I mean.
-
- Snes9x White Belt
- Posts: 16
- Joined: Fri Jun 17, 2011 1:25 am
-
- Official Android Porter
- Posts: 303
- Joined: Mon Feb 07, 2011 9:20 pm
- Location: All up in your business
I have the same problem as blackprince, and it is also happening on Ubuntu! (I dual-boot Windows Vista Home Premium x64 and Ubuntu 10.10)
Today I managed to fix it, at least partially... I disabled bilinear filtering and the LAG was there, but less noticiable. Maybe the video card driver is introducing this input lag? And I have crackling audio...
Tested on version 1.53-x64.
On ZSnes it works with no LAG and no crackling audio, bit it is a little unstable on my system, and its last update was on... 2007?
My specs:
Intel Core 2 Duo 2.0 GHz T5800
4GB DDR2
nVidia GeForce 9300M GS 512MB (64-bit DDR)
(X83VB notebook from Asus)
On Wii it works perfectly, also on my SNES xD
Tested with DKC2.
Today I managed to fix it, at least partially... I disabled bilinear filtering and the LAG was there, but less noticiable. Maybe the video card driver is introducing this input lag? And I have crackling audio...
Tested on version 1.53-x64.
On ZSnes it works with no LAG and no crackling audio, bit it is a little unstable on my system, and its last update was on... 2007?
My specs:
Intel Core 2 Duo 2.0 GHz T5800
4GB DDR2
nVidia GeForce 9300M GS 512MB (64-bit DDR)
(X83VB notebook from Asus)
On Wii it works perfectly, also on my SNES xD
Tested with DKC2.