John Floren wrote:
Hi everyone
As a 4th year computer engineering student with a part time job, I
definitely have too much time on my hands, so I've been thinking about
doing something like building my own computer. I remember playing with
the 68k SBCs back in my assembly class, so I thought something from
that family might be an interesting choice. It's ambitious, but
ideally I'd like to do 16/32 bits and a few megs of memory.
Have any of you built something like this? I'm looking for links to
project pages, shared experiences, and advice on what processor to
use. Reminiscence is welcome too, if you have fond memories of such a
thing :)
In 1985 I was fresh out of school, moved to Sunnyvale CA to work for BTI Computer Systems,
and in within two weeks of starting work had been through the first round of layoffs.
They were kind on the college kids and didn't lay us off, but told us to start
interviewing.
As a result, I had some time on my hands. One thing I did was to design and build a 68000
computer. I used an S-100 backplane and boards, although I didn't adhere to any
standard.
The design had 256KB of DRAM, a uart, and a timer chip. I debugged it by writing a
"JMP
*" program and looking at the waves with an oscope until it looked like it was
working.
Then I wrote a short program that printed some fixed string to the UART and didn't use
any
DRAM. Then I wrote a simple program to read from the uart and echo it back, again not
using DRAM. Once I had I/O capabilities, it was easy to write short memory test programs
until I had that debugged.
Next I found the source for a 68K monitor program, call VuBug. As I recall the 68K
assembler was in the BTI dialect of FORTRAN. I believe it was a version of RM Fortran
(Ryan McFarland).
The 68K debugger was primitive, so I enhanced it. Luckily, I managed to keep the
5.25"
floppies that contained the source, and you are welcomed to use it if you want. Here is
the comment block from the debugger:
****************************************************************************
* *
* DBug is a 68000 debugger. It allows downloading, examining/changing *
* memory, disassembling, single-stepping, tracing, breakpointing, *
* and examining/changing registers. It was originally called VuBug. *
* *
* This is its history: *
* *
* 1) Vubug was written by Edward M. Carter at Vanderbilt University. *
* See the copyright notice below. *
* *
* 2) Mark Isfeld and Dave Conroy modified VuBug for work on the SCC *
* project. The modifications they made were: *
* -- *
* *
* 3) Jim Battle took VuBug and modified it in these ways: *
* -- made syntax checking stronger and error reporting better *
* -- added the Lookup subroutine to allow word commands instead of *
* single letter commands *
* -- added text substitute to substitute memory (SM) command *
* -- changed copy to allow bigger than 64k blocks *
* -- rewrote register (R) command *
* -- added ability to evaluate expressions and changed all commands to *
* allow expressions for parameters *
* -- added disassembly capability *
* -- added symbol managment and changed the load command to read *
* symbols. *
* -- added ascii, asm, bsr, clear, clearsym, dis, fill, help, set, *
* setsym, and = (calc) commands *
* -- changed I/O dependent routines (especially the TERM command) *
* *
****************************************************************************
*******************************************
* *
******** VUBUG *********
* *
* Copyright (C) 1983 *
* Vanderbilt Univ. *
* Comp. Sci. Dept. *
* PO Box 1679 *
* Station B *
* Nashville, Tenn. *
* 37235 *
* *
* Author: *
* Edward M. Carter *
* *
*******************************************
* *
* Although the information contained here-*
* in, as well as any information provided *
* relative thereto, has been carefully re-*
* viewed and is believed correct, Vander- *
* bilt University assumes no liability *
* arising out of its application or use, *
* neither does it convey any license under*
* its patent rights nor the rights of *
* others. *
* *
*******************************************
DBUG.68K: 4227 lines (a few authors)
ASSEM.68K: 2447 lines (entirely written by me)
DISASSEM.68K: 2308 lines (entirely written by me)
It was the first 68K code I ever wrote so it is pretty brute-force, which means it is easy
to understand:
* output in #<quick8>,Dx format. <quick8> is [7:0] and Dx is [11:9]
Dis_MOVEQ equ *
move.b #'.',(a1)+ send '.L' as a reminder
move.b #'L',(a1)+
movea.l a4,a1 point to operand buffer
move.b #'#',(a1)+
move.w d0,d5
bsr SymOr_slzsb signed, leading-zero-suppressed format
move.b #',',(a1)+
move.w d5,d0 recall opcode
rol.w #7,d0 move bits [11:9] to [2:0]
bsr Make_Dx
rts
Once I had it all working, I simply moved on to something else. I had no need to actually
use it for anything, since I had quite capable computers all around me anyway. That next
project was a modula compiler. I only completed a subset of that before I got my next
job, and then there was no time to develop it further. It will need to wait for my
retirement in 20 years. :-)