CUBIX - nealcrook/multicomp6809 GitHub Wiki

CUBIX is a 6809 operating system written by Dave Dunfield and described on his website:

http://www.classiccmp.org/dunfield/d6809/cubix.htm

The source code and an emulator are available for download via the link here:

http://www.classiccmp.org/dunfield/d6809/index.htm

"AG5AT" at the http://n8vem-sbc.pbworks.com project ported CUBIX to Grant's 6809 Multicomp design. My CamelForth can boot into the AG5AT monitor and then to CUBIX, or (latest version) can boot straight to CUBIX.

Here are step-by-step instructions. These instructions assume that you are running CamelForth as your boot ROM, and that you have my mk2 memory mapping unit so that the boot ROM can be disabled (leaving 64KBytes of RAM).

Get the files

First, you need to download some files from the n8vem archive:

Unzip the first one to get the file fpgacubix.img -- this is an image of the disks, to be loaded onto an SD card.

From the multicomp6809/cubix area of this github repository use the build_all_bin script to build r09sase.bin and cubix_autoboot.bin from the .asm files there.

Creating an SD card image

I use a single SD card on which co-exist boot images/virtual drives for "ROM BASIC", "CUBIX", "FLEX", "NITROS9" "FUZIX" and "BUGGY". The key is to use a fixed offset for each image and to code the driver routines to calculate blocks relative to that offset. I did not write the CUBIX drivers so I have put its files at offset 0. I use a script to build an image file and then I copy the image to the SD card. The image file can also be used by the virtual SD interface of the exec09 emulator.

If you only want CUBIX the script to build the image file looks like this:

# Create image file for multicomp
# SDcard is 2GByte so everything must fit within that footprint.
#
# the resultant image can be transferred to and SDcard using dd (Linux) or RAWWRITE (Windows).

# CUBIX file system
# ~35MByte, at offset 0.
dd if=fpgacubix.img of=multicomp09_sd.img

# CUBIX boot ROM
# 2Kbytes at offset 64Mbyte
# 64MByte is block offset 1048576 * 64/512 = 0x2.0000
dd if=cubix_autoboot.bin of=multicomp09_sd.img obs=1M seek=64

Transfer the image to an SDcard

Remember, the Multicomp SD controller only supports standard density cards (2GByte and smaller) and SDHC cards. Use dd (Linux) or RAWWRITE (Windows) to transfer the multicomp09_sd.img file to the SDcard.

And go!

Insert the SDcard and power-cycle your Multicomp. You should get the CamelForth banner. Remember that CamelForth is case-sensitive. Type CUBIX and press return. After a few moments you should see the CUBIX prompt, an asterisk. It should all look something like this:

6809 CamelForth v1.0  25 Apr 95
CUBIX

RAM... passed

CUBIX version 1.3  

Copyright 1983-2005 Dave Dunfield
All rights reserved

*

An alternative (the old way of doing things, still helpful for debug) is to put r09sase.bin on the SDcard instead of cubix_autoboot.bin. With this setup, typing CUBIX and pressing return takes you into a simple ROM monitor. From there, press b (no return needed) to start CUBIX. It should all look something like this:

6809 CamelForth v1.0  25 Apr 95
CUBIX

AG5AT DISK 6809 ROM MONITOR READY.

>b
BOOTING FROM SD

RAM... passed

CUBIX version 1.3  

Copyright 1983-2005 Dave Dunfield
All rights reserved

*

Now type help or read the (well-written) manuals. Note that, despite the message "ROM MONITOR", that code was actually loaded from the SDcard to RAM and executed from RAM.

Debug

If it does not work, the first thing to check is that your SDcard is recognised. Power-cycle the Multicomp (with the SDcard inserted) then type:

0 0 SDRD

and press return. If the system hangs, your card is not initialising. Either you have an incompatible card (such as an SDXC card, which Multicomp does not support or you are using a very old sd_controller.vhd version and an SDHC card, which used not to be supported) or a problem with your wiring or your FPGA image.

If you are using the cubix_autoboot.bin image, try regenerating the SD card with the r09sase.bin image instead. With this image, if you get to the ROM MONITOR prompt but cannot start CUBIX (ie, the system hangs after you press 'b'), your SDcard and controller are probably working correctly. You probably have a problem in the way that you generated the image.

If you cannot get to the ROM MONITOR prompt, you may have a problem in the way that you generated the image, or you may have a problem with your wiring or your FPGA image.

Back to software overview.