First post, by Peter Swinkels
Hi,
I have an installer (Electronic Arts Install Utility - Version 1.40) that comes with Cartooners's installation files (MS-DOS) version. This installer uses a bundle of functions (Greenleaf Superfunctions v1.00) written by a certain Edward D. Luebke for Greenleaf Software Inc. in 1988. Some of this information is displayed by the installer when it is executed, the rest is visible in the executable using a hex-editor. The installer uses a script stored as compressed data in the file "Cartoon.iea" to determine what to do. The script is vaguely BASIC like and pretty rudimentary. After figuring out most of the keywords and syntax by examining the decompressed script and some trial and error and by looking at the executable's data segment I found out the installer initializes a few variables for the script to use. Pretty much all of it relates to disk information, DOS version, and hardware configuration. Through some experimentation by changing DOSBox's configuration and using another program (QuickBASIC) to modify the memory's contents and to compare data returned by interrupt calls I found out the following:
Preinitialized variable:
o Floppies -The number of floppy drives plus one with bitmask 0xC0 at address: 0x0040:0x0010
o JoySticks -The game port flag with bitmask 0x10 at address: 0x0040:0x0011
o MachineType -The machine identification byte at address 0xF000:0xFFFE
o VideoMode -The video mode byte at address 0x0040:0x0049
Also, I used HelpPC to look up technical information. Disassembling the executable (after unpacking it) and scanning for interrupt calls specifically to retrieve hardware information I only found int 0x11 and int 0x15.
Now as to my question:
There is a variable which is initialized by the installer called ColorCard (a 32-bit signed long integer (like all numeric variables used by the script)). It has something to do with the video hardware but it is hard to determine what exactly the values it returns mean. Here is a of values I got by changing the machinetypes in DOSBox.conf:
Machine type: Return value: (decimal)
hercules 10
cga 7
tandy 6
pcjr 7
ega 4
vgaonly 3
svga_s3 and the rest are probably not important as I doubt the installer can detect anything newer than VGA (introduced in 1987). Anyway the value appears to be unrelated to anything returned by int 0x11 (BIOS Equipment Determination / BIOS Equipment Flags) or int 0x15. The reason I am guessing someone on this forum will know what this value represents is that it likely is derived from a BIOS related memory location like most of the other values I mentioned. Therefore someone familiar with low level x86 system programming will likely recognize it.
Information about Cartooners, its installer and code to decompress/compress the script (and what I know about its syntax) can be found at:
https://github.com/PeterSwinkels/Cartooners-File-Viewer
Oh, and why do I want to know this? I am just curious as to how the installer works.
Do not read if you don't like attention seeking self-advertisements!
Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels