Author Topic: The Windows DDK, Keyboard driver build instructions.  (Read 13481 times)

0 Members and 1 Guest are viewing this topic.

Offline sethstorm

  • Thread Starter
  • Posts: 257
The Windows DDK, Keyboard driver build instructions.
« on: Wed, 09 December 2009, 08:51:57 »
Based on discussions in Kishy's Terminal Keyboard conversion article, here are some instructions on dealing with the DDK (should you wish to modify and build your own i8042prt driver.)


Patches and Drivers:


Files (32-bit, x86):
x86 i8042prt.sys and diffs

Files (64bit, x64/AMD64):
x64 i8042prt.sys

x64 diffs


DDK Files:

Direct link(no login):
http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso

Indirect link:
You may need to do is have a Windows Live ID(no charge) and be willing to add the Microsoft Connect service(no charge) to it.  Once you have that, you should be able to grab the SDK you need, which is named "1830_usa_ddk.iso".  

https://connect.microsoft.com/site148/Downloads/DownloadDetails.aspx?DownloadID=21028



Should you wish to build your own:

While I have to say that this is at your own risk, it isn't too hard if you are careful in your work.

First of all: backup your i8042prt.sys in C:\windows\system32\drivers.  

Second of all, have a USB keyboard handy should things go wrong.

Notes for x64 users:

Additional patches are available.  Sleep/Wake keyboard button support has been removed so that it can build.  It is not necessary for 32-bit only users.  





Install/Build/Result:
Following the download, mount the iso image.  Further instructions on doing so are out of the scope of this document.



Install:
Select Custom install, go to samples -> input -> items relating to 8042 input sample and add those.  If you want to add the USB one, go right ahead - but the relevant sample is the 8042 one.
Install to the default directory it gives you: (e.g. C:\WINDDK\3790.1830)


Modification:
The files you need will be here if you installed with the default path.
Code: [Select]
C:\WINDDK\3790.1830\src\input\pnpi8042

Build:
Open a command prompt, go to C:\WINDDK\3790.1830\bin\

Use Build x86 for 32-bit.
Use Build AMD64/x64 for 64-bit.



Build x86:
Code: [Select]
setenv.bat C:\WINDDK\3790.1830 fre hal


Build AMD64/x64:
Code: [Select]
setenv.bat C:\WINDDK\3790.1830 fre AMD64

From there, change directory to ..\src\input\pnpi8042
run build.exe with no options (or if you wish, add options)



Result:
If build went through w/o error, it will be at:
Code: [Select]
C:\WINDDK\3790.1830\src\input\pnpi8042\daytona\objfre_wnet_x86\i8042prt.sys
(ignore any spaces inserted, that's the forum software)



Some helpful hints:
Should you be working from .diff's, this may be helpful.  This is not a complete guide to the format of the file, but it is enough to get the reader going.

Patching
I recommend hand-patching the files based on the diffs.  Here's a quick way to determine how to do this if you wish to go this route.  

If you're uncomfortable with that, a proper patching tool should not be hard to find.



At the start of a new source code file.  (For the purpose of my patches, these are separated out into individual files)
Code: [Select]
--- pnpi8042.orig/kbddep.c 2005-03-24 14:24:00.000000000 -0500
+++ pnpi8042.dev/kbddep.c 2009-12-08 11:25:52.000000000 -0500



Lines that state where to begin editing in a specific source code file.  The relevant number is the start number.  In this example, it would be 427
Code: [Select]
@@ -427,6 +427,7 @@


Lines that start with minus are lines to delete, followed by lines that start with + which are lines to add.  Replace the items to delete with the items to add at the line where the deleted code started.  
Code: [Select]

-    }
+    // [JCE] Resetting a terminal keyboard makes it send two ID bytes



Lines that only require adding code at the specified line in the source code.
Code: [Select]

+    // [JCE] Set all keys to give make/break codes. It seems that on a terminal
« Last Edit: Fri, 22 October 2010, 23:48:27 by sethstorm »
Current:
IBM: Model M: 1391401, 1386887 Terminal 122 Key 
IBM: Model F: 6110668 Terminal 122 key with Trackpoint and M13 blacks
IBM: Specialty: Wheelwriter 5, Boltmodded.  AT F layout, M technology. 
Lexmark/IBM: M13 Black Trackpoint
NCR:HO150-STD1-01-17 Decision Mate V - The other Gray NCR linear.


Offline kishy

  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
The Windows DDK, Keyboard driver build instructions.
« Reply #1 on: Sat, 19 December 2009, 12:34:48 »
I consistently get this: "The content that you requested cannot be found or you do not have permission to view it.

If you believe you have reached this page in error, click the Help link at the top of the page to report the issue and include this ID in your e-mail: dcf1379c-c4ca-431a-982e-0be8e6568097 "

I have a Live account and am registered with Connect, so perhaps it is restricted by your location?
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline keyb_gr

  • Posts: 1384
  • Location: Germany
  • Cherrified user
    • My keyboard page (German)
The Windows DDK, Keyboard driver build instructions.
« Reply #2 on: Sun, 20 December 2009, 12:12:07 »
FWIW, after signing up for a Live account and then Connect, I was able to obtain the DDK a few weeks ago.
Hardware in signatures clutters Google search results. There should be a field in the profile for that (again).

This message was probably typed on a vintage G80-3000 with blues. Double-shots, baby. :D

Offline kishy

  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
The Windows DDK, Keyboard driver build instructions.
« Reply #3 on: Sun, 20 December 2009, 15:28:01 »
Quote from: keyb_gr;143930
FWIW, after signing up for a Live account and then Connect, I was able to obtain the DDK a few weeks ago.

I'll make another account from scratch and do it all over. Maybe there were issues relating to how I used my pre-existing Live account, who knows.

And this time I'll enter more convincing fake info during registration.

Edit: alright, got it to go. Note I had to work my way through the site to get to it. The URL provided in the article is correct but even when registered properly and logged in, it does not work...you need to get to that page from within the Connect site (apparently they check referrers).
« Last Edit: Sun, 20 December 2009, 15:36:37 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline sethstorm

  • Thread Starter
  • Posts: 257
Attaching some diff's
« Reply #4 on: Sat, 19 June 2010, 02:58:06 »
Some diffs for the Windows 2003 DDK.Attachment here.
Current:
IBM: Model M: 1391401, 1386887 Terminal 122 Key 
IBM: Model F: 6110668 Terminal 122 key with Trackpoint and M13 blacks
IBM: Specialty: Wheelwriter 5, Boltmodded.  AT F layout, M technology. 
Lexmark/IBM: M13 Black Trackpoint
NCR:HO150-STD1-01-17 Decision Mate V - The other Gray NCR linear.


Offline Soarer

  • * Moderator
  • Posts: 1918
  • Location: UK
The Windows DDK, Keyboard driver build instructions.
« Reply #5 on: Sat, 14 August 2010, 08:38:51 »
Found a direct no hassle download from M$ themselves... :)

http://download.microsoft.com/.../1830_usa_ddk.iso

Offline sethstorm

  • Thread Starter
  • Posts: 257
x64 Diffs
« Reply #6 on: Fri, 22 October 2010, 23:22:17 »
Thanks go to acfrazier for being able to test a working x64 setup.  The wiki item has been changed to reflect the new x64 related changes.

Notes:
Use this patch set after the others.
No need to use if x86(32-bit).  

Changes:
Removes the Sleep/Wake keyboard "system buttons" from the keyboard driver.  Should not affect non-keyboard input.
Current:
IBM: Model M: 1391401, 1386887 Terminal 122 Key 
IBM: Model F: 6110668 Terminal 122 key with Trackpoint and M13 blacks
IBM: Specialty: Wheelwriter 5, Boltmodded.  AT F layout, M technology. 
Lexmark/IBM: M13 Black Trackpoint
NCR:HO150-STD1-01-17 Decision Mate V - The other Gray NCR linear.


Offline super-6-1

  • Posts: 14
The Windows DDK, Keyboard driver build instructions.
« Reply #7 on: Sat, 03 March 2012, 12:38:41 »
anyone have the x64 sys file? i really need it for my comp... it use to work and now its not valid