Home‎ > ‎Sergey's Projects‎ > ‎

    Sergey's XT

    What is Sergey's XT?

    Sergey's XT is an IBM PC/XT compatible processor board with some IBM AT and IBM PS/2 features. The board has the ISA card form factor, and designed to be plugged in to an ISA back plane. This allows greater flexibility of the final system size. The board is easy to assemble (if you've got basic soldering skills) as it uses only thru-hole components. Most of the components used in this board are readily available from various electronic components distributors, some components can be borrowed from old motherboards.
    The goal is to have an open source implementation, including schematics, PCB, BIOS and related software.

    Specifications of the Sergey's XT version 1.0

    • CPU: Intel 8088 or compatible. Works with the original NMOS Intel 8088 and clones, CMOS Intel or Harris / Intersil 80C88, NEC V20 and V20HL. The standard CPU frequency is 4.77 MHz, with up to 13.3 MHz in turbo mode with V20HL CPU.
    • Math Coprocessor: Intel 8087.
    • Memory:
      • RAM is implemented using two 512 KiB SRAM ICs. It covers 00000h-9FFFFh region (standard 640 KiB lower memory), and optionally could be mapped to 0C0000h-0EFFFFh (UMB memory, switch configurable 6 x 32 KiB blocks)
      • ROM - 128 KiB Flash memory is used for BIOS.
    • On-board peripherals:
      • Two 8259 Programmable Interrupt Controllers (PICs).
      • 8237 Direct Memory Access Controller (DMAC)
      • 8254 Programmable Interval Timer (PIT)
      • 8042 keyboard controller (AT-compatible)
      • DS12887A RTC
    • Bus:
      • 8-bit ISA
      • Some 16-bit ISA signal are implemented: IRQ10 - IRQ15 lines, and non-latched address lines LA17-LA19. Later are to enable compatibility with Cirrus Logic CL-GD54xx VGA cards.
    • I/O ports:
      • PS/2 keyboard
      • PS/2 mouse
      • Connectors for speaker, Reset and Turbo buttons and LEDs

    What is required to build a functioning computer?

    • An assembled Sergey's XT board, with pre-programmed BIOS flash IC.
    • An ISA back plane (for example see http://www.acqu.com/usa/intr-bpb.htm). It seems that the bare minimum is 3 slots - for the processor board, video controller, and disk controller. But I recommend getting 6 or 7 slot back plane, so you have more slots for extension cards.
    • A power supply. The processor board uses only +5V, but VGA adapters and serial I/O controllers also require +12V and -12V. Some older sound cards (e.g. Sound Blaster 2.0) also require -5V. An AT or ATX power supply should work. Note that newer ATX power supplies don't provide -5V. If using an ATX power supply short the green wire to the ground (black wires) to turn it on (connect a power switch there).
    • Following adapter / controller cards. Note that all adapters must support 8 bit operation:
      • A video adapter and matching display. It could be a CGA, MDA or a newer EGA or VGA cards (recommended). Any 8-bit VGA adapters should work. At least following
        16-bit VGA cards work too: Trident TVGA8900 and TVGA9000 work without any problems when configured for 8-bit bus. Cirrus Logic CL-GD5420
        works with J3-J14 jumpers connected (this enables LA23-LA17 signals) and with V20 CPU only - apparently its BIOS uses some 80186+ instructions.
      • A hard disk controller with a hard disk or a flash card. I am using the XT-IDE controller and a PCMCIA flash card. When using XT-IDE it is possible to save a couple of components: put XT-IDE BIOS into system's flash memory, and remove the EPROM and the 74LS688 used for EPROM chip select on XT-IDE board.
      • Optionally - a floppy disk controller. I found that a 16-bit multi I/O board works in with my 8-bit system (everything expect IDE), so I am using it as a floppy controller.
      • Optionally - a sound card. For sound cards I had a success with using ESS ES1868 based cards and some Sound Blaster Vibra 16 cards. The only caveat there is that these cards are PnP, and apparently PnP enabler utility uses some 80186+ instructions (e.g. PUSHA/POPA), so they work only on V20 CPUs. In general any 8-bit Sound Blaster / Sound Blaster Pro card should work. Many third party (not Creative Labs) 16-bit cards should work too, as they are Sound Blaster Pro compatible, and thus support 8-bit operation.
      • Optionally - a POST card (a card that reads and displays values written to port 80h). It will be useful especially if you would like to do some BIOS development work, or hardware mods. These is a schematics of simple post card in attachments. It is possible to build even simpler post card by connecting LEDs directly to '373 outputs instead of using BCD to 7-segment decoders and 7-segment indicators. Note that TTL ICs can't source enough current to drive LEDs, so either connect LEDs to Vcc (in this case LEDs will display inverted codes), or use a CMOS version of '373 or '573 (HC, HCT, AHCT, etc).

    Notes for builders

    • I sell PCBs for $30 (that is the manufacturing cost, no profit for me). I also have some components (keyboard controller, CPU, DMA) for this board. Contact me if you would like to get PCB and components (see e-mail address at the bottom of this page).
    • You will need some basic equipment:
      • A soldering iron (a soldering station with temperature control if possible)
      • Hand tools: a pair of flush cutters, a pair of needle-nose pliers
      • An EPROM / Flash programmer for programming the BIOS
      • A multimeter for troubleshooting.
      • A drill and some round files for making holes in ISA bracket.
    • Soldering supplies: Solder (I prefer traditional Sn60Pb40 rosin core solder, adventurous people might try Pb-free solder). Solder wick and solder sucker are nice to have too.
    • Even though PCBs are supposed to be factory tested, inspect your PCB for potential problems - solder / trace bridges and such. Fix any defects.
    • Learn the Bill of Materials, and read notes, especially if you want to substitute components.
    • Important notes:
      • For 8284 clock generator install R7 and R8 510 ohm resistors. For CMOS 82C84 clock generator install C44 and C45 0.1 uF capacitors instead.
      • AMD 8288 bus controller is not recommended. It's timing specifications are different from these of other manufacturers, and it results in unstable operation (I am researching this issue). Recommended devices are NEC uPB8288D and Intersil 82C88, both work stably even at 12MHz.
    • You can save some money by soldering ICs directly to the board, but at least memory, processor, coprocessor, and RTC (if using DS12887 module) should be installed in sockets.
    • Solder components from lower profile components to higher profile order. Pay special attention to polarity of diode and electrolytic capacitors, and to the sockets orientation.
      • Start with soldering low profile components - diode and resistors.
      • Solder resistor arrays, trimmer capacitor, and 14.31818 MHz crystal (if using low profile crystal)
      • Solder IC sockets. I found it convenient to solder two opposite pins first, verify that socket sits nicely, and then solder the rest of pins.
      • Solder capacitors.
      • Solder DIP switch, reset switch, and battery holder.
      • Solder headers (jumpers and connectors)
      • Solder Mini DIN connectors
    • As a simple test - after soldering all components but before inserting ICs measure resistance between Vcc (+5V) and ground rails. It should be a few kilo-ohm (but not a few ohm - in this case it's possible that there is a short circuit somewhere).
    • For a first "smoke" test it is recommended to connect only the CPU board and the POST card, if available. Once the power is applied, the power LED will lit, and if system is functioning properly the speaker will beep, and POST card will display some numbers.

    Errata for PCB 1.0

    Sergey's XT PCB Version 1.0 has three following bugs. These bugs are not critical and are not easily reproduced (so it took some time to discover them), and system will be mostly functional even
    without fixing them...
    1. The ENA_IOCHK signal is incorrectly connected to the bit 2 of port B (61h). This bit is normally used for software based Turbo control. Due to this bug rarely at boot time system will display "IOCHK NMI detected. Type 'i' to ignore IOCHK NMIs, or 'r' to reboot." message. After pressing 'i' the message will be repeated again.
      • Workarounds:
        • Usually cycling power helps
        • Enable/disable turbo mode (Ctrl-Alt-<+> followed by Ctrl-Alt-<->), and press 'i'.
      • Hardware fix:
        • Cut trace between pin 14 of U25 and pin 9 of U41. Solder a wire between pin 11 of U25 and pin 9 of U41. This will connect ENA_IOCHK signal to bit 3 of port B (that was the original idea).
    2. Memory corruption during DMA transfers. This bug happens more often with certain types of DMA controllers (e.g. Intersil 82C37), and almost doesn't happen with n-MOS 8237 variants. The root cause seems to be that DMA enables it's address lines too early, before address transceiver (U19) switches to 'from X-BUS to ISA' direction.
      • Hardware fix:
        • Cut trace connecting pin 1 of U19 to ~DMAAEN signal (cut it near the pin from both sides). Solder a wire between pin 1 of U19 and pin 3 U24 (~AEN signal). Solder another wire between pin 1 of U21 and pin 11 of U14 (this restores ~DMAAEN connection to U17 and U14). After the fix the transceiver will change its direction one cycle earlier.
    3. System will hang when using DMA in Turbo mode. This bug is related to timing of signals generated by bus arbitration logic, CPU, 8288 bus controller. It takes to 8288 from 115 to 200ns to enable command lines (that get disabled during DMA operations), but BAL provides only one clock period for this (before enabling CPU using RDY1 input of 8284). One period is 210ns in normal mode, but it's only 125ns in 8MHz turbo mode, so apparently CPU bus cycle that follows the DMA operation doesn't get executed correctly.
      • Workaround:
        • Turn off turbo mode when using DMA.
      • Hardware fix:
        • This fix modifies board to switch system clock to 4.77MHz during DMA cycles.
        • Solder a wire between HRQDMA signal (pin 13 of U30 or pin 1 of U34) and pin 4 of U32
        • Solder a wire between pin 7 of U24 and pin 5 of U32
        • Solder a wire between pin 6 of U32 and pin 11 of U38
        • Two options:
          1. Solder a wire between pin 10 and pin 9 (F/C signal) of U38. Remove jumper from J2 (turbo) if you have one installed. In this case system will always operate in turbo mode (switching to the lower frequency during DMA cycles)
          2. Cut the trace going to pin 1 of J2, solder a wire between pin 10 of U38 and pin 1 of J2. In this case  system will operate in turbo mode when pins 1 and 2 of J2 are connected (e.g. by a jumper or a turbo switch)
        • Unfortunately after implementing this fix software turbo switch (<Ctrl>-<Alt>-<+> / <->) won't work.

    Note: DMA is used for floppy data transfers and for playing sound samples on Sound Blaster or compatible cards. FM / Ad Lib doesn't use DMA. Older XT HDD controllers also use DMA, but it is unlikely that you will have one or use it with your XT system. XT-IDE doesn't use DMA.

    Detailed Design Description

    The Sergey's XT system is a hybrid of IBM PC/XT, IBM AT and IBM PS/2. The closest IBM system is probably PS/2 model 30.

    Some differences of my design from original IBM PC and IBM PC/XT:
    • 8042 keyboard controller instead of a shift register and a 8255 used in the original IBM computer. This simplifies design, and also allows using AT or PS/2 keyboards and PS/2 mice. (I don't have XT keyboard, and they are not that easy to get. But PS/2 keyboards are still available, and many USB keyboards will work with PS/2 with a simple adapter that is frequently supplied together with the keyboard).
    • SRAM instead of DRAM. The SRAM implementation is much simpler, it doesn't require memory refresh circuit. It also uses less ICs - only two instead of 18. And finally current SRAMs are much faster than DRAMs. The ICs that I am using have only 55ns access time.
    • One flash memory ICs instead of several UV-erasable EPROMs. Flash memory is much easier to work with (no need for UV-eraser, no need to wait 30 minutes for chip to be erased, much higher number of write/erase cycles - thousands instead of tens with EPROM). Also I hope that one day it will be a simple BIOS flash utility for BIOS upgrades.
    • SRAM and flash EEROM are directly connected to ISA bus. They were connected thru transceivers in IBM systems. There are only 3 CMOS memory chips so bus load is not an issue, and so it saves some components.
    • 1.193182 MHz clock for feeding the 8254 PIT is produced by a 74LS92 divide-by-12 counter, instead of using PCLK output of 8284. This makes PIT input frequency independent from CPU speed which is an important consideration for turbo mode.
    • Turbo mode is implemented using F/C input and an oscillator connected to EFI input of 8284 clock generator. Turbo mode could be toggled either using a switch or by software using 2nd bit of 61h port.
    Similarities to IBM AT and IBM PS/2:
    • AT-compatible RTC / CMOS setup memory chip - DS12885A.
    • 8042-compatible keyboard and mouse controller.
    • Two interrupt controllers in cascade configuration, like in IBM AT. This gives 15 hardware interrupts in total, 5 of them are routed to the system board itself: IRQ0 - timer, IRQ1 - keyboard, IRQ8 - RTC, IRQ12 - PS/2 mouse, IRQ13 - 8087 co-processor. Rest are available on ISA bus.
    • 8087 co-processor uses IRQ13 for exceptions reporting (instead of NMI on IBM PC/XT). The IRQ13 interrupt service emulates NMI by calling INT 2 for software compatibility.
    • BIOS implements advanced functions available on IBM AT and PS/2. This is still work in progress.
    The system most of IBM PC software I've tested and I blame incomplete BIOS implementation for issues with the rest of software.

    Future Steps and Ideas

    Since the PCB is ready and so far works as expected, most of improvements are related to the software implementation. Current BIOS was mostly built so I can load OS and some software, and test various hardware parts. It is far from being a complete AT-compatible BIOS.

    Software Enhancements

    Here are some software improvements I am planning to do (without any particular order):
    • BIOS:
      • POST:
        • Beep codes for error conditions. For example if system fails to initialize video adapter.
        • Reset turbo bit, so system always boots with normal speed setting.
        • More tests (RTC, memory, DMA, floppy seek, what else?)
        • Initialize display before keyboard, so we can report keyboard controller errors?
          • Alternatively (better?) store error bits somewhere, don't halt initialization on keyboard errors, display errors once display is active.
      • XT-IDE:
        • Put XT-IDE BIOS the system Flash memory (@ 0F0000h), change ROM scan to scan that area.
        • Check possibility of using the same EBDA for XT-IDE BIOS and system BIOS PS/2 mouse functions.
      • Finalize mouse support:
        • Test with advanced mice and drivers (Logitech, Microsoft Intellimouse).
      • Int 15h functions:
        • Implement Int 15h AH=0C1h
        • Implement Int 15h Joystick support
        • What is Int 15h AH=4Fh?
      • Rewrite keyboard support (WIP):
        • Enable extended keyboard support:
          • Test for extended keyboard (read keyboard ID), set keyboard flags #3
          • Handle right/left Alt and Ctrl keys. Set appropriate bits in keyboard flags #2 and #3
          • Handle SysRq key. Set appropriate bit in keyboard flags #2
          • Some function reports that extended keyboard is installed, which function
      • Int 1Ah time support:
        • Clean up, separate timer code from RTC code
        • Check what Int 70h ISR should do.
        • Verify that RTC alarm works
      • CMOS/NVRAM Setup:
        • Complete NVRAM setup utility
      • Implement basic ISA PnP extension (so BIOS can initialize PnP devices)
    • Support software:
      • Implement driver for UMB
      • Implement BIOS flashing utility

     Ideas for the future PCB revisions

    • Remove AT / PS/2 jumpers - support only PS/2 - compatible keyboard controllers. They are easier to find anyway.
    • Fix errata
    • Use CPLD for glue logic

    Useful information

    Legal Notices

    • The information on these pages is provided "as is" without warranty of any kind. Use it at your own risk. I am not a certified Electrical Engineer, and DIY electronics is only my hobby.
    • All source code is provided under GPL v3 license unless stated otherwise.
    • All documentation, including schematics, is provided under GFDL license.

    Contact Me

    Comments or additions are highly appreciated. But unfortunately I don't have much spare time, and probably won't be able to help with debugging your stuff.

    Sergey Kiselev,
    May 6, 2011, 9:49 AM
    Sergey Kiselev,
    May 6, 2011, 9:49 AM
    Sergey Kiselev,
    Mar 7, 2011, 4:29 PM
    Sergey Kiselev,
    Mar 7, 2011, 4:29 PM
    Sergey Kiselev,
    May 26, 2011, 12:21 AM
    Sergey Kiselev,
    May 26, 2011, 12:21 AM
    Sergey Kiselev,
    Mar 28, 2011, 10:32 AM