~vertigo/forthbox

Attempting to complete what I started out to achieve with the original Kestrel-1 design back in 2004.
Console WIP: Implement lowest-level logicfor cursor manipulation.
Design document for Console output

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~vertigo/forthbox
read/write
git@git.sr.ht:~vertigo/forthbox

You can also use your local clone with git send-email.

#ForthBox:20AE

In 2004, I embarked on a project to build for myself a W65C816-based home-made computer. I eventually succeeded in making a computer equipped with 32KiB of RAM storage from $8000-$FFFF, and I/O from $0000-$000F. This computer ran at 4 MHz, and relied upon an umbilical connection to a host PC to load software into it. It ran quite well; however, its limited I/O facilities naturally limited what I could do with the machine. Originally named the ForthBox, for I had ambitions of running a Forth dialect on it, I eventually renamed this home-made computer the Kestrel-1.

After I surrendered the on-going use of the name Kestrel to avoid possible litigation from a commercial company, I decided it was high time to reconsider how to move forward. The Kestrel-1 was left in the proof-of-concept stage: can I build a homebrew computer at all? (Yes.) The Kestrel-2 and Kestrel-2DX computer designs were essentially done; however, they were limited by their 48KiB memory space, lack of external expansion, and insufficient system software. All three of these units were test mules, in a sense; they provided valuable proofs of concept which encouraged me to work on the Kestrel-3. But, alas, that project was squashed when the name was, I felt, taken from me.

After a bit of soul-searching, I decided to return to the Kestrel's roots and make an open computer which booted into Forth as its system software environment. Hence, the return of the ForthBox.

As I write this paragraph, 20 years has elapsed since I placed the last wire on the Kestrel-1. It's time I return to this project and finish it.

#Emulator

This distribution includes the definitive emulator for the ForthBox, intended primarily as an aid for software development before concrete hardware exists.

The following "hardware" resources are currently emulated:

  • W65C816 16-bit Processor
  • 16MiB RAM (note: actual hardware is likely to only have 512KB or 1MB)
  • Operator/Debugger Console
  • Up to 8 fixed DASDs up to 32MiB each

The emulator started life as a fork of Alan Cox's v65c816 project.

#System Software

The disk0 directory contains an interactive machine language monitor, IM/F, as well as System Forth.

#Cloning

This repository uses Git submodules. The easiest way to clone this repository is to use the --recursive option on your git clone command.

git clone --recursive ...

#Building

You must have cmake and xa65 installed.

First, you will need to build and install the emulator. This will install the executable and a set of manual pages, which you can summon with man fbemu.

rm -rf build
cmake -S . -B build
cd build
make
make install

Then, you'll need to build the system software. This will create a 512KB DASD image containing the basic system software. If you desire to create your own DASD image for the ForthBox, you are encouraged to duplicate the disk0 directory and customize it to your liking.

cd ../disk0
./mkdisk0

#Running

There are two ways to run the emulator. The first way is without any options. Note that you must have a DASD file named disk0 whereever you run the emulator from.

k1emu

The second way is to turn on tracing support. This is normally only used for debugging purposes during initial bring-up. Warning! Tracing mode produces a ton of output.

k1emu -t

#Disk Files

Up to 8 virtual DASDs (each no greater than 32MB in size) are supported. Simply call them disk0, disk1, ..., disk7. Note that disk0 is always the boot DASD, which is why it must always be present. The other DASD files are optional.

#Bootstrap

The imaginary boot ROM loads block 0 from disk0 to $FC00-$FDFF and jumps to it in 6502 emulation mode.

#System and Application Development

You'll find additional information for programming the environment in the fbemu(1) and fbemu-io(7) man pages, including a complete description of the I/O page and examples on how to use the DMA/block move space.

#License

Unless documented otherwise, everything in this repository, from software source code to hardware designs, is licensed under GNU Public License V3.