Super-OS/9

  • In 1985, Avygdor Moise and other members of the Toronto PET Users Group (TPUG) ported Microware’s OS-9 Level I operating system to the Commodore SuperPET.

    As part of this port, they created a small Memory Management Unit (MMU) daughterboard. The daughterboard allows a 6809-mode program to select between the normal memory map and one of 64K contiguous RAM ($0000-FFFF) to provide more useful working memory to OS-9.

    In 2009, I received the Super-OS/9 boot disk and photographs of the original MMU printed circuit board from TPUG members Golan Klinger and Steve Gray. I then reverse engineered the board from the photos and built my own working replica using point-to-point soldering.

    If you would like to build your own, Jim Brain now sells a PCB and parts kit. You can also try Super-OS/9 using the VICE emualtor (see below).

    Operation

    A stock SuperPET has a total of 96K RAM. It contains 32K from $0000-7FFF, as a CBM 8032 does, and an additional 64K of expansion RAM. The expansion RAM is divided into 16 banks of 4K each. Writing to the bank select register at $EFFC selects bank 0-15. The currently selected 4K bank is mapped into $9000-9FFF. For more information on the stock SuperPET, see AndrĂ© Fachat’s pages.

    The Super-OS/9 MMU is a daughterboard that plugs into the 6809 socket on the SuperPET. It only works in 6809 mode. It expands the SuperPET expansion RAM bank select latch at $EFFC (on the combo board, 74LS273 U36).

    Bit 4 – Unused on Stock and MMU
    Bit 5 – Unused on Stock / OS9SELECT on MMU
    Bit 6 – Unused on Stock / FIRQDISABLE on MMU

    When bit 5 is high, the OS-9 memory map is activated. In this map, the 6809 sees 64K of contiguous RAM from $0000-FFFF, all physically located in the SuperPET expansion RAM.

    There is no access to the $EFFC latch once in the OS-9 memory map. This is where it gets interesting. To get back to the usual SuperPET memory map, the code executes the 6809’s SYNC instruction. This instruction blocks until an interrupt occurs (similar to WAI on 65C02).

    When the 6809 is in “SYNC mode” waiting for an interrupt, two output pins on the 6809 indicate this condition: BA=1 and BS=0 (called “SYNC Acknowledge” in the datasheet). The MMU board has logic gates that detect this. It then resets the latch to return to the SuperPET memory map and generates an /FIRQ (“fast interrupt”). The /FIRQ pin is unused in the stock SuperPET. When the /FIRQ triggers, the SYNC instruction stops blocking, and the software can resume in the SuperPET map.

    Printed Circuit Board

    These photos are the original MMU board produced by TPUG members:

    Top Side
    Bottom Side

    To reverse engineer the board, I used Adobe Photoshop to edit the images. I removed all background, leaving only the traces. Finally, I combined the two images into a single Photoshop PSD file. Each side is a different layer and color, with the holes aligned as closely as possible.

    Layout (Top)
    Layout (Bottom)
    Combined Layout (PSD file)

    Schematic

    I drew this schematic after reverse engineering the PCB. Signal names (e.g. OS9SELECT) are my own, since I’ve never seen the original schematic.

    Schematic
    Netlist

    Nils Eilers took my hand-drawn schematic and produced a much nicer one:
    Super-OS/9 MMU Schematic by Nils Eilers

    Prototype

    I built the MMU board using point-to-point soldering. It’s been installed in my SuperPET ever since and it works well.

    Photos

    Documentation

    The original instructions from the Super-OS/9 disk include installation and testing procedures.

    Software

    Insert a boot disk in unit 8, drive 0 and type disk8/0.os9 at the Waterloo startup menu.

    System Disk (D80) – Super-OS/9 boot disk (D80 image for the CBM 8050 drive).

    System Disk (D64) – Super-OS/9 boot disk (D64 image for 4040 and 2031 drives). This image was created by Steven Hirsch.

    Emulator

    It’s now possible to run Super-OS/9 in the popular VICE emulator. In August 2012, Olaf “Rhialto” Seibert added the MMU emulation to VICE. It was included in the VICE 2.4 release.

    Since the MMU does not affect the operation of the SuperPET unless it is accessed, there are no configuration options for it in VICE. The MMU is always available.

    To start VICE with the D80 boot disk above, run:
    xpet +sound -truedrive -superpet -cpu6809 -model SuperPET -drive8type 8050 -8 /path/to/your/os9-systemdisk.d80

    You can then start Super-OS/9 by typing disk/0.os9 at the Waterloo menu.

    Copyright

    OS-9 Level 1 was a commercial operating system for the 6809 sold by Microware. Radisys purchased Microware and the copyright on OS-9. Radisys has generously granted me permission to distribute OS-9 Level 1 in binary form on a non-commercial basis. Please note that Radisys can not any provide support. Letter from Radisys.

    Super-OS/9 is an adaptation of OS-9 Level 1 for the SuperPET that was developed and sold by the Toronto PET Users Group. Super-OS/9 consists of a hardware extension and software changes to OS-9 Level 1 to allow it to run on the SuperPET. TPUG retains its copyright to both the hardware and software. TPUG has generously granted me permission to distribute Super-OS/9 on a non-commercial basis. Letter from TPUG.

    Resources

    Review (TPUG Magazine, Jun/Jul 1986)