Thursday, September 25, 2014

Classic DOS Pinball Games, Mode X and What they can Teach Us about Aspect Ratios

During the early to mid 1990s, several highly regarded pinball games were released for PC compatible computers running DOS.  Three prominent series of Pinball games were released during the years 1992-1995.  The first, developed by Digital Illusions, includes Pinball Dreams (1992), Pinball Fantasies (1992) and Pinball Illusions (1995).  All these were developed on the Commodore Amiga and ported to the PC by Frontline Designs.  The second series was developed by Epic Megagames, and consists of Epic Pinball (1993), Silverball (1993) and Extreme Pinball (1995).  A third series was developed by Spidersoft, and includes Pinball Dreams II (1994), Pinball Mania (1995) and Pinball World (1995).  There are also a few other notable pinball games that are not distinguished by coming from a single developer or publisher around this time.  These include Psycho Pinball (1995) and Absolute Pinball, which share the same style of gameplay as the other titles.

These games always supported non-standard VGA modes, sample-based music and were often heavily influenced by the demo-scene and European programmers who were still focused on the Commodore Amiga.  They all used an in-game display that used the full width of the screen and most of its height, with a portion of the height reserved for a display.  The tables were much taller than one screen could display.  They did not use a pseudo 3-D perspective, but all supported a high frame rate for fast, exciting action.  Most supported the Gravis Ultrasound as the ideal sound output device.

There has been debate over the proper aspect ratio for DOS games using the standard 320x200 resolution.  That resolution, as I outlined in a previous post, was a BIOS standard resolution for no less than the five (out of seven) major DOS game graphics display adapters, CGA, TGA, EGA, MCGA and VGA.  Using square pixels, the aspect ratio is 1.6:1, and this gives a letterbox effect on standard 4:3 ratio CRT monitors at the time.  If you stretch the monitor vertically, you can fill the screen but the pixels become 1.2 times as tall as they are wide.

VGA BIOS Display Mode 13h, which most VGA DOS games used, used the 320x200 resolution with an ability to display 256 colors from a palette of 262,144 colors.  The pixel information for the graphics is stored sequentially, with one pixel = one byte.  However, in addition to the aspect ratio issue, Mode 13h had its limitations, namely the fact that it could only support one full page of graphics in RAM.

A VGA card has 256KB of RAM, so the card could support four graphics pages at this resolution.  However, to do this, the card's registers had to be programmed directly.  Also, the registers that made up the display resolution could also be changed, but the values had to be reasonable lest the programmer destroy his or his user's monitors.  VGA, in its various official modes, supported 320, 360, 640 or 720 horizontal pixels and 200, 350 or 480 vertical pixels.  240 and 400 vertical pixels could be easily obtained by writing to a few registers.

Mode X, a custom VGA mode obtained by programming the registers, canonically has a 320x240 resolution at 256 colors.  The term eventually became to be appropriated for any non-standard resolution VGA mode.  320x240 was very popular for the pinball games identified above.  It is especially useful to obtain a reference for what the graphics should look like with square pixels.  Other modes like 320x350, 320x400, 320x480 and 360x480 were also popular, especially with shareware games.

360x480 at 256 colors was the maximum resolution a programmer could hope to achieve with 256KB VGA and keep to some degree of compatibility.  While it may have the RAM to display a 640x350 or 640x400 resolution at 256 colors, other technical limitations on the VGA prevent it from doing so.  Any graphics displaying in 640x350x256, 640x400x256 or 640x480x256 is always using some kind of SVGA or VESA mode.

DOSBox will stretch certain modes horizontally and this functionality cannot be totally disabled.  If no scalers in DOSBox are used, 320x200, 320x240, 360x200 and 360x240 resolutions are not scaled.  Other resolutions are stretched as follows :

320x350 to 640x350
320x400 to 640x400
320x480 to 640x480
360x350 to 720x350
360x400 to 720x400
360x480 to 720x480

If a screenshot is taken of any of the horizontally-stretched modes, the stretch effect can be removed by reducing the horizontal resolution by half using nearest neighbor interpolation.  This will eliminate every second column of pixels.  Resizing by doubling the horizontal resolution using nearest neighbore interpolation will restore those pixels.  In the screenshots below, I have eliminated any stretching by this method.

Digital Illusions' Pinball Series

Pinball Dreams and Pinball Fantasies offer two resolutions, 320x200 and 320x350.  Take a look at these screens from each game :

Pinball Dreams 320x200
Pinball Dreams 320x350
Pinball Fantasies 320x200
Pinball Fantasies 320x350
Both modes give the same amount of screen area to the status display, only the text is off-center (in relation to the status display area), in the 320x350 mode.

The great advantages of pinball games is that they almost always have a ready supply of circles which you can judge whether the aspect ratio is correct.  If a circular object looks like its diameter is the same regardless of the points of the circle measured, you are on sure ground to assume that the aspect ratio is correct.  If the object looks like the diameter is shorter between certain points compared other points, looking more like an oval, then the aspect ratio is probably incorrect.

For Pinball Dreams and Fantasies, the only difference between the 320x200 and 320x350 graphics is that the 320x350 graphics show 1.75x more of the pinball table.  Pinball tables, by their very nature, tend to be much taller than they are wide.  This will be an important point when I go on to discuss the final game in this series, Pinball Illusions.  However, this is what DOSBox displays in the 320x350 mode :

Pinball Fantasies Stretched
The game does not give the pixel dimensions of its high resolution mode in numbers.  However, comparing the two screenshots, it is apparent that no extra detail is given in the stretched screenshot.  Instead, the pixels are much more prominent and the circular objects have become ovals.  It should be clear that stretching is not correct for this mode.

If any further confirmation is required, look to the original games for the Commodore Amiga.  Pinball Fantasies (OCS/ECS PAL version) for that system uses an effective 320x262 resolution.

Pinball Fantasies Amiga OCS/ECS
Pinball Fantasies Amiga OCS/ECS
Pinball Illusions is by far the most demo-scene inspired of these three pinball games, using numerous odd-ball resolutions in its pre-game sequences.  However, for VGA cards, the pattern is almost the same.

Pinball Illusions 320x240
Pinball Illusions "360"x350 (only 336 horizontal pixels used)
If you look carefully, you can see that the right side of the screen is slightly cropped in the 320x240 mode compared to the "360"x350 mode.  The SVGA/VESA Modes follow the 360x350 mode, but only the vertical resolution is increased :

Pinball Illusions "640"x480 (only 336 horizontal pixels used)
Pinball Illusions "800"x600 (only 336 horizontal pixels used)
By the time you get to 800x600 pixels, the screen barely needs to scroll, you can see almost the whole table. On a real CRT monitor, these tables will appear centered in a narrow portion of the middle of the screen with large black borders on either side.  For all these pinball games, no stretching should be done.  If necessary, you should decrease the horizontal size on your CRT monitor until the circular objects look like circles.

Epic Megagames Pinball Series

For the first two games in Epic's series, Epic Pinball and Silverball, they are easy to deal with because they each only use a 320x240 resolution for their tables.  

Epic Pinball 320x240
Silverball 320x240
For the final game, Extreme Pinball, it only uses a 320x400 resolution, and the situation is quite different.  

Extreme Pinball 320x400
As you may have noticed, the ball and the chutes do not look like spheres.  If we stretch this resolution, we get the following : 

Extreme Pinball "640"x400

Now the ball and chutes look like spheres.  Therefore, for one set of games, stretching is not desirable, but for this game, it is.

Spidersoft Pinball Series

Pinball Dreams II was intended as the sequel for Pinball Dreams even though Spidersoft had no connection to Digital Illusions.  Since it was built using the same engine, the same graphical issues appear in it.  Pinball Mania uses the same graphics modes as Pinball Fantasies, and the same comments apply.  In short, they all look correct at their native aspect ratios, no adjustments or stretching required :

Pinball Dreams II 320x200
Pinball Dreams II 320x350
Pinball Mania 320x240
Pinball Mania 320x350
Pinball World uses a standard 320x200 mode or a 320x240 mode.  However, the ball is perfectly "circular" in the 320x200 and 320x240 modes (15x15 pixels) without any aspect ratio correction.  Unlike the earlier pinball games, Pinball World uses huge tables that are wider and taller than the screen resolution.  The ball is the same size in both modes, so the higher resolution just shows more of the table :

Pinball World 320x200
Pinball World 320x240
Other Pinball Games

Although Psycho Pinball uses a 320x240 or an odd 320x368 resolution, it follows the same pattern as Pinball Dreams.  The extra resolution merely shows more of the table, although this time more of the status bar is displayed.  No stretching should be done to its graphics.



For the final game to be detailed in this blog post, Absolute Pinball, the comments made for Psycho Pinball apply.  It offers three modes, 320x240, an odd 360x270 mode and a 320x400 mode.  First, the usual modes :

Absolute Pinball 320x240
Absolute Pinball 320x"400" (only 384 vertical pixels are used)
Like Psycho Pinball, the 320x400 resolution merely adds more visibility to the table and a larger dstatus display.  The circular objects are circular without any stretching.  For the 320x400 resolution, this is in marked contrast to Extreme Pinball, which uses the same resolution.  Last, let's consider the oddball 360x270 resolution.

Absolute Pinball "360"x270 (only 320 horizontal pixels are used)
First, despite the larger number of horizontal pixels offered by the mode, only the middle 320 pixels are used.  The status display uses a 320x62 pixel box.  This is essentially the size of the status display in the 320x400 mode.  The purpose of this mode was to allow for the same status display as enjoyed by users of the highest display resolution with more modest system requirements instead of the smaller status display.  Again, no particular stretching is required for this mode.  

4 comments:

  1. Your blog is really great :D

    ReplyDelete
  2. there's one question i've wondered about ever since i stepped into radio shack way back around 1980s

    how did coco3 compare with c64? which is a better platform for games and productivity like word processing? how did cost compare?

    better graphics? better sound?

    ReplyDelete
  3. "These games always supported non-standard VGA modes, sample-based music and were often heavily influenced by the demo-scene and European programmers who were still focused on the Commodore Amiga."

    The game that started it all, Pinball Dreams, was developed by Swedish Amiga demosceners from the group The Silents.
    They founded Digital Illusions CE (yes, that is the same DICE that we know today of games such as Battlefield) to publish their game.
    So it's a bit more than just 'influenced by'... this genre of pinball games was pretty much invented by European Amiga demosceners.

    ReplyDelete