China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-23 07:53
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » [Newbie Must Read] The boot LOGO format that so many people ask about View 1,083 Replies 1
Original Poster Posted 2003-07-21 00:00 ·  中国 吉林 吉林市 联通
银牌会员
★★★
想當一人之下萬人之上
Credits 1,275
Posts 393
Joined 2003-01-10 00:00
23-year member
UID 717
Gender Male
Status Offline
Anyone who has used Windows 95 (MS-DOS 7.x) knows that logo.sys on drive C is the boot screen.

But what format is logo.sys?
1. A bitmap in bmp format
2. The size must be 320×400Pix
3. 256 colors
4. The filename must be logo.sys, and it must be placed in the root directory of drive C or drive A.
5. If you want to make it animated, you can use a hex editor; of course xrx and Boot Animation Magician can do it too.

So, just make an image meet the above requirements, save it as a file named logo.sys, and put it in the root directory of drive C or drive A, and that's OK. Now does everyone know???

Win98, WinME, and Dos can use it too.
But in msdos.sys, you have to set LOGO=1
Dos boots too fast, so you may not be able to see it clearly.

Everyone knows that bmp images do not move, so why can windows make it move?
Hehe, what moves in ms's logo is the palette. Just use Boot Animation Magician and you'll know.

Boot Animation Magician download: http://www.newhua.com/down/CLogoMag.exe

Xrx Logo Utilities download: http://www.xrx.ca/logoutils/download_sites.htm

The above was posted by dosbbs, organized by playboy2925.




<- 刷新一下换个MM
叫我Jorkin或小p就行,别再叫playboy2925了,跟提犯人似的。
如果认为小弟发的logo不错的话,给朵鲜花我就知道了。:)
Floor 2 Posted 2003-07-24 00:00 ·  中国 吉林 吉林市 中移铁通
银牌会员
★★★
想當一人之下萬人之上
Credits 1,275
Posts 393
Joined 2003-01-10 00:00
23-year member
UID 717
Gender Male
Status Offline
Windows boot graphics interface and how the dithering color-changing image is formed

I. Introduction
Windows 95 appeared before users with a newer and better interface, and what
left the deepest impression was the boot and shutdown logo graphics showing it was a
"thoroughly" graphical interface. Windows 95 lets the system boot graphically and shut
down in a graphical interface; while displaying the Microsoft startup logo, the system
performs initialization, and while displaying the waiting message, it completes system
exit and ends system operation with a graphical prompt. In addition, Windows 95 also
designed a very good graphical interface for running old DOS programs, so that the
system's entire working process can completely break away from the old command-line
method. This article introduces how to customize these interface graphics and how to
make the startup cover image dither and change color.

II. The three interface images of Windows 95
Windows 95 uses three images to complete initialization and shutdown message
delivery, namely the startup logo (cover), back cover 1 (displaying "Please wait while your computer shut
s down", and back cover 2 (displaying "It's now safe toturn off your computer
"。Among them, back cover 1 and back cover 2 are two 256-color bitmap files named L
OGOW.SYS and LOGOS.SYS respectively, stored in the Windows working directory. The programs
responsible for displaying these two graphics are USER.EXE and WIN.COM respectively, and
after opening the corresponding graphics files they each perform file format checks.
The checking code segment in WIN.COM is:
debug win.com
-u 3b68 3b83
0AF4:3B68 813F424D CMP WORD PTR ,4D42
0AF4:3B6C F9 STC
0AF4:3B6D 75B9 JNZ 3B28
0AF4:3B6F BBCE40 MOV BX,40CE
0AF4:3B72 833F28 CMP WORD PTR ,+28
0AF4:3B75 75F5 JNZ 3B6C
0AF4:3B77 837F0C01 CMP WORD PTR ,+01
0AF4:3B7B 75EF JNZ 3B6C
0AF4:3B7D 837F0E08 CMP WORD PTR ,+08
0AF4:3B81 75E9 JNZ 3B6C
0AF4:3B83 60 DB 60
What is loaded into register BX is the offset value of the starting address of the successfully opened file LOGOS.SYS. By
comparing the header structure of a bitmap file, we can immediately determine that the opened file LOGOS.S
YS is an uncompressed bitmap image file with 1 bitplane and
256 colors (for the header flag fields of bitmap files, see the brief explanation in Appendix 1). In fact the LOGOS.SYS file really is a
complete bitmap file and can be edited with Paintbrush; it displays the information for back cover 2. Therefore
we can create a bitmap file of the corresponding format to replace it, and tests prove this is completely feasible.
USER.EXE handles LOGOW.SYS similarly, only the statements checking the bitmap flag fields are not continuous. Its checks are as follows:
ren user.exe userexe
debug userexe
-u 5ada:abb8
5ADA:ABB8 813F424D CMP WORD PTR ,4D42
-u 5ada:abc4
5ADA:ABC4 833F28 CMP WORD PTR ,+28
-u 5ada:abcb
5ADA:ABCB 837F0C01 CMP WORD PTR ,+01
-u 5ada:abd3
5ADA:ABD3 837F0E08 CMP WORD PTR ,+08
Here register BX contains the starting storage address of the opened LOGOW.SYS. From this it can be seen that
a bitmap of the corresponding format can be used to replace LOGOW.SYS for displaying back cover 1.
It is worth noting that during display it is automatically shown full-screen according to the set screen resolution.
For a 640×480, 256-color screen, it is best to set the bitmap size to 320×400 pixels.

III. How to make the startup logo cover
The Windows 95 cover does not exist as an independent bitmap file. This differs from how WIN.COM handles
LOGOS.SYS and how USER.EXE handles LOGOW.SYS. While analyzing the boot file
IO.SYS, the author discovered that the Windows 95 startup cover logo is embedded in the
boot file IO.SYS and has been compressed with DBLSPACE; the image data area length is 64KB. In
the Windows 95 version analyzed by the author, the image data occupies sectors 217 to 344 of IO.SYS (file length 223748
B), and there are many "DS" markers inside the data. This is the mark of a DBLSPACE compressed file.
Because DBLSPACE compressed files are segment-checked, even a change to a single byte
in this area will cause severe damage to the image. In the above IO.SYS, the image display execution
code starts at the place marked with "DBLSBIN$\LOGO.SYS" and occupies sectors 110-112.
Because DBLSPACE compressed files are very complicated and segment-checked, we cannot, as with Win
dows3.1's WIN.COM, customize the startup cover by changing the combined file or recompiling part of WIN.COM's code.
However, we can suppress the display with Logo=0 in MSDOS.SYS. Documentation on the
settings of the configuration file MSDOS.SYS already exists; Appendix 2 of this article briefly describes its configuration options.
In fact, the startup cover can also be customized. While analyzing IO.SYS, the author
found that before displaying the internally embedded cover, IO.SYS first tries to open a file
named LOGO.SYS in the boot directory (using DOS function call INT 21H, subfunction AH=3DH). If opening fails
(the file does not exist), it then displays the internally embedded cover instead (when WIN.COM and USER.EXE fail to open
the file, they do not display graphics, but instead display the relevant information in text). If opening succeeds, it performs a file format check, and
the required format is stricter than WIN.COM's checks on LOGOS.SYS.
The code IO.SYS uses to check LOGO.SYS is as follows:
debug io.sys
-u de0e
12B9E0E 813C424D CMP WORD PTR ,4D42
12B9E12 0F DB 0F
12B9E13 854801 TEST CX,
12B9E16 83C60E ADD SI,+0E
-u de19
12B9E19 833C28 CMP WORD PTR ,+28
-u de20
12B9E20 837C0C01 CMP WORD PTR ,+01
-u de28
12B9E28 837C0E08 CMP WORD PTR ,+08
-u de30
12B9E30 817C044001CMP WORD PTR ,0140
-u de39
12B9E39 817C089001CMP WORD PTR ,0190
-u de42
12B9E42 837C1000 CMP WORD PTR ,+00
From the above code we can immediately see that the opened file is an uncompressed bitmap file with dimensions
320×400, with bitplanes =
1, and 256 colors. Therefore, you can use Paintbrush and similar tools to create an uncompressed
256-color bitmap file, 320 pixels × 400 pixels, name it LOGO.SYS, and place it in the boot directory. The required LOGO.SYS format happens to be the same as the formats of LOGOS.SYS and LOGOW.S
YS. As verification, you can rename LOGOS.SYS or LOGOW.SYS to LOGO.SY
S and place it in the boot directory; experiments prove it is completely feasible. If there is a file named LOGO
.SYS in the boot directory, but it does not pass all the above checks, then display is refused and the internally embedded logo cover is also no longer displayed.

IV. Removing the format check on LOGO.SYS and creating a dithering color-changing logo cover
The external cover image displayed by the above method is static, but the image in IO.SYS
has a scrolling color bar underneath it. If the method is handled properly, the whole image can dither and change
color. If the LOGO.SYS in the boot directory is removed, then the image embedded in IO.SYS can also make the entire
picture surface have "flowing colored clouds," giving it a very strong sense of motion. The bitmap's dithering and color change are handled by IO.SYS,
and the relevant control flags for this processing are embedded in the statements above that judge LOGO.SYS, so
it is enough to modify the related statements a little. The method is: use PCTOOLS or other tools (DEBUG, etc.)
to find the underlined part below, and change all of it to hex machine code 90 (nop, an empty instruction that performs
no operation), for a total of 60 bytes from beginning to end, including some code that was not listed in the above
disassembly.
debug io.sys
-d de00
12B9E00 00 93 BA 02 00 E8 D6 02 -0F 82 52 01 8B F2 81
3C ..........R....

12B9E10 42 4D 0F 85 48 01 83 C6 -0E 83 3C 28 0F 85 3E
01 BM..H.....

12B9E20 83 7C 0C 01 0F 85 36 01 -83 7C 0E 08 0F 85 2E
01 .|....6..|.....

12B9E30 81 7C 04 40 01 0F 85 25 -01 81 7C 08 90 01 0F
85 .|.@...%..|....

12B9E40 1C 01 83 7C 10 00 0F 85 -14 01 8B 44 24 1E 2E
8E ...|.......D$..

12B9E50 1E 3E 0F A2 D8 02 F6 D8 -04 FF A2 D9 02 84 E4
74 .>.............

12B9E60 06 A3 DA 02 A3 DC 02 1F -2E C6 06 F2 8E 00 16
07 ...............

12B9E70 83 EC 26 8B FC BD 5F 03 -E8 45 02 B9 00 80 E8
E9 ..&..._..E.....

After making the above changes to IO.SYS, any bitmap can be displayed, but because the display adjusts the image size according to the system's
display driver and screen, the original settings are still best in terms of scale.
If you want to make changes, you should test first; the result may be distorted, but it does not affect display or operation. After the above
changes, when there is no external LOGO.SYS, the embedded cover can dither and change
color. If LOGOS.SYS or LOGOW.SYS is renamed to LOGO.SYS and placed in the boot directory, it
can replace the internal cover and also have changing colors. But if either of these two bitmaps has been edited,
or a new file created with Paintbrush is used, it generally cannot change color. This is because files created by Paintbrush
actually use very few colors, and most of the bitmap color table is empty. To create
a new color-changing logo, you should:
1. Use Paintbrush or the like to create an ordinary 256-color bitmap;
2. Make the resulting bitmap have a complete 256-color index table. This can be taken from the color index table of LOGOW.SYS
or LOGOS.SYS, that is, copy the field at file offset 36H~436H from LOGOW.SYS or LOGOS.SYS
to the same field in the new file. Be careful not to modify the first 0~36
H bytes of the bitmap. Then name the new file LOGO.SYS and place it in the boot directory.
V. Removing the format checks in WIN.COM and USER.EXE for LOGOS.SYS and LOGOW.SYS
The method is similar to the one above, so it will not be described one by one here.
Since boot files are very important, when making changes you must make them on a copy. Now DO
S7 can handle filenames up to 255B with IFSHIP.SYS, and such filenames are stored by changing the
directory entry attribute byte to 0FH, that is, system (04) + hidden (02) + read-only (01) + volume label (08) =
the VFAT filename attribute (0FH), and using multiple directory entry areas to store the long filename continuously.
To prevent data loss, DOS7 masks absolute disk writes through INT 26H, and tools such as PCTOOLS
use INT 26H for disk writing in their EDIT function. If you modify files on a hard disk, it will cause the
system to lock up and cancel the write; on a floppy disk there is no such problem, so it is recommended that modifications to IO.SYS be done on a system floppy disk.
It is very easy to create a DOS7 system floppy. For a disk initialized under DOS7, simply copy in IO.S
YS, MSDOS.SYS, and COM-MAND.COM and it can boot Windows 95. This is because DO
S7 has a more sophisticated BOOT boot sector: the boot file IO.SYS does not need to be stored contiguously, need not occupy the starting cluster, and its filename entry need not be the first directory entry.
VI. Appendix: MSDOS.SYS configuration and bitmap file structure
Appendix 1: Important header fields of the bitmap files involved in this article
Offset Length (Bytes)
Identification information
00H 2 424DH, that is "BM"
0EH 4 Bitmap information header size 28H=40 bytes
12H 4 Bitmap width in pixels 4001H=320 pixels
16H 4 Bitmap height in pixels 9001H=400 pixels
1AH 2 Number of bitplanes for target bitmap device 1
1CH 2 Number of bits required per pixel in the bitmap array, possible values are:


1: monochrome, 4: 16 colors, 8: 256 colors, 24: 16M colors
1EH 4 Bitmap compression flag, possible values: 0: uncompressed, 1: RLE-compressed 8-
bit bitmap, 2: 4-bit compressed bitmap
Therefore the bitmap IO.SYS read by LOGO.SYS in this article is uncompressed, has 1 bitplane,
256 colors, width 320 pixels, and height 400 pixels.
Appendix 2: Configuration options in MSDOS.SYS

Logo=1/0;1: display logo, 0: hide logo
BootGUI=1/0;1: boot directly into Windows after startup, 0: show DOS prompt after startup
Network=1/0;1: network installed, 0: not installed
BootWin=1/0;1: boot Windows system, 0: boot old DOS system
BootDelay=2 ;1: Starting Windows 95 logo delay can be changed to this
value, 0: do not display
BootKeys=1/0 ;1: enable startup control function keys F4/F5/F8, 0: disable startup func
tion keys
DrvSpace=1/0 ;1/0: load/do not load disk compression program
Dblspace=1/0 ;1/0: load/do not load disk compression program
DoubleBuffer=1/0
;1: reserve conventional memory for incompatible devices, 0: do not reserve

UninstallDir=D:\
;uninstall drive, its root directory contains 2 files used for recovery
WinDir=C:\Windows
;working directory
WinBootDir=C:\Windows ;boot directory
HostWinBootDrv=C:
;disk it is located on
For different installation settings, some of the above may not be present; MSDOS.SYS can be
edited.
<- 刷新一下换个MM
叫我Jorkin或小p就行,别再叫playboy2925了,跟提犯人似的。
如果认为小弟发的logo不错的话,给朵鲜花我就知道了。:)
Forum Jump: