Unbelievable! There is STILL an XP input bug

  • CGen

    CGen - 2003-08-01

    I cannot believe it's STILL there, I reported this ages ago, as well as email the author.

    Comeon Martin, this is a serious bug.
    No matter what you use, keyboard, mouse, joystick. There are serious 'Delays' between pressing a key/button, and on-screen movement.

    Yet, boot into Win9x/ME, and it's great. No probs.

    Now don't get me wrong, I really love this new NES emu, hence my want to get this bug squished in XP. I can then ditch the 9x OS.

    • Martin Freij

      Martin Freij - 2003-08-05

      Did v1.06 fix your problems? If not, I have a naggy feeling it's because your video driver likes to render many frames ahead. It's good in the way that you'll get maximum parallelism from the CPU + GPU out of it but it may produce 'pausy' delays. I made a few tweaks to the renderer in v1.06 to avoid too much frame latency but if your problem remains I guess I'll have to do some more investigation.
      In the meantime, see if there are any option in your driver settings configuration utility that lets you control the use of 'ahead-rendering' and try to disable it.

    • CGen

      CGen - 2003-08-06

      Thanks for trying , Martin.
      But it's still there.
      It happens when you assign keys to the joypad via the menu, and in any game.
      But in WinME, using the same driver version, it's great.
      Perhaps if I give you my specs, and how I run your emulator, that may help ?

      Athlon 2.4 ghz
      512Mb PC3200
      MSI Nforce 2 motherboard - Latest drivers
      ATI Radeon 9700 Pro - Catalyst 3.6 drivers
      SBLive Platinum - Latest drivers
      WinXP Pro - service pack 1, WinME - dual boot.
      PSX Dual shock gamepad on parallel port
      DirectX 9.1

      I run nestopia at 1024x960 @50hz (PAL), with Vsync on in both the emulator and the drivers.

      Hope that helps

      • Martin Freij

        Martin Freij - 2003-08-07

        Hmm.. it might be because of your gamepad being connected to the parallel port. Perhaps there's some serious latency going on there when the device is getting polled. Have you tried running Nestopia with the gamepad unplugged?
        In any case, I guess we can scrap that previous theory I had then. Just so I got you right; it's also slow at responding when you're assigning keys in the input menu? If so I think it's pretty clear,  something funky is going on in my function calls to DirectInput. I'll have to revisit the input code again and see if I can find anything.

    • CGen

      CGen - 2003-08-07

      Hi Martin,
      Thanks again for looking in to it.

      I have tried unplugging the PSX pad, and even tried running a normal gamepad, but it still lags.
      Infact, even if you assign everything to keys, even the keyboard lags. And even in the "Assign Keys" menu, it lags about 3 seconds behind.
      It must be something weird in XP's input code, as in WinME everything is great.
      I even thought it may be DX9.1, but I have 9.1 in WinME as well.

      If you like, I could be your guinea pig, and do some testing for you.

      • Martin Freij

        Martin Freij - 2003-08-07

        Yeah, I'm beginning to run out of ideas so I think we better do some tests. I'm going on vacation tomorrow and I'll be away for a week. After that I'm ready to dissect your computer.

    • CGen

      CGen - 2003-08-16

      Hi Martin,

      Not sure if you are back from vacation, but I think I've found the problem.
      And the good news is it's not your emulator, it appears to be some sort of Direct Draw problem.

      I have tried the Visual Boy Advance emulator, a Master System Emulator (forget the name), and a few others, WITH Direct Draw on. ALL those emulators lag on the joypad, just like yours.

      Now if I turn off Directdraw, and use Direct3D, the lag goes away, but I then lose the ability to choose my own resolution.

      Any chance you could support Direct3D in the future , And still keep the option to use your own resolution ?

      I'm guessing Nestopia uses DirectDraw ?


    • Martin Freij

      Martin Freij - 2003-08-16

      Yes, DirectDraw all the way. I've toyed with the idea of using Direct3D in Nestopia but it's not my top priority. Maybe in the future though.

    • Keith F. Kelly

      Keith F. Kelly - 2008-01-29

      First off, Martin, thank you for all your hard work on Nestopia.  I downloaded and built the code and stepped through it, and I have to say the code is very well-written, readable, and well-organized.  Great work.

      But I'm having this same issue with Nestopia 1.37.  I even filed a bug in the Tracker on SourceForge about it.

      My system:

      - WinXP Pro SP2
      - Intel Core 2 Duo
      - 4GB RAM
      - ATI Radeon X1900 series, latest drivers installed from ATI
      - PS2 Dual-Shock controller hooked up to USB port via a Mayflash Super Dual Box adaptor (with driver installed)

      The game lag only reproduces for me in full-screen mode if I have VSync enabled in Nestopia.  If I disable VSync in Nestopia, then the game is responsive, but I get horrible shearing lines.  The problem occurs regardless of which input device I am using (even unplugging the joystick and using the keyboard instead, the lag exists).

      I don't think this is a DirectDraw bug, but there are a few things I can do to investigate that.  I also downloaded the sources for Nintendulator, which doesn't exhibit the lagging problem.  I will take a closer look at the Nintendulator source code and see whether it's using DirectDraw or Direct3D.  I will also poke around in my video driver settings (even undocumented ATI settings that may require something like ATI Tray Tool to expose) and see if I can find any settings that would reduce DirectDraw lag.

      I'll report the results in the bug in the tracker when I can.


Log in to post a comment.