Friday, February 20, 2009

Another bug... squashed

This one was quite strange - the PPJoy installer would work when using the debug build of the DLL that registers the driver; when I used the release build the installer would fail to register the driver. Oh joy.

So then out comes windbg. Man's best friend for sure. As it turns out, there is one function in my DLL that requires a MULTI_SZ format string. Basically this means the string must end with two zero bytes; and the code was initialising it with only one zero, hence it failed. So why did the debug version work? I am speculating that the debug version includes extra variables that changes the packing in memory and the empty spots are probably filled with zeros... These zeros would make up for the one I forgot to add at the end of the string.

I really, really hope I don't other similar bugs lurking in there somewhere!!! The scary thing is that these bugs can lie dormant for years, just waiting for an innocent code change.


  1. do you have any idea when you are going to release a ppjoy for windows vista 64 bits?
    i have waited for a very long time, i realy hope you finish it, i would be very gratefull.

  2. PPjoy for vistax86? I can't seem to get past the "copying JR_PPM.dll" stage of the installation!

  3. Glad to hear that development for PPJoy is continuing. I would love some support for 64bit. Good luck.

  4. I too would appreciate 64 bit drivers, I hope you're still working on this, it's been a while.

  5. I'm pleased to see this is still going. It was sheer co-incidence I stumbled on this blog.

    Anyway, this had made me feel like digging up my old C64 joystick and having a go on WinVice.

    Much appreciated.

  6. Ah well, last update in february... I guess your 64bits PPJoy is never going to be released... Too bad.

    Incredible to see all the posts everywhere on the net, of people drooling to see you release it.

  7. Hi Deon,

    My Name is Danny and I’m the programmer of WeeWheel, 1stly I want to thank you of the amazing work you did! Unfortunately the project has been stopped :(

    If you need some help, I would like to help you if I can of course :P

  8. Support for x64 Windows 7 would totally fulfill my dream of using the PSP as a gamepad on the PC. If you don't work on PPJoy anymore, please let someone else finish your project. I'd suggest Danny from =)

  9. This comment has been removed by the author.

  10. I just wanted to say thanks for putting PPJoy out there, and, if it's any encouragement to development, I'd certainly be a paying customer for a future x64 Win7 release.

  11. I hope this is still in work. There hasn't been any updates in a while. As far as support goes, I was thinking that the current PPJOY is plastered all over the web. Maybe just make a vista/win7 driver with 64 bit support and forget about backward compatability. Hope to hear an update soon. Not sure how I stumbled across this blog, but I hate the thought of moving back to a 32bit operating system to use this great tool.

  12. Hi Deon,
    as programmer and user of PPJoy I'd really like to help you to make a 64bit version of your great driver. Needless to say how many people use 64bit windows nowadays; it's a pity PPJoy lacks this support.

    I'd also like to know if you have considered to make PPJoy open-source. You'd get free-hosting, free download servers and free help :) for development at ;)

    If you are interested and want some help, please let me know at francesco DOT montorsi AT gmail DOT com.


  13. You are right on the point that how debug version work that the debug version includes extra variables that changes the packing in memory and the empty spots are probably filled with zeros and these zeros would make up the last 2 zeros required.
    e-sign act