Patching the "SSFLYWIN.SCR" file in Windows 3.11 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 figure 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 "SSFLYWIN.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 ahead of the character string "DISPLAY" I found where to patch the screen-saver. I have also found out where to patch the file so you can select whichever one of the modified files you want from the Desktop Dialog Box of the Windows Control Panel. The short patch -- only one byte needs changing. There is less chance of error. -- you need a backup of SSFLYWIN.SCR with a different extension or in another directory. -- you have to keep your modified files with different names or in another directory and copy as desired over your current operational SSFLYWIN.SCR file to change the character to be displayed. The longer patch -- the internal description is changed but the length must be the same as or shorter than the original name of "Flying Windows". If you use a name that is longer than the original name, your screen-saver may crash. You have to be extra careful. -- each new file must have a unique name with the ".SCR" extension and reside in the \WINDOWS\ subdirectory. -- You can select the character you want by name with the Desktop Dialog Box of the Control Panel. The short patch: --------------- (1) copy your original SSFLYWIN.SCR to a new file SSFLYWIN.OLD so you have a backup of it. (2) in the WINDOWS directory, enter the command "DEBUG SSFLYWIN.SCR". (3) at the DEBUG prompt, a "-", enter the command "D 2EC0 2F0F". You should see the following (except that the "xxxx" will be a four-digit hexadecimal number which you can ignore). Except for the "xxxx" everything should be EXACTLY the same as what is shown here. If not, you may have a different version of SSFLYWIN.SCR and it will NOT be safe to make any changes. In that case, just use "Q" to quit without changing anything. C:\>DEBUG SSFLYWIN.SCR -D 2EC0 2F0F xxxx:2EC0 00 00 00 00 05 00 00 00-00 00 00 00 00 00 00 00 ................ xxxx:2ED0 57 69 6E 67 64 69 6E 67-73 00 57 61 72 70 53 70 Wingdings.WarpSp xxxx:2EE0 65 65 64 00 44 65 6E 73-69 74 79 00 00 00 00 00 eed.Density..... xxxx:2EF0 32 00 FF 44 49 53 50 4C-41 59 00 57 69 6E 67 64 2..DISPLAY.Wingd xxxx:2F00 69 6E 67 73 00 57 69 6E-67 64 69 6E 67 73 00 25 ings.Wingdings.% - (4) change the character to be displayed by changing the "FF" byte at 2EF2 with the command "E 2EF2 zz", replacing the "zz" with the two-digit hexadecimal number for the character you want (see chart). I'll assume in the example below that you want a bomb with a lit fuse, character 4D hex. Then display the results with another "D 2EC0 2F0F" command. You should now have: C:\>DEBUG SSFLYWIN.SCR -D 2EC0 2F0F xxxx:2EC0 00 00 00 00 05 00 00 00-00 00 00 00 00 00 00 00 ................ xxxx:2ED0 57 69 6E 67 64 69 6E 67-73 00 57 61 72 70 53 70 Wingdings.WarpSp xxxx:2EE0 65 65 64 00 44 65 6E 73-69 74 79 00 00 00 00 00 eed.Density..... xxxx:2EF0 32 00 FF 44 49 53 50 4C-41 59 00 57 69 6E 67 64 2..DISPLAY.Wingd xxxx:2F00 69 6E 67 73 00 57 69 6E-67 64 69 6E 67 73 00 25 ings.Wingdings.% -E 2EF2 4D -D 2EC0 2F0F xxxx:2EC0 00 00 00 00 05 00 00 00-00 00 00 00 00 00 00 00 ................ xxxx:2ED0 57 69 6E 67 64 69 6E 67-73 00 57 61 72 70 53 70 Wingdings.WarpSp xxxx:2EE0 65 65 64 00 44 65 6E 73-69 74 79 00 00 00 00 00 eed.Density..... xxxx:2EF0 32 00 4D 44 49 53 50 4C-41 59 00 57 69 6E 67 64 2.MDISPLAY.Wingd xxxx:2F00 69 6E 67 73 00 57 69 6E-67 64 69 6E 67 73 00 25 ings.Wingdings.% - Note the "M" just before the word "DISPLAY" in the modified version. (That's the bomb character in the Wingdings font. You will see some other character instead of "M" if you chose a different character from the character table. (5) use the DEBUG "W" command to write the file to disk and then the "Q" command to quit DEBUG: -W Writing 03F20 bytes -Q C:\> (6) copy the modified SSFLYWIN.SCR to BOMBSCR.BIN for safe-keeping. (7) check out the screen-saver and ensure you now get bombs. (8) to change to Microsoft flags, now use "COPY SSFLYWIN.OLD SSFLYWIN.SCR". To change back to bombs, use "COPY BOMBSCR.BIN SSFLYWIN.SCR". The long patch: --------------- (1) to (4) perform the same first four steps in the short patch above. (5) display the section where the description for the Desktop screen-saver window is stored with "D 05F0 067F". You should see: -D 05F0 067F xxxx:05F0 00 00 00 00 08 53 53 46-4C 59 57 49 4E 00 00 00 .....SSFLYWIN... xxxx:0600 01 00 08 00 0C 00 00 06-4B 45 52 4E 45 4C 03 47 ........KERNEL.G xxxx:0610 44 49 04 55 53 45 52 09-FF 01 CD 3F 01 E2 03 01 DI.USER....?.... xxxx:0620 CD 3F 01 52 06 01 CD 3F-01 AC 15 01 CD 3F 01 1E .?.R...?.....?.. xxxx:0630 1B 01 CD 3F 01 2E 20 01-CD 3F 01 3A 22 01 CD 3F ...?.. ..?.:"..? xxxx:0640 01 66 13 00 CD 3F 01 B0-10 00 CD 3F 01 BC 14 00 .f...?.....?.... xxxx:0650 19 53 43 52 4E 53 41 56-45 20 3A 20 46 6C 79 69 .SCRNSAVE : Flyi xxxx:0660 6E 67 20 57 69 6E 64 6F-77 73 00 00 10 41 52 52 ng Windows...ARR xxxx:0670 4F 57 43 4F 4E 54 52 4F-4C 50 52 4F 43 03 00 0F OWCONTROLPROC... - Notice the string "SCRNSAVE : Flying Windows". You want to change the "Flying Windows" part. If what you see is not EXACTLY what is shown here (except for the "xxxx"s) then just go to step (5) of the short patch and use the short version of the modification. (6) Start DEBUG's assembler with the command "A 065C" to start assembly where the "Flying Windows" string is stored. DEBUG display an address and wait for an assembler command. -A 065C xxxx:065C (7) type in a "DB" statement followed by the new description in quotes. THE NEW DESCRIPTION MUST BE EQUAL IN LENGTH OR SHORTER THAN THE ORIGINAL "Flying Windows" DESCRIPTION. "Flying Bombs" is appropriate for the bombs... -A 065C xxxx:065C DB "Flying Bombs" xxxx:0668 (8) put a terminating zero byte after the new name with "DB 0" -A 065C xxxx:065C DB "Flying Bombs" xxxx:0668 DB 0 xxxx:0669 (9) terminate assembly by pressing the RETURN or ENTER key without entering any text on the line. You should get the "-" prompt back: -A 065C xxxx:065C DB "Flying Bombs" xxxx:0668 DB 0 xxxx:0669 - (10) display the results with "D 05F0 067F" again: -A 065C xxxx:065C DB "Flying Bombs" xxxx:0668 DB 0 xxxx:0669 -D 05F0 067F xxxx:05F0 00 00 00 00 08 53 53 46-4C 59 57 49 4E 00 00 00 .....SSFLYWIN... xxxx:0600 01 00 08 00 0C 00 00 06-4B 45 52 4E 45 4C 03 47 ........KERNEL.G xxxx:0610 44 49 04 55 53 45 52 09-FF 01 CD 3F 01 E2 03 01 DI.USER....?.... xxxx:0620 CD 3F 01 52 06 01 CD 3F-01 AC 15 01 CD 3F 01 1E .?.R...?.....?.. xxxx:0630 1B 01 CD 3F 01 2E 20 01-CD 3F 01 3A 22 01 CD 3F ...?.. ..?.:"..? xxxx:0640 01 66 13 00 CD 3F 01 B0-10 00 CD 3F 01 BC 14 00 .f...?.....?.... xxxx:0650 19 53 43 52 4E 53 41 56-45 20 3A 20 46 6C 79 69 .SCRNSAVE : Flyi xxxx:0660 6E 67 20 42 6F 6D 62 73-00 73 00 00 10 41 52 52 ng Bombs.s...ARR xxxx:0670 4F 57 43 4F 4E 54 52 4F-4C 50 52 4F 43 03 00 0F OWCONTROLPROC... - The important thing to note is that the only changes are at: xxxx:0650 19 53 43 52 4E 53 41 56-45 20 3A 20 46 6C 79 69 .SCRNSAVE : Flyi =========== xxxx:0660 6E 67 20 42 6F 6D 62 73-00 73 00 00 10 41 52 52 ng Bombs.s...ARR ============================= and that a zero byte is at the end of the new string. In other cases, the zero byte may be the original zero byte at 066A: xxxx:0650 19 53 43 52 4E 53 41 56-45 20 3A 20 xx xx xx xx .SCRNSAVE : xxxx xxxx:0660 xx xx xx xx xx xx xx xx-xx xx 00 00 10 41 52 52 xxxxxxxxxx...ARR == but the new string should NEVER be longer than fourteen characters. (11) tell DEBUG to use a new name to write the file with the "N" command. In this case, you could use "N BOMBS.SCR". (The new name in all cases should have an extension of ".SCR". (Use "DIR *.SCR >LPT1" to get a list of current "*.SCR" files before exercising your creativity to make sure you don't overwrite some other screen-saver.) Then write the new file to disk with DEBUG's "W" command and quit with the "Q" command. -N BOMBS.SCR -W Writing 03F20 bytes -Q (12) run Windows. Double-click on "Main". In Main, double-click on "Control Panel". In Control Panel, double-click on "Desktop". In the Desktop Dialog Box, open up the Screen-Saver menu by clicking on the downward-pointing triangle next to the current screen-saver name and scroll through the list of names. You should now see "Flying Bombs" (or whatever you used) as a selection. Select it, click on the "Test" button, and see your results. Repeat this step to change your screen-saver. Some Selected characters: ------------------------- (step 11) (step 7) filename I suggested name (step 4) suggest for to replace command: character: the new file: "Flying Windows" E 2EF2 24 a pair of glasses GLASSES.SCR "Flying Glasses" E 2EF2 26 a book BOOK.SCR "Flying Books" E 2EF2 28 a telephone PHONE.SCR "Flying Phones" E 2EF2 36 an hourglass(familiar?) HOURGLAS.SCR "Hour Glasses" E 2EF2 37 a computer keyboard KEYBOARD.SCR "Keyboards" E 2EF2 38 a computer mouse MOUSE.SCR "Flying Mice" E 2EF2 3A a personal computer COMPUTER.SCR "Flying PCs" E 2EF2 4A a happy face :) HAPPY.SCR "Happy Faces" E 2EF2 4B an apathetic face :| APATHY.SCR "Apathetic Face" E 2EF2 4C a sad face :( SAD.SCR "Sad Faces" E 2EF2 4D a bomb with a fuse BOMBS.SCR "Flying Bombs" E 2EF2 4E a skull and crossbones SKULL.SCR "Flying Sculls" E 2EF2 5B Chinese Yin-Yang symbol YIN-YANG.SCR "Flying YinYang" ( Twelve of the characters are astrological symbols: ) E 2EF2 5E Aries ARIES.SCR "Aries" E 2EF2 5F Taurus TAURUS.SCR "Taurus" E 2EF2 60 Gemini GEMINI.SCR "Gemini" E 2EF2 61 Cancer CANCER.SCR "Cancer" E 2EF2 62 Leo LEO.SCR "Leo" E 2EF2 63 Virgo VIRGO.SCR "Virgo" E 2EF2 64 Libra LIBRA.SCR "Libra" E 2EF2 65 Scorpio SCORPIO.SCR "Scorpio" E 2EF2 66 Sagittarius SAGITTAR.SCR "Sagittarius" E 2EF2 67 Capricorn CAPRICRN.SCR "Capricorn" E 2EF2 68 Aquarius AQUARIUS.SCR "Aquarius" E 2EF2 69 Pisces PISCES.SCR "Pisces" E 2EF2 7A a Mac-like 'cloverleaf' MAC-LEAF.SCR "Flying Clover" E 2EF2 A9 a 3-pointed star STAR3.SCR "Flying Stars 3" E 2EF2 AB a 5-pointed star STAR5.SCR "Flying Stars 5" E 2EF2 AC a 6-pointed star STAR6.SCR "Flying Stars 6" E 2EF2 AD an 8-pointed star STAR8.SCR "Flying Stars 8" E 2EF2 B2 a 4-pointed star STAR4.SCR "Flying Stars 4" E 2EF2 FD an X-ed box (no) X-BOX.SCR "Flying X-Boxes" E 2EF2 FE a checked box (yes) CHECKBOX.SCR "Flying Yesses" E 2EF2 FF a Microsoft Windows flag -- the original SSFLYWIN.SCR