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

7 comments:

  1. I'm impressed by all these programs, but I'm also impressed by mTCP and IRCjr.

    I have a Toshiba T3200. That's a portable computer with a 286 processor and a monochrome screen. I've put a network card in it and with the aid of mTCP I can connect this computer to the internet, so I can download Paku Paku and chat on IRC.

    ReplyDelete
  2. Hey, I recognise that video! :P

    This is a great write-up, good work dude! :)

    ReplyDelete
  3. Found your site while looking up info on sound blasters... you have tons of really interesting content, I'll be making a point to visit often.

    Not sure if it fits with this article since it was targeting the 8088 mostly, but retro city rampage dx came out last year as well, made specifically to run on 486 systems. Heh really loving the new "old" releases.

    ReplyDelete
  4. I have not overlooked RCR, I reviewed it here : http://nerdlypleasures.blogspot.com/2015/08/retro-city-rampage-486-review-of-new-ms.html

    However, I did not feel it was appropriate to mention it here because it requires a 386 to play and a 486 to enjoy, so it is in quite a different league than the software described in this blog entry.

    ReplyDelete