jrIDE - An IDE Adapter for the PCjr


jrIDE board

(Image source: Alan Hightower)


Overview

jrIDE is a new (2011/2012) kit designed for the PCjr that includes the following features on a sidecar board:

jrIDE with 20GB Maxtor IDE hard drive The sidecar board is designed to replace an existing sidecar board. An obvious choice would be to replace the board in a memory upgrade sidecar with this board; you still get your memory upgrade and you get the other new features too without changing the footprint of the machine.

The board features a standard IDE header. From the IDE header you can run a cable to a standard 3.5 inch IDE hard drive, use a wiring adapter to connect a 2.5 inch IDE hard drive, or use a FLASH based product such as a CF card with an adapter or a Disk On Module (DOM). Power for small devices (CF cards or DOM) is available on the card. Power for larger devices (real IDE drives) should be provided by an external power source or a modification to the PCjr. (Modern hard drives don't require a lot of power but remember that PCjrs don't have large power supplies either!)

To the right is a picture of my "test bench" setup featuring the jrIDE connected to a 20GB Maxtor IDE hard drive. The small enclosure with the green light is just providing power for the hard drive and cooling fan. (A cooling fan is a good idea for any hard drive.)

The completed project would have the jrIDE completely enclosed in a sidecar shell. Use of the original specification AMP connectors allows other sidecars to be attached to it. (In this picture the jrIDE is connected to a parallel printer sidecar. The other enclosures to the right are my old SCSI devices.)

Hardware

The jrIDE is implemented using two CPLDs, two SRAMs, a FLASH memory, a clock/calendar chip and some support components.

A CPLD (Complex Programmable Logic Device) can be thought of as programmable hardware that replaces the older style TTL chips that one would normally find on machines as old as the PCjr. The larger CPLD implements the IDE interface and memory decoding logic while the smaller CPLD implements the POST display and decoding logic for the real time clock. Using CPLDs keeps the total part count low and allows for "fixing things in the field" if a bug is found. (They can be reprogrammed with utilities provided by Atmel.)

The SRAMs provide the extra memory for the PCjr. A key advantage to SRAMs is that they do not need refreshing so the CPU will never be held off waiting for a refresh cycle. This improves performance. There are two SRAMs at 512KB each. 608KB of the SRAM is used to fill the PCjr memory out to 736KB. The remaining SRAM is available in the upper memory area between the various ROM extensions and system ROMs; the ability to use those upper areas has not been enabled yet. (There is something on the motherboard intefering with accesses to the cartridge areas that we need to understand yet.)

The FLASH holds the BIOS extensions that make it possible for the PCjr to boot from a hard drive. It normally functions as a ROM but it has the benefit of being upgradable right from the PCjr. The FLASH is a 512KB part, which is much larger than it needs to be for the BIOS extension. The part not used for the BIOS extension can be used through a small memory window, making it possible to store programs or data that are preserved even when the power is turned off. (This feature has not been exploited yet - it is on the todo list.)

The clock/calendar chip is nearly fully identical to the implementation use in the PC AT. The only difference is that the PC AT clock/calendary chip can cause an interrupt on IRQ 8, which is not available on the PCjr. If you want to use that feature you need to use one of the IRQs on the sidecar bus (1, 2 or 7). Most software did not use this feature so not having IRQ 8 available is not a problem.

The design only seeks to be compatible at the BIOS level - it is not IDE interface register compatible. This is similar to the way a SCSI BIOS adds hard drive support to a PC. This allows us to hide the details of the IDE interface behind the BIOS and allows us to make it far faster than if we had tried to maintain IDE interface register compatibility. It is not like you are going to be running SpinRite on a PCjr anyway ... Read speeds in excess of 300KB/sec have been observed.

The credit for the design of this masterpiece belongs to Alan Hightower. Alan's repository for the hardware design, software headers defining the programming interface to the hardware, and pre-built utilities can be found at his SVN repository: http://www.retrotronics.org/svn/jride/trunk/

The Atmel WinCUPL software for working with the Atmel CPLD devices can be found at http://www.atmel.com/tools/WINCUPL.aspx

The Atmel "In-System Programmer" utility for the CPLD devices can be found at http://www.atmel.com/tools/ATF15XX-DK3CPLDDEVELOPMENT_PROGRAMMERKIT.aspx . This is used for doing "field upgrades" to the CPLD devices, which generally should not be needed anymore. (We've worked the bugs out!)

BIOS

The BIOS for the jrIDE is adapted from an early version of the XT-IDE, which is a project that adds an IDE interface to old 8 bit bus ISA systems. The original XT-IDE board can be run on a PCjr with an ISA bus adapter and some minor changes to the BIOS extension. While the jrIDE BIOS is derived from the XT-IDE, there are some significant differences:

The jrIDE BIOS is functional enough to auto-detect and boot modern IDE drives that use LBA (logical block addressing).

The BIOS works by converting the CHS addressing used by the INT 13h interface to an LBA that the hard drive recognizes. The original BIOS INT 13h interface allows for 1024 cylinders, 256 heads, and 63 sectors per track. This means that the largest amount of storage that a machine using the original INT 13h interface can access is 7.88GB (1024*256*64*512).

IDE devices using CHS addressing work in a similar way, but their maximum values for cylinders, heads and sectors is different. If you take the intersection of the two sets of CHS limits, a PC using INT 13h can only access 504MB. (This is the infamous limit that older machines were subject to.) The PCjr using the jrIDE is not subject to this limit; if your version of DOS supports it you can access up to 7.88GB of storage on a single IDE drive.

I have not tested it with multiple drives or a variety of devices yet. Some Disk On Modules have been tested. I will compile a list of tested devices and post it here ...

Besides handling the hard drive the BIOS also sets the amount of detected memory to 736KB. The system BIOS will only scan and detect up to 640KB but we know that this card provides more. You will need to use a memory manager like JrConfig to move the video buffer around so that DOS can make use of memory above 128KB. With JrConfig and jrIDE you can boot DOS, have a 32KB video buffer, and still see over 640KB of RAM available for DOS programs!

The current BIOS can be downloaded from here: http://www.brutman.com/jride/jride_bios_2012-08-29.zip . The utility to FLASH the BIOS is included in the zip; crude instructions can be found here: http://www.brutman.com/forums/viewtopic.php?f=1&t=234

Todo list:

Connecting Devices

jrIDE with remote drive LEDAs mentioned above the board has a standard IDE header on it. You can connect a variety of devices to the header:

The jrIDE board has an LED to indicate activity on the drive. In addition to that LED there is a connection available for another LED which you can route to someplace that will be visible when the board is assembled and encased in a sidecar shell. (You will probably have to drill a hole in the sidecar shell for the LED.) The power supply is 5v with a 220 Ohm resistor which provides a resonable voltage for most common LEDs that you probably have laying around.

You should be able to use any hard drive that is 8GB in size or larger; these hard drives are required to support LBA style addressing which the BIOS uses. Hard drives that are ATA-3 or later are required to support LBA style addressing. In ATA-2 hard drives LBA style addressing is optional; your hard drive may not have it. (It was optional for hard drives greater than 528MB but less than 8GB.) If your selected hard drive does not support LBA style addressing the BIOS will display an error message. In the future the BIOS can be enhanced to support hard drives that only use CHS addressing, but that function is not available now.

Here is a short list of devices known to work (or not work!):

Manufacturer Model Size

Read KB/sec Write KB/sec







IBM DB0A-2540 540MB Works!


Maxtor 90640D4 6.4GB Works!
336 168
Maxtor 92048D8 20GB Works!
343 170
Maxtor 5T030H3 30GB Works!
358 196
       


HyperDisk DOM   512MB Works!


Kingspec DOM   8GB Works!


       


Western Digital 64AA 6.4GB Does not support LBA addressing



Read and write tests are for a 4MB file and are the best times reported out of 3 runs.
The test machine was running DOS 3.3 and has a NEC V20.

Have a device that should be in this table? (Either good or bad?) Let me know ...

Ordering/Availability

As of this date jrIDE kits are still available. The pricing on the parts is la carte:

So for $100 or less you can have a jrIDE which I think is a steal for a custom designed card that provides all of these functions. Alan has made all of the project files available openly; the kits are provided as a convenience. Contact Alan through the web forum ( http://www.brutman.com/forums/ ) for current availability and pricing.

Credits/History

The long detailed story about how this project came about can be found here: ( http://www.brutman.com/forums/viewtopic.php?f=1&t=180 ) .

Alan gets the credit for delivering the final finished product. Quite a few people were involved coming up with the ideas and debugging it.


Created September 15th, 2012,
(C)opyright Michael B. Brutman, mbbrutman at gmail.com