
Grant's 6-chip 6809 computer
- a fully operational computer running BASIC can't get simpler than this!
by Grant Searle
Last update: 16th January 2012
Please note that you are NOT allowed to reproduce any of this page elsewhere on the Web without my permission.
Specification
16K ROM
32K RAM
68B09 Processor with a 7.3728MHz crystal (1.8432MHz clock)
115200 Baud serial interface, RS232 specification voltage levels
Power consumption - 200mA
Microsoft Extended BASIC, as used in the Tandy Coco 2 (modified for the SBC with
all I/O via serial. Commands not applicable for the SBC have been removed)
Minimal possible component count - 6 ICs and a small number of discrete
components
Memory Map
0000-7FFF 32K RAM
8000-9FFF FREE SPACE (8K)
A000-BFFF SERIAL INTERFACE (minimally decoded)
C000-FFFF 16K ROM (BASIC from DB00 TO FFFF, so a large amount of free space suitable for a monitor
etc)
Circuit diagram
The purpose of this computer is to create the simplest
possible machine with a high speed interface, good amount of RAM and also a good
implementation of BASIC.
The design that I produced is shown here, and is probably the simplest 6809
circuit that can be done to fulfil what I need. This can be used as the basis of
more complex machines.
The ACIA is very minimally decoded. If a more refined decoding is needed then it
is straightforward to add additional gates or a 74LS138 decoder. However, even
with this simple arrangement, there is still 8K of address space free for
interfacing as needed.
Power supply pins are not shown and need to be connected to the appropriate power rails.

Prototype
The circuit shown on this page is built here. As you can see, I have attached labels to the chips to allow the wiring to be very straightforward and error-free. Blue wiring is the address lines, green is the data lines, red and black are power lines and yellow are the other connections.

ROM BASIC assembly listing
AS9 was used to assemble the BASIC listing.
I took the listing from "Color BASIC Unravelled II" and updated it to assemble
correctly under AS9.
The resulting ROM dump was compared to the actual ROM dump to ensure it matched
perfectly before proceeding.
I then removed all code and commands that were specific to the screen, graphics,
keyboard and sound.
I wrote a serial handler to control the text I/O, along with suitable Control-C
break handling.
Unused variable locations were removed.
The command/function tables were updated as needed for the updated command set,
and pointer values adjusted accordingly.
Once complete, I put it onto ROM to ensure all commands for the "Standard" BASIC
ROM were working properly.
To allow quick-checks to any changes I made, I needed an emulator. However, I couldn't find any suitable, so I wrote my own in Visual Basic which emulates the complete 6809 CPU architecture and handles the I/O needed for this SBC.
Once working perfectly, I then added commands from the "Extended" BASIC ROM (from the "Extended BASIC Unravelled II" book), merging it with the existing code and updating command tables etc. as needed.
The ROM in the SBC is fully working with all the commands in the Standard and Extended ROMS that are applicable to the SBC.
The following files are available in many places on the internet. I have included them here for completeness. Click on the image to download the PDF.
ROM dump
The HEX dump of the ROM is here.
Note that the first part is "FF" values, because BASIC
starts at DB00 but the ROM starts from C000. There is a lot of space for
inclusion of monitor programs etc.
ROM BASIC - details of what has been included/excluded
INCLUDED TOKENS
(From the Color BASIC ROM)
FOR, GO, REM, ELSE, IF, DATA, PRINT, ON GOSUB, ON GOTO, INPUT, LINE INPUT, END, NEXT, DIM,
READ, RUN, RESTORE, RETURN, STOP, POKE, CONT, LIST, CLEAR, NEW, EXEC, TAB, TO,
SUB, THEN, NOT, STEP, +, -, *, /, ^, AND, OR, >, =, <
(From the Extended BASIC ROM)
DEL, DEF, LET, RENUM, FN, USING, &, &H, TRON, TROFF, EDIT
Secondary functions
(From the Color BASIC ROM)
SGN, INT, ABS, USR, RND, SIN, PEEK, LEN, STR$, VAL, ASC, CHR$, LEFT$, RIGHT$,
MID$, INKEY$, MEM
(From the Extended BASIC ROM)
ATN, COS, TAN, EXP, FIX, LOG, SQR, HEX$, VARPTR, INSTR, STRING$, MID$
(MODIFICATION), POS
EXCLUDED TOKENS
The following are not in this SBC version of the ROM as they are not applicable...
(From the Color BASIC ROM)
CLOAD, CSAVE, OPEN, CLOSE, LLIST, SET, RESET, CLS, MOTOR, SOUND, AUDIO, SKIPF,
OFF
(From the Extended BASIC ROM)
LINE, PCLS, PSET, PRESET, SCREEN, PLCEAR, COLOR, CIRCLE,
PAINT, GET, PUT, DRAW, PCOPY, PMODE, PLAY, DLOAD,
Secondary functions
(From the Color
BASIC ROM)
EOF, JOYSTK, POINT, TIMER, PPOINT
(From the Extended BASIC ROM)
none
Powering-up
Connect to a PC or similar terminal, with 115200 baud, 8 bits, hardware handshake/none, no parity, 1 stop bit.
Power on the board and press the RESET button.
After a few seconds (memory test) the following will appear on the terminal:
6809 EXTENDED BASIC
(C) 1982 BY MICROSOFT
OK
The machine is now ready to use.
Typing
PRINT MEM
will give (current ROM version, may be slightly different with future
releases)...
31944
OK
This shows that the 32K RAM has been recognised correctly.
...the rest is up to you.
A simple program entered and run on the terminal showing one of the more powerful "Extended" BASIC commands...

Links
The following links were very useful to me...
Albert van der Horst - AS9 assembler
Arto Salmi - 6809 Emulation and links page
I hope this page has been useful.
Grant.
To contact me, my current eMail address can be found here. Please note that this address may change to avoid spam.
Note: All information shown here is supplied "as is" with no warranty whatsoever, however, please let me know if there are any errors. All copyrights recognised.