Patching the "Flying Windows.scr" file in Windows 95 to display =============================================================== something else other than an advertisement for Microsoft: ========================================================= by Norman De Forest -------------------- I learned this technique from a professor from St. Mary's University. Unfortunately, I lost the paper with her name and office address on it. The actual location to patch was something I had to fugure out on my own. If you use some utility such as the "Character Map" utility (if you installed it) to display all of the characters in each of the fonts available to Windows, you may notice that character 255 (or FF hex.) in the "Wingdings" character set is a Microsoft Windows flag. If you use a ASCII/hex-dump utility (DEBUG will do) to dump your "Flying Windows.scr" file you will notice that the Wingdings character font's name is embedded in the file. That suggests that the screen-saver is fetching the pattern for character 255 in the Wingdings character font and using that as the symbol to display. Why include a lot of graphics routines in the screen-saver when it is much easier to use a system call to tell Windows to draw THIS character in THIS font at THIS location in THIS colour and THIS size. The Windows character-drawing routines are used so much that they are optimized for speed every way possible. THAT is just what the screen-saver does. To change WHAT character is displayed, just find where the character 255 is specified and change it and, "voila", a new screen-saver! With THAT information and the fact that the character 255 was just a little ahead of the character string "DISPLAY" I found where to patch the screen-saver. (1) Create a new sub-directory (I used the name "old") just below the \WINDOWS\SYSTEM subdirectory. This is to keep a copy of your ORIGINAL version of "Flying Windows.scr" so you can restore it. (2) Create an emergency boot floppy disk and make sure you can boot into DOS with it and get at the files in C:\WINDOWS\SYSTEM and the new C:\WINDOWS\SYSTEM\old subdirectories. (You should have had one made already, anyway!) In case you make a mistake that makes it impossible to start Windows on your system. (3) Use the command "DIR FL*.scr" in a DOS box in the \WINDOWS\SYSTEM sub-directory and make sure that the only file listed is: FLYING~1 SCR 14,336 07-11-95 9:50a Flying Windows.scr (The day and month may be reversed depending on your system date format (dd-mm-yy or mm-dd-yy). (4) If that is so, use "COPY FL*.SCR old" to make a backup copy of the screen-saver in the "old" subdirectory. If you do NOT get "Flying Windows.scr" (alias "FLYING~1.SCR") listed or it is a different size then quit NOW and give up on changing the file until you can get a patch for YOUR version (unless you like living dangerously OR you are very familiar with DEBUG). (5) Load the file into DEBUG (I assume DEBUG is accessable via your PATH setting) with the command "DEBUG FLYING~1.SCR". (6) Display or dump the bytes at hex. 1B00 to 1B3F with the command "D 1B00 1B3F". You should see: C:\WINDOWS\SYSTEM>COPY FL*.SCR old Flying Windows.scr 1 file(s) copied C:\WINDOWS\SYSTEM>DEBUG FLYING~1.SCR -D 1B00 1B3F 1269:1B00 57 61 72 70 53 70 65 65-64 00 00 00 44 65 6E 73 WarpSpeed...Dens 1269:1B10 69 74 79 00 00 00 00 00-32 00 00 00 FF 00 00 00 ity.....2....... 1269:1B20 57 69 6E 67 64 69 6E 67-73 00 00 00 44 49 53 50 Wingdings...DISP 1269:1B30 4C 41 59 00 25 64 00 00-53 63 72 65 65 6E 53 61 LAY.%d..ScreenSa - (The hexadecimal number "1269" may be some other value on your system. Everything else should be EXACTLY as above.) (7) Notice the strings "Wingdings" and "DISPLAY" in the ASCII text at the right. Also note that the second line of hexadecimal bytes ends with " FF 00 00 00". The "FF" is what you need to change. Use the DEBUG "E" command to change it with (for example) "E 1B1C 4E". The first "E" is DEBUG's Edit or Enter-data command. "1B1C" (that's one-bee-one-see) is the address of the "FF" byte and the "4E" is the new byte value to put there. The "4E" may be changed to use a different character but some are BORING!! to say the least. The "4E" value is a skull-and-crossbones in the Wingdings character font. Other interesting values are listed later. (8) repeat the Dump or Display command as in step 6. You should now have: C:\WINDOWS\SYSTEM>COPY FL*.SCR old Flying Windows.scr 1 file(s) copied C:\WINDOWS\SYSTEM>DEBUG FLYING~1.SCR -D 1B00 1B3F 1269:1B00 57 61 72 70 53 70 65 65-64 00 00 00 44 65 6E 73 WarpSpeed...Dens 1269:1B10 69 74 79 00 00 00 00 00-32 00 00 00 FF 00 00 00 ity.....2....... 1269:1B20 57 69 6E 67 64 69 6E 67-73 00 00 00 44 49 53 50 Wingdings...DISP 1269:1B30 4C 41 59 00 25 64 00 00-53 63 72 65 65 6E 53 61 LAY.%d..ScreenSa -E 1B1C 4E -D 1B00 1B3F 1269:1B00 57 61 72 70 53 70 65 65-64 00 00 00 44 65 6E 73 WarpSpeed...Dens 1269:1B10 69 74 79 00 00 00 00 00-32 00 00 00 4E 00 00 00 ity.....2....... 1269:1B20 57 69 6e 67 64 69 6e 67-73 00 00 00 44 49 53 50 Wingdings...DISP 1269:1B30 4C 41 59 00 25 64 00 00-53 63 72 65 65 6E 53 61 LAY.%d..ScreenSa - (9) Notice the "FF" is now "4E". If that is so, use the "W" (Write) command to write the change to disk and the "Q" command to quit DEBUG. If ANYTHING (except the "1269" doesn't match, just type a "Q" and press the RETURN key to quit DEBUG: -W Writing 03800 bytes -Q C:\WINDOWS\SYSTEM> (10) Now copy THIS modified copy of "Flying Windows.scr" to the "old" directory with a different extension... C:\WINDOWS\SYSTEM>COPY FL*.SCR old\*.skull (11) Repeat the steps above, substituting the new value you used in the previous "E" command for the "FF" in the old file and a new value for the character to select in place of the "4E" above. While any hexadecimal value CAN be used, some are undefined in the Dingbats font so the only "usable" values are 21 to 2F (20 is a space) (remember that DEBUG uses hexadecimal and the digits go: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F), 30 to 6F, 70 to 7E (7F is a control code), A1 to AF (A0 is another space), and B0 to FF with FF the original value. MOST of these values are -- well -- boring. Some lesser boring values for the "E" command are: (step 7) (step 10) command: character: filename I copied this to in "old": E 1B1C 24 a pair of glasses Flying Windows.glasses E 1B1C 26 a book Flying Windows.book E 1B1C 28 a telephone Flying Windows.telephone E 1B1C 36 an hourglass(familiar?) Flying Windows.hourglass E 1B1C 37 a computer keyboard Flying Windows.keyboard E 1B1C 38 a computer mouse Flying Windows.mouse E 1B1C 3A a personal computer Flying Windows.personalcomputer ("All right, children, can anyone tell the class why I shouldn't just use the name 'Flying Windows.computer'?") E 1B1C 4A a happy face :) Flying Windows.happy E 1B1C 4B an apathetic face :| Flying Windows.apathetic E 1B1C 4C a sad face :( Flying Windows.sad E 1B1C 4D a bomb with a fuse Flying Windows.bomb E 1B1C 4E a skull and crossbones Flying Windows.skull E 1B1C 5B Chinese Yin-Yang symbol Flying Windows.yin&yang ( Twelve of the characters are astrological symbols: ) E 1B1C 5E Aries Flying Windows.Aries E 1B1C 5F Taurus Flying Windows.Taurus E 1B1C 60 Gemini Flying Windows.Gemini E 1B1C 61 Cancer Flying Windows.Cancer E 1B1C 62 Leo Flying Windows.Leo E 1B1C 63 Virgo Flying Windows.Virgo E 1B1C 64 Libra Flying Windows.Libra E 1B1C 65 Scorpio Flying Windows.Scorpio E 1B1C 66 Sagittarius Flying Windows.Sagittarius E 1B1C 67 Capricorn Flying Windows.Capricorn E 1B1C 68 Aquarius Flying Windows.Aquarius E 1B1C 69 Pisces Flying Windows.Pisces E 1B1C 7A a Mac-like 'cloverleaf' Flying Windows.cloverleaf E 1B1C A9 a 3-pointed star Flying Windows.3-point E 1B1C AB a 5-pointed star Flying Windows.5-point E 1B1C AC a 6-pointed star Flying Windows.6-point E 1B1C AD an 8-pointed star Flying Windows.8-point E 1B1C B2 a 4-pointed star Flying Windows.4-point E 1B1C FD an X-ed box (no) Flying Windows.no-X E 1B1C FE a checked box (yes) Flying Windows.yes-check E 1B1C FF a Microsoft Windows flag -- the original Flying Windows.scr (12) Now, after creating a bunch of slightly different Flying Windows.* files in the "old" sub-directory, you can change your screen saver character at any time by going to the "\WINDOWS\SYSTEM\old" subdirectory at any time in a DOS box and using the command "COPY FL*.xxx* ..\*.scr", replacing the "xxx" with the first three letters of the wanted file's extension (*.sku*, *.sad, *.key*, ...) as in this example C:\WINDOWS\SYSTEM\old>COPY FL*.sku* ..\*.scr which will copy "Flying Windows.skull" from the \WINDOWS\SYSTEM\old subdirectory to the \WINDOWS\SYSTEM subdirectory with the new name of "Flying Windows.scr", overwriting your previous "Flying Windows.scr". If your system is set to prompt for confirmation on overwriting files and asks "Are you sure?", just press "Y" (or "y") and the RETURN key to allow the overwriting.