home *** CD-ROM | disk | FTP | other *** search
/ Home Edutainment Collection 4: Games & Extensions / Aztech-HomeEdutainmentCollection-Vol4-3DGamesExtensions.iso / dhacked / dehack5.bas < prev    next >
BASIC Source File  |  1994-06-14  |  3KB  |  75 lines

  1. ' DEHACK - Doom Exe HACK
  2. ' by Matt Fell (matt.burnett@acebbs.com)
  3. ' written 6/13/94
  4. '
  5. ' DEHACK 5 - The SOUND TABLE
  6. '
  7. ' These crude programs extract information from the DOOM.EXE or DOOM.WAD
  8. ' files and store it into a TXT file, suitable for perusing or printing.
  9. ' If you want to print the results, you might have to reformat it. Please
  10. ' don't waste reams of paper. Thanks.
  11. ' All of these only work on the 1.2 registered doom.exe, because I use
  12. ' simple byte offset numbers, not search strings.
  13. '
  14. ' IMPORTANT: If you don't like typing pathnames, modify the next section,
  15. ' un-comment it, and remove or comment-out the input section.
  16.  
  17. ' infile$ = "c:\doom\doom.exe"
  18. ' outfile$ = "c:\-\doom\12\dehack5.txt"
  19.  
  20. CLS
  21. PRINT "Enter the full pathname to your DOOM.EXE file, then the full pathname"
  22. PRINT "to where you want the textfile to be (in an already existing directory)"
  23. PRINT "e.g. 'c:\doom\doom.exe' and 'c:\doom\txt\dehack5.txt'"
  24. PRINT "Note: modify the program with built-in pathnames, and skip this!"
  25. PRINT
  26. INPUT infile$
  27. INPUT outfile$
  28.  
  29. OPEN infile$ FOR BINARY AS 1
  30. OPEN outfile$ FOR OUTPUT AS 2
  31.  
  32. DIM byte AS STRING * 1
  33.  
  34. PRINT #2, "The 'Sound Table' contained in DOOM.EXE version 1.2 2-17-94"
  35. PRINT #2, "List-maker program written by Matt Fell (matt.burnett@acebbs.com)"
  36. PRINT #2, "=========================================================================="
  37. PRINT #2, "At 553292 ($8714c) is the sound table. It has 61 entries, each is 9 4-byte"
  38. PRINT #2, "integers. The first is a pointer, which when added to $6f414 = 455700,"
  39. PRINT #2, "points to the text string that is that sound's name. Prefix DS or DP to"
  40. PRINT #2, "get the names of the entries in DOOM.WAD"
  41. PRINT #2, "The columns below are:"
  42. PRINT #2, "  1. sound #, used in THING TABLE"
  43. PRINT #2, "  2. sound name (I grab the name, not the pointer)"
  44. PRINT #2, "  3. ? 0 or 1"
  45. PRINT #2, "  4. ranges from 32 to 128"
  46. PRINT #2, "  5. to 10. ? unknown"
  47. PRINT #2, "=========================================================================="
  48.  
  49. pointer& = 553293               ' this is for 1.2 doom
  50.  
  51. FOR i& = 1 TO 61
  52.  
  53. PRINT #2, USING "####"; i&;
  54. PRINT #2, " ",
  55. GET #1, pointer& + (i& - 1) * 36, offset&
  56. sndname$ = ""
  57. FOR j% = 0 TO 5
  58.         GET #1, 455701 + offset& + j%, byte$
  59.         IF ASC(byte$) = 0 THEN EXIT FOR
  60.         sndname$ = sndname$ + byte$
  61. NEXT j%
  62. PRINT #2, sndname$;
  63. PRINT #2, " ",
  64. FOR j% = 4 TO 32 STEP 4
  65.         GET #1, pointer& + (i& - 1) * 36 + j%, num&
  66.         PRINT #2, USING "###"; num&;
  67.         PRINT #2, " ";
  68.         NEXT j%
  69. PRINT #2, " "
  70.  
  71. NEXT i&
  72.  
  73. END
  74.  
  75.