DEATHSHADOW'S
MADNESS
Madness and You, Perfect together!

  1. Top of Page
  2. Main Menu
  3. Page Content
  4. Page Extras
  5. Bottom of Page

Video Technical

The video mode this game runs in is actually a sneaky trick using a text mode. Because of this it originally only worked on the CGA card. Basically you fill the screen with character code $DD, which has half the character filled with the foreground color and half with the background color. This nets you a 160x25 "semigraphics" mode where to set pixels you just change the foreground for even numbered pixels and background for odd numbered. To get that up to 100 vertical pixels you reprogram the CGA registers to make it think all characters are only 2px tall.

Back in the early 90's Geoffrey Silverton figured out that you could implemnet it on the EGA and VGA cards by adjusting their character heights in a similar fashion, though you faced the problem of every other column on the VGA being one px wider than the others, and on the EGA you ended up with a blank bar across the bottom seventh of the screen with the aspect ratio messed up since 350 does not divide evenly by 100. This 'broken' but working mode of operation can be triggered on those cards using the /safe switch.

I have expanded upon that by way of my knowledge of the EGA card. The EGA can be used with a CGA monitor, though that restricts it's highest resolution to 640x200... This means that unlike when the EGA is plugged into an EGA monitor the text mode is actual mode 3, and not the expanded 720x350 mode 3+. The VGA by way of backwards compatibility ALSO has the actual mode 3 timing information stored in it's BIOS -- so all we have to do to get the actual 160x100 mode implemented is reprogram the display timings to the actual 640x200 mode. This appears to work on most EGA and VGA cards I have tested with the exception of some laptop LCD's. Should you have graphics corruption on the EGA or VGA you should use /safe when starting the program.

Ideally the game should give you the CGA palette where color 6 is set to brown instead of ochre, however on many EGA cards the commands to reprogram the palette appear to be broken with the bits working as RGBi instead of RGBrgb. I suspect this is a side effect of reprogramming the CRTC into the CGA 200 mode 3, though I've been unable to determine where in the CRTC data this is turned on or off (or if it even can). As such on EGA systems I have left the yellow-ochre color in place.

  1. Top of Page
  2. Main Menu
  3. Page Content
  4. Page Extras
  5. Bottom of Page