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.  
scelbi emulator
I also have a start on an IOS/iPAD port of this program.   Major parts of it are working in the xcode IOS simulator.  If you like the app and want to see an IOS port of it, I encourage you to pay the $5 and download the latest version from Apple's App Store.  This will help pay for the Apple developer fees, which are necessary in order to develop an IOS app and encourage me to work harder on it.

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 (2.8)
Added support for SCELBI Oscilloscope/keyboard interface.   This version is only available from Apple's app store.  Start your the App Store application and search for "SCELBI" The application costs $5.  Version 2.7 (without oscilloscope/keyboard support) will remain available and free for downloading from this page.

  1. Oscilloscope and keyboard hardware emulation added
  2. The MEA EPROM on page 76 is switchable between oscilloscope and TTY drivers
New version (2.7) - updated 1/7/2016
This version has a lot of subtle fixes and improvements, many of then cosmetic, some functional in nature.  Among the more important:
  1. Control-L support for entering the MEA modify commands
  2. Many improvements in the cassette tape emulation.  You can now rewind a new tape and read it back without ejecting it.  The emulator implements the cassette interface relay function, so the tape starts when 8008 software commands it, not when you press the play or record buttons
  3. Help menu support implemented - hopefully a novice user can boot and enter some MEA commands just by following directions in help
  4. Cosmetic improvements to front panel LED and toggle switch handling
  5. True emulated baud rate support of 110, 300,1200 and 2400 baud - this is a significant change and could potentially still have issues.  The best part of this change is that if you restart the 8008 in the middle of a serial output, the serial port will automatically get back in sync.  Also, this implementation may be helpful for debugging real bit banged serial driver problems
  6. Terminal auto line feed support option for those programs that assume CR includes an implied LF
  7. File content validation of cassette and Intel hex files.  This should prevent loading bad files into the emulator, which has caused some “problems”
  8. Unused menu items removed
Note that some of the 8008 programs on my 8008 applications web page had serial driver issues and have been updated along with a few added/corrected notes on that web page.   Some of the drivers assume CR includes an implied LF (auto LF).   For instance, the Galaxy serial drivers were all messed up.  Galaxy starts at 000-040 and needs the auto LF menu item set up.  With the current set of terminal options, I’m able to run most, if not all, of the programs that I’ve run on my 8-H in days past.

The list of updated programs include: circle, galaxy, star shooter, calculator and both mandelbrot programs.

version (2.2) - updated 12/5/2015
  1. Fixed TTY emulator support in the terminal window.  Terminal window operation now matches a real Scelbi in most all respects.
  2. A fix was added to update front panel LEDs when a halt instruction stops the CPU.  Prior to this fix, there was only a 1 in 5 chance that the LEDs would be correct after a halt instruction.

New version (2.0) - updated 10/18/2015
  1. Cassette I/O added!
  2. Added memory configuration support for 4K, 16K SRAM or 12K with the 4K MEA EPROM.  The MEA EPROM code is now built into the program and when enabled, acts like a EPROM is supposed to, and cannot be written.  When 4K is configured, reads from above the 4K range, always return all ones, just like a real SCELBI.   The memory configuration is selected using the "Hardware" menu.  Note that the MEA EPROM is not available with a 4K memory configuration.  To start MEA, use the front panel to jump and run from location 066-000.
  3. General improvements in display cosmetics, including what I think turned out to be a pretty nifty application icon.  The red, yellow and green switches are often seen on real SCELBIs.
New version (1.1) - updated 5/28/2015
  1. When serial port gets out of sync after interrupting, running the program resets the serial bit counter. So interrupting and then running a program may cause problems with serial output.  Best way around this is to not stop a program in the the middle of the serial driver.  If it does get confused, restarting the program should resync the pseudo serial port.
  2. Added menu support for optionally stripping or adding the MSB of serial/terminal data.  Try changing these settings if terminal input is not accepted by the program or if the terminal output looks like gibberish.  These options were specifically added to allow support for the Modified Creed Mini Monitor, MCMON that I just finished porting to the SCELBI.
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



At this time, there are 3 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 Hardware menu can be used to select memory size (4k or 16K) and enable or disable the MEA PROM in the 16K byte configuration.
  4. 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