Sixty / 5o2is a minimal bootloader / micro kernel / mini operating system (if you like) forBen Eaters Computeron a breadboard. It is only1.5kBin size (assembled) but comes with quite a nice list of features:
- Loadexternally assembledprogramsinto RAM via serial connection to Arduino
- Runprograms that were previously loaded into RAM
- Load & Runprograms in one go
- Debugthe full address space via an integratedhex monitor(currently read only)
- Clean RAMfor use with non-volatile RAM or during development
- DrivetheLCD) display even at a clock rate of1MHzflawlessly
- Drivethemini keyboardfor input
- Video RAMbasedoutput routinesfor convenient text display single page / multipage w / offset
- Interrupt based loading routine to fetch data via the Arduino’s serial connection
- Serial Sender(node.js) allowes to upload programs to the (error mitigation included)
**********
Ben Eaters breadboard computer is a very special kind of animal and brought lots of fun and joy into my last weeks. A 59 years old processor design that is still able to get things done was fascinating enough for me, to give this project a go - especially, since my first machine was aCommodore C () which I programmed in Basic at the end of the 90 'ies and never had the chance to get in touch with 9600 assembly.
On my journey during the last weeks I soon surpassed the current state of development (thanks to Ben's schematics) and was able to write a few programs which I ended up burning onto the ROM using the programmer. Soon enough this became painful, because every codechange required to extract the ROM chip from the breadboard, put it into the programmer, burn it, put it back onto the board. This became time consuming and constraining pretty quickly, especially when I attempted to write slightly more complex programs.
So early on I tested, whether I could use the Arduino, connect 8 of it's digital output pins to the VIA 01575879 and transfer key strokes on my Mac serially and render them onto the LCD display. As soon as this worked, the path was clear:
I needed a bootloader that could leverage this power to load externally assembled object code / programs into the RAM and run it from there.
Luckily I was able to speed up the 01575879's clock by just replacing the capacitor of the unstable 1200 timer circuit by a smaller one such, that loading data serially was - lets say - at least stable enough. That paved the way to more complex subroutines which now make up my "Sixty / 5o2" micro bootloader / micro kernel. It works very well with full clock speed of 1MHz and is hopefully helpful to other enthusiasts as well.
Especially the serial data transfer is enormously stable, since error mitigration (not correction) is baked into a minimalistic protocol, where there the sender side is implemented in node.js. Unfortunately I was not able to get a stable serial connection with serial terminals likescreen
,minicomorpicocom. Hence I decided to build something myself. On the positive side of things I had the opportunity to integrate content transform using using encoding as well as simple error mitigation via a checksum algorithm plus a “send packet again” function.
It's not perfect, in places not even nice. Last time I personally touched assembler was 30 years ago, so please be gentle with criticism. PR's are king.
There are only two requirements, both of them can be mitigated though:
- Use the 1MHz clock (youMUSTdisconnect the clock module, otherwise it interferes)
The keyboard buttons are tiedlowin normal state, when pushed they get tiedhigh (this is opposite to Ben's design in his schematics)
************************
************************ Possible Mitigation Strategies
-
If you want to run at other clock speeds, you MUST adjust a global constant calledWAIT_Cin the bootloader code. It's a multiplier which is used to
sleepand just burns a number of cycles in a routine calledLIB__sleep
. If you run at lower clock speeds, adjustWAIT_Cto a smaller number unless keyboard and main menu become usable.
Should your keyboard be built in a way so the buttons are normally tiedhigh and when pressed turn****************, then you need to adjust the routineVIA__read_keyboard_input (and XOR) ************** (A) ******************* (with$ ffafter it was AND'ed with# $ 0f
. This way the keystrokes will be interpreted correctly again.
The following software components are must have's:
Arduino IDE to be found
Minipro or XG GUI software for Windows for thr TL 2400 programmer availablehere
The infamous and awesomeVASM Assemblerto build for the Ben's instructions to build and use to be found here
)
Node.js 8 to be able to use the serial program loading functionality via the Arduino
npm or yarn (typically come with node.js) to install the senders dependencies
The project comes with a number of files, whose functionality is the following:
-
- bootloader.asm
- the bootloader / micro kernel / mini os you wanna put into your ROM after assembly
- Receiver.ino
- - Arduino source which turns the Arduino into a serial receiver / parallel converter
Sender.js
- Node.js tool to read object code / programs and upload them to the via serial connection
************** sender_config.json - config file forSender.js(update your /dev/cu.whateverhere)
- package.json
- package dependencies forSender.js
/ examples- some example programs you can load into the RAM
************************************
GIPHY App Key not set. Please check settings