xboxscene.org forums

Pages: 1 2 3 [4] 5

Author Topic: Zsnexbox 2.99b2  (Read 522 times)

bd2003

  • Archived User
  • Newbie
  • *
  • Posts: 2
Zsnexbox 2.99b2
« Reply #45 on: February 05, 2007, 02:27:00 PM »

QUOTE(nes6502 @ Feb 5 2007, 04:32 PM) View Post

The input code polls every 1ms. It was set at 8ms until 2.99b2. Also, the buttons are allready at the tightest threshold to avoid picking up crosstalk from other buttons. I go any lower, and when a user presses "X" it could register "X", "Y" and "A", etc....

The Xbox controller requires you to push the buttons 1/3 to halfway down before it sends a "button pressed" messge (which is what all my Xbox controllers do), and I can't do anything about that.

I could try turning off Vsync but I suspect that will provide a lot of ugly tearing.


Then those two things are out of the equation.

I can guarantee you disabling vsync will cause tearing.  It doesnt bother me, but other people seem to really hate it.  But if it can solve the lag issue, I'd at least enjoy the option to use it in games that really need the precision.

Although I'm still thinking there may be more to it than that - the lag feels like far more than a single frame (16ms), which would be essentially imperceptible..this is definitely perceptible if you know what to look for.

When you set it to use "none" as filtering, does that skip an entire block of code that could be somehow causing the delay, or is none a "separate but equal" codepath?

Theres an option that I cant figure out...what is the "old style mode 2" option all about?

Also, superscale2x + HRM7 doesnt work correctly - it superscales, but no HRM7.
Logged

nes6502

  • Archived User
  • Hero Member
  • *
  • Posts: 1158
Zsnexbox 2.99b2
« Reply #46 on: February 05, 2007, 02:47:00 PM »

QUOTE(bd2003 @ Feb 5 2007, 10:34 PM) View Post

Then those two things are out of the equation.

I can guarantee you disabling vsync will cause tearing.  It doesnt bother me, but other people seem to really hate it.  But if it can solve the lag issue, I'd at least enjoy the option to use it in games that really need the precision.


I will look into providing an option to disable vsync even though I suspect most users will not use it due to the tearing.

QUOTE

When you set it to use "none" as filtering, does that skip an entire block of code that could be somehow causing the delay, or is none a "separate but equal" codepath?


Filters are mapped as function pointers, so it calls the function for the filter you select. in the case of "none" is calls the noFilter() function. So execution time through the code is the same but the code in the function is less with no filter selected.

QUOTE

Theres an option that I cant figure out...what is the "old style mode 2" option all about?


Not sure. You'd probablly want to research that one on the ZSNES boards as it's internal to ZSNES and not my code.

QUOTE

Also, superscale2x + HRM7 doesnt work correctly - it superscales, but no HRM7.


Are you sure? Here's a good test. Play Super mario Kart (for about a lap) with just Superscale2x with the FPS turned on. Notice that the FPS should stay at 60. Now exit to the video options menu and switch to Superscale2x + HRM7. It should drop by 10-15FPS. If it doesn't then I'll look into it.

If you really want to help narrow this down, can you download ZsnexBox 1.0 and test this input issue?

1.0 was using my old input code and it only supported 1 player so there is much less overhead between frames.

Also try 1.3 as that was the first release to use all my new input code.

I would test it myself but I don't know what to look for.


Logged

Andrew_Roy

  • Archived User
  • Jr. Member
  • *
  • Posts: 84
Zsnexbox 2.99b2
« Reply #47 on: February 05, 2007, 03:53:00 PM »

Don't ask for links to or request of files compiled in XDK

Check the pinned thread for where to find any version of Zsnexbox.
Logged

DZIAD

  • Archived User
  • Newbie
  • *
  • Posts: 44
Zsnexbox 2.99b2
« Reply #48 on: February 05, 2007, 04:35:00 PM »

Thanks so much for all your hard work  beerchug.gif
Logged

Consoleman!

  • Archived User
  • Full Member
  • *
  • Posts: 102
Zsnexbox 2.99b2
« Reply #49 on: February 05, 2007, 11:14:00 PM »

I don't see how v-sync itself could cause input lag, especially when the input polls every 1ms.  The frame buffer and controllers are probably more likely to blame here.
Logged

bd2003

  • Archived User
  • Newbie
  • *
  • Posts: 2
Zsnexbox 2.99b2
« Reply #50 on: February 06, 2007, 08:43:00 PM »

QUOTE(Consoleman! @ Feb 6 2007, 01:21 AM) View Post

I don't see how v-sync itself could cause input lag, especially when the input polls every 1ms.  The frame buffer and controllers are probably more likely to blame here.


After testing zsnexbox without v-sync, re-investigating the pc port of zsnes, and comparing it to xsnes9x, snes9x pc and a real SNES, I've come to a conclusion that it's a problem with zsnes at large.

I tried using the latest build of pc zsnes, and noticed that while there is less lag with triple buffering enabled, there is *exactly* the same amount of lag as there is on znex.  The less amount of lag without the buffering tricked me into thinking that removing the buffering/v-sync solves the problem - it doesnt.  Slowing zsnes down so it runs at a few fps still shows the problem - mario jumps 4-5 frames after input should be received.

Comparing it to xsnes9x, snes9x and real SNES, it is noticibly different.  I can't even begin to guess where the two emulators differ than zsnes has lag, but it most certainly does.  

It's a shame, because I really do dig znexbox, since its way faster than xsnes9x.
Logged

Consoleman!

  • Archived User
  • Full Member
  • *
  • Posts: 102
Zsnexbox 2.99b2
« Reply #51 on: February 06, 2007, 11:57:00 PM »

QUOTE(bd2003 @ Feb 6 2007, 10:50 PM) View Post

After testing zsnexbox without v-sync, re-investigating the pc port of zsnes, and comparing it to xsnes9x, snes9x pc and a real SNES, I've come to a conclusion that it's a problem with zsnes at large.

I tried using the latest build of pc zsnes, and noticed that while there is less lag with triple buffering enabled, there is *exactly* the same amount of lag as there is on znex.  The less amount of lag without the buffering tricked me into thinking that removing the buffering/v-sync solves the problem - it doesnt.  Slowing zsnes down so it runs at a few fps still shows the problem - mario jumps 4-5 frames after input should be received.

Comparing it to xsnes9x, snes9x and real SNES, it is noticibly different.  I can't even begin to guess where the two emulators differ than zsnes has lag, but it most certainly does.  

It's a shame, because I really do dig znexbox, since its way faster than xsnes9x.

My suggestion is to take a visit to the Zsnes forum and explain your test results there.  I'd also place more emphasis on Zsnes' performance than Zsnexbox's, since it's not their port.

http://board.zsnes.com/phpBB2/
Logged

AtomicShroom

  • Archived User
  • Newbie
  • *
  • Posts: 5
Zsnexbox 2.99b2
« Reply #52 on: February 07, 2007, 06:17:00 AM »

QUOTE(Consoleman! @ Feb 6 2007, 01:21 AM) View Post

I don't see how v-sync itself could cause input lag, especially when the input polls every 1ms.  The frame buffer and controllers are probably more likely to blame here.


It's actually very probable that v-sync adds some lag as the emulator waits for the next Vblank before rendering. Any sort of waiting between the input and actual image render will create a lag in controls.  The only way to avoid this is to not employ any sort of buffering.  We're maybe losing one frame between the control polling and actual render on screen?  It's not much, but it's something we can feel.

But somehow ZSnes (even the PC version) is losing much more than one frame.  We're talking maybe 2-3 frames here. That's just awful.   Like that other guy said, playing games that require lightning quick reflexes like Tetris Attack becomes painfully unplayable.
Logged

Consoleman!

  • Archived User
  • Full Member
  • *
  • Posts: 102
Zsnexbox 2.99b2
« Reply #53 on: February 07, 2007, 07:57:00 PM »

QUOTE(AtomicShroom @ Feb 7 2007, 08:24 AM) View Post

It's actually very probable that v-sync adds some lag as the emulator waits for the next Vblank before rendering. Any sort of waiting between the input and actual image render will create a lag in controls.  The only way to avoid this is to not employ any sort of buffering.  We're maybe losing one frame between the control polling and actual render on screen?  It's not much, but it's something we can feel.

But somehow ZSnes (even the PC version) is losing much more than one frame.  We're talking maybe 2-3 frames here. That's just awful.   Like that other guy said, playing games that require lightning quick reflexes like Tetris Attack becomes painfully unplayable.

IIRC, vsync\vblank shouldn't add any additional input lag since this is basically the same rendering method used by the SNES.

If the perceived lag bothers you fellas that much, perhaps one of you should present your test results to the devs on the Zsnes board.

Even though some of us either don't notice it or aren't bothered by it, I think it's fair to say that we'd all welcome any reduction of input lag.
Logged

Spaceman2004

  • Archived User
  • Full Member
  • *
  • Posts: 241
Zsnexbox 2.99b2
« Reply #54 on: February 11, 2007, 08:33:00 AM »

I may have got the wrong end of the stick, but as far as I understand, roms have the name of the game inside them...(?)

If this is so, would it possible that zsnexbox scanned all the games with a one off kind of thing, that linked up the name of the file to the "true" name of the game in a database file? Then snexbox showed the database file as the list of games?

That way long file names wouldn't matter any more.

If I'm wrong just hit me around the back of the head and ignore me!  jester.gif

Thanks for all the hard work! (I never had a snes as a kid, so I'm enjoying a few games for the first time around!)
Logged

nes6502

  • Archived User
  • Hero Member
  • *
  • Posts: 1158
Zsnexbox 2.99b2
« Reply #55 on: February 12, 2007, 06:27:00 PM »

QUOTE(Vlcice @ Feb 12 2007, 11:46 PM) View Post

I've noticed a bit of an odd bug with one controller I have.

I use a Magic Box controller adapter (Saturn/PS1/Dreamcast) with a digital Saturn pad. It works normally with other emulators and Xbox games, but in Zsnexbox every input is interpreted as a repeated stream of button-presses. This occurs both in the GUI and in-game, and applies to d-pad movements as well as button presses. I've checked the settings and the turbo is turned off. It occurs with PS1 pads on the same adapter, as well, though that's not as relevant.

Is it possible that the digital-only input is causing some problems with the way Zsnexbox reads the Xbox controller?


Not sure. Does it work correctly with any version before 2.99?
Logged

nes6502

  • Archived User
  • Hero Member
  • *
  • Posts: 1158
Zsnexbox 2.99b2
« Reply #56 on: February 12, 2007, 07:54:00 PM »

QUOTE(Vlcice @ Feb 13 2007, 03:14 AM) View Post

I've just tried going back to 2.98, and it looks like it works correctly there.


Interesting. I dropped the polling from 8ms to 1ms to attempt to fix the lag some users seem to be having. But it didn't seem to fix anything. I guesss I could change it back to 8ms. That's the only input code I've changed since 1.3
Logged

Vlcice

  • Archived User
  • Newbie
  • *
  • Posts: 7
Zsnexbox 2.99b2
« Reply #57 on: February 13, 2007, 09:25:00 AM »

That would be great, if it doesn't break anything else.

Thank you for looking into this so quickly, and thank you for your great work on the emulator!
Logged

PapaChabre

  • Archived User
  • Newbie
  • *
  • Posts: 2
Zsnexbox 2.99b2
« Reply #58 on: February 20, 2007, 12:33:00 AM »

Pardon me if this issue has already been addressed or if it doesn't belong here, but I am running the newest EvoX and I can't seem to get ZsnexBox to load up.  It shows up under emulators, but when I try to run it, it says it's loading for a moment and then it just goes back to the dash.  In case it helps, here are the contents of my path.ini:

G:\Emulators\ZsnexBox\artwork\Shots 1\
G:\Emulators\ZsnexBox\artwork\Shots 2\
G:\Emulators\ZsnexBox\artwork\Shots 3\
G:\Emulators\ZsnexBox\artwork\Shots 4\
G:\Emulators\ZsnexBox\artwork\Shots 5\
G:\Emulators\ZsnexBox\artwork\Shots 6\
G:\Emulators\ZsnexBox\artwork\Shots 7\
G:\Emulators\ZsnexBox\artwork\Shots 8\
G:\Emulators\ZsnexBox\sram\
G:\Emulators\ZsnexBox\save\
G:\Emulators\ZsnexBox\ini\
G:\Emulators\ZsnexBox\rumble\
G:\Emulators\ZsnexBox\cheats\
G:\Emulators\ZsnexBox\garbage\
G:\Roms\SNES\

The directories are all correct to my knowledge, but if there's some small format error maybe someone can point it out.  TIA

-Papa
Logged

PapaChabre

  • Archived User
  • Newbie
  • *
  • Posts: 2
Zsnexbox 2.99b2
« Reply #59 on: February 20, 2007, 12:53:00 AM »

I think that happened because I accidently added an extra line at the bottom of the ini.  I deleted it and it seems to work now.

-Papa
Logged
Pages: 1 2 3 [4] 5