About my 8008/SCELBI OS/X Emulator Program

This is my slowly evolving SCELBI/8008 emulation app.   It currently only runs on Macintosh OS/X.  

I also have a start on an IOS/iPAD port of this program.   Major parts of it are working in the xcode IOS simulator.  However, I don't know if I want to spend the $100 to become an official IOS developer, so I can test it on a real IOS device.

I also wrote an 8008 Unix POSIX style 8008 emulator/debugger in order to debug 8008 programs.   If you need a simple 8008 emulator/debugger, send me an email and I'll send you the latest source. 

Support for any of these programs should be expected to be the same as the amount of money that you pay for it.  You can feel free to send me an email if you think of an improvement or find a bug, but I may not act on it for days, weeks, months or years, if ever.

Things to Do or Fix


New version - updated 7/4/2013
  1. This version is an initial attempt at supporting front panel functionality.  Basics work about like a real SCELBI, but it hasn't been fine tuned and tested against the real thing, so more than likely, significant inconsistencies exist.  Use the SCELBI users manual from www.scelbi.com as a beginners guide to front panel operations.
  2. There are 11 control switches on the SCELBI, 8 toggle switches for data bits B0-B7, and 3 momentary control buttons.
  3. Execution of  8008 instructions that access memory multiple times has been significantly revised in order to make the panel work.  Hopefully nothing was broken.
  4. While the simulated 8008 is running, LED updates occur every 5 accesses.  The reduced LED update rate and the mechanism for scheduling simulated 8008 instructions isn't quite the same as the real thing,  but it gives you a fairly good feeling of what an actual SCELBI front panel looks like while running a program. 
  5. Be aware that the LED updates put a fairly high load on your host CPU.  The 2GHz i7 CPU I developed this on shows about 35% CPU on activity monitor.
  6. PC defaults to 00-100, so you can load SCELBAL into memory, using the menu and run without knowing how to work a SCELBI front panel, in order to run basic.

New version - updated 6/3/2012

  1. Mark Arnold (one of the original authors of SCELBAL) has fixed some mistakes in the version of SCEBAL I was originally using.  This mistakes were introduced during the reconstruction of the program.
  2. I have made changes to AS8 to support the RST instruction and my interpretation of how OUT port numbering should be implemented.  If you are interested in this version, drop me an email.
  3. The SCEBLI expects that all inputted characters have the high bit set - and starshooter and SCEBAL have been reassembled to match.  The power function such as 2^3 did not work in SCELBAL prior to this change.
  4. The emulator itself now accurately counts cycles based on information gleaned from the 8008 data sheet.  Each cycle takes 2 clocks and instructions take from 3 to 11 cycles.  The emulator executes 250,000 cycles per second, same as an actual 8008.  
  5. This version of the emulator uses port numbers to select serial or byte I/O, so the byte I/O menu has been removed.  This effectively emulates a SCELBI with both serial and parallel (BYTE I/O) ports connected.  See table below.

INPUT PORT OUTPUT PORT
SERIAL I/O - (SCELBAL BASIC) 5 16
BYTE I/O - (STARSHOOTER) 2 12

scelbi emulator

At this time, there are 2 working drop down menu items available with this application.
  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 00-000 00-100 during reset.
  3. 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 an experiment. 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.

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

Running SCELBAL (SCELBI Basic)

General information on SCELBAL and tiny SCELBAL can be found on this page.

To run Scelbal (basic), do the following.
  1. Download and unzip the SCELBI application
  2. Run the SCELBI app
  3. Clear 8008 memory (optional)
  4. Load 8008 memory with Scelbal.hex
  5. Click on the “RUN” button – you should see a “READY” message
  6. Type “SCR” – this clear’s Scelbal variables – if you don’t do this before entering your program, weird things will start happening
  7. 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. 



Back to Mike's Hobby Home Page