The DOS-LOGO project
Welome to the DOS-LOGO project. The number one source of logo.sys technical
information. Other information about Windows 95 can be found at
Wikipedia.
Back in 1994, Microsoft Corporation decided to blend their current MS-DOS
technology and 386 Enhanced Mode Windows together to create a "consumer"
operating system. By doing this they would get more control of their products.
The MS-DOS part of windows was rearranged so that the MS-DOS kernel was moved
into the MS-DOS bios. But around this time, a boot splash screen was created to
hide as much as possible of MS-DOS and help advertising the Windows 95 brand.
This boot splash screen came to be a hardware mystery. As you might know, if
something has to work on a PC it can't be a hardware hack. There are so many
different hardware setups out there. But the MS-DOS boot splash screen is a huge
hack, and it took me around 11 years to figure it out. I remember reading huge
PC bibles over and over to find something that worked like the boot logo, but
with no success.
As a user, you'd see the logo show up after the "Starting Windows 95..."
message. If you had a clean installation with nothing in config.sys and
autoexec.bat, and your computer had basic hardware, the logo would animate until
DISPLAY.DRV (one of the KRNL386 drivers in Windows 95) switched the graphics
mode to show the Windows desktop. However this was a rare scenario. Because of
different settings carried over from old MS-DOS installations and codepage
loading for different language versions of Windows 95, the logo would be killed
- then reloaded when the windows part of the boot process was executed. Then
there was more trouble such as having more than once registery hardware profile.
Then the logo would have to be redisplayed 3 times during boot. And evil
scenarios such as the hardware profile killing the logo, then the boot menu
warning (safe mode) killing the logo, and autoexec.bat killing it. That's 4
times redisplaying the logo.
Let's face the problems. Even today these problems will apply. If you are a
programmer like me, even better if you are a designer, you know about the Video
Graphics Adapter (VGA) which is a standard in possibly all computer graphics
cards. VGA is the only way to go, but the problems are huge:
Problem number one is to be able to show the logo without having interference
from other programs and hardware device drivers. This is very easy if you have
full control of the operating system, but MS-DOS doesn't have that kind of
control. The best part about MS-DOS (from my perspective) is it's way of
allowing programs to directly access hardware without having to ask MS-DOS for
permission.
There are two boring solutions to this problem. Simply allow the logo to be
displayed while MS-DOS and Windows are loading inbetween programs. But the
loading time is mostly done by device drivers, and the result would end up as
showing nothing. Or to pause the loading process in a cupple of seconds so that
the logo can be displayed. That option is stupid!
Problem number two is the greatest of them all: The logo must be canceled if a
critical program needs attention outside of MS-DOS's knowledge. Even MS-DOS
itself must be able to show critical information without having the logo in the
way. The solution to this problem is one of the greatest hacks I will uncover
later. There is no simple solution that I can come up with at this point. Part
of this problem is also to be give the user a way to cancel the logo too! If you
haven't noticed it already, the original logo.sys can be canceled at any time
pressing the ESC key!
Problem number three is a problem I found the solution to 7 years ago. To be
able to hide MS-DOS's output while displaying the logo. VGA does allow you to
load your own character set, and by reprogramming the VGA's controller chip,
magical things can happen. But even with novice VGA knowledge, you can't shut
off the emulated character generator in the standard VGA graphics modes. An
example of this is to run Windows 95 in VGA mode 12h (640x480x4) and let a
device driver print out text using the VGA bios. It will be displayed all over
the desktop! And Windows won't know about it.
Problem number 4 is crazy. Being able to fool MS-DOS itself and every other
program that the mode is still textmode, while the logo is displayed. At this
point you are starting to understand there is no way to pull this off without
spending all the developing time on a logo and skipping the whole operating
system.
Okay, so let me get really lazy and do this logo by the known techniques. I'll
use mode 13h (320x200x8) to show the logo. And I'll hook the VGA bios text
output interrupt, yea all of them! Now I simply stop programs from outputting
text while the logo is active. Oh god! I spent 4 hours writing the perfect logo
system, and when I tested it, I came to see how annoyingly stupid the result
was: Once the logo was active, it took my monitor 0.9 seconds to blank out
before the logo was shown. Oh, this is just so annoying since I wanted to both
cancel this thing and reaload it in less than 0.9 seconds! Gah, but anyway the
text is not showing! Score! No... wait, one program wrote to the video buffer
directly and didn't use the bios calls. The text is not showing since the logo
is in graphics mode but instead I got broken pixels all over the place! So both
my lazy solutions went to crap.
Well, not to mention the fact that switching back to text mode never worked the
way I wanted. I wanted the text that was there before the logo was shown to be
visible again, and also the text that was "aborted" to be visible as well.
So one day of failure, and I decided to stop working with this! But day two, I
booted my machine up just to see the original logo.sys working. I can never give
up until the day I'll have that technology. I mean it is working somehow, else I
wouldn't see it everytime I boot my computer.
The original Windows 95 boot logo hidden deep inside IO.SYS
The boot logo's name "logo.sys" is famous. It is a Windows bitmap renamed to become a system file. This was first uncovered when people found the file in the root folder of the Plus! package, an addon to Windows 95. Over the internet, you can find simple guides how to replace the boot logo. But when the question about the resolution 320x400 pixels comes up, noone can answer why. I was a little annoyed how some guides said it was just to open logo.sys when there was no logo.sys file to be found. And I was not interested in drawing my own logo. I wanted the original. I had a basic knowledge of IO.SYS back then, such as I knew it was responsible for all the MS-DOS messages of cool importance, such as "Starting MS-DOS..." and "MS-DOS Start Menu". So the logo must be there somehow. Today I know the logo is compressed using some form of compression and it is fast to decompress. My guess is some form of LZ compression. But back then I had to wait several years before I could finally printscreen the logo from a PC emulator (VMware). During the years I have collected original logo.sys from many Windows 9X releases. I still find the first one, the Windows 95A RTM release to be the best.
When Windows 9X is started for the first time, SULOGO.SYS is displayed with a special message. This logo is from Windows 98 Build 1650
(Beta 3)
When I first saw Windows 95, it had just been installed. The boot logo was
different, and the animation likewise. It had a blue shaded keyboard with a
black frame below it saying "Starting Windows 95 for the first time...". It
also had
a little Windows logo that was glowing back and forth. It was not until later the
same year I found that the name of that logo was "sulogo.sys" and it was hidden
inside the installation CABs. For Windows 95, the logo was not that special, but
for the upcoming Windows 98 and Millennium Edition, sulogo was of greater
importance.
The name sulogo.sys was just the name it has when stored among setup files, but
when it was displayed, its name was still "logo.sys". And it was deleted by
Windows once the second installation process was done.
Windows 98 and Windows Millennium Edition
By surprise I found out about Windows 98. I got Beta 3. I used the internet
to gain as much logo.sys as possible from all Memphis versions. Windows 98's
codename was Memphis, and there was a lot of people hosting logos from these
versions. Today they are all gone, but I got them in safe storage for the
future.
The interesting part about the beta logos was their quality. They were
often using layouts that were low budget, and it gave me an idea what program Microsoft
used to create them.
The RTM build of Windows 98 had its logo's colors toned down a bit compared to
the beta logos, but it also had a bug in the low scanline of 98. Something that
bugged me. By a coincident I found a file named oemlogo in the root of one of my
new computers that came with Windows 98 Second Edition. That logo was perfect,
and even included Microsoft's logo in the top like the original Windows 95 logo.
It was probably this logo that was supposed to be build into IO.SYS but never
made it. I never bothered to get the bugged logo from IO.SYS, and settled with
that oem logo instead.
When I first heard about Windows Millennium Edition, I knew I had to get the
logos myself because of MS-DOS's removal from the operating system. No one would
be able to extract the logos when they believed DOS was gone. As a programmer I
knew MS-DOS was 50% of Windows at that time, and it would be impossible and a
waste of time to remove it. It was of course just hidden. But Microsoft did
remove config.sys and autoexec.bat parsing so the logo would show up more or
less without interruption from DOS programs and device drivers.
Millennium Edition was boring because it skipped win.com and went directly to
execute VMM32.VXD from IO.SYS. So there would be no more respawning of the boot
logo. It lost its touch, but the clean white logo felt new. At this point the
clouds had become boring design, and clean flat design was the fashion of the
new millennium!
There was a way to boot Windows Millennium to DOS by a recovery boot disk. This
version of IO.SYS had the logo turned off, but not deleted. There is no way to
turn it on without hacking the uncompressed IO.SYS. From Windows Millennium Beta
1, IO.SYS was compressed with an unknown compression, so the default logo data
was stored uncompressed in conventional memory once IO.SYS was decompressed. The
DOS resources being used because DOS was no longer important.
This is the SULOGO.SYS from Windows
Millennium Edition Build 2499 (Beta 3)
Okay, so how does the boot logo work?
The boot logo uses the only mode available, VGA graphics mode 13h 320x200 pixels
256 colors. But changes the VGA registers manually to use double scanline height
(320x400). This is because when a monitor switches video mode, a short blanking
period can be avoided if the two video modes in question are using the same
number of scanlines.
All of VGA's textmodes uses 400 scanlines. There are another VGA graphics modes
available which use 400 scanlines, but none of them have 256 colors. By using
320x400, the VGA must be put into planear mode. It's a slow way of drawing
pixels, but it allows changing of video ram offset to do page flipping. With
this hack, the logo's pixel data can be stored in the upper video ram, and the
textmode 8 pages of text in the lower video ram. This allows the logo and text
to saved at the same time, so that switching between them can be done.
Because drawing is so slow, the logo is only drawn the first time, then left in
video ram for future activation. During logo drawing, the monitor will be
disabled temporarly so that it won't show how slow the logo is drawn on screen.
When the logo is activated it will be animated to show the user the computer is
not frozen. The animation is done by palette rotation, so no drawing is made.
The trick to remember the textmode, and still allow programs as well as DOS
itselfto believe textmode is still the active mode, BIOS RAM area is modified.
VGA BIOS allows mode switching without erasing the video buffer bhy turning on
the 7th bit in the video mode number. This is done to avoid text to be cleared,
as well as the logo's pixel data.
Quite a few interrupts are taken over so that the logo can safely be
deactivated. Interrupt 8h for timing the animation. Interrupt 10h for video mode
switching. Interrupt 15h for keyboard intercept (user can abort the logo with
the Escape key). And interrupt 16h for keyboard requests.
DOS-LOGO Technical Reference
Offset | Name | Size | Description |
---|---|---|---|
0h | bfType | 2 | BM ascii sign |
2h | bfSize | 4 | Size of the whole bitmap file. Is ignored by DOS-LOGO. |
6h | bfReserved1 | 2 | Not used. Set to 00. |
8h | bfReserved2 | 2 | Not used. Set to 00. |
Ah | bfOffBits | 4 | Offset where the bitmap bit data is located. Must be be 436h |
Eh | biSize | 4 | Holds the size of the BITMAPINFOHEADERADER structure. Must be 28h |
12h | biWidth | 4 | Width of the bitmap. Must be be 140h |
16h | biHeight | 4 | Height of the bitmap. Must be be 190h |
1Ah | biPlanes | 2 | Bitmaps only support 1 plane. Must be be 1 |
1Ch | biBitCount | 2 | DOS-LOGO require 256 color bitmaps (8 bit palette). Must be 8 |
1Eh | biCompression | 4 | DOS-LOGO supports RLE8 compressed bitmaps. This value can be 00 for compatibility with original LOGO.SYS boot logo, or 1 for RLE8 compression. |
22h | biSizeImage | 4 | Size of bitmap bits specified when using compression. Is ignored by DOS-LOGO. |
26h | biXPelsPerMeter | 4 | Not used. Set to 00. |
2Ah | biYPelsPerMeter | 4 | Not used. Set to 00. |
2Eh | biClrUsed | 4 | Is ignored by DOS-LOGO. |
32h | biClrImportant | 4 | Byte at offset 32h holds the palette entry animation start, and byte at offset 33h holds the rewind count for palette animation looping. | 36h | bmiColors | 4*256 | Array of RGBQUADQUADs. The RGBQUAD structure is four bytes where the first byte is the BLUE component, followed by GREEN, RED, and a RESERVED byte. There are 256 entries in this array. | 436h | bmBits | 320*400 | The bitmap bits, each byte representing a pixel, and the value being an index into the bmiColors palette array. Or in case of RLE8 compression, the compressed bitmap commands. |
DOS-LOGO Support | Input | Output | |||||
---|---|---|---|---|---|---|---|
Subservice | Name | Description | Register | Value | Description | ||
AX=4A32h | BL | 00h | DOS-LOGO Is Session & Get Logo Checksum | Check to see if the boot logo is active. Since the boot logo is
invisible to programs and device drivers, this is the real way of knowing if the
boot logo has been activated. The checksum is used internally by the operating system to see if the logo pixel data has been untouched. |
AX | 0000h | Logo is in session (turned on). |
FFFFh | Logo is not in session (turned off). | ||||||
DX | **** | Checksum of the logo's pixels in video ram (A000h:8000h) from when it was first drawn. Compare this checksum against the current video ram's checksum to see if the logo can be put back into session once more. | |||||
01h | DOS-LOGO Resume Session | DOS-LOGO allows the operating system and device drivers to have priority access
to the interrupt table when the boot logo is in session. After the DOS-LOGO
session has been paused, use this subservice to resume it. Note: A paused DOS-LOGO session cannot restore the video mode. |
N/A | ||||
02h | DOS-LOGO Pause Session | The operating system or other device drivers might want the priority to the interrupt table when the boot logo is in session. Pausing the boot logo will not change the video mode, but will allow access to unmodified DOS-LOGO resources. Use subservice 01h (DOS-LOGO ResumeSession) to actiavate the boot logo after it has been paused. | N/A | ||||
03h | DOS-LOGO Restore Previous Video Mode | A DOS-LOGO session will automatically restore the previous video mode and its
text if the user presses the keyboard key Escape, or if the current running
program requests user input. But in order for a program or device driver to restore the video mode in other ways, calling this subservice is the correct way to do it. Note: Changing video mode from a program/device driver during a DOS-LOGO session will not restore the previous video mode and its text. |
N/A | ||||
04h | DOS-LOGO Turn On Session | The operating system calls this subservice to start the DOS-LOGO session,
meaning that the boot logo will be animated and can be aborted by the user
pressing the keyboard key Escape. The return value is the previous animation
rotation info from when the boot logo was last in session. Note: This subservice is used in complex redisplay boot logo operations by the operating system. It is only supported for backward compatibility. Use subservice 06h (DOS-LOGO Redisplay and Enter Session). |
AX | **** | The animation rotation info from the previous session. | ||
05h | DOS-LOGO Turn Off Session | Turns off the DOS-LOGO session. | N/A | ||||
06h | DOS-LOGO Redisplay and Enter Session | This subservice is new for the DOS-LOGO device driver. It does the hard work of
redisplaying the boot logo once it has been aborted by a program or by the user.
In order for a boot logo to be redisplayed, the video ram must have been
untouched since the last time the boot logo was displayed. A graphics mode
switch without the 7th bit turned on will cause the video buffer to be erased,
thus destroying the logo's loaded pixel art. DOS-LOGO Redisplay and Enter Session does all of the work from the subservices above. Therefore use this subservice in first hand. When it comes to redisplaying the boot logo, the above subservices are left for backward compatibility only. |
N/A |
DEVICE=[d:][path]DOS-LOGO.SYS |
DOS-LOGO and FreeDOS
The function ConInpFlush in the source file console.asm of the FreeDOS Kernel is
calling interrupt 16h all the time.
I don't know for what purpose. I don't know what benefit this action has on
FreeDOS compared to MS-DOS in general. But calling interrupt 16h will destroy
the logo. Interrupt 16h is used when keyboard responses are needed from the
user. After a very short period after a call to interrupt 16h service 01h, the
logo will go back to textmode. This allows the user to be prompted for input.
But when a user knows the input beforehand, pressing that key within the period
will not destroy the logo. FreeDOS kernel is however using the keystroke check
indefinetly, which is sad because the logo will not stand a chance of be shown at all.
If the kernel allows a key to be pressed at anytime, it can hook up to interrupt
15h service 4Fh (Keyboard Intercept) to search for keystrokes, and also remove
them from ever reaching interrupt 9h.
For a program to use Interrupt 16h service 01h to search for keystrokes is okay.
But for a kernel?
If any of you find a solution, or know what ConInpFlush does, please contact me: ola]o[logotypes.se
so that a fix can be made that benefit both the DOS-LOGO project and FreeDOS
Kernel!
DOS-LOGO Downloads