home *** CD-ROM | disk | FTP | other *** search
/ Software Recommendations - 1998 Season 1 / DNBCD4.iso / develop / NUMEGA / zip / vxd / VXDLIB.ZIP / VXDLIB.DOC next >
Encoding:
Text File  |  1996-10-07  |  18.2 KB  |  480 lines

  1.  
  2. FREEWARE:
  3.  
  4.     This software may NOT be distributed or bundled with any product
  5.     that is sold for commercial profit without the explict permission
  6.     of the author. In cases where the author has consented, the PKUNZIP(tm)
  7.     authentication message which normally reads :
  8.  
  9.         Authentic files Verified!   # EYC098
  10.         Tenth Planet Software International
  11.  
  12.     will additionally indicate the commercial entity to which permission
  13.     has been granted. If authentication is not present, please contact
  14.     the author to obtain a bona fide copy.
  15.  
  16. Disclaimer:
  17.  
  18.     The author hereby disclaims all warranties relating to this software,
  19.     whether express or implied, including without limitation any implied
  20.     warranties of merchantability or fitness for a particular purpose.
  21.     The author will not be liable for any special, incidental,
  22.     consequential, indirect or similar damages due to loss of data or any
  23.     other reason, even if the author or an agent of the author has been
  24.     advised of the possibility of such damages.  In no event shall the
  25.     author's liability for any damages ever exceed the price paid for
  26.     the software, regardless of the form of the claim.  The person
  27.     using the software bears all risk as to the quality and performance
  28.     of the software.
  29.  
  30. VxDLIB:
  31.  
  32.     This tool was primarily designed to extract Windows Virtual Device
  33.     Drivers (VxDs) from W3 (WIN386.EXE) & W4 (VMM32.VXD) format archive
  34.     files. The W4 format is unique to Windows '95 and is a compressed W3
  35.     image, the compression algorithm is the same as that used by DoubleSpace
  36.     (aka DriveSpace) and MRCI (Microsoft's Realtime Compression Interface),
  37.     and uses a Lempel Ziv (LZ) technique to replace repeating data patterns.
  38.     This tool can also unpack a W4 file so that tools like Andrew Schulman's
  39.     W3MAP can work as they did with Windows 3.xx. Unpacking the file will
  40.     also allow you to examine the file with regular hex editors. Unpacked
  41.     files will typically take up far more space, my copy of VMM32.VXD went
  42.     from 0.7MB to 2.0MB. A temporary file is created during pack/unpack
  43.     operations, so this program should be run from the directory where the
  44.     W3/W4 file resides. Files can be packed, or repacked, using this tool.
  45.     I have been able to achieve higher compression ratios than Microsoft's
  46.     DEVLIB tool by finding the best match in the history buffer rather than
  47.     just a good one. Compression speeds are markedly slower than DEVLIB,
  48.     this is because I'm lazy and wrote this tool in C, not highly optimized
  49.     assembler as Microsoft did, and not because I'm an Electronics Engineer!
  50.  
  51.     If you found this tool to be mildly useful or entertaining please send
  52.     me some Email, positive feedback is always good to get and makes writing
  53.     FREEWARE worth while. If you didn't like this tool, discard it, and keep
  54.     your sentiments to yourself.
  55.  
  56.  
  57. Clive Turvey, October 7, 1996.
  58. DeKalb, IL., USA & Southampton, ENGLAND.
  59.  
  60. Email : 74011.1732@compuserve.com
  61.       : clive@tbcnet.com
  62.  
  63. URL   : http://www.tbcnet.com/~clive
  64.  
  65. ------------------------------------------------------------------------------
  66.  
  67. VxDLIB v1.01 (c) Copyright Tenth Planet Software Intl., C Turvey 1995-1996.
  68.                All rights reserved. Non-Commercial use only.
  69.  
  70.  ====     ===            This FREEWARE product was written by Clive
  71.   \\      / th            Turvey, an English Electronics Engineer.
  72.    \\    /
  73.     \\  /   Planet        It is designed to replace the DEVLIB utility
  74.      \\/     Software        provided by Microsoft in the Win95 DDK.
  75.      /\\      International
  76.     /  \\            If you like the software, or find a problem
  77.    /    \\   CIS 74011,1732    post some Email to 74011.1732@compuserve.com
  78.   /      \\
  79.  ===     ====
  80.  
  81. Usage : VxDLIB <-l[ist]> <W3/W4 file>
  82.     VxDLIB <-d[ump]> <W3/W4 file>
  83.     VxDLIB <-p[ack]> <W3/W4 file>
  84.     VxDLIB <-u[npack]> <W4 file>
  85.     VxDLIB <-e[xtract]> <W3/W4 file> <VxD>
  86.  
  87.  
  88. Example of list command, W4 files will be decompressed into a temporary W3
  89. file first.
  90.  
  91. C:\>VxDLIB -l VMM32.VXD
  92.  
  93. VxDLIB v1.01 (c) Copyright Tenth Planet Software Intl., C Turvey 1995-1996.
  94.                All rights reserved. Non-Commercial use only.
  95.  
  96. Unpacking VMM32.VXD to VxDLIB.$$$
  97.   100% complete
  98.  
  99. Listing VxDLIB.$$$
  100.  
  101. vxds:
  102.   VMM        VDD        VFLATD     VMOUSE     VSHARE     VWIN32     VFBACKUP
  103.   VCOMM      COMBUFF    VCD        VPD        IFSMGR     IOS        SPOOLER
  104.   VFAT       VCACHE     VCOND      VCDFSD     INT13      VXDLDR     VDEF
  105.   DYNAPAGE   CONFIGMG   EBIOS      VMD        DOSNET     VPICD      VTD
  106.   REBOOT     VDMAD      VSD        V86MMGR    PAGESWAP   DOSMGR     VMPOLL
  107.   SHELL      PARITY     BIOSXLAT   VMCPD      VTDAPI     PERF       VKD
  108.  42 total vxd(s)
  109.  
  110. C:\>
  111.  
  112.  
  113. Example of dump command, W4 files will be decompressed into a temporary W3
  114. file first.
  115.  
  116. C:\>VxDLIB -d VMM32.VXD
  117.  
  118. VxDLIB v1.01 (c) Copyright Tenth Planet Software Intl., C Turvey 1995-1996.
  119.                All rights reserved. Non-Commercial use only.
  120.  
  121. Unpacking VMM32.VXD to VxDLIB.$$$
  122.   100% complete
  123.  
  124. Dumping VxDLIB.$$$
  125.  
  126. vxds:
  127.   VMM      : LE header offset    14400, size     8E55
  128.   VDD      : LE header offset    65000, size     18F6
  129.   VFLATD   : LE header offset    78000, size      38A
  130.   VMOUSE   : LE header offset    7A000, size      D55
  131.   VSHARE   : LE header offset    83000, size      5C3
  132.   VWIN32   : LE header offset    87000, size     1136
  133.   VFBACKUP : LE header offset    95000, size      711
  134.   VCOMM    : LE header offset    99000, size      8B7
  135.   COMBUFF  : LE header offset    A2000, size      27B
  136.   VCD      : LE header offset    A5000, size      6EB
  137.   VPD      : LE header offset    AB000, size      392
  138.   IFSMGR   : LE header offset    B1000, size     37EE
  139.   IOS      : LE header offset    DA000, size     177C
  140.   SPOOLER  : LE header offset    EB000, size      60E
  141.   VFAT     : LE header offset    F2000, size      DB3
  142.   VCACHE   : LE header offset   101000, size      5F2
  143.   VCOND    : LE header offset   106000, size      9E8
  144.   VCDFSD   : LE header offset   114000, size      343
  145.   INT13    : LE header offset   11A000, size      356
  146.   VXDLDR   : LE header offset   11D000, size      52F
  147.   VDEF     : LE header offset   126000, size      20D
  148.   DYNAPAGE : LE header offset   129000, size      45B
  149.   CONFIGMG : LE header offset   130000, size     181A
  150.   EBIOS    : LE header offset   146000, size      225
  151.   VMD      : LE header offset   14B000, size      305
  152.   DOSNET   : LE header offset   14E000, size      259
  153.   VPICD    : LE header offset   152000, size      DE6
  154.   VTD      : LE header offset   15E000, size      585
  155.   REBOOT   : LE header offset   166000, size      367
  156.   VDMAD    : LE header offset   16C000, size      C32
  157.   VSD      : LE header offset   177000, size      1C0
  158.   V86MMGR  : LE header offset   179000, size     1424
  159.   PAGESWAP : LE header offset   191000, size      1CF
  160.   DOSMGR   : LE header offset   195000, size     18D0
  161.   VMPOLL   : LE header offset   1B0000, size      3FD
  162.   SHELL    : LE header offset   1B8000, size     1164
  163.   PARITY   : LE header offset   1CC000, size      198
  164.   BIOSXLAT : LE header offset   1CF000, size      21D
  165.   VMCPD    : LE header offset   1D4000, size      2F0
  166.   VTDAPI   : LE header offset   1D8000, size      385
  167.   PERF     : LE header offset   1DD000, size      4F7
  168.   VKD      : LE header offset   1E3000, size      C27
  169.  42 total vxd(s)
  170.  
  171. C:\>
  172.  
  173.  
  174. Example of pack command, W4 files will be decompressed into a temporary W3
  175. file first and then recompressed. The compression algorithm was written to
  176. pack the file as tightly as possible, so the resultant file will be smaller
  177. than that created by Microsoft's DEVLIB utility.
  178.  
  179. C:\>VxDLIB -p VMM32.VXD
  180.  
  181. VxDLIB v1.01 (c) Copyright Tenth Planet Software Intl., C Turvey 1995-1996.
  182.                All rights reserved. Non-Commercial use only.
  183.  
  184. Unpacking VMM32.VXD to VxDLIB.$$$
  185.   100% complete
  186.  
  187. Packing VxDLIB.$$$ to VMM32.VXD
  188.   100% complete
  189.  
  190. Size of library:                        2031616
  191. Size of compressible portion:           1949696
  192. Size of chunk map:                      952
  193. New size of compressible portion:       660607 (33% of original)
  194. New size of library:                    743495 (36% of original)
  195.  
  196. C:\>
  197.  
  198.  
  199. Example of the unpack command, W4 files will be decompressed into a W3 file
  200. of the same name via a temporary file that is renamed to match the original
  201. after the original is deleted. The W3 file can then be examined with tools
  202. like W3MAP.
  203.  
  204. C:\>VxDLIB -u VMM32.VXD VMM.VXD
  205.  
  206. VxDLIB v1.01 (c) Copyright Tenth Planet Software Intl., C Turvey 1995-1996.
  207.                All rights reserved. Non-Commercial use only.
  208.  
  209. Unpacking VMM32.VXD to VxDLIB.$$$
  210.   100% complete
  211.  
  212. C:\>
  213.  
  214.  
  215. Example of extract command, W4 files will be decompressed into a temporary W3
  216. file first and then the specified VxD will be extracted. The extracted VxD
  217. can then be examined by the likes of V Communications' Sourcer. Multiple VxDs
  218. can be extracted using wildcards, like V?D, VC* or V?O*.
  219.  
  220. C:\>VxDLIB -e VMM32.VXD VMM.VXD
  221.  
  222. VxDLIB v1.01 (c) Copyright Tenth Planet Software Intl., C Turvey 1995-1996.
  223.                All rights reserved. Non-Commercial use only.
  224.  
  225. Unpacking VMM32.VXD to VxDLIB.$$$
  226.   100% complete
  227.  
  228. Extracting VMM.VXD from VxDLIB.$$$
  229.  
  230. VMM.VXD      00014400 00065000 00050C00
  231.  
  232. C:\>VxDLIB -e VMM32.VXD V?O*.VXD
  233.  
  234. VxDLIB v1.01 (c) Copyright Tenth Planet Software Intl., C Turvey 1995-1996.
  235.                All rights reserved. Non-Commercial use only.
  236.  
  237. Unpacking VMM32.VXD to VxDLIB.$$$
  238.   100% complete
  239.  
  240. Extracting V?O*.VXD from VxDLIB.$$$
  241.  
  242. VMOUSE.VXD   0007A000 00083000 00009000
  243. VCOMM.VXD    00099000 000A2000 00009000
  244. VCOND.VXD    00106000 00114000 0000E000
  245.  
  246. C:\>
  247.  
  248. ------------------------------------------------------------------------------
  249.  
  250. Technical Stuff:
  251.  
  252.  Wx VxD Library EXE Header
  253.  
  254.       00h ┌──────────────────┐  <──┐
  255.           │ DOS 2 Compatible │     │
  256.           │    EXE Header    │     │
  257.       1Ch ├──────────────────┤     │
  258.           │      unused      │     │
  259.           ├──────────────────┤     │
  260.       3Ch │  Offset to       │     ├── VMM32 DOS Portion
  261.           │  Wx VxD Library  │     │
  262.           │  EXE Header      │     │
  263.       40h ├──────────────────┤     │
  264.           │  VMM32 DOS Stub  │     │
  265.           │  Loader Program  │     │
  266.           │   Reloc. Table   │     │
  267.           └──────────────────┘  <──┘
  268.  
  269.       xxh ┌──────────────────┐  <──┐
  270.           │    W3 Header     │     │
  271.           ├──────────────────┤     │
  272.           │    VxD Table     │     │
  273.           ├──────────────────┤     │
  274.           │ First VxD        │     │
  275.           │ Linear Executable│     ├── W3 VxD Library
  276.           ├──────────────────┤     │
  277.                   ....             │
  278.           ├──────────────────┤     │
  279.           │ Final VxD        │     │
  280.           │ Linear Executable│     │
  281.           └──────────────────┘  <──┘
  282.  
  283.                    or
  284.  
  285.       xxh ┌──────────────────┐  <──┐
  286.           │    W4 Header     │     │
  287.           ├──────────────────┤     │
  288.           │   Chunk Table    │     │
  289.           ├──────────────────┤     │
  290.           │ First Compressed │     │
  291.           │       Chunk      │     ├── W4 VxD Library
  292.           ├──────────────────┤     │
  293.                   ....             │
  294.           ├──────────────────┤     │
  295.           │ Final Compressed │     │
  296.           │       Chunk      │     │
  297.           └──────────────────┘  <──┘
  298.  
  299.  W3 Header
  300.  
  301.           ┌─────┬─────┬─────┬─────┐
  302.       00h │ 'W'   '3' │OS-Lo OS-Hi│
  303.           ├─────┴─────┼─────┴─────┤
  304.       04h │ VxD Count │   - 0 -   │
  305.           ├───────────┼───────────┤
  306.       08h │   - 0 -   │   - 0 -   │
  307.           ├───────────┼───────────┤
  308.       0Ch │   - 0 -   │   - 0 -   │
  309.           ├───────────┴───────────┴───────────────────────┐
  310.       10h │ VxD #1 Name padded to 8 bytes with spaces     │
  311.           ├───────────────────────┬───────────────────────┘
  312.       18h │ VxD #1 LE File Offset │
  313.           ├───────────────────────┤
  314.       1Ch │ VxD #1 LE Header Size │
  315.           ├───────────────────────┴───────────────────────┐
  316.       10h │ VxD #2 Name padded to 8 bytes with spaces     │
  317.           ├───────────────────────┬───────────────────────┘
  318.       18h │ VxD #2 LE File Offset │
  319.           ├───────────────────────┤
  320.       1Ch │ VxD #2 LE Header Size │
  321.           ├───────────────────────┤
  322.                     .....
  323.           ├───────────────────────┴───────────────────────┐
  324.       xxh │ VxD #x Name padded to 8 bytes with spaces     │
  325.           ├───────────────────────┬───────────────────────┘
  326.           │ VxD #x LE File Offset │
  327.           ├───────────────────────┤
  328.           │ VxD #x LE Header Size │
  329.           └───────────────────────┘
  330.  
  331.  W4 Header
  332.  
  333.           ┌─────┬─────┬─────┬─────┐
  334.       00h │ 'W'   '4' │OS-Lo OS-Hi│
  335.           ├─────┴─────┼─────┴─────┤
  336.       04h │ Chunk Size│Chunk Count│
  337.           ├─────┬─────┼───────────┤
  338.       08h │ 'D'   'S' │   - 0 -   │
  339.           ├─────┴─────┼───────────┤
  340.       0Ch │   - 0 -   │   - 0 -   │
  341.           ├───────────┴───────────┤
  342.       10h │ Chunk #1 File Offset  │
  343.           ├───────────────────────┤
  344.       14h │ Chunk #2 File Offset  │
  345.           ├───────────────────────┤
  346.                     .....
  347.           ├───────────────────────┤
  348.       xxh │ Chunk #x File Offset  │
  349.           ├───────────────────────┤
  350.  Chunk #1 │  Compressed Chunk #1  │
  351.                     .....
  352.           │                       │
  353.           ├───────────────────────┤
  354.  Chunk #2 │  Compressed Chunk #2  │
  355.                     .....
  356.           │                       │
  357.           ├───────────────────────┤
  358.                     .....
  359.           ├───────────────────────┤
  360.  Chunk #x │  Compressed Chunk #x  │
  361.                     .....
  362.           │                       │
  363.           └───────────────────────┘
  364.       EOF
  365.  
  366. OS : Indicated the Windows version, 0x0400, Windows 4.0
  367.  
  368. Chunk Size : This WORD defines the size of the chunks. The loader expects
  369. the chunk size to be 8K. This is much like the concept of a disk cluster.
  370. I originally called chunks, clusters until I found that Microsoft refers
  371. to them as chunks in DEVLIB (Win95 DDK).
  372.  
  373. Chunk Count : This WORD defines the number of chunks contained in the file.
  374. The loader verifies this is less than 1024
  375.  
  376. Chunk # File Offset : This DWORD defines an absolute file offset from the
  377. beginning of the EXE file to the start of the compressed chunk, the loader
  378. expects the chunks are consecutive order, the size of the final chunk is
  379. deterined using the file length
  380.  
  381. The first Compressed chunk follows immediately after the last Chunk # File
  382. Offset entry.
  383.  
  384. Data encoded as either a Raw Byte or Depth usually followed by Count, a depth
  385. of 0 and 4415 are special cases which require no count component. The depth of
  386. 0 indicates the end of the compressed chunk, and a depth of 4415 defines a 512
  387. byte boundary has been reached, the first byte is not counted as a 512 byte
  388. boundary.
  389.  
  390.   MSB...............................LSB
  391.  
  392.                      ┌─────────────┬───┐
  393.                      │a b c d e f g 0 1│    Raw 1abcdefg, No Depth or Count
  394.                      ├─────────────┼───┤
  395.                      │a b c d e f g 1 0│    Raw 0abcdefg, No Depth or Count
  396.                      └─────────────┴───┘
  397.  
  398.   Depth                                  or
  399.  
  400.                        ┌───────────────┐
  401.                        │0 0 0 0 0 0 0 0│    Quit, No Count
  402.                ┌───────┼───────────┬───┤
  403.                │ Count │a b c d e f 0 0│          abcdef         (1..63)
  404.          ┌─────┴─┬─────┴─────────┬─┴───┤
  405.          │ Count │a b c d e f g h 0 1 1│    64  + abcdefgh      (64..319)
  406.  ┌───────┼───────┴───────────────┼─────┤
  407.  │ Count │a b c d e f g h i j k m 1 1 1│    320 + abcdefghijkm (320..4414)
  408.  └───────┼───────────────────────┴─────┤
  409.          │1 1 1 1 1 1 1 1 1 1 1 1 1 1 1│    Sector Break, No Count
  410.          └─────────────────────────────┘
  411.  
  412.   Count
  413.  
  414.                                      ┌─┐
  415.                                      │1│    2
  416.                                  ┌─┬─┴─┤
  417.                                  │a 1 0│    3   + a          (3..4)
  418.                              ┌───┼─┴───┤
  419.                              │a b 1 0 0│    5   + ab         (5..8)
  420.                          ┌───┴─┬─┴─────┤
  421.                          │a b c 1 0 0 0│    9   + abc        (9..16)
  422.                      ┌───┴───┬─┴───────┤
  423.                      │a b c d 1 0 0 0 0│    17  + abcd      (17..32)
  424.                  ┌───┴─────┬─┴─────────┤
  425.                  │a b c d e 1 0 0 0 0 0│    33  + abcde     (33..64)
  426.              ┌───┴───────┬─┴───────────┤
  427.              │a b c d e f 1 0 0 0 0 0 0│    65  + abcdef    (65..128)
  428.          ┌───┴─────────┬─┴─────────────┤
  429.          │a b c d e f g 1 0 0 0 0 0 0 0│    129 + abcdefg  (129..256)
  430.      ┌───┴───────────┬─┴───────────────┤
  431.      │a b c d e f g h 1 0 0 0 0 0 0 0 0│    257 + abcdefgh (257..512)
  432.      └───────────────┼─────────────────┤
  433.                      │0 0 0 0 0 0 0 0 0│    Quit - Illegal Encoding
  434.                      └─────────────────┘
  435.  
  436. ------------------------------------------------------------------------------
  437.  
  438. I have finished writing Windows Source Version 3, which is now available
  439. from V Communications Inc.
  440.  
  441. What is Windows Source?
  442.  
  443. Windows Source is an add-on to V Communications' Sourcer disassembler
  444. which preprocesses executable, dynamic link library, device drivers and
  445. VxD files for Windows 3.x, Windows '95 & Windows NT. It also provides
  446. support for OS/2 1.x, 2.x & Warp.
  447.  
  448. Where possible symbolic debug information included in separate .SYM,
  449. .DBG files, or included in Codeview or COFF debugging sections.
  450.  
  451. Windows Source Web Page : http://www.tbcnet.com/~clive/vcomwinp.html
  452.  
  453. ------------------------------------------------------------------------------
  454.  
  455. For more information about V Communications software :
  456.  
  457. Sourcer, Bios Preprocessor, Windows Source,
  458.  
  459. V Communications, Inc., 4320 Stevens Creek Blvd.,
  460. Suite 120, San Jose, CA 95129-9944.
  461.  
  462. Orders: 800-648-8266 (USA & Canada)
  463. Phone : 408-296-4224
  464. Fax   : 408-296-4441
  465. BBS   : 408-296-5334
  466. URL   : http://www.v-com.com
  467. Email : sales@v-com.com
  468.  
  469. These tools are highly recommended, be sure to let them know Clive Turvey
  470. sent you.
  471.  
  472. ------------------------------------------------------------------------------
  473.  
  474. Andrew Schulman's Unauthorized Windows 95 updates along with this software
  475. can be found at :
  476.  
  477.     http://www.ora.com
  478.  
  479.  
  480.