Saturday, October 11, 2014

Directional Difficulties - The Early Keyboards and Cursor Keys

When IBM introduced the PC, it came with an 83-key keyboard keyboard that a number row and a numeric keypad.  There were no status LEDs on this keyboard, so the only way you could tell whether the Num Lock key had been pressed was by observing the behavior of the numeric keypad.  If a number was typed, then the Num Lock was on.  The general layout was as follows :


All layouts taken from here : http://www.quadibloc.com/comp/kyb03.htm.  There were also separate + and - keys and a PrtSc * key.  Not every game used the numberpad for directional controls.  

For the IBM PCjr., IBM severely cut down the keyboard size, build quality and number of keys.  There was no numeric keypad.  Instead, the keyboard only had six discrete cursor keys.  Here is the new layout :

The cursor keys pull double and even triple duty, as their function changes  if the Shift or Fn key is held down.  There is no Num Lock key on this keyboard.

The Num Lock key can be "pressed" by hitting Alt, Fn and N.  When the Num Lock function is activated in this manner or the Shift key is pressed, then Up becomes 8, Left becomes 4, Right becomes 6, Down becomes 2, Ins becomes 0 and Del becomes .  If the Fn key is held, then you get Home, Pg Up, Pg Dn and End for Up, Left, Right and Down, respectively.   Press Fn and Shift, and you get 7, 9, 3 and 1.  Numberpad key 5 cannot be directly generated by the PCjr. keyboard.

The next major keyboard innovation came from Tandy.  Tandy 2000 and more importantly 1000 keyboards have separate cursor control keys in the now familiar inverted-T layout.  In addition, there is a numeric keypad, but several functions have been changed.  There are individual keys for Home, Insert and Delete. Here is the layout :


There are more differences between an IBM and a Tandy keyboard as well.  However, the differences do not always make a difference to programs.  There are two general methods with PCs to determine which key was pressed.  The first was to call Int 16h.  The result would give you a translated scan code and an ASCII character.  The second was to read the raw scancode directly from the hardware.  Some programmers used the second method with their own keyboard interrupt handlers.  This tends to be the cause of keyboard incompatibilities.

Because some keys, like the numberpad keys, can give results identical to other keys on the keyboard, even the BIOS allows you to distinguish between the 1 key on the number row and the 1 key on the number paid.  You can tell the difference between the Left and Right Shift keys, even though their function is totally identical.

A Tandy has a Num Lock key and even a status LED, but when the Tandy boots up, the Num Lock defaults to off, just like the PCjr.  An IBM PC defaults the Num Lock function to on.  Many games require you to turn the Num Lock on when running on a Tandy 1000.  This is because the characters given by the Tandy keyboard are often not the same as on an IBM PC keyboard.  However, for numbers they will always be the same.  

The Tandy inverted T cursor keys are another issue.  A well-behaved program doesn't care which key is pressed so long as it reads the scancode it expects.  However, not every DOS game is well-behaved.  In DOS, the separate cursor keys function as they would on an IBM Model M keyboard.  However, some games rely on the numeric keypad to give eight movement directions.  Tandy's inverted-T cursor keys give different raw scancodes and may not always be recognized.  

Later Keyboards :

The 83-key keyboard layout was followed for the PC AT keyboard with a few differences to key placement and size.  IBM included status LEDs and an 84th key for Sys Req.  The raw scancodes are completely different from an 83-key keyboard, only the BIOS allows for compatibility with PC and XT software.  However, despite the fewer number of keys compared to more modern keyboards, it is still usable in any system with a PS/2 port.  

Finally, IBM released the Model M 101-key keyboard which essentially defined the minimum number of keys and the basic layout that we use today.  Its provided fully separate cursor keys in addition to the numeric keypad.  Most of the time, the cursor keys can be used as directionals, but because they have different raw scancodes than the numeric keypad cursor keys, some games will not recognize them.  The Model M supports three sets of raw scancodes, Set 1 is the PC/XT scancodes and it sends those scancodes when it is plugged into a PC or XT or Tandy 1000 TL/SL/RL or the 8086 based IBM PS/2s (but compatibility with anything other than the PC/XT's 2nd or 3rd BIOS is dicey).  Set 2 is when it is plugged into an IBM PC AT, PC/XT Model 286 and just about every other computer, including modern machines. Set 3 was intended as the native PS/2 scancode set and is similar to Set 2 but was rarely used. 

Three Flight Simulator Joysticks for DOS

I want to compare and contrast the three DOS-era joysticks I own suitable for DOS Flight Simulators, Racing Simulators and the like.

1.  CH Flightstick Pro

One of the first modern joysticks, this almost-completely ambidextrous joystick has four buttons, a 4-position hat switch, two trims and a throttle wheel.  The throttle wheel acts as the Y-axis of the second joystick.  The 4-position hat switch is implemented as button combinations.  Hat up is buttons 1,2 3 & 4, Hat down is buttons 1, 2 & 3, Hat right is buttons 1, 2 & 4 and Hat left is buttons 1 & 2.  Due to this, the individual buttons will not register simultaneous button presses.  Button 1 will have priority over buttons 2, 3 and 4, button 2 will have priority over buttons 3 and 4 and button 3 will have priority over button 4.


This joystick is by far the "loosest" of the three.  The stick offers little resistance and it seems you can move the stick much further than you would think.  With my joystick the trims frequently get dislodged, causing things to go haywire.  I put electrical tape over them to keep them in place.

To open the joystick, you must dislodge all four of the rubber feet around the edges to get at the screws.  This is annoying because you can scrape the sticky stuff holding the rubber feet to the bottom off.

The stick's design has been very popular over the years, and the basic design is still being sold today in a USB form.

2.  IBM 76H1571 Joystick

Despite IBM introducing the PC joystick interface in 1981, I believe this may be the only IBM-branded joystick released for the PC-compatible platform that is suitable to hold in your hand.  It was made for IBM by Anko Electronic Co., Ltd., and was branded for its Aptiva line of computers.  Its for right handed people only.


It has four buttons, a 4-position hat switch, two trims, a throttle wheel and a pair of two position switches.  This joystick is fully Thrustmaster Flight Control System compatible, where the hat switches represent resistance values of 0.2 (Up), 20 (Left), 40 (Right), 60 (Down), 82 (Center) kOhms on the Y-axis of the second joystick.

The left switch, when set to the right position, enables Thrustmaster compatibility.  When set to the left position, it disables the hat switch and allows the throttle wheel to function on the Y-axis of the second joystick.  It does not provide full CH Flightstick Pro compatibility because the HAT switch is disabled.

The right switch, when set to the left position, enables rapid fire action for button 1 only.  The right position is normal button operation.

Unlike the other two joysticks, it has suction cups on the base.  It also has steel weights screwed into the inside of the base to give it extra weight.  This stick has the stiffest feel and the travel distance feels short.  The screws for opening the stick are all completely visible.

As I do not own a true Thrustmaster joystick, I do not know how well the build quality or stick and button action compare to the real thing.  Even still, it fills a hole in my joystick collection.

3.  Microsoft Sidewinder 3D Pro

Microsoft's first joystick shows a transition between DOS-compatible hardware and Windows-feature hardware.  It is more-lefty friendly than the IBM stick, but despite its shape it is not truly ambidextrous.  It has four buttons and a hat switch on the stick, a throttle wheel and the stick can be twisted for a X-axis.  It has four buttons on the base and a mode switch on the bottom of the base with two positions.


The CH and IBM joysticks use traditional potentiometers to indicate stick movement and need the trim controls.  The Microsoft joystick uses optical sensors to determine stick movement and converts the data into an analog resistance value.  There is also a "digital" mode which allows for direct optical support, ultra precise input and the use of the four buttons on the base, but the driver must have explicit support for it with DOS.  The four extra buttons on the base of the stick also require specific driver support.  The Windows drivers should allow for full game support.  As far as I know, only Mechwarrior 2 for DOS supports the "digital" mode of this stick.  Descent does not and Descent 2 does only with its Windows version.

Unfortunately, this stick may only be compatible in its digital mode with Windows 95 or 98.  I have read that it can be tricky to get working in ME, 2000 or XP.  You may want to try and build a gamepad to USB converter.

The mode switch, when set to the 1 position, enables full CH Flightstick Pro compatibility.  When set to the 2 position, it enables full Thrustmaster FCS compatibility.  Due to the way the Hat switch works in these modes, the hat switch is only a four way switch.  (This also applies to the CH and IBM sticks).  The twisting function is recognized in either mode, so it will register as input on the 2nd joystick's x-axis.

There is one notable flaw in the design, the throttle control.  The throttle control rubs plastic against plastic and is particularly open to attracting dust and debris through the slot.  There is grease that will need to be cleaned out and replaced.  My stick's throttle control is very stiff, some lubricant can help.

The lack of trims is both a blessing and a curse.  The blessing is that your joysticks will not drift because the trims get adjusted.  The curse is that you may not be able to get a perfect center for your game.  Depending on how sensitive your game is, it may throw you the game's calibration off.

To open the stick requires not only removing the feet on the "tips" of the joystick but also a screw covered by the Microsoft label on the bottom.  There are weights on each side of the stick for balance.  One optical sensor handles all four joystick axes.

One thing to note is that this stick's DA-15 connector does not have all the pins on it.  Pins 5, 8, 9, 12 and 15 are not  supposed to be present on the connector.  If you see a stick for sale with these pins missing, do not let it faze you.

The Microsoft default drivers for this stick in Windows are very speed sensitive.  This stick was released during the Pentium era, but apparently the designers did not future proof their drivers because the stick will go haywire with a Pentium III.  This is despite the optical encoders having the precision of a mouse.  Fortunately there are custom drivers that will allow you to get an adjustable speed setting, to a point.

Sunday, September 28, 2014

The Lost PC Game Versions

Updated 03-28-2021

Originally this blog entry was titled "The Lost PCjr. and Tandy 1000 Game Versions".  However, several years later there are very few games known to have any special support for PCjr./Tandy graphics or sound remaining unavailable.  So I have decided to expand this list with other notable games.  You won't find these games in any DOS or ROM collection, on any abandonware site, from any torrent site, or to buy from any legitimate retro PC game selling site like Good Old Games.  Where I know of corroboration for these games, I will give it.

Agent USA - Tandy
Supports PCjr. graphics and was advertised for sale in Tandy's catalogs, so a Tandy version with support for enhanced graphics may exist.

Congo Bongo - CGA Composite
This game, like Tapper, came as a "flippy" disk.  This is a disk where both sides are independent of each other and can be used in single or double sided drives.  This is rare on the IBM PC, and disks for the IBM PC have two index holes.  Ultima 3 also used a flippy.  One version had graphics suitable for RGBI monitors, the other was meant for composite color monitors.  The composite color version has yet to be preserved and distributed.

Dragon's Keep - PCjr.
Based on installation instructions in the manual for the PCjr. and magazine articles from the time period, this game may have been ported to the PCjr.

EcoQuest 1 - EGA 16-Color
EcoQuest uses the Sierra SCI1 engine, and like other SCI1 games, it had separate 16-color and 256-color versions.  Other SCI1 games like King's Quest V and Conquests of the Longbow have their 16-color versions available, this is the only one which is not available.

Gauntlet II - Tandy DAC
Gauntlet II had a bonus disk, which you had to send away for to Mindscape, that added digitized sound support for owners of a Tandy 1000 with a DAC, such as the TL, SL and their successors.

Mouskattack - PC
A 2019 discovery of this Sierra port from the Apple II and Atari 8-bit computers : https://www.mobygames.com/game/mouskattack/cover-art

Oil's Well - PCjr.- PCjr.
Although there is a hack which gets Oil's Well working on a PCjr./Tandy 1000, the original disk still needs to be redumped because the disk was damaged where the PCjr. code was.  The original game may have PCjr/Tandy sound support.

Superbowl Sunday - Tandy
Supports enhanced PCjr. graphics.  Advertised in Tandy's catalogs, so a version that supports enhanced graphics on a Tandy may exist.

Wizardry II - 5.25" Disk
The Wizardry sequels were released on 5.25" disks and 3.5" disks, but only the latter are available for Wizardry II.  All booters should have 5.25" disks versions available because early computers like the IBM PC, XT and PCjr. did not have 3.5" drives.

Saturday, September 27, 2014

Oddball EGA and VGA Resolutions, When the Standard Resolutions Aren't Used

I have already indicated in several posts that 320x200 was generally the resolution for DOS games.  However, in my previous post I discussed how the classic DOS pinball games use Mode X resolutions.  In this post I will identify other games that use non-standard resolutions.  While there are a few games that use oddball EGA resolutions, custom resolutions really came into play with VGA.  Once people figured out how to manipulate its CRT Controller Registers without destroying their monitors, all manner of resolutions became possible.

In addition to supporting all CGA Graphics and Text Modes and the MDA Text Mode, the standard BIOS Supported EGA graphics modes are :

Mode 0Dh - 320x200x16
Mode 0Eh - 640x200x16
Mode 0Fh - 640x350 mono (intended for monochrome MDA monitors)
Mode 10h - 640x350x16/64 (can display 16 colors from palette of 64 colors, requires color 350-line monitor)

In addition to supporting all the mode EGA supports, the standard, BIOS Supported VGA graphics modes are :

Mode 11h - 640x480x2 (intended for monochrome analog VGA displays, MCGA compatible)
Mode 12h - 640x480x16 (60Hz, all other VGA modes run at 70Hz)
Mode 13h - 320x200x256 (MCGA compatible)

For the list of games, I have taken my own screenshots with DOSBox.  Any aspect ratio correction from DOSBox has been removed.  If no scalers or aspect ration correction settings 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

Certain resolutions, like 320x240, need no aspect ratio correction, since that mode was used to ensure square pixels.  Many of these modes may not fill to the edges of a VGA monitor.

Gauntlet

256x200 EGA Mode :


Gauntlet uses this mode, which seems derived from the 320x200 16-color mode.  Gauntlet and F-15 Strike Eagle also use an unusual for EGA 160x200 16-color resolution, but this may not be an actual new mode as just drawing every pixel twice in the 320x200 16-color mode.  Sierra's AGI games also use an effective 160x200 graphics resolution, but use the typical text font for the 40 column text modes, which require 320 horizontak pixels.

Lemmings & Oh No! More Lemmings

These games change the palette entries in mid-frame in order to select more colors than would be normally possible in the 640x350 16-color mode.  Lemmings uses this only for the screen type below, and no other place.  Regular DOSBox v0.74 will show these proper screens with the vgaonly machine type.

640x350x"32" EGA Mode :


640x350x"32" VGA Mode :


Pinball Fantasies

Same issue with Pinball Fantasies, but only on the table select screens and using a different resolution. Without this effect, the car would look mostly green.

640x480x"32" :


Pinball Illusions

Pinball Illusions is one of the most demo-like games ever released by a developer with any stature in the PC DOS game world of the time.  It uses several weird modes and very demo-like effects.

320x400 :



These graphics should obviously be stretched horizontally.

320x145 :


320x290 :



These banners should also be stretched horizontally to fill the screens, they look wrong without aspect ratio correction.

320x240 (304x224 active pixels) :


This screen is very interesting.  The active screen is 304x224 pixels, and this is what DOSBox captures in a screenshot.  On a real monitor, there is this dark blue border seen in the screenshot.  You can see this border in a custom version of DOSBox like daum that has border support.  I had to add the border in this screenshot, and I figured that 8 pixels on each side would ensure that the screen ratio was 4:3, those are rotating cubes.

Jurassic Park

This game is clearly an Amiga port.  One of the main game types uses an odd 320x184 mode.  I suspect that it was done for performance issues, as the same resolution is used for the Amiga.  The game uses 320x200 for the other game type, which is a first person 3D shooter.  However, the Amiga confines the action to a small window, whereas the DOS version the action takes up most of the screen.  Some Amiga screens use a 320x256 resolution (found on PAL Amigas), including the loading screen.  The loading screen shows a perfect circle, whereas the same screen in the DOS version, which uses 320x200 pixels, does not without aspect ratio correction.

320x184 :


Prehistorik 2

Why did the programmers decide to eliminate 8 pixels from the standard resolution?  Because they could, evidently.  Game uses 320x200 elsewhere, including on the in-game screen.  The difficulty selection screen shown below uses a typical demo effect.

312x200 :




Cyril Cyberpunk, a.k.a. Cyberboard Kid

288x224


No aspect ratio correction required.

Jazz Jackrabbit & Jazz Jackrabbit : Holiday Hare '94 & '95

320x199 :

I hypothesized earlier that the programmers made a tiny tweak to the standard mode to ensure that the adapter would run this mode at 60Hz, not the default 70Hz. The question of whether the game requires aspect ratio correction is complex.  The in-game screens clearly do not :




If you look at the circles in the last two screenshots, you can see that they are perfectly circular.  Aspect ratio correction would only stretch them into ovals.  Similarly, the large and small "diamonds" in the first two screenshots are actually squares, as each of the four sides has the same length.  In fact, on a real VGA CRT, the in-game graphics should appear in a letterbox mode with large borders on the top and bottom.  However, if the user decides to stretch out of screen vertically, then the objects will become elongated.  There are no other near modes that would show the detrimental effects of the stretch, so the effect may be lost.  

On the other screens, some may require aspect ratio correction, while others do not.  Here is one that does not :


On the other hand, this one does :


The planet in the middle of the screen doesn't look quite right without aspect ratio correction.  Even with aspect ratio correction, its not a perfect sphere, but neither is the real Earth :


The Incredible Machine & The Even More Incredible Machine

Sierra bought several companies in the early to mid-1990s, and while their own games rarely pushed hardware, the same cannot be said for some of its subsidiaries, like the one that produced this series of games.  These games do not require aspect ratio correction.

640x471x16 :


640x400x16 :


640x448x16 :



The Incredible Machine 2

640x441x16 :



Quake

Quake is unique because it supports every combination of 320 and 360 horizontal pixels and 200, 240, 350, 400 and 480 vertical pixels.  Increasing the vertical resolution increases the view area vertically.  This looks absolutely ludicrous without aspect ratio correction once you get to 350 vertical pixels.  Increasing the horizontal resolution puts empty filler on the sides of the status area and does not enhance the field of view horizontally.  Instead, it merely stretches the pixels contained within that view horizontally.  I would personally recommend staying with the 320x240 resolution.  At 640x480 resolutions, you should really be using GLQuake (with a Glide wrapper if necessary) or a source port with support for more modern 3D accelerators.

320x240 :


320x350 :


320x400 :


320x480 :


360x200 :


360x240 :



360x350 :


360x400 :


360x480 :


Earthworm Jim & Earthworm Jim 2

Earthworm Jim was originally designed for the Sega Genesis, which uses a 320x224 pixel resolution.   320x240 is used for all non-ingame screens in both EWJ1 and EWJ2.  Both 320x224 and 320x240 are available for EWJ1 in-game, but EWJ2 supports only 320x224.  There is no difference between the two graphics modes in EWJ1 except the need to adjust the size graphics using the monitor controls, but some cards had trouble with the 320x224 mode.  Due to the origins of this game, it should be stretched out vertically, but tiny difference between 224 and 240 pixels makes it pretty much a non-issue.

320x240 :


320x224 :


The Lost Vikings & Norse by Norse West: The Return of the Lost Vikings

320x240 :


LineWars II

This is the only Mode X VGA mode the game supports, and it requires horizontal stretching.  This game will support 640x480 and 800x600 on specific ATi and S3 SVGA cards.  The regular 320x200 resolution does not need aspect correction, but the 320x480 resolution obviously does :

320x200 :


320x480 :


Scorched Earth

For the main menu, each increase in the graphics resolution adds more height to the image.  As a consequence, the buttons are more spaced out vertically.  However, as you can see, the 320x240 resolution cannot fully display all the buttons using the spacing, which is consistent beginning with this resolution.

320x200 :


320x240 :


320x400 :


320x480 :


360x480 :


As far as the in-game graphics go, each increase in resolution substantially increases the play area, but not the status bar.  As you can see, the amount of barrier to open space ratio eventually becomes ridiculous :

320x200 :


320x240 :


320x400 :


320x480 :



360x480 :



Aspect Ratio correction required.

Chaos Software Mario Shareware Game

320x190-191 :


The top eight pixels do not seem to be used, but sometimes an extra black line is displayed, leading to the one pixel difference.

Axia

640x400x16 :



Needs no aspect ratio correction, the planets are perfectly spherical without it.

Jump 'n Bump

400x256 :




Most Moraff games

Games shown are Moraff's Flygame, Moraff's Super Entrap and Moraff's Monster Memory

360x480 :




Monster Memory's unadjusted 360x480 resolution is clearly wrong compared to its true 4:3 SVGA modes, which show perfect squares.  In addition, the 320x200 mode does not show perfect squares unless aspect ratio correction is applied.  I would think this applies to all of Steve Moraff's games, since they were developed by him.

I am greatly indebted to RGB Classic Games for identifying many of the more obscure games on this list. Moraff's (Regular) Entrap and Magic Pockets do not use a 640x400 VGA mode, despite what RGB Classic Games may think.  Moraff's Entrap, as it states in its setup menu supports EGA 320x200, EGA 640x350, VGA 320x200 and VGA 640x480.  Magic Pockets supports regular EGA 320x200 (but uses different palette entries than the Tandy 320x200 mode) and regular VGA 320x200.

The Moraff games that support the 360x480 mode are as follows :

Moraff's Blast I
Moraff's Dungeons of the Unforgiven, Module I
Moraff's Monster Bridge
Moraff's Monster Memory
Moraff's Super Blast
Moraff's Super Entrap
Moraff's Mega Morejongg
Moraff's Stones
Moraff's World

Moraff's Escapade only supports OEM-specific SVGA modes found on Ahead Systems, Trident and Tseng Labs chipsets with 1MB of RAM.

System Shock CD

Unlike the floppy version, which supports only 320x200, the CD version also supports 320x400, 640x400 and 640x480.  While the 320x400 resolution clearly requires aspect ratio conversion, the 320x200 and 640x400 modes do not.  They have perfect squares and circles in the HUD area, and the 640x480 mode distorts them into rectangles and ovals.

320x200 :


320x400 :


Conclusion

I believe there are to types of non-standard VGA modes, first there are the the modes that use a combination 320 or 360 horizontal pixels and 200, 350, 400 or 480 vertical pixels.  Second, there are modes that use a number of pixels other than the ones given in the previous sentence for at least one axis.  The second variety are the games that tend to break graphics cards with less than stellar VGA compatibility.  Even the first variety can cause later cards to break because there was no universal standard.  

As far as aspect ratio correction with non-standard VGA modes go, it is almost always desirable to stretch out the double the horizontal pixels for any of these games that use a 320 or 360 horizontal pixel resolution.  Often, there will be a standard VGA or SVGA mode to guide you.  I understand that VGA cards more or less do this by default in low resolution modes.  However, this does not always apply, as I have demonstrated in the previous post with the 360x350 mode used by Pinball Dreams and its successors.  

With games that use a high resolution 16 color mode with 640 horizontal pixels, I see no reason to stretch the display vertically.  The letterboxing is pretty minimal.