Showing posts with label PC Hardware. Show all posts
Showing posts with label PC Hardware. Show all posts

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.

Friday, January 5, 2018

OPL2/3 Frequency - The 1Hz-ish Difference

The nature of FM Synthesis sound is based on sine waves.  Sine waves create sound by oscillating at a certain frequency and amplitude.  So a sine wave oscillating at a frequency of 440Hz (the pitch) would sound like an A note (A4) hit above the middle C (C4) on the 4th octave of a full 88-key keyboard.  But a sine wave in and of itself is not very interesting musically, so FM synthesis modulates two or more sine waves to create a much more complex sound.  The sine wave's frequency is programmed into the FM Synthesis chip and the modulation of the two frequency, combined with other methods to shape the waveform such as ASDR envelopes, make a sound more complex and realistic than the Programmable Sound Generators that were used in computer and video game music before FM Synthesis became popular in computer music.


Sunday, December 18, 2016

Getting a Roland/Edirol UM-1X and Windows 10 64-bit to Work Together

About ten years ago I found myself in need of a hardware MIDI solution for my Windows XP machine.  At the time I had a Sound Blaster X-Fi in the machine, but it did not have a hardware MIDI IN and OUT port.  The add-on that would add these ports was very expensive at the time, but I needed a hardware MIDI solution to use my Roland MIDI modules such as the CM-500 I had at the time.  A less expensive solution was a USB MIDI interface, so I decided to buy one.  The one I bought was the Edirol/Roland UM-1X, and it was not particularly inexpensive but I figured I needed a good quality solution for non-GM devices like the MT-32.

The UM-1SX is the same interface as the UM-1X but you need to plug in your own MIDI 5-pin cables.  There were earlier UM-1 and UM-1S, which appear to function identically to the UM-1X and UM-1SX except they do not have the Advanced Driver Switch on them.  After the UM-1X is the UM-1EX, which adds a switch for toggling MIDI OUT and MIDI THRU functionality and the UM-2EX, which adds a second MIDI OUT.  After the 1EX and 2EX came the UM-ONE and the Roland UM-ONE mk2.  The UM-ONE mk2 is the only one of these products which is not discontinued.  The ONE and the ONE mk2 are the only one of these interfaces that have Windows 10 drivers.  The rest have drivers only until Windows 8/8.1.


Friday, August 5, 2016

The Generic DOS PC - A Critique of LGR's 486 Build

If you wanted to build a DOS PC, what would you build?  The answer depends in no small part on what you expect it to run.  Do you want a system that can run the oldest games?  In that case you will probably want an IBM PC, XT or one of the earlier Tandy 1000 series systems.  Perhaps even a PCjr. or a Compaq Portable?  But those systems are often running PC Booters as much as they are running true DOS games.  Fast forward a couple of years and you get into EGA and VGA systems.  Now you are dealing with higher speed 286s, 386s and 486s.  Even though many of the more speed sensitive games will fail to run on these systems, the classic DOS era is at hand.  But suppose you want something with 3-D acceleration and high resolution color in mind.  Then you are looking at Pentium systems and sharing drive space with Windows 95 games.  Duke Nukem 3D, Fallout, Magic Carpet 2 require more than what most 486s will give.

I would suggest that most people probably received their first introduction to IBM compatible PCs and DOS in the early 1990s, "When VGA Was King."  In those days, then-young adults like myself were in awe at the beautiful graphics of the King's Quest games, addicting world-building simulations like Civilization and complex role-playing of the Ultimas.  We saved our allowances to buy a Sound Blaster card because systems did not come with sound cards as a standard feature until well into the mid-90s.  We looked eagerly at the new CD-ROM technology, waiting for it to drop in price and salivated at The 7th Guest and Myst (and found out that cutting edge technology seldom lives up to the hype).  PCs had something to offer that our NES, SNES and Genesis consoles could not.

Building a DOS system often addresses that era of early 90s gaming with the ability to reach somewhat back to the late 80s and forward into the mid 90s.  Building vintage computer systems has become something of a niche hobby, but now one with very dedicated members.  My own humble writings here and elsewhere may have made some small contribution to this phenomenon.  But when someone like Lazy Game Reviews decides to post a system build video, it will get a great deal of attention.  With almost 400K Youtube subscribers and videos easily ratcheting 100K views within a short period of time, he is sufficiently successful on that he does not need a day job.  Although far many more people watch his Sims videos than his retro-computing videos, there is enough overlap that his message reaches many more people than anyone else I know of who regularly covers retro-PC topics.


Here is his first video : https://www.youtube.com/watch?v=fbjYkPKRm-8
And here is his followup video : https://www.youtube.com/watch?v=g15J44xB2zU


Monday, May 30, 2016

Working with ST-506 Interface MFM Hard Drives

If you have an IBM PC, XT or compatible of similar vintage, historically accurate options for mass storage can be a bit tricky to work with.  No XT-IDE, compact flash or Disk on Modules were available during the first decade after the release of the IBM PC.  Drives were huge but storage capacity was small by today's standards.  Still, if you want to go 100% Oldskool PC, you should use a vintage drive.  Even a vintage hard drive is far superior to being relegated to floppies.

The first hard drive interface in the PC compatible world came with the IBM PC/XT.  The XT included a "fixed disk drive" controller designed by Xebec.  The controller used an interface called the ST-506 after Seagate ST-506 hard drive.  The ST-506 was a 5MB drive and used a two-cable interface.  The IBM original controller only officially supported one type of hard drive in its first two iterations, the ST-412.  The ST-412 functioned like the ST-506 but had a 10MB capacity.

Later, Seagate released the ST-225, a 20MB hard drive that could be found in late model XTs and perhaps the IBM PC XT/286.  IBM released a final revision of its fixed disk controller to support this drive.

MFM drives can take up a full-height 5.25" drive bay.  These bays are seldom found outside the original IBM PC, XT and XT/286.  The ST-412 is a full-height drive, the ST-225 is a half-height drive.


Monday, April 11, 2016

The Amstrad PC-1512 : The Affordable IBM PC Compatible for Europe

The Amstrad PC1512, What you See is the Hardware you Got (credit to wikipedia)
In 1986, Amstrad released the PC-1512 for in the United Kingdom.  Amstrad was a leading manufacturer of home computers, having launched the successful CPC series and by 1986, having bought Sinclair Research and would release more computers in the ZX Spectrum line.  However, both the CPC and Speccy's were known more for and better at playing video games than serious work.  Unfortunately, the standard business computer of the day, the IBM PC and clones, was very expensive.  The cost of a minimally configured PC compatible or clone was well out of the price range of most European consumers.

Neither of Amstrad's key computer lines were IBM PC compatible so Amstrad decided to design their own PC Compatible.  The solution they came up with was innovative in many ways but a bit limited in others. Enter the PC-1512.

The Amstrad PC-1512 uses an 8086 CPU running at 8MHz like the Tandy SL, SL/2 or the IBM PS/2 Models 25 & 30, but it came earlier than either machine.  The CPU is in a socket, so it can be upgraded to a V30 for increased performance.  The stock system came with 512KB of parity memory, which was very reasonable for a low cost PC clone at this time.  (The Tandy 1000 EX and HX came with half that and the SX came with 384KB, all non-parity).  The RAM can be upgraded to 640KB with eighteen standard 64Kx1 DRAMs, 150ns or better.  It also has a socket for an 8087 Math Coprocessor and a built-in floppy controller with DMA.

The PC-1512 came with one or two half height 5.25" drives, and in this regard looks very similar to a Japanese NEC PC-8801 or 9801 machine.  The keyboard is based off the IBM 83 key keyboard with many improvements to the layout.  It has 85 keys and looks like an IBM PC AT keyboard. Apparently the PC-1512 was released in the United States, but it was not popular.  Likewise, the Tandy 1000s were released in the U.K. and Europe, but were not popular.  The US and UK keyboard are almost identical and the UK keyboard is rather US friendly in terms of key layout.  The keyboard is not compatible with any IBM-compatible keyboard, but there does exist at least one compatible 102-key keyboard.  Early Northgate Omnikey keyboards also have Amstrad compatibility with a special cable.

Input was also very innovative for the time.  The system came with a mouse out of the box, which was always a separate purchase for other IBM PC compatibles of this time.  The Amstrad mouse is extremely ugly looking, even by the miserable mousing standards of the 1980s. It looks like the designer was inspired by the Moai statues of Easter Island.  You should be able to build an adapter to allow a bus mouse which sends pure quadrature signals to work in the PC-1512.  I believe an Atari ST mouse may also be compatible.  I'm not sure about an Amiga mouse.

Expansion is pretty decent.  There is a standard 25-pin serial and parallel port on the back and three slots inside the machine for ISA expansion cards.  The keyboard connects to the machine via a 6-pin DIN.  Next to the keyboard port is a DE-9 mouse port.  The mouse is a proper rotary optical mouse, but the two mouse buttons are redirected to the keyboard port.  The keyboard will report the mouse buttons as otherwise unused raw keyboard scancodes.  Of course, with the proper mouse driver, this should be transparent to the user.  If you want to assign the mouse buttons to a particular keyboard key, you have that option.

Even more interesting is the Amstrad joystick, which attaches to the keyboard via a DE-9 port.  The joystick pinout is compatible with standard Atari joysticks, but also can support a second button on pin 7, which is not particularly standard (Genesis and Master System controllers use Pin 9).  This is a digital joystick, which is a first in the PC world.  The keyboard treats the joystick simply as six extra keys, giving a unique raw scancode to each key.  The built in firmware translates the joystick directionals to cursor keys but the buttons can be user defined to produce the translated scancode of any key.  The Amstrad can also use a standard IBM PC compatible analog joystick with a standard Game Card or a Sound Card.  This feature was carried over to the PC-1640.

Like the Tandy 1000 EX and SX, the Amstrad has a volume control for the internal speaker.  The dial is accessible outside the machine, like the EX.  The SX's volume dial is inside the machine, an issue fixed with the TX and HX.  There is no additional sound hardware outside the main PC speaker unless you add a sound card.

The Amstrad came with one or two 5.25" 360KB drives.  Upgrading the drives to 720KB can be done.  The data separator in the PC-1512 cannot handle the 500kbits per second speed required for high density drives.  In addition, Amstrad drive cables are untwisted, so you will need a way of setting a modern 3.5" drive to DS0 instead of DS1 for the A: drive.  You do not need to do anything for the B: drive in this case. Installing a hard drive into one of the bays was a standard, if expensive, option.  You would need to add a hard drive controller card into one of the expansion slots or use a hard card.  The Amstrad can accept a 13" expansion card, unlike the Tandys.

The Amstrad had a built in real time clock and CMOS RAM.  It is a standard HD146818 like the one used in the IBM PC AT and powered by 4xAA batteries instead of coin cells, barrel batteries, or the Dallas Smartwatches.  The CMOS setup is pretty basic, but is used to assign the number of disks, starting text/graphics mode, initialize serial port parameters and can be used to assign a keyboard translated scancode to the joystick and mouse buttons.  Tandys of the time required an upgrade for a RTC, either being fitted underneath a ROM chip or on an expansion board.

Most PC compatibles had a fan for the power supply.  Early PC1512s did not come with a fan, even for the power supply.  The reasoning was that the inclusion of the power supply in the monitor allowed for adequate cooling by natural convection.  However, when rumors of unreliable machines popped up, Amstrad put in a fan.

The Amstrad came with MS-DOS 3.2 and Digital Research DOS Plus, the latter of which can run MS-DOS or CP/M applications but was slower.  It also came with DR's GEM graphical user interface and the GEM Paint program.  The Paint program supports 640x200x16.  Tandy provided something similar with its Deskmate II software with the SX, but Deskmate II gave only a text-mode based interface.  The EX's Personal Deskmate used a true graphical interface but it was fairly limited.

The 1512 has a special CGA-style monitor.  This monitor comes in monochrome and "colour" varieties.  This monitor is unique to the 1512 because it provides power to the system unit.  No monitor = paperweight.  The monitor provides power to the system unit via a very unusual DIN-14.  The system unit provides video to the monitor via a DIN-8.  This DIN-8 combines H-sync and V-sync on one pin, standard CGA separates the H and V signals into two pins.  The signals for the R, G, B, & I signals are still digital.  The Amstrad does not have composite CGA output, so the monochrome output is digital and uses 16-shades, giving sharp and distinct image quality.

CGA compatibility on the 1512 is nothing to write home about.  The standard BIOS-compatible CGA modes are supported as is the 160x100 "graphics mode" and the alternate cyan/red/white palette. Composite color is not supported because the PC-1512 was designed in and marketed mainly for PAL countries and CGA composite color was NTSC based.  The MC6845 is only emulated and the emulation is not 100% compatible.  The built-in CGA cannot be disabled, so EGA and VGA will be limited to monochrome modes.  A Hercules or MDA card will work alongside the Amstrad's CGA, but you will need a separate monitor.  A Hercules InColor card will also work to provide high resolution color output, but little software supports it.

Amstrad CGA has two or three text mode fonts built in, selectable by a jumper on the motherboard.  Normal/Codepage 437/English is the default, Danish is also available as is Greek on later 1512s.  More important is its 640x200x16 graphics mode.  This graphics mode is unique to the 1512.

However, few games ever took advantage of this high resolution graphics mode.  MobyGames indicates that 21 games support Amstrad graphics, but this does not mean these games support the 640x200x16 Amstrad graphics mode.  The Lemmings games do not.  Iznogoud does not, nor do the two Passenger on the Wind games.  While they do have Amstrad selections, I believe this is to ensure compatibility with CGA graphics, not to implement extra color.  Almost all of these games support EGA and sometimes even Tandy or VGA.  All of these games  come from European publishers and except for Lemmings they are very obscure by US standards.

The one commercial game that has been known to support Amstrad 640x200x16 graphics out of the box is Frank Bruno's boxing.  It gives more color to what would otherwise be 640x200 B&W CGA graphics.  Unfortunately, the game is an unlicensed clone of the Punch Out arcade games and is pretty terrible.  Ironically, it does not support the Amstrad joystick.  Here are some screenshot comparisons :

Title - Amstrad
Title - CGA
Opponent Profile - Amstrad
Opponent Profile - CGA
Fight - Amstrad Colour
Fight - Amstrad Monochrome on Colour Monitor
Fight - CGA
The 640x200x16 mode's implementation is unique to the Amstrad PC-1512.  Its successor, the Amstrad PC-1640, has built-in EGA graphics in place of the PC-1512's graphics controller.  The 16-color PC-1512 graphics mode did not receive BIOS support.  Neither did the 640x200x16 mode with the later Tandys.  It requires 64KB of RAM, but the controller only provides a 16KB window into video memory.  In this 640x200 mode, the window is assigned to one of four 16KB bitplanes, with each bitplane representing one of the four RGBI components.  You select each bitplane then write that component's bits.

On top of this, the Amstrad's CGA graphics may be the slowest graphics adapter of all time (next to the PCjr.)  Topbench's benchmarks show the speed of the Amstrad as significantly lower than a CGA card in an IBM PC or the Tandy graphics adapter in an Tandy 1000SX.  Given that you cannot disable the built-in graphics, you are almost always stuck with slow 4-color CGA graphics.  The Technical Reference states that the CPU has wait states inserted when accessing video RAM to maintain synchronization with the graphics controller and the number of wait states (12-46) seems rather high.

One thing I had forgotten about until writing this article was that Sierra offered support for the 640x200x16 mode in its SCI0 and 16-color versions of SCI1 games!  With a driver called PC1512.DRV, you could obtain a proper, effective 320x200x16 resolution in Sierra's games.  In order to achieve this, each pixel is written twice horizontally.  This driver rarely can be found with the actual games themselves, but here is a place to download the driver : http://sierrahelp.com/Patches-Updates/MiscUpdates.html  The SCI games run a tad slow on the PC1512.  As far as AGI games go, there is no Amstrad driver and you are limited to 4-color CGA at best.

Price and Feature Comparison with the Tandy 1000SX

Amstrad PC-1512 US Prices
Monochrome Monitor Single Drive : $799
Monochrome Dual Drive : $899
Color Single Drive : $999
Color Dual Drive : $1,099

Source : http://www.old-computers.com/museum/computer.asp?c=183

Tandy 1000SX US Prices :
Tandy 1000SX Dual Drive : $1,199
VM-4 Monochrome Monitor : $129.95
CM-5 Color Monitor : $299.95
Digi-Mouse : $99.95
Digi-Mouse Controller/Calendar Board : $99.95
PLUS RS-232C Option Board & PLUS Upgrade Adaper Board : $94.9

Source : Tandy Computer Catalog RSC-17

So, in order to get the functional equivalent of the Amstrad's Color Dual Drive features (except for CPU and RAM), you would need to spend $1,793.75 at Radio Shack on the SX.  Of course, you could often find Tandy options cheaper elsewhere.

Here is a spreadsheet comparison between the two dual drive systems :

Feature Amstrad PC-1512 Tandy 1000SX
CPU 8086 @ 8MHz 8088 @ 7.16/4.77MHz
CPU Upgrade V30 V20, 286 Express
Coprocessor Supported Supported
RAM 512/640KB parity 384/640KB non-parity
Keyboard 85-Key 90-Key
Parallel Port DB-25 Card Edge
Serial Port DB-25 Upgrade
Real Time Clock Built-in Upgrade
Mouse Interface Built-in Upgrade
Volume Control External Internal
Sound PC Speaker PC Speaker + Tandy 3 Voice
Expansion Slots 3 5
Video Amstrad Enhanced CGA Tandy Graphics Adapter
Drive Bays 2 x 5.25” 2 x 5.25”
Monitor Included Separate Purchase
Monitor Type Monochrome or Color CGA Monochrome or Color CGA or Composite
Joystick Interface Digital, 1 Joystick Analog, 2 Joysticks
Power Supply 57W 65W
Supplied Software MS-DOS 3.2, DR DOS Plus, DR GEM, DR GEM Paint MS-DOS 3.2, Tandy Deskmate II

So, it would seem that Amstrad has more advantages.  But not all things are weighted evenly.

The Amstrad CPU is faster than the Tandy CPU, but the slower switchable speeds of the Tandy makes it more early software friendly.  Moreover, Tandy offered the 286 Express upgrade (at 299.95) that would propel the Tandy beyond the Amstrad.  8086 machines had no such upgrade generally available.  

The maximum amount of RAM is the same, but the cost of eighteen 64Kx1 chips for the Amstrad was probably roughly equivalent to the cost of eight 256Kx1 chips for the Tandy.  

Amstrad's keyboard has a better layout than Tandy's.  The keys are more spread out and areas more clearly defined.  Tandy's keyboard has everything mushed together and the extra keys are seldom used.

Amstrad's parallel port is standard, Tandy's is not and is missing one of the control lines.  The serial port in the Amstrad is a welcome feature, Tandy requires an upgrade that takes up a slot.  Cheap these days, however.  A dual serial card will give you a mouse interface for the Tandy, making Amstrad's mouse interface no longer much of an advantage.

Amstrad's external volume control comes in handy on occasion.  With the SX, you can use the multiplexer to silence the internal speaker and allow the external audio output to output PC Speaker and 3-voice music.  See here : http://nerdlypleasures.blogspot.com/2013/06/ibm-pcjr-and-tandy-1000-sound.html

Music is clearly superior from the Tandy machine, 3-voice music was supported in hundreds of games and usually sounds decent even when the game supports Adlib music.

Expansion slots are typically a wash, you need at least one slot on the Tandy for a mouse interface.  Amstrad will have no problem with Expanded Memory Boards, but there are modern Expanded Memory Boards available from Lo-tech that fit inside Tandys.  Vintage 8-bit EMS boards are overpriced.

The Tandy 1000SX has its power supply built in and you are not tied to two specific monitors.  They can also use NTSC-compatible composite monitors and TVs when nothing better is available.

Tandy's video slaps down Amstrad's video.  Tandy's video is much more CGA compatible and is far, far faster than Amstrad's.  Hundreds of games use 320x200x16 and 160x200x16 Tandy graphics, almost none use Amstrad's Enhanced 640x200x16 graphics.  You can easily upgrade to an EGA or VGA card in a Tandy SX, you cannot in an Amstrad.

The joystick issue is not an easy one.  Some games do explicitly support an Amstrad joystick.  Many games which use cursor keys support it by default.  Games that do not use the cursor keys or games that read raw scancodes from the keyboard will not work with the joystick.  The analog joystick of a Tandy is always supported in any game that supports a standard joystick. An analog to digital joystick converter for the Tandy joystick is now possible : http://www.vcfed.org/forum/showthread.php?44532-Tandy-Color-Computer-Digital-Joystick-Adapter 

Sunday, March 20, 2016

Electronic Recycle Bin Rescue Super Socket 7 System

My town has a shipping container where you can rid yourself of old electronics like TVs, computer systems and monitors and printers.  The town charges a small fee per item.  Even in my small town there seems to be no lack of residents with old PCs.  Usually the container will have three to four PCs dumped in it by the time it is picked up and sent to a recycling center.  I have been known to explore the leftovers and have taken the occasional graphics or sound card from PCs.

Last week, I saw a system that interested me.  Usually I see stock Dell or HP machines from the mid-2000s, but this system was inside an AT-style enclosure.  My interest was naturally peaked.  The system did not have a cover and I could see a socket 7 motherboard.  There was no heatsink on the CPU, which identified itself as an AMD K6-2 350MHz.  I did not need any more advertising, I had to have this machine.  Three discrete trips to the bin later, I had the CPU, the motherboard on a removable tray, the CPU heatsink and all the header connectors I saw.  I did not take any disk drives, I do not need floppy or CD-ROM drives and there is an unwritten rule about taking hard drives (to protect residents against identity theft.)  I left the case, drives and power supply for the recyclers.

The unknown motherboard
Motherboard Overview :


As this is a late AT class motherboard, there are headers and ribbon cables for just about everything.

Identifying the Motherboard :

Not to busy looking from this angle
The VIA Southbridge chip is the VT82C686A (labeled as HT82C686A on this board).  Although the identity of the Northbridge chip is obscured by the headsink, the motherboard has integrated video but no external chip to provide that functionality.  According to the Southbridge reference manual, it was designed to integrate with three VIA Northbridge chips, VT82C598, VT82C501 and VT82C691.  The VT82C598 (Apollo MVP3) is a Super Socket 7 chip which provides AGP, the VT82C501 (Apollo MVP4) is a Super Socket 7 chip has integrated 2D / 3D graphics and the VT82C691 (Apollo Pro) is a Socket 8 / Slot 1 chip.

Obviously, the VT82C691 is not the chip and the VT82C501 looks better than the VT82C598 because the VT82C501 advertises integrated graphics, which fits with my board. Therefore, the Northbridge is a VT82C501.  The MVP4 is otherwise identical to the MVP3.

There is no official name of the motherboard or who manufactured it on the board itself, but judging by this thread it is highly likely a PCChips product.  http://www.vogons.org/viewtopic.php?f=46&t=46530&start=0

The heatsink on PC Chips' boards is very distinctive.  Other manufacturers like ASUS and Gigabyte proudly identify themselves, but PC Chips left their identity to their golden heatsink. It uses a VIAGRA PC100 chipset.  No chipset was ever more unfortunately named and a Google search does not really work well.

This board is not documented in TotalHardware '99.  However, there are board shots of many of PC Chip's motherboards at motherboards.org.  Even in low resolution, these photos correspond almost exactly to my board :
http://www.motherboards.org/mobot/motherboards_d/PC%20Chips/M585LMR/
http://www.motherboard.cz/mb/pcchips/M585LMR.htm

Therefore, my motherboard is a PC Chips M585LMR.  Its PDF manual can be downloaded from here :
http://www.motherboards.org/mobot/manuals/pc%20chips/M585LMR/

There is a thread about the motherboard here : http://www.vogons.org/viewtopic.php?t=44260&p=435581, but without pictures it would be difficult to associate this board with the thread.

Integrated Functionality :

This chip incorporates the Trident Blade 3D AGP 3D Accelerator.   http://www.anandtech.com/show/248

The LAN is provided by the Davicom 9102F chip.  It is a 10/100Mbit PCI-based LAN card, and Windows 9x has drivers for it.  It cannot be disabled, but there is no reason you have to use it except that wasting a PCI slot on a LAN card is silly.

The audio and modem is provided by the SoundPro HT8738AM chip, which has dual functionality.  The audio portion is provided by a core functionally identical to the C-Media CMI8738.  The modem capability is provided by a core fundamentally identical to the PCtel HSP56 MicroModem.  This is a Winmodem, so do not expect good performance.

Jumpers

The only jumpers on this board are JBAT1, JP2, JP4 and JP5.  JBAT1 clears the CMOS memory, JP2 enables and disables the onboard audio and modem functionality and JP4 enables and disables the onboard LAN.  JP5 selects the SPDIF voltage output for the SPDF I/O connector, allowing for 5 volt or .5 volt.  5 volt is suitable to power an optical or TTL output, while 0.5 volts is appropriate for a coaxial peak-to-peak output.  There is also an audio and modem disable in the BIOS, but hardware disable seems better than software disable for completely eliminating the device from Windows.

There is information silkscreened for JP6 (CPU multiplier selection) and JP9 (front side bus speed selection), but no pins or dipswitches on the board to access these selections.  These settings are entirely controlled by the BIOS.

Headers :

Then you look on the other side of the board
This board has lots and lots of pin headers.  Some of them appear to be standard, others are not.  

COM1 : Serial Port, standard 10-pin header (pin 9 is key)
PRINT1 : Parallel Port, standard 26-pin header (pin 26 is key)
VGA : Monitor Display port, standard 16-pin header.  Uncommon but not unknown, pin 16 has no connection)
LAN1 : RJ-45 port module, non-standard.  
DAA1 : Winmodem 2 x RJ-11 module, non-standard.  This does not have a ribbon cable, it attaches directly to the motherboard and its header is positioned so the module aligns with a case slot.  This can be found by searching for PCTel Fax/Modem DAA module
SOUND1 : Game/midi port and line in/out/mic, 26-pin non-standard header.  The first 16 pins of this header are for a gameport, and that is standard (pin 16 not connected).  The subsequent 10 pins are used for the audio jacks, but do not follow the standard for front panel audio designs.  Instead, 4 pins are used for the stereo line in, 4 pins for the stereo line out and 2 pins for the microphone input.  This header adapter appears to be identical : http://www.ebay.com/itm/new-PC-Audio-cable-with-Line-in-Mic-Line-out-for-Asus-Intel-MotherBoard-MORE-/121321453854?_trksid=p2141725.m3641.l6368
ATX FORM : PS/2 mouse, Infrared Port, and 2 x USB ports, 18-pin non-standard, pin 14 is the key.  I do not have this particular connector, but it appears identical to the one sold here : http://www.cablesonline.com/usbatxforcar.html
USB1 : USB1.1 x 2 ports, 8-pin semi-standard.  The standard ribbon cable has 10 pins, but pins 9 & 10 are no connected.  A typical adapter should work.  This board supports 4 USB ports between this header and the ATX FORM header.
CD-ROM : Although not labeled as such, there are what appears to be two CD-ROM headers.  One of them has a white snap-in box around the pins.  The white box should have the pins in GLGR format, while the no-box header should have the pins in the LGGR format.  
SPDF I/O : 8-pin header, pin 3 is key.  Provides coaxial spdif input and output and stereo line input with an adapter which I cannot find.
J7 : 2-pin header for CD-ROM SPDIF input.  This cannot be used if the external SPDIF bracket is being used.
J4 : 8-pin header, pin 8 is key.  Not documented in the manual

There is a header, J11, for the switches, LED and speaker.  This header is a little odd.  The 4-pin header for the speaker and the 3-pin header for the Power LED are connected horizontally, but the other LEDs and the Power/Suspend switch are connected vertically.  They all use 2-pins, so this will work.  The silkscreening on the motherboard does not make this crystal clear.  

Special Features :

The motherboard theoretically supports up to 768MB of RAM in its three DIMM slots.  However, not all of this RAM is cacheable.  2MB cache systems can cache up to 508MB, 1MB cache systems up to 254MB and 512KB boards only 127MB.  If for some reason you need more RAM than this, the performance of the extra RAM will suffer.  My system reports itself as having 512KB of RAM, so a single 128MB stick of PC-100 SDRAM will suffice.  PC-66 SDRAM is also supported.

Front side bus speeds supported are 60, 66, 75, 83, 90, 95 and 100MHz.  If the silkscreening is to be believed, this board supports multipliers from 1.5x to 5.5x.  This pretty much encompasses the world of the Socket 7 and Super Socket 7 CPUs, from a Pentium 90 (1.5 x 60) to a K6-2+ at 550MHz.  These CPUs do not have locked multipliers, so for example, my K6-2 350 can be unclocked to 90MHz.  The system can run CPUs with 3.3v to 2.0v core voltages.

The Southbridge chip supports UDMA/66 IDE.  This limits you to 28-bit LBA, so hard disk drives should be no more than 120GB.  Windows 9x also has similar limits.

The Trident Blade 3D integrated graphics cannot be disabled.  The integrated graphics will use 4MB or 8MB of system RAM for a frame buffer.  Discrete graphics cards using this chipset may use SGRAM instead of SDRAM.  There is Direct 3D support for 3D accelerated graphics as well as an OpenGL ICD for Quake-engine game support.  There is also hardware support for DVD decoding.  This graphics controller is AGP based, but does not take full advantage of the AGP specification.  When it came to 3D accelerated graphics, an nVIDIA TNT card smoked the Trident, as shown in the Anandtech article linked above.

The Trident adapter supports 640x480x32bit @ 160Hz, 800x600x32bit @ 160Hz, 1024x768x32bit @ 120Hz, 1280x1024x16bit @ 100Hz and 1600x1200x16bit.@ 85Hz.  DOS VGA and SVGA compatibility appears to be solid.

The CMI8738 chip appears to be a quite decent all-rounder.  It supports DirectSound/DirectSound 3D, EAX 1.0 and A3D 1.0 with updated drivers.  It provides Head-Related Transfer Functions for 2-speaker 3D positional audio.  It can record and output 24-bit SPDIF and will output 5.1 AC3 from DVDs.  The SOUND1 bracket supports using four speakers by repurposing the line-in connector.

The CMI8738 will emulate a Sound Blaster 16.  It possesses an excellent FM synthesis core.  I do not know if it was licensed from Yamaha, but it sounds very close to a Yamaha YMF-724 FM recording.  If you want to use an ISA card for DOS games and keep the PCI audio, you can move the I/O ports of the Sound Blaster, MPU-401 and/or FM Synthesis to ports that will not be used.  Interestingly, the VIA Southbridge also supports Sound Blaster Pro emulation, but this may be disabled on the motherboard or the chip itself to allow the CMI8738-based chip to be the only on-board audio system.

Expansion :

Meet your expansion options
A typical AT case will have seven or eight card slots.  The motherboard included five header brackets, sound, modem, LAN, VGA and Serial/Parallel.  The manufacturer offered the ATX and SPDIF brackets as optional purchases.  You may not be able use all the headers and both expansion slots, one must be sacrificed in a seven slot case.  Typically the modem is the best choice to go without, especially in today's world.

This board is on the edge of the AT to ATX transition.  Most Socket 7 and even Super Socket 7 boards used the AT form factor, while virtually all Pentium II boards used ATX.  The AT keyboard connector has purple plastic, which is a PC97 requirement.  With the ATX FORM bracket and an ATX power supply, this system becomes a fully ATX compliant computer with its various suspend and sleep functions.  Use of AT power supplies makes fewer of these energy saving options available.  I personally find sleep, suspend and ACPI functions a nuisance.  I prefer to turn a system on and turn a system off rather than worry about whether it will wake itself from sleep.

The board is very small for the period, not much larger than a mini-ITX board.  Even so, very little that an average user may need is left out.  A parallel port and one serial port is provided.  The one serial port is intended for a mouse, and instead of a second serial port you get a built-in (if crappy) modem.  Use the ATX FORM bracket and a PS/2 mouse and you can rescue the serial port for something else.  By adding basic 3D accelerated video and audio and a LAN, there is not a heck of a lot of need for expansion for most people.

The ISA slot is in line with the switch and panel headers, so using long cards with this system may be tricky. The PCI slot is in line with the secondary IDE port, so caution is advised with using a long PCI card.

If you want to use this board for 3D gaming, you may want to add a 3D accelerator.  A Voodoo, Voodoo 2 and PowerVR PCX1 or PCX2 are add-on boards without 2D capabilities.  They should be able to co-exist without difficulty with the on-board video.  Because Voodoo 2 SLI requires 2 PCI slots, the only way you will be able to use Voodoo 2 in SLI is by obtaining a Quantum3D Obsidian 2 X-16 or X-24, which combines two 8MB or 12MB Voodoo 2 boards onto one board.

Building the System :

The 486 motherboard had to get the boot
The K6-2 is recognized as a K6-2 at 350MHz.  You can set the speed, multiplier and core voltage in the BIOS.  For multipliers, you can select 2.0x through 6.0x in 0.5x increments.  For core voltage you can select 2.0-2.5v in 0.1v increments.  Front side bus speeds supported are 60, 66, 75, 83, 90, 95, 100, 105, 110, 115, 120, 124MHz.  Perhaps a Pentium or a Cyrix CPU would have different settings available.

There is no way this board will fit inside an modern ATX case.  The mounting holes for the motherboard are in different places in an ATX case and there are not enough common holes to give this AT board sufficient support.  Even if you remove the ATX I/O panel to allow you access to the AT keyboard connector, the expansion slot holes in an ATX case do not correspond to the expansion slots on the board.

I'll win no prizes for my cable routing
Getting all the ribbon cables to cooperate with the bracket placement was a bit of a challenge.  Even though no ribbon cable had more than 24 pins, ribbon cables are not the most flexible of connectors.  The floppy drive ribbon cable also connects in the area where the on-board peripherals connect.  I could not get the modem daughterboard, which connects directly to the motherboard without a ribbon cable, to fit in the AT case I have, so I just left it out.

Lots of ribbon cables
I originally could not get the board started.  I tried an AT power supply and an ATX power supply, but neither seemed to work.  I thought I had a dead board and was beginning to believe I had wasted my time.  I looked at the trace side of the board and it appeared that the ATX traces did not make any sense where the AT traces did.  The AT connector is not keyed, making inserting the connectors a bit tricky.  Once I realized that the ground wires (black) are always together and in the middle with the AT connectors, I was able to start the board.

The ATX connector still did not work.  The silkscreening for the switch/LED block was a little confusing.  I did not realize until I found and read the manual that the 2-pin connectors were to be inserted vertically, not horizontally.  I figured they were inserted vertically just as the other connectors, which is how they are inserted in my ASUS P3B-F.  Once I inserted the power switch connector vertically in the last pair of pins, the board fired right up.

So much for that AWE32 I wanted to put into the ISA slot
If you want to use an ISA card that extends over the switch/LED pins, you will have difficulties with the LED and power and reset switches due to the lack of clearance.

The system did not come with any RAM, so I grabbed a 64MB and later a 128MB stick of PC-100 SDRAM I had lying around, the system did not have any trouble with the RAM.

Installing the OS and Drivers :

I was only prepared to use a 540MB hard drive for experimentation.  I decided to use Windows 95 for a change, since it is smaller and faster with lower end hardware than Windows 98.  I have a Windows 95 OSR2.1 CD, which I found out was not bootable.  A truly fresh install will require a boot disk with a DOS CD driver and MSCDEX.  Installing the operating system was fast and easy.  Getting the drivers to work, well that was not easy.

A streamlined boot screen
The chief difficulty is finding the right drivers for this board.  Originally the board came with a drivers CD with drivers for the LAN, Video, Sound, Modem and IDE Bus Master.  Of course I did not have this CD, so I had to search for the drivers online.  I managed to find them, thanks mostly to Driver Guide.  Installing the Sound and Bus Master drivers was easy.

Only 512KB of External Cache, I want my money back!
Installing the LAN driver was not so easy.  Even though the chip used is a Davicom 9102F, there is more than one driver set for it.  The driver set that finally worked for me was not easy to find.  It has folders for win95, win95osr2 and win98.  Even with this driver, I still got a yellow exclamation mark in Driver Properties.  What finally worked was deleting the "Unsupported Device PCI LAN" after installing the driver. Once the driver was installed properly, the LAN was well-behaved.  Connecting to a Network Drive was not a problem.

The OS installed in the exposed system
Finding a good video driver for this motherboard has been a more difficult trial.  The Blade 3D does support Direct3D, so hardware accelerated games should be possible.  The first drivers I tried refused to give me anything but standard VGA capabilities.  The second set gave me full 2D capabilities at first, but not 3D capabilities.  The first set identifies the video chipset as a Trident Blade3D, but the second set identifies itself as a Trident CyberBlade i7 AGP.  It seems that like the LAN adapter, different drivers may be required depending on whether you have a standalone expansion card or an embedded solution.  Even Windows 98SE is unlikely to have video drivers for this adapter as implied here :  http://www.anandtech.com/show/253/3.

You have to install the card using the setup program, not the Add/Remove Hardware, in order to obtain full 3D capabilities.  I had a non-working Diamond Monster 3D in the system, and it seems that it was blocking the Trident setup program from working.  Unfortunately, the pickiness of the drivers means that they really cannot be upgraded.

Windows 95 stripped of all its nonsense
The graphics adapter was able to run 3dmark99, so it should be able to run Direct 3D and OpenGL games from the mid-to-late 90s reasonably well.  Glide-only and Glide-preferred games have another system to run on.

Thursday, January 21, 2016

Tandy Color Computer Mice - A Viable Alternative for Tandy 1000s without a Serial Port?

When Tandy designed its 1000, it helped reduce R&D costs by taking certain portions of the design from other of its computers.  The 1000's keyboard is more-or-less identical to the Tandy 2000's keyboard.  The Tandy 1000's joystick interface and connector was previously used in the Tandy Color Computer.  While neither the Tandy 2000 nor the Color Computer are IBM PC-compatible computers, these interfaces were sufficiently similar to the PC keyboard and joystick interface to work with most PC software.




The first several Tandy 1000 models, the 1000, 1000A, 1000HD, 1000SX, 1000EX and 1000HX did not come with a built-in serial adapter.  PS/2 ports would come much later to the Tandys.  The 1000SX had five expansion slots, so adding a serial adapter is easy for that machine.  The 1000/A/HD can also accept a standard serial adapter, but they only have three slots and need at least one of them for memory expansion.  The final expansion board had room for a PLUS card to add as a daughterboard, and Tandy sold a serial adapter PLUS card.  This PLUS card the only way you were supposed to add a serial adapter to the Tandy 1000EX or 1000HX.  The EX and HX are the most difficult machines to upgrade because they use the odd PLUS form-factor and BERG-style connectors instead of edge connectors.

Tandy Deluxe Joystick (early model)
The Tandy TRS-80 Deluxe Joystick, Tandy Part No. 26-3012 was marketed for both the Tandy 1000 and Tandy Color Computer lines. It used a black and off-white color scheme with a red and a black button.  The black button does not work in the Color Computer 1 or 2.  It is self centering, but there are a pair of latches on the bottom that you can use to allow for free-form movement of each axis.  It has a pair of trimmer controls to assist in obtaining a proper center for the joystick.

Tandy Joystick (also come with black handles)
Tandy also marketed a pair of cheaper, one-button joysticks, Tandy Part No. 26-3008, that are non-self centering for the Color Computer, but you can still use them for the 1000 line.  Of course, considering how cheap they are, you would have to be truly desperate to put up with them.   These joysticks have a black base, silver or black handle and red button and were sold as a pair.  They do not have any type of trimmers, making them even worse for trying to center a joystick.  Nonetheless, they do technically work in a Tandy 1000.

Tandy Color Mouse - Very Apple Lisa like
Tandy also marketed a pair of mice for both computers.  The Tandy TRS-80 Color Mouse, Tandy Part No. 26-3025, had one button and used a black/red scheme, just like the cheap joystick pair.  The Deluxe Mouse, Tandy Part No. 26-3125 came later but had two buttons and used an off-white color.  Both use the joystick connector, and unlike the joysticks both mice were advertised for the 1000 line.  You could also get Touch Pad that plugged into the joystick port.

Tandy Deluxe Mouse - A bit more like Microsoft's Green-Eyed Mouse
Internally, the Tandy Mice does not use rotary optical encoders like every other ball mouse ever made. Instead the ball moves a pair of potentiometers, just like the Tandy and IBM PC joysticks!  There is no microcontroller inside to encode anything as there would be with a serial or PS/2 mouse.  The Tandy mice are read and function just like a joystick, the only difference being the way you manipulate the potentiometers.  They have no trimmers and are difficult to calibrate because it is not obvious where the mouse "ends".

 I'll spare you from the corny puns I could make about steel balls,
The Deluxe Mouse contains a steel ball and a pair of soft rollers which end in gears which turn the potentiometers.  You can move the ball to a point where the potentiometers will not go further.  Unlike Serial, PS/2 or bus mice, the joystick interface cannot generate an IRQ.  This means that the mouse cannot tell software that it has moved, instead the software must poll the joystick port at regular intervals.  Here are a few photographs of the Deluxe Mouse's internals :





Many DOS games support a mouse cursor, and a couple will work reasonably well on a 4.77MHz or 7.16MHz Tandy system.  The early LucasArts SCUMM games starting with Maniac Mansion and the MacVenture ports like Shadowgate have a cursor which can be controlled with a joystick or a mouse. Wasteland and Dragon Wars also support a cursor, but those games (ported from the Apple II) can be played best by mastering the keyboard commands.

There are a pair of joystick-to-mouse drivers in the wild.  One is JOY.SYS and is loaded in CONFIG.SYS.  This works well with the Tandy Mice.  The other is JMOUSE.COM and can be loaded with AUTOEXEC.BAT.  This works well with regular joysticks but not with the Tandy mice because it requires calibration. The Tandy Deluxe Joystick can work as an ersatz mouse using these programs, but expect some jitter in the cursor and imprecision.  You can download both from here : http://www.oldskool.org/guides/tvdog/utilities.html

Tandy also released the Digi-Mouse, a bus-style mouse that does not work in a serial or PS/2 port.  Its expansion card comes in standard pin connector and PLUS-style form factors.  Both adapters have a real time clock chip on them but are hard to find.  Obviously, both the mouse and clock chip require special drivers, which can also be found at Tvdog's site.  The driver has a Microsoft copyright as viewed in a hex editor.  The Digi-Mouse connector uses a 9-pin connector and can support three buttons and two pairs of quadrature signals, just like a Microsoft Inport mouse.  I would not be surprised if Microsoft's Inport mice could also work with the driver and expansion card, although the signals may require rewiring.  The card uses IRQ3.

Eventually Tandy would release its own serial mice and PS/2 mice.  The Tandy 1000 TX is the first Tandy 1000 to come with a built-in serial adapter, and the later 1000s always had one.  The TL/3, RL, RLX and RSX also support PS/2 mice, but you will have to manually set the IRQ in the mouse driver (except for the RSX) because these systems lack IRQs 8-15 and the PS/2 mouse IRQ is assigned to 2.  They assign the IRQ to 3.

Additionally, Personal Deskmate, which came with the Tandy 1000 EX, comes with the JOY.SYS driver. In fact, with Personal Deskmate, the cursor will be corrupted with any mouse driver except the JOY.SYS driver or the Digi-Mouse driver (see below).  Personal Deskmate 2 and later GUI versions are not picky about the mouse driver loaded.  Unfortunately, the JOY.SYS driver does not like the PCT 286 Express Accelerator Card and will refuse to allow the PCT software to run if the JOY.SYS driver is installed.

The Tandy Deluxe Mouse still shows a jittery cursor with the JOY.SYS driver and many programs.  Low resolution graphics and text modes will not show as much jitter as medium and high resolution graphics modes. Moveover, some games like the high resolution version of Maniac Mansion, do not like the driver and will show some erratic cursor movement.  If you are going to experience jitter, then you may as well use a joystick instead of a mouse.  Ultimately, if you have a joystick with the free-form switches, I cannot recommend using these mice on a Tandy 1000.

Thursday, January 7, 2016

Displaying DOSBox Screenshots on Real Hardware

DOSBox is an excellent program for taking screenshots of DOS games, it saves them losslessly in the Portable Network Graphics format.  But what if you want to view these screenshots on real hardware, especially low-end hardware?  Suppose there is a particular screen you really want to see on older hardware, can it be done?  The answer is surprisingly yes, for the most part, and it's pretty easy.

Once upon a time, there existed a picture viewer program for DOS called CompuShow.  The last numbered version released is 9.0.4, and can be downloaded here : http://www.cshowplace.com/cshow.htm  CompuShow can load most of the major image formats from the mid-1990s, including PNG, GIF, PCX, BMP and JPG and many others that are rarely encountered today.  It can also convert picture files to these formats and more.

CompuShow has the benefit of working on any PC compatible, from an IBM PC with an 8088 CPU to a Generic Windows 98SE machine.  The program can fit on a 360KB floppy with room for some images, so it is small.  Loading speed is decent even on the IBM PC.  For a program of the later 80s to mid 90s, it supports a wide variety of graphics adapters.

I have personally tested the program with an IBM PC with IBM CGA and Hercules Graphics Cards and the modes work as they should.  I have also tested the program with my Tandy 1000 SX and Tandy 1000 TL and it works well with them.  Finally I have tested the program with my 486 PC with a Cirrus Logic VLB card with 2MB of RAM and a GD-5429 chipset.  All modes work as expected except as noted below.

Graphics Modes CompuShow can display

CGA 160x100x16

Driver required to be loaded.  Will work on a real CGA card or a pre Tandy 1000 TLs and SLs, but not on the later 1000s.  CGA games that use this effective resolution include Styx, Round 42 and Moon Bugs.

CGA Mode 04/05 320x200x4

Limitations include no cyan/red/white palette, no tweaked capabilities (background/border color, mid-frame palette changes).  Use Tandy, EGA or better 320x200x16 modes to show the cyan/red/white palette and tweaks.  Border colors will never be shown.

CGA Mode 06 640x200x2

No support for changing foreground color with real CGA or entering color composite mode.  Use Tandy 1000 Mode 640x200x4, Tandy TL/SL or EGA Mode 640x200x16 for showing foreground colors other than white. Not many games use a pure CGA 640x200x2 mode, some can choose it as an option like Wizardry and SimCity.

Tandy 1000/PCjr. Mode 09 320x200x16

Should be used for Tandy 1000/PCjr. Mode 08 160x200x16 as well, use /J1 as a command line argument to gain access to this mode.  EGA Mode 320x200x16 can show these 160x200x16 and 320x200x16 screenshots.

Tandy 1000/PCjr. Mode 0A 640x200x4

Rarely used, use /J1 as a command line argument to gain access to this mode.  Great if you want to show off graphic screenshots in PCjr. ColorPaint or Tandy Personal Deskmate 1-2, but otherwise almost never used.

Hercules Graphics 720x348x2

Available on Hercules monochrome graphics adapters.  Better adapters do not tend to show this mode well.

Tandy 1000 TL/SL 640x200x16

Driver required to be loaded, can display EGA Mode 0E 640x200x16 graphics perfectly and CGA Mode 06 640x200x2 graphics with a colored foreground.  Very few games use this mode directly and it is never ideal.  Sargon III and Star Trek 25th Anniversary allow it to be selected.

EGA Mode 0D 320x200x16

Can be used for displaying  Tandy 1000/PCjr. Mode 08 & 09 graphics

EGA Mode 0E 640x200x16

Can display Tandy 1000 TL/SL 640x200x16 graphics perfectly and CGA Mode 06 640x200x2 graphics with a colored foreground.  Use this mode to display CGA Mode 06 640x200x2 properly with a VGA card.   Mainly used by ports of Japanese PC games and some LucasArts and Sierra games for those few people without VGA cards.

EGA Mode 0F 640x350x2

Will be available only on a EGA card attached to a monochrome TTL monitor.  Rarely used, but SimCity and Microsoft Flight Simulator 3.0 do support it.

EGA Mode 10 640x350x16

Will be available only on an EGA card attached to a 350-line color TTL monitor or by using a VGA card.  The original SimCity's best graphics mode and also used for the title and menu screens in the early Lemmings games.

MCGA/VGA Mode 11 640x480x2

Takes the place of CGA Mode 6 640x200.  Supported by SimCity and not much else.

VGA Mode 12 640x480x16

Not very popular due to the color limitations, Supported mainly by Syndicate.

MCGA/VGA Mode 13 320x200x256

VGA Mode-X 320x400x256, 360x480x256

320x400 had some popularity, System Shock supports it, but 320x240 was a more common non-standard resolution.  360x480 was pretty much the maximum resolution vanilla VGA could support, but was used by shareware and freeware games.

VESA Modes Supported by CL GD-5429 Driver :
Resolution / Color Depths
640x480 : 256, 32K, 64K, 16M
800x600 : 16, 256, 32K, 64K
1024x768 : 16, 256, 32K, 64K

If you have a 320x240x256 VGA Mode-X screenshot, you should be able to set perfect results using 640x480x256.

The program supports many SVGA chipsets as well as the usual VESA modes.  It identified my VLB card's chipset accurately and was able to display all the above resolutions and color depths in the setup test program.

General Tips and Observations

I found that CompuShow really preferred interlaced GIFs.  It would show minor drawing errors if it displayed PNGs, GIFs or PCX files using the Tandy graphics adapters.  With interlaced GIFs, pictures will display correctly every time.  Many, many programs can convert PNGs to GIFs.  I use InfranView to perform the conversion, and the program will allow you to convert to the interlaced GIF format.  While CompuShow will also convert PNGs to interlaced GIFs, InfranView can do so with the horsepower of a modern machine and can do multiple files in batches with ease.

DOSBox will save a 640x200 resolution or 160x100 CGA screenshot as 640x400 pixels.  Similarly, Tandy/PCjr. 160x200 resolution screenshots are saved as 320x200.  Unusual VGA screenshots tend to be saved in aspect ratios that will give the image a squarish aspect ratio.  You do not need resize the images, CompuShow will automagically disregard unnecessary duplicate lines and show the image as it was meant to be shown.

When using the CGA display modes, it is important to know what the original palette colors were.  The program gives you four palette options :

1 - Light Green/Light Red/Yellow
2 - Green/Red/Brown
3 - Light Cyan/Light Magenta/Intensified White
4 - Cyan/Magenta/White

On a real CGA adapter, if your screenshot uses the alternate palette colors, use the corresponding intense or non-intense cyan/magenta/white palette.  If you select the wrong palette choice, the screen may draw very slowly as the program tried to interpolate colors and often the pixels will not look correct even with the wrong colors.

If you are trying to display a screen capture of a text mode with colored text, EGA, VGA and Tandy TL/SLs have a graphics mode that is sufficiently colorful to handle the effective text resolution with 16 colors.  Tandy/PCjr. can handle 40-column text modes in full color, but not 80-column text modes.  CGA is too limited to handle either column width with full color.  Hercules may be able to offer a passable rendition of text mode in graphics mode.

Note that true VGA text modes have a 360x400 and 720x400 effective resolutions for for 40-column and 80-column text modes.  DOSBox will save screenshots of VGA text modes in 320x400 and 640x400 resolutions, respectively, unless using the vgaonly machine type.  These are the effective text resolutions of the MCGA adapter, which is a VGA offshoot.

Even though Hercules has a 720x348 graphics mode, it will not show monochrome text very well, even though the monochrome text Mode 07 has an effective resolution of 720x350.  Also, monochrome text can use intense and non-intense characters, but monochome Hercules graphics can only show non-intense pixels.

Ironically, while CompuShow works very well with all sorts of hardware (I did not test it with the PCjr. yet), it does not work in DOSBox.  It will complain that it cannot find its README.EXE, SETUP.EXE and CSHOW.DRV files, even though they are present in the same directory as CSHOW.EXE.  Even booting real MS-DOS 6.22 will not prevent the error, which prevents the program from starting.

Although the monochrome selections, A-G, are supposed to allow for light to dark shades of the color, it seems to have no effect in every system I tried.  Maybe it is for a special type of CGA display.

With my IBM PC and IBM EGA graphics adapter (upgraded to 256KB), the wrong colors would appear when using the 16-color EGA modes.  The program did not detect an EGA card, and I believe this is because I was using a 200-line monitor with the card.  So it can look like a CGA card.  I had to force the program to use the EGA modes using the /Ae command line argument, but I got color errors.  I got the same color errors when I forced the program to EGA on a VGA card.  When I used the EGA modes without the forcing command line argument, the pictures displayed correctly.  Therefore, I suggest that EGA will display these graphics properly on a 350-line EGA monitor and with the card configured for full EGA capabilities.  I do not have a 350-line color monitor to test with unfortunately.  When connected to my MDA display, the 640x350x2 graphics mode was available and displayed the screenshot correctly.

Thursday, December 25, 2014

Atari Joysticks on the PC : Four Historical Interfaces

The standard PC joystick was an analog design that uses potentiometers to vary the rate of a capacitor's charge.  Most console systems of the time used joysticks with pure digital switches.  Before console emulators became popular with PCs, there were some historical hardware that could implement a digital, Atari-style joystick.  This post will describe the methods used to implement them.

1.  Amstrad PC-1512 & 1640

The Amstrad PC-1512 and PC-1640 supported a digital joystick, with a port built into the keyboard.  The joystick directionals and fire buttons function just like keyboard keys, and send the following untranslated scancodes :

77 Fire 2
78 Fire 1
79 Right
7A Left
7B Down
7C Up

A program can read the raw scancode, but most typically use Int 16H to read a translated scancode.  The Amstrad translates the joystick directions into the XT compatible numberpad cursor scancodes.  Thus the joystick functions identically to the 2, 4, 6 & 8 keys on the numberpad, assuming the program is not trying to distinguish between the number pad cursor keys and the dedicated cursor keys with their raw scancodes.  The buttons are not defined by the BIOS and are ignored until an assignment is given to them by writing to the systems' non-volatile RAM.  As its name implies, this RAM will retain its contents even after the system is powered down.  This provides for maximum configurability, because games commonly use the Spacebar, Enter/Return or even F1 as a fire key.

Amstrad connects pins 1-4 and 6-8.  Pin 7 is normally unconnected on an Atari joystick, but Amstrad uses it as a second button.  Amstrad CPC JY2 and JY3 joysticks function properly with this pin arrangement.

2.  Covox Sound Master

The original Covox Sound Master has two DE-9 ports.  Having viewed closeups of the PCBs of the board, I can give a fair analysis of how the joysticks work.  The joystick lines for each joystick are connected to pullup resistors and then a 74HC365 line buffer, non-inverting.  From the solder side of the board, there are lines connecting pins 1-5 and 8 & 9 to these buffers.  Pin 9 is used on a Sega Master System controller as button 2, but it is unconnected on an Atari one-button controller.  However, pin 6, which is the only button on an Atari controller, is unconnected on the Covox's PCB.  Pin 5, which is unconnected on an Atari controller, is connected.  This leads me to believe that Covox either sold its own joysticks or, more likely, connected pins 5 & 6 on the component side of the board.  We cannot see underneath the plastic.

From the line buffers, the joystick inputs appear to be connected to the I/O pins of the AY8930.  The AY8930 contains a pair of 8-bit I/O ports that can be set to input or output.  The original SimCity has explicit support for Covox Sound Master Joysticks.  It sets the I/O ports to input and reads the values of the pins.  More information will have to wait until the project to clone the board has been completed.

3.  The FTL Sound Adapter

This device was a parallel port dongle that output sound in the manner of a Covox Speech Thing and had a DE-9 port on the end of it.  It was included in some releases of Dungeon Master for the IBM PC.  PCB and schematic for the device can be found here :

http://dmweb.free.fr/?q=node/1514

As you can see, each joystick input is connected to one of the five status port lines.  Four of those five inputs are also connected to a separate control port line.  Here are the connections :

1 Up     15  1 (Strobe - Error)
2 Down   13 14 (Select - Line Feed)
3 Left   12 17 (Paper Out - Select Printer)
4 Right  10    (Acknowledge)
5 NC
6 Fire   11 16 (Busy - Reset)
7 NC
8 Ground 18
9 NC

When a directional or button is pressed, a bit in the status port will flip to indicate that the direction has been pressed.  As you can see, you cannot use more than a one button joystick by this method.

The control port lines, which are not intended to function as input lines, are connected to allow Dungeon Master to detect the presence of the FTL Sound Adapter.  First, the game writes 0C to the control port and checks to see if bit 5 is a 0 on the status port.  Then it writes 04 to the control port and checks to see if bit 5 is a 1 on the status port.  If either check fails, the game will not allow the user to select the FTL Sound Adapter.  Now recall how the DB-25 parallel port connector is wired :

           Bit 7 6 5 4 3 2 1 0
Data Port    Pin 9 8 7 6 5 4 3 2
Status Port Pin 11 10 12 13 15 NC NC NC
Control Port Pin NC NC NC NC 17 16 14 1

underlined = inverted input or output from value written

0C = 0000 0011
04 = 0000 0100

Now, bit 5 of the status port is connected to bit 1 of the control port, which inverts.  If a 1 is written to bit 1 of the control port, then a 0 will appear at bit 5 of the status port.  Conversely, if a 0 is written to bit 1 of the control port, then a 1 will appear at bit 5 of the status port.

Dungeon Master will attempt this check for every parallel port address reported by the BIOS.  Once it has passed, then it will allow the user to select the FTL Sound Adapter and should allow the user to use the joystick plugged into the Sound Adapter.  The adapter cannot actually verify if a joystick is connected, however, unless it asks the user to move the joystick around and press the button.

The PC version of Dungeon Master that came with the FTL Sound Adapter shows an Atari joystick plugged into the back of the Adapter.  It says that the joystick port is the next best thing and the user can plug in any switch style joystick for easy game play.  (The computer in the photo looks like a Tandy 1000 TL, SL or SL/2).  However, the quick start guide only talks about analog joysticks and identifies the DE-9 port on the Sound Adapter as "Future expansion port".  The sound functionality is adequately described in the quick start guide, but because the joystick isn't specifically mentioned, I wonder whether the game actually supports a digital joystick.

If it does, then it would read the joystick in parallel, with a 0 value on each bit of the status port, except for bit 7, which would be a 1, indicating that a directional or button was pressed.

4.  The Dyna Blaster Adapter

The Dyna Blaster Adapter, on the other hand, is a truly working Atari parallel port joystick adapter.  Dyna Blaster, a.k.a. Bomberman in the U.S. and Japan, was released for DOS only in Europe.  Apparently it was a somewhat obscure release; it is not easy to find.

This adapter has two DE-9 ports and supports two Atari joysticks.  Uniquely for a PC game, the dongle functions as the copy protection.  The system requirements label on the box states that an Atari joystick is required, and without the joystick and the dongle you cannot make any selections on the main menu screen. Fortunately the dongle's function has been more or less reverse engineered.  (There is also a crack available for the game to use the keyboard at the menu).

When the game starts up, it calls a subroutine that writes FF to the data port and then checks to see if bit 6 of the status port is 0.  Then it writes 7F to the data port and then checks to see if bit 6 of the status port is 1.  This sequence then loops 20 times for each parallel port the BIOS reports.  In terms of bits, the patterns are

FF = 1111 1111
7F = 0111 1111

Therefore, data port bit 7 is connected to status port bit 6 because that is the only bit that is changing.

The second subroutine is called at the menu and when playing the game.  It writes the following values to the data port twice :

3E = 0011 1110
3D = 0011 1101
3B = 0011 1011
37 = 0011 0111
2F = 0010 1111

The first time this data is written, bit 5 of the status port is checked after each write, and if 0, then a directional bit is set in the program's memory.  The second time this data is written, bit 7 of the status port is checked after each write, and if 1, then a directional bit is set in the program's memory.  Obviously, this corresponds to the first and second joysticks.

The bit pattern for the five values above gives us the key as to how each joystick is wired.  The joystick is being read in a serial fashion.  Instead of the status lines being connected to each switch, instead the common line of each joystick is connected to a single status bit.  The low five bits of the data port are connected to the five switch lines of both joysticks.  The data lines send logical 1s to everything but the joystick switch being queried.  If the first joystick switch is pressed, a logical 0 will appear on status bit 5.  If a second joystick switch is pressed, a logical 1 will appear on status bit 7 (which is inverted at the parallel port adapter)..

One last necessary observation is that data bit 6 is always a logical 1.  I believe that this is to allow a pull-up resistor on status bit lines 5 & 7.  According to this page, 4.7K resistors should be sufficient as a pull up resistor : http://arcadecontrols.com/arcade_tormod.html  Otherwise, the program would have no way to determine whether a joystick switch has stopped being pressed.  As a consequence of the pull-up resistor, when the joystick switch is no longer pressed, then the line will settle back to a logical one 1.  Thus the FTL problem is solved.

While Bomberman does not use diagonals, what happens if a user pushes the stick in a way that closes two switches or pushes the button as he holds the joystick down?  As the adapter can only test one joystick switch at a time, there will be a 0 and 1 (or two 1s if the diagnonal is pressed) coming down the status line.  Fortunately, it is almost impossible to press two directionals and or the fire button exactly at the same time. The game, however, only cares about 0s on the first joystick port.  Each time it reads the port, it is only reading for one direction.  Presumably it will read the stick several times to make sure it finds the 0, if there is one.