Showing posts with label IBM PCjr.. Show all posts
Showing posts with label IBM PCjr.. Show all posts

Saturday, April 29, 2023

IBM PCjr. Compatibility & PC Software

The IBM PCjr. had many faults, one of which were the compromises IBM imposed on the machine to limit its PC compatibility.  By the time the PCjr. was released and in people's homes and offices, there was over two years of software developed with only the IBM PC and IBM PC/XT in mind.  For a too-brief period of time, PCjr. compatibility was an important focus, especially as some companies updated their software to become PCjr. compatibile.  Then once the PCjr. was discontinued, PCjr. compatibility pretty much fell by the waist-side not too long afterward.  In this article we will identify the issues which held the PCjr. back and what needs to be done to show that a piece of software is truly PCjr. compatible.

Sunday, March 26, 2023

IBM Composite Artifact Color Games and Related Topics

Top - Direct Colors Old CGA & New CGA
Bottom - High Resolution Artifact Colors Old CGA & New CGA

Back in 2013 I gave an overview of composite color usage on the IBM PC platform.  I included a list of all games I knew about or could find which supported composite color graphics.  Now, 10 years later, new information has made that list less than inaccurate and less than fully inclusive.  Let's talk about these games and give a new, more accurate list.  I will also talk about other topics related to CGA and color in more detail below.  

Sunday, January 29, 2023

CGA and "Intended", "Incidental" and "Just Plain Wrong" Graphics

When IBM released its Color/Graphics Adapter card as one of the two display adapters supported by the IBM PC Model 5150 when it launched in August of 1981, it offered two video output options, RGB video and composite video. RGB video offered much sharper text and purer colors than composite video but required expensive and special monitors. Composite video would work with any color monitor or TV and had the unique ability to offer more colors via artifact color. The CGA output both types of video at the same time. In a sense every game that supports CGA supports both RGB and Composite color, but that does not mean that every game will look the way the graphics artists intended the game to look. In this article we will discuss some examples of the "Intended" look versus the "Incidental" look of CGA gaming graphics. 

Tuesday, April 26, 2022

List of PCjr. and Tandy Exclusive Enhanced Games

The IBM PC computing platform supported gaming from the beginning, but at first its graphical and sound capabilities were not that much more advanced than an Apple II's. Other inexpensive home computers of the day (Atari 800, Commodore 64, TI-99/4A) could run rings around the IBM PC in the video and audio departments. IBM sought to improve its PC line's graphics and sound in an affordable system which became the PCjr., but that was a flop.  Tandy cloned the graphics and sound of the PCjr. and put it into a much more PC-compatible system, the Tandy 1000.  Between the two, the exclusive PCjr./Tandy graphics and sound hardware received wide support from game developers in the mid and late 1980s.  In this article, I will attempt to give a definitive list of games which have "better" graphica or sound on a PCjr. or Tandy 1000 due to this support or have unique video and audio support even if the game can utilize EGA, VGA, Adlib, Game Blaster or Sound Blaster or MT-32.

Saturday, March 20, 2021

IBM JX - The IBM PCjr. 2.0 (Revised Article)


I wrote an article about the IBM JX (note no "PC" in the computer's name) five years ago.  Much of that article was subject to speculation due to the lack of hard information about the IBM JX.  A significant portion of that article had out-of-date information, so with the help of a site dedicated to the IBM JX and two Youtube videos really showing the system off for the first time, I have rewritten that old article (except for the following paragraph) entirely.  

In 1985, IBM released a computer in Japan, Australia and New Zealand called the IBM JX, Model 5511.  Essentially it was an upgraded PCjr., and in some respects what the PCjr. should have been.  In fact, upon rumors of the JX making it to the United States, at least one commentator dubbed it the PCjr. 2. Released in 1985, just as the PCjr. was being discontinued, it proved to be the last machine by IBM with any substantial PCjr. compatibility.  However, it was not successful anywhere it was released and consequently is extremely obscure today.

Saturday, December 28, 2019

The Gotek Floppy Drive Emulator in the IBM PC World


The Gotek floppy drive emulator is a simple, cheap and little device that, as its name says, emulates a floppy drive.  There are many varieties of these devices and they usually come with a USB port on the front of the unit and a 34-pin header + 4-pin power header on the back.  While originally intended to replace disk drives in industrial, sewing and musical equipment, they can be used with standard PC floppy controllers.  However, as they come they are at best diamonds in the rough, so in this blog entry I will describe how to make these devices more useful for vintage IBM PCs and compatibles.

Monday, January 7, 2019

IBM PCjr. Upgrades Part 2

When I first received my IBM PCjr. back in 2013, I was able to discuss most of the readily-available upgrades for the system that existed at that time.  https://nerdlypleasures.blogspot.com/2014/03/ibm-pcjr-upgrades.html  Now, almost six years later, we have some new upgrades available.  Let's see what modern conveniences can do for a 35-year old computer system


Saturday, April 7, 2018

Expanding Vintage IBM PC & Compatible Display Options - the GGLabs CGA2RGB Converter

GGLabs' CGA2RGB (courtesy of GGLabs)

Getting a high quality and proper video signal from an IBM CGA or EGA card or an IBM PCjr or Tandy 1000 without their specialized monitors can be difficult.  These computers used specialized RGB monitors to give a high quality solution using digital signals to tell the monitor which color to display.  Unfortunately this standard was not really adopted outside of the expensive PC compatibles and most RGB monitors only accept an analog signal.  When VGA and its analog RGB signal format became standard, support for the older digital RGB format went away.  In this blog entry I am going to examine an inexpensive converter that can help you adapt your vintage PC compatible's digital RGB video output to the more accessible analog RGB video output.


Sunday, August 21, 2016

Boulder Dash - PC Speed and Joysticks

Boulder Dash was originally released for the IBM PC and PCjr. in 1984 by First Star Software.  The disk included two separate executables, one for the IBM PC and one for the IBM PCjr.  The disk was a PC booter.

The IBM PC executable is serviceable but not particularly impressive.  There is a distinct lack of animation on the title screen and for the amoeba tiles.  There is also no color-cycling effect for the diamonds.   It is debatable whether the game really uses composite color graphics.  Sound effects are weak even by PC speaker standards.

The IBM PCjr executable, on the other hand, is much, much more impressive.  It uses the 3-voice PCjr. chip for music and sound effects.  It supports 16-color graphics with full animation and color cycling.  Despite the PCjr. being slower than the PC, it does not suffer from a lot of slowdown, despite the extra effort.  Compare these pairs of screenshots from the PC and PCjr. executables :


Tuesday, April 19, 2016

Winnie the Pooh Tandy/PCjr. Graphics Recolorization


Recently, I learned that Winnie the Pooh had support for Tandy/PCjr. graphics and 3-voice sound.  However, whoever was responsible for the colorization either must have had cloudy memories of the Pooh cartoons or problems with perceiving colors.  I took a screenshot for each character and tried to make them closer to their colors from the Disney films.  I made sure to only use the 16 RGBI colors available to the Tandy/PCjr. and not to do violence to the backgrounds.

The real graphics are on the left side, my retouched graphics are on the right side.

The Pooh Bear doll only needed to turn the shirt from light magenta to light red.


Thursday, January 14, 2016

Milestones in the IBM PC Compatible Software Renaissance

Over the past decade (and a bit) people have been writing new software for "oldskool" PC systems like the IBM PC, IBM PCjr. and the Tandy 1000 computers.  Some of these programs have been really impressive or have pushed these systems in ways never envisioned by their creators.  While other systems like the Apple II, Commodore and Atari computers may have had comparatively more software released during the same time period, the early PC world has not lain dormant.  Starting by the year of announcement, I will identify each project I have found particularly worthwhile or noteworthy and explain why they deserve to be here.  I hope this blog entry will serve as a Thank You for all the programmers who put their effort into making new software for the oldest PCs.

2004 - 8088 Corruption

In 2004, Trixter, the creator of The Oldskool PC website and the co-founder of MobyGames, discovered a way to play full motion video on an IBM PC with a CGA card.  He did not have much to work with, an 8088 CPU running at 4.77MHz, 640KB of RAM, and a CGA card that could display 16 colors maximum, and all those colors on the screen only in text mode.  Moreover, in 80-column text mode, many CGA cards would show "snow", random mosquito noise, when refreshed too quickly.

Trixter looked to the 40 column (by 25 rows) mode for his implementation of full motion video.  That mode supports 16 colors, 256 distinct but unchangeable character glyphs, and 8x8 character cell sizes.  Most importantly, each 8x8 character cell can choose from any two of the 16 colors for foreground and background colors.  A single screenshot using text characters this large would often not show recognizeable objects, but at 30 frames per second, video can be much more watcheable.  The 40 column mode has the benefit of only requiring 2,000 bytes to fill the screen compared to 4,000 bytes for an 80-column mode screen or 16,000 bytes for any of the CGA graphics modes.

Of course, the illusion of video is often helped by the use of audio.  Use of the PC Speaker was out because too much time would be spent decompressing and displaying the graphics.  So Trixter targeted the only devices that would work in a PC's 8-bit slot, could output digital audio and were sufficiently common, the Sound Blaster.  8088 Corruption required a Sound Blaster that supported the auto-init DMA commands so the card could keep its digital audio buffer fed with minimal CPU involvement.  The final piece of the puzzle is having a hard drive, preferably a fast one, to hold the video file to be played.

Trixter originally presented 8088 Corruption in 2004 but continually improved the video playback software.  However, just about every year thereafter it saw attention at demoparties and news outlets.  Eventually an encoder was released that converted .AVI files into the TMV format files the 8088 Corruption (called 8088flex) player needs to load.  It can support 60fps video and at least 22kHz 8-bit audio.  The most recent versions no longer require a sound card and have much better buffering than older versions.  Here is Trixter's original 2006 video showing off 8088 Corruption and proving that it was real :



You can obtain 8088 Corruption from here : http://www.oldskool.org/pc/8088_Corruption

2008 - Monotone

The concept of a tracker was not a new one in 2008.  Music tracker programs had first appeared on the Commodore Amiga in 1987 with Ultimate Soundtracker, which have a graphical interface to music programmers so they could assign PCM samples to their music in a programming-friendly format.  The Gravis Ultrasound card was a popular target of early DOS-based tracker programs.  Eventually tracker programs were released for the Adlib OPL2 and OPL3 chips as well as other popular platforms that used chiptune music like the NES, the Sega Genesis and the Game Boy.

Trixter noted that there was no tracker program that worked with the PC Speaker, so he sought to change that.  The PC Speaker is musically a very limited device, essentially a 1 channel square wave with no volume control but a 16-bit frequency divider.  While it could produce digitized and multiple voices by toggling the speaker cone on and off faster than it was designed, there were several disadvantages to this.  First, the resulting volume is often very low.  Second, these techniques require a large amount of CPU time, leaving little time for much else on 8088 and 80286 machines.  Third, the audio can sound very "buzzy" and have a high noise floor, leaving the listener with an uncomfortable experience.  Was there any other way to allow the PC Speaker to sing in more than beeps and boops?

Enter Monotone, a solution for a problem few had.  Monotone is the first and only tracker designed to support the PC Speaker.  Monotone supports 1-4 "voices" for the PC Speaker.  It supports multiple voices by giving a programmer a precise time base to change his sound.  The PC Speaker still plugs away, but the rapid transitioning of the music, facilitated by the program can give the illusion that the PC Speaker is a multi-channel device.  Monotone also supports the Adlib and the Tandy 3-voice sound chip, but both chips have other trackers available to them.  You can compare the PC Speaker version of a song in the first video with its Adlib version in the second video :





You can obtain Monotone from here : http://www.oldskool.org/pc/MONOTONE

2008 - mTCP

You like the Internets, right?  I do too, but those people still stuck with DOS can have a hard time getting online and enjoying it.  Enter mTCP, a suite of utilities developed by VCF forum member mbrutman in 2008. At first he released the utilities separately, starting with IRCjr.  IRCjr. is a very slimmed down IRC client that can be run on any PC and intended for the IBM PCjr.  Since mbrutman is a IBM PCjr. fan and runs the only IBM PCjr. fansite on the web, it would be natural for him to ensure that the client is sufficiently light-weight to work on a PCjr. or a PC.  He also released other programs like a DOS Telnet program and soon began to bundle a whole package of 8088-friendly Internet utilities called mTCP.

mTCP has been continuously updated since 2008.  Using the utilities in the package make it very easy to get online with an Ethernet card and a packet driver.  For the earlier systems, a Xircom PE3 parallel port Ethernet adapter can work with anything with a standard parallel port (except for the Tandy parallel port).  8-bit Ethernet cards usually work just fine with a transceiver, and 16-bit cards often have RJ-45 jacks so you can directly plug them into a router.  Some of these cards are hybrid cards that can work in an 8-bit or 16-bit slot.  Wireless Ethernet adapters can be made to work with older systems.  If you can find a DOS packet driver for the card, and most major brands and chipsets have one, you are all set to play with mTCP.

mTCP provides a host of utilities.  The first one that most people run is DHCP, which obtains all the configuration information you need to get online.  You can use IRCjr for connecting to IRC chat rooms so long as you have the relevant information to connect.  Similarly, if you need to connect to a BBS, you can use the TELNET application.  If your system lacks a real time clock, you can obtain the correct date and time using the SNTP tool.  You can also PING the router to check connectivity.  You can turn your vintage computer into a basic webpage hosting machine with HTTPSERV

My favorite programs are FTP and FTPSRV.  FTP is an FTP client, and you can use it to obtain files from an FTP Server.  This of course includes your own FTP server, making for easy file and directory transfers to and from your old computer to your new computer across the network.  However, being a lazy guy, I prefer to use FTPSRV on my vintage computer.  This allows me to obtain full access to my old computer from my new computer.  I can use the FTP client on the new computer to move, copy, delete files on the old computer's storage devices, and I can send files to them or take files from them.  It sure beats sneakernet.

The genius of the mTCP program suite is how easy it is to use.  Even though it does not come with a web browser or an email client, it can allow you to get on the Internet easily so you can use those programs without any further configuration headaches.  mTCP works on all speeds and stripes of DOS computers, but no program requires more than 256KB to run.  You can download the mTCP suite from here : http://www.brutman.com/mTCP/mTCP.html

2011 - Paku Paku


A new game that can run on the IBM PC?  Who would want to write a new game for that ancient thing?  Enter VCF forum member deathshadow, a man determined.  He was determined to write a Pac-Man clone that played fast with an IBM PC without the 4-color limitations of the official Pac-Man from Atarisoft or PC-Man and other unofficial clones.


Deathshadow decided to use the CGA 160x100 "graphics" mode.  This gave him freedom to use the whole 16-color palette on any display at the expense of resolution.  He decided to keep the aspect ratio of the maze to be true to the original arcade game and to have the maze use the proper orientation.  He used red, cyan, magenta and brown for the ghosts, yellow for Pac-Man and appropriate blues for the mazes and colors for the fruit.  He included all eight types of fruit, both warps and the exact number of dots found on the original arcade.  It saves the high scores and can fit onto a floppy disk.  He did not include the intermissions that the original game had, and I doubt there is a split screen level 256.


Deathshadow cast a wider range of hardware support, his game can support CGA, PCjr., Tandy, EGA, MCGA and VGA graphics adapters.  He quickly added joystick and high score saving support.  He added support for the PC Speaker, Tandy 3-voice sound, Adlib and even CMS/Game Blaster for music and sound effects.  Later he added MT-32 and General MIDI support.  It runs at full speed on an IBM PC with 128KB, even with the joystick reading, although you will have to put up with a bit of snow with many CGA cards.  The game even runs on an unexpanded 128KB PCjr.  Now there is a feat!  He later ported the game to the Commodore 64, which utilizes a 160x200 resolution, smoother graphics and 3-voice music.


You can obtain Paku Paku from here : http://www.deathshadow.com/pakuPaku

2012 - Tandy 85-Color Picture Viewer

Tandy's can only display 16 colors on a screen at once, right?  A VCF forum member called chjmartin2 challenged that idea.  While it technically can only display 16 colors in a 320x200 mode, or in a 640x200 mode for the Tandy TL, SL and later machines, color blending has often been used to try to give the appearance of more color.

Most RGB monitors, even the crappy Tandy CM-5, make most dithering techniques look very obvious.  What chjmartin2 did differently was instead of trying to put two colors next to each other to try to simulate a third color, he displayed two colors in a rapid cycle and relied on the viewer's persistence of vision to make a third color.  By displaying two images 30 times per second, he could obtain a result that, while looking somewhat flickery, could give the impression of greater than 16 colors.  He made a tool that can take 24-bit BMPs and split them into two images which his program would then display 30 times per second, each following the other.

So finally we have a first for the Tandy, the ability to display lifelike images with sufficient color.  Because each combination of two colors does not give a unique third color, 85 colors can be obtained.  His program relied on the GW-BASIC included with Tandy DOS, demonstrating that you do not need to master Turbo Pascal or Microsoft Assembler to produce something cool with an old machine!  He released his program in 2013 and also included a converter that runs in Windows and will convert any 320x200 24-bit BMP image into a pair of files his program can display on a Tandy 1000.  It works on my Tandy 1000 SX and he wrote the program on a Tandy 1000 TL, so it should work with any Tandy 1000 with a built-in Tandy Graphics Adapter.  I do not believe it would run in a PCjr. without modification because of the reliance on Tandy GW-BASIC.

Here is a video demonstrating the picture viewer :



You can download the program from post #49 of this VCF post : http://www.vintage-computer.com/vcforum/showthread.php?35007-Tandy-1000-TL-85-Color-Demo

2013 - INTROjr

This year brought us the first demos for the IBM PCjr. from Hornet.  Hornet is the demo "group" of Trixter and Phoenix.  They not only ran it on a PCjr., premiering it at @party 2013, but also coded the demo on the machine.  Given the chicklet and rubber dome keyboard that the PCjr. uses, that must have been fun.  Trixter wanted a "world first" and in these programs he obtained it.

He targeted the PCjr. because he found a video mode unique to it.  Even the Tandy 1000s do not replicate IBM's hardware sufficiently to make this video mode work.  By accident, he had programmed the PCjr.'s gate array to display each line in 160x200x16 mode twice, giving him something unexpected.  His video mode this uses an effective 160x100x16 resolution, but is not set up the same way as it would be on a CGA card.  Instead of ASCII values and attribute bytes, he has a 160x100 graphics mode where each pixel determines the color of two bytes.  Moreover, there is no interlaced memory organization as there is with other CGA and PCjr. graphics modes.  He and Phoenix made a little demo called INTROjr with several demo-effects like plasma and scrolling text and 3-voice music, and it was widely acclaimed.  Here you can see it for yourself without the extra scanlines :



Later he made a "silly joke game" called SHAKEjr using the 160x100x16 PCjr. graphics mode.  The game requires you to jerk your joystick back and forth as many times as you can within a certain time frame.  Then it tells you how many "microfractures" you made to your joystick.  Video shows people doing the "Harlem Shake" during the "game".  Here is a very tongue-in-cheek video "advertising" SHAKEjr :



While the demo will work in a Tandy 1000, it will show a row of black lines after each row of graphic lines.  This is because the Tandy cannot double the scanlines as a PCjr would.  Nor does DOSBox properly emulate this functionality of the PCjr.  Late in 2015, VOGONS forum member NewRisingSun discovered how any Tandy, except for the original 1000/A/HD, could double the scanlines via another method and released a fixed version of INTROjr that displays properly on the Tandys.

You can obtain INTROjr from here : http://www.pouet.net/prod.php?which=61547

You can obtain SHAKEjr from here : http://www.pouet.net/prod.php?which=61535

2014 - 8088 Domination

Trixter believed that 8088 Corruption was the limit of the IBM PC and CGA's graphics capabilities.  But then he discovered the potential of CGA's high resolution composite color mode.  But the old problems surfaced.  How do you run video at 24fps when you have to output 8x the graphics data on a system so slow as the 8088-based IBM PC?  Moreover, when hard disk interfaces of the time only pushed 90KB/sec, how can you get so much data to the graphics card?

Trixter discovered he could do it if refined his techniques.  When he had finished dancing naked in the streets, he wrote a new video player that made 8088 Corruption obsolete.  Instead of always transferring 2KB per frame as he did with 8088 Corruption, he would only transfer as much pixel data as his demo needed, up to 2KB.  He would only update those portions of the frame that needed updating.  His encoder would do all the hard work on a modern system and leave the video file simply to tell the 8088 which pixels to update and when.  Moreover, instead of just pointing to data and telling the 8088 to fill the graphics memory, he converted that data into code, allowing much faster execution.

He premiered his 8088 Domination decoder @party 2014, an event I was privileged to witness and assist.  The first part of the video uses essentially the same video samples he used for 8088 Corruption back in 2004.  However, by using high resolution color composite mode, the graphics were much clearer.  You could now see something resembling a human face during the Tron sequence.  The second part used the Bad Apple animation to show the detail that can be obtained in black and white.  Here is a video capture of the demo :



Trixter also released a player that allows people to play back video files as his demo did.  He documented the video/animation system as XDC, (X86 Delta Compiler) People can make their own videos, although the process is not as easy as running a video file through a converter.  The XDC format supports graphics in 160x200 resolution (Tandy/PCjr only) or 160x100 resolution at 16 colors or 640x200 resolution in two colors (you can specify B&W or color in the encoder).  The video must be broken down into individual frames in the bmp format which are accompanied by a 8-bit PCM wav file up to 44.1kHz.  Then you use a script file to run it through an encoder in DOS, which makes the XDV file which you can play.

If you want to see just how huge the difference is between 8088 Corruption and 8088 Domination, which Trixter's comparison video here :



Trixter set up a website for 8088 Domination, you can find the player and encoder there : https://x86dc.wordpress.com/

The original demo is hosted here : http://www.pouet.net/prod.php?which=63591

2015 - 8088MPH

2015 began slightly inauspiciously for oldskool PC demos.  GP-01 was a demo that relied on CGA.  Unfortunately the demo did not work on real hardware, it was coded in DOSBox and ran only on DOSBox, making it a DOSBox specific demo.  As CGA may be improved to more closely emulate real hardware, eventually this demo may fail to run on DOSBox.  A VOGONS/VCF forum user named Scali eventually fixed the demo to run on a real IBM PC with CGA.

Much more impressive was the demo 8088MPH, which premiered at Revision 2015 and won first place there in its demo category.  Hornet (Trixter and Phoenix) was only part of this demo this time, the project was comparatively huge.  Also joining in were VOGONS/VCF forum members known as reengine from the group CRTC, VileR(ancour) and the previously mentioned Scali affiliated with the group DESiRE.  Here is the video of the demo as shown at Revision :



The demo version of 8088MPH was extremely picky about the hardware it would run on.  If you did not have an IBM PC, XT, Portable or true clone, you could forget about running all parts of the demo correctly.  Moreover, the demo was designed for an "old-style" IBM CGA card's composite colors.  "New-style" IBM CGA's colors were a bit off.  Finally, the CRT controller on the CGA card had to be a Motorola 6845 and many CGA cards came with a Hitachi 6845.  The demo took advantage of a text-mode feature found on Motorola chip that was not duplicated on the Hitachi chip.

Fortunately, the demo was cleaned up a bit and the developers released a final version.  Now there was official support for new IBM CGA cards and the Hitachi 6845 chip.  Additionally, the program offered a calibration screen so you can tweak the colors to get something close to the intended result.  By some clever pixel positioning, the program could now even tell you whether you had an old or a new CGA card.  Here is the final version of the demo on a new IBM CGA card :



There were several firsts for this demo.  The most visibly spectacular was the demo's ability to display 1,024 colors using 80-column text mode and color composite graphics.  Using color composite graphics with a text mode is usually undesirable, the monitor does not have sufficient bandwidth to keep up with all those color changes, usually making for a blurry mess of text. However, by using certain carefully selected ASCII values, like the U, the !! and the ▓, cutting down the cell size to 8x2 and using different foreground and background color combinations, a vastly greater color palette is possible.

Another first for the demo was implementing a MOD player for the PC Speaker.  While the main two music pieces use songs adapted for Monotone, the final music played during the credits would have taken too much time away from the visual effect earlier in the demo.  The Amiga MOD format supports 4-channel playback.  Playing MODs using the PC Speaker is nothing new, but playing them at an acceptable sample rate with a 4.77MHz 8088 is a lot more difficult.  With some amazing 8088 trickery, they were able to obtain an effective 16.6KHz sample rate from the PC speaker through Pulse Width Modulation..

Because of all these code optimizations and cycle timing, the number of machines on which this demo is guaranteed to run correctly still amount to three, the IBM PC, the IBM PC/XT and the IBM PC Portable (which is really just an XT in a "portable" case).   Even the Tandy 1000SX running at 4.77MHz runs a bit too fast for the Kefrens bars, that portion of the demo will lose sync.  DOSBox will not run that and several other portions of the demo, you may be able to skip them if it does not crash the emulator.  A recent fork of PCem called PCem-X can almost complete the demo, but the Kefrens Bars does not look right and the demo crashes as it tries to play the MOD at the end.

You can find both the demo and the final version of 8088MPH here : http://www.pouet.net/prod.php?which=65371

2015 - MagiDuck


Although not finished, another program of note is a game called MagiDuck.  This game, like Paku Paku, is designed to run on an IBM PC with CGA and 256KB.  The author, VCF forum member mangis, is learning as he goes.  Judging by the beta released in December of 2015, he has learned his craft very well.


MagiDuck is a sidescroller with a vertical orientation with a simple control scheme of three directionals and two buttons, one for shooting fireballs and one for jumping.  Your character, the duck, can jump and float downwards and move left and right and look down.  She can jump on some enemies and collect keys and treasures to score points.  She has four hearts which function as a health meter.  There are passages that open touching switches and levels that only open by finding secret stars.  There are eight kinds of enemies and six different types of special blocks.  There are three save slots and the game tracks your completion level.  The game feels reminiscent of Kirby's Adventure for the NES in this regard.


This game has the feel of a shareware game from the early 90s.  There are only PC Speaker sound effects, no sound card support has been implemented.  Neither Commander Keen 1-3 nor Duke Nukem/Nukum had sound card support either and both are very fun to play.  So is this game, which has 10 levels, 3 secret levels and a boss level.  You can complete any of the levels in any order and the game saves high scores to disk.  The large characters make up much of the challenge because you do not necessarily know what may be in front of you or above you, so you have to be careful.


What makes this game particularly well-suited for the IBM PC is the graphics.  MagiDuck can show all 16 colors on the screen at a time.  It does this by tweaking the CGA 40 column by 25 row mode to show 50 rows and then uses the half-filled character to give two distinct "pixels".  The foreground and background attributes allow each half of the "pixel" to show a different color.  The effective resolution is only 80x50 pixels, half the semi-official CGA 160x100 mode.  What MagiDuck loses in terms of resolution, it gains in that there is no CGA snow to deal with and maintains a smooth framerate.  The game does detect EGA and VGA cards, so it should work in any PC compatible that can run DOS (with the possible exception of the PCjr.) and supports at least a floppy disk.  Hopefully the final version 1.0 will work with a joystick, because these games lend themselves well to Gravis Gamepads.

You can download the latest beta and the prior alpha's of MagiDuck here : http://www.indiedb.com/games/magiduck

Monday, December 14, 2015

Alley Cat - Epitome of a Timeless Early PC Classic















IBM PC Screenshots on the Left Side of the Page                       IBM PCjr. Screenshots on the Right Side of the Page

Alley Cat from Synapse Software is one of the best examples of a classic game released for the IBM PC. Originally programmed for the Atari 8-bit computers by Bill Williams in 1983, it was soon ported over for the PC by Williams and published by IBM.

Alley Cat is not an overly complex game and is easy to pick up and play.  You play as an alley cat named Freddy who is trying to impress his would-be girlfriend Felicia by doing all sorts of alley cat things that people who live in the alley find to be a nuisance.  The object of each level is to get into one of the rooms of the condominiums above the alley using the windows that open and then complete the challenge in that room. Once you complete the challenge, Felicia will beckon to you through an open window.  There you must dodge her brothers and reach her to get a kiss.  Once you kiss her you will advance to the next level, which is more difficult than the last.  When you start you can select one of four difficulty levels, Kitten (easiest), House Cat, Tomcat or Alley Cat.

You can control the game with the cursor keys or a joystick, but I highly recommend using a joystick.
Moving Freddy is done by pushing left or right and jumping by pressing up.  Pressing down descends off clotheslines, fences and other platforms.  Jumping left and right is done with by holding the up and left or right cursor keys or directionals on the joystick.  Freddy can cover a lot more distance from a running jump than a walking or stationary jump.  The jumping mechanics are a bit stiff in this game, but eventually you should be able to get a feel for the game's mechanics.

Holding down the cursor key down will make Freddy move faster.  The same thing happens with an analog joystick no matter how far from the center the stick's position is held.  Considering that Alley Cat was originally programmed for the Atari 8-bit computers and their digital joysticks, it is not surprising that there is no real analog joystick support.  It seemed to have no problem with a "digital" Gravis Gamepad when run on a real IBM PC.  You can "paws the game" by pressing the Escape key.















You begin in the alley with three lives and can earn up to an appropriate nine.  Your task is to hop on the small or large trash cans, then onto the fence.  You can run on top of the fence but not on the clotheslines.  You must jump onto the clotheselines where there are clothes hanging off them.  From there you can leap or descend into an open window.  This screen is the most lethal between the dog patrolling the ground (helped by the other alley cat that pushes you off trash cans) and the things thrown out of windows.  You can catch the three mice for points, but they can knock you off a clothesline by touching Freddy as he clings to laundry.  The high score is displayed on the left side of the fence and the current score is on the right side of the fence (as telephone numbers) with the number of lives you have remaining.

There are five challenge rooms and when you jump into a window you can encounter any of them :















The first room you may enter is the Aquarium.  Your first task is to hop into the bowl by touching it.  Then the screen will change to Freddy swimming in the bowl.  He needs to catch all twelve fish without touching the increasing number of electric eels or suffocating.  Freddy and the screen border will change color as his oxygen runs out.  You can replenish your air supply by swimming to the surface.















The second room is the Pantry.  Here there is a huge wedge of cheese with multiple holes.  You have to catch four mice in this stage.  You can jump across the cheese or use the action button to crawl between holes in the cheese.
















The third room is the Aviary.  Here you must knock the bird cage off the table by touching it several times.  Once the bird cage falls to the floor, it will break and a bird will fly out.  Catch the bird to complete the challenge.















The fourth room is the Library.  Here you must collect all three flower plants on top of the bookshelf without touching the two spiders.















The fifth room is the Kennel.  Here you must drink all the dogs' water bowls (twelve in all) with the action button without waking up the dogs.  You only have a certain amount of time to drink bows next to a dog before he wakes up.  The screen will flash red when one starts to wake up and if he does wake up, he will attack you like the dog in the alley.















In each of these rooms is a mad housekeeping broom that will chase you and fling you about the room with contact.  It will also sweep up your paw prints, which you can use to distract it.  Sometimes, it is helpful to propel Freddy to a hard to reach area.  In each of these challenge rooms, the dog from the alley can run across the screen and the consequences are identical as if you encountered him in the alley.  You can jump out of the window from which you entered, which causes you to lose the challenge room and return to the alley.  You earn points depending on how quickly you completed the challenge room, and on the score screen the background and border will flash green.















Felicia's room is a little different.  No dogs or broomsticks here.  However, there are six levels between you and her, and each one is patrolled by one of her feline siblings who will knock you down to the level below.  Moreover, the cupids shoot arrows that can turn parts of the floor solid or allow you to fall.  If you fall off the lowest level, you lose and must complete a challenge room before you can get to Felicia's room again.  When you enter Felicia's room, you will find one present for each time you have tried the room.  If you drop this present and one of her cat brothers touch it, it will leave the room.  The black colored objects and border will change to blue when you have a present.  All the colors change if you get to kiss Felicia.  If you kiss Felicia you will get a bonus depending on how fast you cleared the level and may also earn extra lives.















You will not lose a life if you fall off the fence, get knocked off a clothesline by a mouse, fall off a clothesline and go behind the fence, jump into the window from whence you came after entering a room or falling below the lowest level in Felicia's room.  You will lose a life if you get hit by an object thrown out of a window, being touched by an awake dog, an electric eel, a spider or drowning in the fish bowl.

Alley Cat is a very fun game, one you can or could have found yourself losing half an hour of time (when you should be working).  The challenge rooms are fun without getting too frustrating at the lower levels.  The graphics are cute and clear, the sound effects are quite appropriately done for the PC speaker.  Getting the noise sound effect when the dog attacks you is pretty impressive.  This game was a product of its time when character control was seen as part of the challenge, but the jumping control is still on par with Mario Bros.  It proves that fast paced, engaging arcade-style games are quite possible on the limited graphics and sound capabilities of the PC speaker.

Many other games from the IBM-dominated PC era (1981-1986) will fail when run at a playable on hardware substantially faster than that in the IBM PC.  One of the most interesting things about Alley Cat for the IBM PC is that it is very speed friendly when it comes to faster machines, something very rare in its day. However, this is not quite as forward thinking as you may believe.  When this port was released in 1984, IBM had no less than three speed classes of PCs on the market during that year.  First there was the 8088 running at 4.77MHz running in the IBM PC, IBM PC/XT and IBM PC Portable.  Second was the PCjr., which had the same CPU and ran it at the same speed as the PC, but system is slower with 128KB due to the sharing of the memory between the CPU and PCjr. graphics adapter.  Third was the IBM PC AT with a 80286 CPU running at 6MHz and up to three times as fast as the IBM PC.  The developer probably had to sign a few non-disclosure agreements and put up with the legendary IBM secrecy in order to gain access to that information or hardware, since the AT was not released until August of 1984 and was incredibly expensive when first released.  The result is a same that runs at a consistent speed regardless of the hardware being used to run it.  It does a speed test prior to loading and uses it to adjust its timing appropriately.















On any system other than a PCjr., Alley Cat is displayed using CGA color limitations.  Alley Cat has better color selections and some 3-voice music when run on an IBM PCjr.  However, this information had to be re-discovered at some point during the 2000s, Alley Cat has some support of PCjr. graphics and sound.  There is three voice PCjr. sound chip music on the title screen.  (The PCjr. can play the PC speaker music by selecting N for the prompt "Are you using a TV or an external speaker (Y/N)?")  However, all in-game music and sound effects use the PC speaker with the PCjr.

For graphics, as with the CGA card, only four colors are used.  However, the PCjr. allows the colors to be selected freely from its 16 color palette. Of course this is not a patch on the Atari 8-bit plaform, which could display 16 colors from a 256 color palette, and on some screens even more can be seen because Alley Cat uses scanline interrupts.  You can see differences in the screenshots posted throughout this blog entry.  CGA screenshots are on the left side of the page, PCjr. screenshots are on the right side of the page.















Outside the PCjr., all later graphics cards should display the colors and effects correctly.  Alley Cat strove for compatibility by avoiding direct hardware access to the CGA card and instead used BIOS functions for its graphics control.  All other graphics cards except for Hercules monochrome are or should be CGA compatible at the BIOS level.  The BIOS functions are more limited than direct hardware access; BIOS functions only allow the programmer to change the palette color in 320x200 Mode 4 to either green/red/brown or cyan/magenta/light gray and to set the background and border color.  It does not allow you to change the palette intensity and emulation of BIOS functions after the Tandy Graphics Adapter tend not to allow you to show the alternate cyan/red/white palette by selectiong 320x200 Mode 5 (which is a side-effect of how the color palettes work on the CGA card). Many other games write to the CGA registers directly to change modes and colors displayed by the card and these tend to fail on the PCjr. and graphics adapters more advanced than Tandy's.  Some cards may show this game using the intense versions of the standard CGA palettes, but you should see both palettes employed.

Very recently, there have been patches made to allow the 3-voice introduction music and the PCjr. colors to be seen and heard on Tandy 1000s.  Also there are patches to allow EGA and VGA cards to display the PCjr. palette colors.  Find them here : http://www.vogons.org/viewtopic.php?f=24&t=45896&view=unread#unread

Saturday, October 10, 2015

The Journey of the "PCjr./Tandy Sound Chip"

The TI SN 76496, what we today typically refer to as the PCjr./Tandy sound chip, is a long and varied one as it pertains to the IBM PC platform.  Texas Instruments originally developed this simple music chip for use in its TI/99 4 computer, where it was called the TI TMS9919.  Texas Instruments offered the core of this chip as the TI SN79426 and later the TI SN76489 as an off-the-shelf part.  The TI SN76489 found its way into the Colecovision and the Coleco Adam computer as well as many arcade machines.  Additionally, a clone of the chip is integrated into the Sega Master System and Sega Genesis and the Sega Game Gear.

The TI SN76489 can generate three square waves at different frequencies.  The input clock is typically 3,579,545MHz.  For the square wave channels, the input clock is divided by 32 by the chip and then by a 10-bit number in a register to obtain the output frequency for the square wave.  The human ear can perceive sound waves in the range of 20KHz to 20Hz, but the lowest square wave tone the chip can produce at this input clock is about 109.24Hz.

The chip can also generate periodic or white noise for sound effects and percussion.  The channel divides the clock rate by 64, 128 or 256 or uses the rate of square wave generator 3 which drives a linear feedback 15-bit shift register (1 bit is shifted every clock cycle) to produce a pseudo-random pattern of 1s and 0s at a high rate of frequency.  The periodic noise option is output only once every 15 clock cycles compared to the white noise option.

The chip has eight registers, two for each square wave channel and two for the noise channel.  Any write to the chip will select a register and send data to the chip.  However, the frequency for each square wave channel is controlled by two registers, and if the register is not changed, the lower six bits of the frequency for a square wave channel can be updated quickly for frequency sweeps.

The chip uses a 4-bit number to attentuate the amplitude/volume of the each channel and then mixes all four channels into the single output pin on the chip.

Usage in the IBM PCjr.

The IBM PCjr. uses a discrete TI SN76496 (or TI SN76496A) at ZM26.  The TI SN76496 is the same chip as the TI SN76489A except that it has an audio in pin on pin 9 to allow for an external audio source, like a speech synthesis chip, to be mixed into the chip for a combined output.  The TI SN79494 has the audio input pin but only divides the input clock by 4 instead of 32, so it is not a drop in replacement.

IBM did not connect the audio in on pin 9 to anything in the PCjr.  Instead, all sources of audio, the PC Speaker, the TI SN76496 and the audio output pins from the cassette connector and from the sidecar bus (used for the IBM PCjr. Speech Attachment) all go to a audio multiplexer chip called the MC14529.  This chip will determine which of these four sources will be heard at the RCA audio jack, through the TV RF Modulator and through the IBM 4893 PCjr. Display.  Note that the internal speaker in the PCjr. only outputs PC Speaker audio.

IBM assigned I/O ports C0-C7 to the chip in the PCjr., even though it only needs one port.  The chip is write-only and cannot be reliably detected, the system it is part of is what gets detected.

Usage in the Tandy 1000A/HD

The Tandy 1000A/HD use a discrete TI SN76496 at U96.  The first difference in the implementation from the PCjr. is that the audio input pin is used to mix in PC Speaker sound.  This allows both the PC Speaker and SN76496 sound to be heard from the audio multiplexer chip.  The second difference is that you can hear the SN76496 through the Tandy's internal speaker as well as through its RCA audio output.  In fact, the audio selector chip is only connected to the RCA audio jack, so you will always hear the PC Speaker and SN76496 from the internal speaker, which is pretty large and loud.

Unfortunately, the default setting for the multiplexer chip will output only PC Speaker audio to the RCA jack.  Some games, like LucasArts' SCUMM games, will not touch the multiplexer chip, leaving you with only the internal speaker for music and sound effects.  You can avoid this by running a Sierra AGI game or finding a program that will let you set the multiplexer accordingly.

Usage in the Tandy 1000EX, SX, HX, TX

The Tandy 1000EX and 1000SX are similar to the earlier 1000s except now they are using NCR8496 clones of the TI SN76496 as well as the real TI SN76496s.  It is a crapshoot as to which chip you will find in any given EX or SX.  You can find the chip at U15 in the EX and U37A in the SX.

While the two chips work almost identically, there are two differences.  First, the NCR chip requires a 2K resistor instead of a 2.7K resistor for mixing in the PC Speaker audio into pin 9.  Second, the TI chip and the NCR chip behave slightly, but at times audibly differently when it comes to the noise channel. In the TI chip, any change to the noise control register will reset the shift register.  In the NCR chip, this does not appear to happen.  (This difference in behavior also appears to be true for the registers governing the square wave channels)  The bits used for the feedback register are not the same for the TI and NCR chips.

The SX has a complex connection to the audio multiplexer chip and will require a write to hear the TI/NCR audio from the RCA jack.  This machine has the same problem with the LucasArts' SCUMM games described above. See here for more details : http://nerdlypleasures.blogspot.com/2013/06/ibm-pcjr-and-tandy-1000-sound.html

The EX has a simplified connections to the audio multiplexer chip so that by default PC Speaker and TI audio will always be heard without needing to write to the audio multiplexer chip.  The HX and TX give identical output options to the EX, except its highly likely that in these machines Tandy was exclusively using the NCR chips.  In the HX, U19 contains the chip.  In the TX, it's at U7.

While real TI SN 76496 chips can still be sourced from chip vendors, the NCR 8496 chips seem impossible to find, except in these Tandys.

Usage in the Tandy 1000 SL, SL/2, TL, TL/2, TL/3, RL, RL-HD

These machines embed the NCR version of the TI chip into a custom Tandy chip called the PSSJ (Parallel, Serial, Sound & Joystick).  The PSSJ has acquired a DMA-fed, IRQ-driven DAC/ADC, which uses ports C4-C7.  The DMA used is 1 and the IRQ used is 7, making it impossible to coexist with a Sound Blaster.

The audio multiplexer chip no longer exists in these machines.

The PSSJ chip has an option to allow an extra divisor bit (for an 11-bit divider) to be enabled for the TI/NCR chip, but it is unknown if this feature was ever used.

For some reason, the first note of Greensleeves in the opening of King's Quest I & II is not heard in these systems.

Usage in the Tandy 1000RLX & RLX-HD

The PSSJ chip in these machines is accessed identically to the other Tandy machines, but because these machines have VGA built-in instead of Tandy video, certain games will refuse to play audio through the chip.  Electronic Arts games like Skate or Die and Kings of the Beach will not work with Tandy audio in these machines.  AGI games with interpreter versions below 2.917 will show graphical glitches in the form of "trails" on these machines, but will still produce Tandy sound.

Usage in the Tandy 1000RSX & RSX-HD, 2500 and Sensation!

In addition to the VGA issue of the RLX, these systems are fully AT compatible.  This required them to relocate the PSSJ audio to I/O 1E0-1E7.  IBM decided when it made the IBM PC AT to put the second DMA controller at C0-DF.  It did not appreciate or care that its PCjr. had its TI chip there as well.  The IBM AT was a success and the PCjr. was not, so other companies followed IBM's lead.  Hence Tandy had to relocate the chip.

The result of the relocation broke Tandy music compatibility with most games because they were expecting the chip to be at C0-C7.  The TI chip was always programmed through direct register writes, neither IBM nor Tandy wrote BIOS routines to program the chip.  A few later games, mostly from Sierra, have drivers that support these machines.

The chip's presence is not advertised on the Sensation!, which contains an Adlib Gold clone.  It is there, but it sounds very muffled compared to the earlier computers.

Usage in the IBM PS/1 Model 2011 and 2121

IBM released the PS/1 Audio/Joystick Card as an upgrade for one of the proprietary sockets on the motherboards of these machines.  The PS/1 line was introduced in 1990 with the Model 2011, which uses a 10MHz 286 CPU.  The basic functionality of the TI chip is integrated into the Card, even though its musical capabilities were very unimpressive to everybody by this time.  Adding ISA slots to these machines requires an external expansion box.  It uses I/O address 205.  It can use interrupts, namely IRQ7, but does not use DMA.  Later the Model 2121 was released with support for the Card, it uses a 386SX @ 16MHz.  None of the later PS/1s support the Card.

Interestingly, while the system board supplies a 10MHz Clock signal to the Card, the integrated TI chip is based off an 8MHz signal, which means the clock rate is stepped down somewhere on the Card.  The 8MHz signal is divided by 64 and then by the 10-bit number.  Therefore, if you put the maximum value of 1,024 into the square wave generator, you will end up with a square wave being output at 122.07Hz.

The PS/1 Audio Card has a problem then if fed with pure Tandy music data, it is running the same notes at 11.74% higher frequencies!  Unfortunately, the Tandy is no master of the lower octaves, and IBM's version is even less capable of reaching the lower notes.  The Game Blaster can get all the way down to 28Hz and has three times the channels.

Now this frequency difference can be accounted for the most part if the programmers write a driver that adjusts the speed of the music playback.  However, this was not always done, as can be seen when running the special PS/1 version of Silpheed running on a real IBM PS/1.

Now for some audio comparisons :

Audio Comparison #1 - TI vs. NCR Noise Channel

IBM PCjr Maniac Mansion (low resolution version) :



Tandy 1000TL Maniac Mansion  (low resolution version) :



Audio Comparison #2 - PCjr. Discrete Chip vs. Tandy Integrated Chip

IBM PCjr. King's Quest :



Tandy 1000TL King's Quest :



Audio Comparison #3 - Tandy vs. IBM PS/1

Tandy 1000 Prince of Persia (via DOSBox SVN)



IBM PS/1 Prince of Persia (via IBMulator 0.7)



Advantages of the 160x200 16-color Tandy/PCjr. Resolution

160x200 in 16 colors is a resolution officially only supported on the Tandy 1000s and the IBM PCjr.  Despite having the memory (16K) available, CGA can only do 160x200 in 4 pre-defined colors (by doubling pixels in the 320x200 mode) or 160x100 in 16 colors (by tweaking the 80-column text mode)  EGA can also support 160x200 unofficially either by doubling pixels or adjusting the parameters in its CRT controller, but this was seldom supported on EGA-supporting titles.

One of the most substantial benefits to the 160x200 16-color mode is that it uses half the video memory of the 320x200 16-color mode (16KB vs. 32KB).  The CPU needs only send half as much data to the video memory, improving performance on any machine.

One drawback with the 160x200 16-color mode is that you can only uses 20-columns of text at the standard 8x8 pixel IBM character set.  In this case, developers typically chose two options.  First, they could use their own character set which would fit into a smaller pixel matrix.  Maniac Mansion is an example of this option, it uses 4x8 characters for the Tandy mode and the standard 8x8 characters for CGA, MCGA, EGA or VGA modes.  Second, they could use the 320x200 16-color mode, which is what King's Quest and its sequels use.  In King's Quest, the pixels for the graphics display are doubled, improving performance to a good extent but not as much as if the true 160x200 mode was used.


Another benefit, which is under-appreciated these days, is that games using this mode look very good on a composite monitor.  The IBM PCjr. and the early Tandy 1000s (1000/A/HD/EX/HX/SX/TX) have a composite video output jack.  In a 320x200 mode, these computers show artifact colors that are markedly different from an IBM CGA card.



But in a 160x200 16-color mode, their composite colors correspond to their RGB colors quite well.  This is because in this mode, the pixel clock is the same as the NTSC color burst frequency, 3.58MHz.  Because the pixel clock is aligned with the color clock, the TV's color decoding circuitry can keep pace with the color changes being sent to it.  Even in a psuedo-160x200 game like King's Quest, the doubling of the pixels makes the graphics look as they should, color-wise.

By contrast, the pixel clock in a 320 pixel mode is 7.16MHz and 14.318MHz in a 640 pixel mode.  In those resolutions, the color decoding circuitry cannot keep up, leading to artifact colors.  The timing of the PCjr. and Tandy video controller chips is "off" compared to the IBM PC CGA, leading to different artifact colors. The 320x200 16 color mode does not look good on a composite monitor, the artifacting becomes ugly at this point, especially when it comes to dithering.


The final benefit to the 160x200 mode is that the end result looks acceptable on a video capture device. Capturing 320x200 or 640x200 graphics from a CGA card, PCjr., Tandy or EGA card that gives a good representation of RGB color is much, much more difficult.  First, you need a board that will convert the digital RGB signal to an analog RGB signal and preferably keeps color 6 brown, not dark yellow.  (From the composite video output, color 6 will look closer to dark yellow than to brown.)  Second, you will need a hardware device that can capture 15kHz RGB.  They do exist, but most people would probably use a scan-line doubler and send it to a VGA capture device.



You may think that only a handful of games used a 160x200 mode, but you would be surprised.  Here is a list of forty nine games that primarily use a 160x200 16-color mode for their graphics when run on a PCjr. or a Tandy 1000 :

Black Cauldron, The
Boulder Dash
Boulder Dash II: Rockford's Revenge
Bruce Lee
California Games
Demon Attack
Donald Duck's Playground
F-15 Strike Eagle
Ghostbusters
Gold Rush!
Indianapolis 500
Jumpman
King's Quest I: Quest for the Crown
King's Quest II: Romancing the Throne
King's Quest III: To Heir is Human
King's Quest IV: The Perils of Rosella
Leisure Suit Larry in the Land of the Lounge Lizards
Lost Tomb
Manhunter 2: San Francisco
Manhunter: New York
Maniac Mansion
Mickey's Space Adventure
Microsoft Flight Simulator (v2.0)
Microsurgeon
Mixed-Up Mother Goose
Mouser
Murder on the Zinderneuf
Ninja
Dr. J and Larry Bird go One-on-One
Pitfall II: Lost Caverns
Pitstop II
Police Quest: In Pursuit of the Death Angel
Rasterscan
River Raid
ScubaVenture
Sea Speller
Silent Service
Slugger, The
Space Quest I: The Sarien Encounter
Space Quest II: Vohaul's Revenge
Starflight
Storm
Super Bowl Sunday
The World's Greatest Baseball Game
Touchdown Football
Troll's Tale
Winnie the Pooh in the Hundred Acre Wood
Wizard and the Princess, The
Zak McKracken and the Alien Mindbenders

Tuesday, April 7, 2015

IBM Character Fonts

IBM used several fonts during the life of the IBM PC line and soon thereafter.  Eventually the font support would be finalized into the standard VGA font, but there was quite an evolution to get there.

The first font set is  found in the IBM PC BIOS, starting at address FFA6E.  In PC BIOSes, whether from IBM or from another publisher like Phoenix, Award or AMI, you will always find a font beginning at this address.  This address contains the dot patterns, or glyphs, for the first, basic 128 ASCII characters. The font is always in an 8x8 pattern and essentially acts like a fallback for programs using graphics modes. You could only find the glyphs for the second, extended 128 ASCII characters on the display adapters themselves.



Note the extra pixel in the diamond character in the first row.  This is unique to the first IBM PC Model 5150 BIOS revision.  That pixel will be gone in the PC BIOS dated 10-19-81 and every other BIOS thereafter.  Note that the second 128 characters do not exist in the PC BIOS's ROM.

MDA & Hercules

MDA and Hercules-brand graphics cards share the same glyph patterns.  Their text mode uses a 9x14 text cell and you were strictly limited to the 256 characters contained in the Character Generator ROM on the display adapter.  If you wanted to use non-IBM characters with a basic Hercules Graphics Card, you would use the graphics mode.  A Hercules Graphics Card Plus or Hercules InColor Card can redefine the characters in text mode.  Here is what the demo screen looks like on an MDA or Hercules :


Interestingly, the MDA's Character Generator is an 8KB ROM chip, even though its font only takes 4KB.  The other 4KB contain the two CGA fonts described in the next section.  Apparently it was easier to use one ROM for both cards.  The IBM Part number on the chip is 6359300 or 5788005 and the ROM is a 9264 type, so it cannot be dumped or replaced by an EPROM without a pin adapter.  The Character Generator ROMs cannot be read by the system, so the glyph patterns are obtained via a ROM dump.

CGA & PCjr.

CGA text modes always use an 8x8 text cell and typically uses a thick, double-dot font.  A true IBM CGA card also has a thin, single-dot font.  This can be selected by bridging two solder pads just below the MC6845, but IBM did not provide a pair of pins to make this easy for end users.  The thick font was suitable in 40-column mode for TVs, but the thin font shows a lot of color fringing, a.k.a. artifacts.  IBM probably thought that the thin font was not such an important feature that it should be made accessible to end users.  Otherwise, many users would have probably complained that the text was too difficult to read on their TVs.

This is what the standard thick font looks like :


Note that there are four characters with minor differences between the Character Generator ROM font and the BIOS font.  They are listed as "8x8 different between card and BIOS" in the screenshot.

Here is the thin font, which may have been IBM's first attempt at ISO compliance :


The PCjr. fonts should be identical to the CGA fonts, but the thin font is not available.

Tandy 1000

The Tandy 1000 contains a Character Generator ROM that is mostly similar to IBM's CGA double-dot font, but there are some differences :


In the original 1000, the Character ROM is embedded in the Video Gate Array chip.  After the original 1000s, the Tandy integrated the Video Gate Array and MC6845s into a large VLSI chip.  This applies to the EX, SX, HX and TX.  Internal to these chips is a 2K Character Generator ROM.  In the above screenshot, the first 128 characters are correct because they are duplicated in the Tandy BIOS at address FFA6E.  It is very difficult to extract the patterns for the second 128 characters because they are not in an accessible or dumpable ROM.  Here is what the characters truly look like :



By the time of the TL and SL, Tandy was using the Tandy Video II chip and an external 16KB Character ROM with the 8x8 font and a 9x14 font that may or may not be identical to IBM and Hercules.  The Video Controller in the TL and SL and their successors could emulate MDA and Hercules text and graphics.

The Tandy default text mode uses a 8x9 text cell, but usually an 8x8 text cell can be used.  For most characters, the extra row is blank, but for some the ninth pixel row is a repeat of the eighth pixel row.

EGA

With the EGA, MCGA and VGA adapters, the Character Generator ROM would no longer be found on a separate ROM chip accessible only to the CRT Controller.  Instead, multiple character sets would be contained in the BIOS Extension ROM (for EGA and VGA) or within the BIOS (for MCGA).  As these adapters supported redefinable character sets in text mode, DOS could upload its own character set for display.

The EGA BIOS supports an 8x8 text font when displayed on 200 line monitors, an 8x14 text font when displayed on 350 line color monitors and a 9x14 text font when displayed on a monochrome 350 line monitor.  The 9x14 characters are identical to the MDA characters, but many are shifted a pixel one direction or another to produce a more pleasing spacing (kerning) than MDA.  The 8x14 characters are mostly identical to the 9x14 characters, but there are differences.  The first 128 8x8 characters are identical to the PC BIOS and the second 128 8x8 characters are identical to the CGA thick text font.  All these fonts are stored, uncompressed, in the EGA 16KB BIOS extension.

This is the EGA and VGA and (for the first 128 characters) the standard PC BIOS 8x8 text font :


Here is the EGA and VGA 8x14 text font :


And the EGA and VGA 9x14 text font :


MCGA

MCGA includes a 8x8 and an 8x16 text font.  Actually, the MCGA, in addition to the standard 8x16 font, also contains four more 8x16 fonts, none of which ever obtained popularity.  These may have been IBM's attempt to be ISO compliant.

This is the standard 8x16 font for MCGA and VGA :


In addition, PS/2 Model 30s with a revision 0 BIOS contained an earlier version of the 8x16 font.  In this font, the zero character has a slash instead of a dot.

VGA

VGA supports the EGA 8x8, 8x14, 9x14 fonts and 8x16 and 9x16 fonts.  These are all found in the VGA BIOS ROM extension, which can be 24KB-32KB.  With 8x14 and 9x14 or 8x16 and 9x16, with EGA and VGA the glyphs are mostly the same and only one set is stored in the ROM unless there is a substitution for a particular glyph.  The BIOS adjusts for the ninth pixel column, for most characters the column will be blank; for others, the ninth column will repeat whatever is in the eighth.

Here is the final, standard 9x16 VGA font :


DOS Code Pages

The PC was originally designed by and intended for English speaking countries.  Support for other languages was a cumbersome exercise in the early days of MDA and CGA.  Eventually, DOS 3.3 introduced Code Pages, which when combined with an EGA or VGA card, allowed the user to set his PC to his country's symbols.  English language users would generally be content with the default DOS code page, 437, or the alternate English code page, 850.  Code Page 850 is more friendly to Western European languages than 437 but loses some of the drawing characters.  DOS's .CPI files would contain character sets for several code pages, each of which had character sets for 8x8, 8x14 and 8x16.  EGA.CPI contains 437, 850, 852, 860, 863, 865.  Here are 437 and 850 :



While the Tandy Video II chip found in the TL and SL does not support software redefinable fonts, it has support for 512 characters instead of just 256.  (EGA can also support 512 characters).  The first 256 are the characters in Code Page 437, the second 256 characters are those of Code Page 850.  However, as Tandy 1000s after the original can be upgraded to EGA or VGA, Tandy MS-DOS 3.3 supports Code Pages in 8x8, 8x9 and 8x14 text cell sizes.

ISO.CPI contains an English-language character sets suitable for ISO-compliant fonts :


Special thanks to NewRisingSun for all his help with this blog entry.