The Intel 8008 and SCELBI Mini-Computer

Part 1 - About the 8008


The 8008 is widely known as one of the first single chip processors.  The first computer systems that were affordable enough to be purchased by an individual hobbyist were built around it.
8008 micro-processor
the image of the 8008 is curtesy of Cameron Cooper

The feature set included:
An interesting feature of the 8008 is the small 18 pin package.  This was achieved by multiplexing an 8 bit bus with both address and data.   To access memory, the 14 bit address must be written 6 and 8 bits at a time using two clocks cycles each followed by  a read or write of data using two more clock cycles.   External latches must hold the address until the data read or write state.

Running a typical instruction mix, the 500 KHZ processor executes instructions about 10 times slower than the later 1MHZ 6502 used in the Apple ][.

The instruction set is fairly complete, but there are some limitations.

    The stack is only 8 levels deep, with the current level being used as the program counter.  The current value of the program counter stack is pushed with a CALL instruction and popped off the stack with the return instruction.  This limits subroutine nesting to 7 levels deep.
    There is no stack available for temporarily storing of registers.
    The only memory access mechanism for data, is indirect through the H and L registers.  Subroutine calls that need to access memory must have available at least 3 registers - 1 for the operand, and 2 more to save either the H and L registers themselves, or two other registers that must be available to save the current contents of the H and L registers.
    The ALU includes zero, carry, sign, parity flags, but does not include an overflow flag.

Part 2 - About the SCELBI “Mini” Computer

Scelbi 8H
SCELBI's came built - or as kits - this one was built from a bare board kit
images of the SCELBI provided by Curtis from Kentucky

The SCELBI (SCientic-ELectronics-BIology) was arguably the first commercially available micro-computer marketed toward hobbyist.   The company name, SCELBI, which stands for SCientic-ELectronics-BIology, clearly indicates that the business clearly had a plan to penetrate specfic markets which were not necessarily hobby oriented.   Frank Zawacki, an early employee, recommends this site for a brief story about the founding of the company.
http://www.atarimagazines.com/creative/v10n11/6_The_early_days_of_persona.php

Frank told me, that SCELBI was incorporated and funded to the tune of $100,000.  Frank's father, helped raise money and managed finances for SCELBI.  They both worked for stock in those early days.   Frank has sent me this image of a SCELBI stock certificate.

SCELBI stock certificate



The computer, itself, was built around the Intel 8008 architecture.  There were two versions of the SCELBI, the first was called the 8-H.  It had the following features.
Scelbi side view
images of the SCELBI provided by Curtis from Kentucky
The 8-H was sold as a kit - actually there were several kits available.  The chassis with the "#1105 backplane harness board" was a separate kit.  You could buy the SCELBI kit without the chassis, but it was up to you to find the edge connectors,  I/O connectors, toggle switches, etc and wire everything up by yourself.  The pictured unit has only 5 slots and was not purchased with the chassis kit.   The edge connectors are connected together by individual wires.
top-front view of Scelbi
images of the SCELBI provided by Curtis from Kentucky

    The default I/O capability was limited to the extremely difficult to use front panel.  Usage of the computer involved switching  8 toggle switches to preset the value of the address/data bus.  The user would then clocking the CPU with another toggle switch to step the 8008 cpu.  During the appropriate cycles, the 8008 would then read the data bus value as set by the toggle switches as if it were reading memory or an I/O location.
    Expansion capability was through a series of parallel ports on the back panel that made use of 11 pin vacum tube sockets.  Serial protocols could be implemented by “bit banging” individual bits of this parallel port.  There were several standard expansion options including a cassette interface, serial port and a terminal output device that made use of an oscilloscope for display purposes.  Detailed information on these expansion devices is very difficult to find.         
    The  later 8-B added an extra slot with an addressing card that allowed addressing the full 16K memory allowed by the 8008 architecture through the use of 4K memory cards.  I haven’t found any additional information about changes made to the 8-B.


Part 3 - About my 8008/SCELBI OS/X Emulator Program

scelbi emulator

At this time, there are currently 6 mostly working controls available with this application. All other controls either do nothing or react unpredictably.
  1. The Memory->Clear menu function will clear 8008 memory to zeros
  2. The Memory->Load menu function can be used to load 8008 memory with an intel hex formatted file. I have a copy of scelbal (SCELBI Basic) in this format available to download. Other 8008 programs could be loaded, but the current assumption is that the PC is set to location 0×40 during reset.
  3. The I/O->Byte mode menu function is used to set the terminal emulation to either a bit banged mode or to a byte mode.  The bit banged mode is used to emulate a simple serial interface that is completely timed and controlled by toggling and reading single bits on the I/O port interface.  The byte mode is used to emulate a UART type serial inteface where bytes are read and written as a unit to emulated UART registers.  The mode is set to byte mode when the check mark is present next to this menu item
  4. The “INT” button will stop and reset the 8008, setting registers to zero, except for the program counter which is initialized to 0×0040. This is not the authentic use of the button, but it was handy for the initial bare bones implementation of this emulator
  5. The “RUN” button will start the 8008, or if it is already running, do nothing.
  6. The terminal section at the bottom of the window emulates either a UART or a bit banged serial interface compatible with drivers commonly found with Scelbal. Input is expected to be in upper case. If this window does not respond to input, either the 8008 is stopped, or not currently monitoring the serial port or you have found a bug in the app. Note that unlike a real serial port, input to the port from the keyboard is queued to a length of 4K characters to allow cutting and pasting input from other applications into the emulator. Overflow conditions are not currently handled gracefully.
The SCELBI/8008 emulation app can be downloaded from here.  Ty it for yourself, but keep in mind that the app is in early prototype stage. It is likely to behave unpredictably, hang and/or crash from time to time.

The performance is throttled to approximately, the actual speed of a 500kHZ 8008. Load Basic and try executing a “FOR” loop of 0 to 100 to get an idea of the incredibly slow performance of an 8008 running Scelbal. The first version of the 8008 emulator that I had running in a Unix shell environment was approximately 500 times faster than an actual 8008, and even that felt slow!

Your host computer running the SCELBI application may get real busy, go to sleep or suspends for a while.  At this point, the  emulator will fall behind real time.  When this happens, the emulator will limit the catching up of the 8008 to actual elapsed real time to a 5 seconds burst of cycles.  In other words, if you put your computer to sleep for an hour, when it wakes up, the SCELBI application will give the emulated 8008 the maximum burst of 5 seconds worth of cycles and other cycles will be lost.
.
The current implementation emulates the 8008 instruction by instruction. If I find the time and energy, I’ll convert it to a cycle accurate emulation and complete the hook up to the SCELBI front panel depicted at the top of the app’s window.

Have fun with it and be sure to let me know what you think.

SCELBAL (SCELBI Basic)


SCELBI implemented a Basic interpreter for the 8008.  This could be run on a SCELBI that had 8K of memory.  Presumably few, if any, 8-H machines were ever upgrated to  run this interpreter.   This interpreter completely supported floating point math with 6 digits of precision.  As time went on, additional packages including maxtrix arithimetic and math functions were added.  This interpreter was also ported to the similar Mark-8.  For many purposes this Basic interpreter was far and away superior to Apple’s integer basic.
To run Scelbal (basic), do the following.
  1. Download and unzip the SCELBI application
  2. Run the SCELBI app
  3. Make sure that the Byte I/O sub-menu under the I/O menu is disabled (no check mark next to this menu item)
  4. Clear 8008 memory (optional)
  5. Load 8008 memory with Scelbal.hex
  6. Click on the “RUN” button – you should see a “READY” message
  7. Type “SCR” – this clear’s Scelbal variables – if you don’t do this before entering your program, weird things will start happening
  8. You can now enter a basic program or basic commands directly
Be aware that there are several common 2 character error messages in Scelbal including “BG” for two big and “SY” for syntax error.

For fun, try booting up Scebal and running this program:http://99-bottles-of-beer.net/language-scelbal-2472.html.  Once you have a the Scelbal ready prompt on your machine, copy and paste the source into the terminal section the SCELBI application.  Then type run to run it.

Starshooter - a SCELBI Game as published in Byte magazine

http://www.vintagecomputer.net/stars.cfm

I have ported the source to this game to make it  assemble using the AS8 assembler found here. I also added a byte mode input/output driver compatible with my simulator. The resulting intel hex file output can be found here.   To run, starshooter follow these instructions.
  1. Run the SCELBI application
  2. Make sure that Byte I/O sub-menu under the I/O menu is enabled (check mark is set next to this menu item)
  3. Clear 8008 memory (optional)
  4. Load 8008 memory with STARSHOOTER.HEX
  5. Click on the “RUN” button – the computer should prompt you for input and away you go
Note that though this game was apparently written on a SCELBI, the author did not leave any  registers available for processing a bit banged serial port in the input and output calls.  My assumption is that he had some kind of UART interfaced to his SCELBI so that I/O could be as simple as reading or writing a byte from an I/O register in this UART.  This is why I added the byte mode I/O capability to the emulator.   Without available registers, it was impossible to control a bit banged type interface, without rewriting portions of the main StarShooter program.



Back to Mike's Hobby Home Page