Tuesday, July 8, 2008

Writing a DX1 device driver for Vista

I recently upgraded to Vista after an incident involving a replacement video card resulting in a lost hard drive (don’t ask), for the most part I actually prefer Vista to XP. About the only real downside (other than the stupid security escalation dialogs) was the lack of a driver for my Ergodex DX1.

After rummaging through the Ergodex forums and waiting for them to actually provide a driver, I ran across this site http://ergodex.hydraproductions.com/wiki/ since Dom had already reverse engineered the USB protocol I thought I’d try writing a driver for the device.

I think the last time I wrote a device driver of any description for windows might have been circa windows 3.1. I have a pretty good understanding of the hardware and the underlying protocols, because Consoles usually don’t make much of an effort to hide the nuts and bolts, but my Windows skillz leave a bit to be desired.

I downloaded the windows DDK, scanned the examples, and started messing around with the Bulk USB sample. After a while it became obvious I was going to have to install another copy of Vista on a second box in order to debug anything or at least use my laptop as the target. I was scanning through the docs and I came across the WDF doc, it seemed that the UMDF provided everything I needed to write a USB driver in usermode and allowed me to debug just by attaching Visual Studio to the running device process.

So on Sunday night I started experimenting with one of the samples, by Wednesday Night the driver was basically functional. It’s changed a bit since then because I changed my mind on how to communicate with the programming/macro playback software. Since then I’ve put together enough of a programming/macro app to do what I need.

There are two things that jump out at me from this experience,

The first is how well designed at least the UMDF portion of the WDF is, the reason I could write a driver in literally 3 or 4 evenings, was that the base functionality just does the right thing most of the time just leaving you to marshal data and pass it on.

The second, is how frustrating it is that a company like Ergodex still can’t get Vista drivers out, the vast majority of the work for the suit is in the programming tool and I’m sure the XP one Ergodex has could just be dropped on Vista, just leaving the part that took me 3 or 4 days.

I’ll release the driver here along with my horrible programming application when I get some time to make a pass on the code. I’ll also release the source code for none commercial purposes.

17 comments:

  1. woot, my reverse engineering was useful to someone :D - Dom

    ReplyDelete
  2. May I sіmply just say what a гelief to unсover
    ѕomeone thаt genuinely knows whаt thеy're discussing on the web. You certainly understand how to bring a problem to light and make it important. A lot more people need to check this out and understand this side of your story. I was surprised that you aren't more popular because you
    most certainly posseѕs the gift.

    Also vіsit my blog :: prodog

    ReplyDelete
  3. An impressive share! I have just forwarded this onto a co-worker who had been conducting a little research on this.
    And he in fact ordered me dinner due to
    the fact that I stumbled upon it for him... lol. So let me reword this.
    ... Thank YOU for the meal!! But yeah, thanks for spending some time to talk about this subject
    here on your web page.

    Visit my web blog fenetre pvc prix

    ReplyDelete
  4. This excellent website really has all the info I wanted concerning this
    subject and didn't know who to ask.

    Here is my weblog :: devis pose fenetre pvc

    ReplyDelete
  5. Everyone loves it whenever people come together and share opinions.
    Great blog, continue the good work!

    my webpage; porte de garage coulissante acier

    ReplyDelete
  6. Мagnifіcent wеbsite. Plеnty οf helρful іnfo here.
    I am sending it to sevеral pals ans adԁitiоnаlly shагing
    in delicious. Αnd οf couгѕe, thаnks foг
    your еffoгt!

    Feel free to ѕurf to my weblog :: prix fenetre pvc

    ReplyDelete
  7. Hey there, You've done an excellent job. I will definitely digg it and personally suggest to my friends. I'm
    sure they will be benefited from this site.

    Feel free to surf to my website - vitrification du parquet

    ReplyDelete
  8. Have you ever thought about including a little bit more than
    just your articles? I mean, what you say is fundamental and everything.
    But think of if you added some great visuals or videos to give your posts more, "pop"!

    Your content is excellent but with pics and video clips, this blog could definitely be one of the best
    in its field. Good blog!

    Here is my site :: motorisation volet roulant

    ReplyDelete
  9. Pretty nice post. I just stumbled upon your blog and wanted
    to say that I have truly enjoyed browsing your blog posts.
    After all I will be subscribing to your feed and I hope you write
    again soon!

    Take a look at my webpage plombier paris 4

    ReplyDelete
  10. Good post. I learn something new and challenging on blogs I stumbleupon every
    day. It's always useful to read through articles from other writers and use something from their websites.

    My page - parquet pas cher paris

    ReplyDelete
  11. Нowdу woulԁ you mind lеttіng mе know whiсh hosting
    comρany you're working with? I'νe loaded yοuг blog in 3
    diffeгent wеb bгowseгs and
    I must say thiѕ blog loаds a lot quickeг then most.
    Ϲan you suggest a goоd hostіng ρrovideг аt
    а reasonаble pricе? Kuԁοѕ, I aρprecіаte it!



    My blog post ... pose porte fenetre pvc

    ReplyDelete
  12. Terrific post however , I was wondering if you could write a litte more on this subject?
    I'd be very thankful if you could elaborate a little bit more. Appreciate it!

    My web page :: phenix option

    ReplyDelete
  13. Howdy very cool website!! Man .. Beautiful .. Superb .
    . I'll bookmark your web site and take the feeds also? I'm happy to search out so many useful
    info right here within the submit, we'd like develop extra techniques on this regard, thank you for sharing. . . . . .

    Also visit my web blog poncage parquet

    ReplyDelete
  14. Hey! This is my first visit to your blog! We are a team of volunteers and starting a new
    initiative in a community in the same niche. Your blog
    provided us valuable information to work on. You have done a wonderful job!


    Here is my website :: gagner de l'argent sur internet

    ReplyDelete
  15. I do trust all of the ideas you have presented on your post.
    They're really convincing and can definitely work. Still, the posts are too short for newbies. Could you please extend them a little from next time? Thanks for the post.

    Feel free to surf to my web page :: fenetre pvc devis

    ReplyDelete
  16. Incredible story there. What happened after? Take care!

    my web-site ... poncer un parquet ancien

    ReplyDelete