Z80 Homebuilt machine on left, MacBook on right.

This is the first, GEMESYS-manufactured Z-80 SBC, built on board-design developed by D. Collens, licensed to GEMESYS Ltd. I hand-built this board, from parts ordered from Mouser. The GEMESYS NorthStar Z-80 SBC runs a small, but very accurate "Nascom/Microsoft Z-80 BASIC" interpreter. I've written simulation software, and matrix-multiply and matrix-invert software, which runs on this device. It has two serial ports, which can easily communicate with Windows, MacOSX, Linux, Android (if device supports serial bi-directional communication), and even old MS-DOS machines running Kermit. To process the results of a neural-network AI, one only needs to be able to process some vectors, and multiply some matricies, and this little computer does that nicely.

Z80 Single-Board Computer (SBC): Matrix Multiply & Print!

Z80 "NorthStar", accepting a "matrix-definition-runfile" from an Linux box, and printing result to a mechanical printer. The runfile has two matricies defined, and control instructions to multiply and print them. The BASIC interpreter now fits in first 8K, along with the Z80MON monitor. The little BASIC program - MATMULPR.BAS - which creates the product matrix, correctly monitors the Z80's control port for the serial device port, so we are able to output at any speed to any device, without overruns or underruns. I want to try putting CSAVE and CLOAD (currently just stubs now) back into the interpreter, so we can load and save BASIC programs to/from the serial port. With a serial-access SD-card, we won't even need CP/M, to have a stand-alone computer, which can process - and then act upon - tensor-forms created by a neural-network AI device.

APL on the Z-80: This is actually pretty exciting for us. I found something called "APL/Z-11" - a zip-file collection of what amounts to a complete APL interpreter for the Z-80. Except it runs under full CP/M, of course, and so far, I only have the binary image of the interpreter. (The "APL.COM" CP/M file). So,to test it, I had to build a complete CP/M machine - complete with virtual disks, and a running Z-80 box emulator and all of CP/M - on one of my Linux machines. This was a late-nite hack, and I honestly did not expect it to all work. One has to download and build from the source, the Z80Pack utilities, and then also get the CPMTools utilities, that let you copy your files from the Linux directory, to the virtual disk-drive that your CP/M emulator/simulator looks at. Then, I had to load and run the APL, and figure out the translate-tables the original author had used. But to my astonishment, it all worked - rather well, actually. The instructions were on a site called "Techtinkering.com", and I followed these to the letter, to get all the CP/M stuff working, and then used the CPMtools program ("cpmcp") to copy all the APL stuff onto a virtual CP/M disk, called "I:". You can list the files on the CP/M disk, with "cpmls" - from your Linux command-line session. Once you start the simulator - with the disks defined so they can be seen - you can see all the APL files, and you can start APL and load "matinv" and "matdiv", and invert a matrix. It's like black-magic, really. You can even save and load your workspace. The cyan/black-background right-side panel shows the Z-80 CP/M APL session, with results of inversion of a simple 4x4 matrix.

What You Have To Do - Just to START the Process of Reading Something from an SD Card. Those little SD cards are truly complex. This is how billionaires happen. If you can make something complex and ugly and difficult - turn into something that is simple, easy and beautiful, the world will beat a path to your door, and *beg* for the opportunity to do business with you. I want the Z80 "NorthStar" to load and save programs and data to an SD card - but retain the elegant, modular design the current board has. This means a daughter-board, and a CH376s chip, it looks like, and a wee bit of coding as well. [SD-Flowchart is from Elm-Chan's site: http://elm-chan.org/docs/mmc/i/sdinit.png ]

Sept. 21, 2019: A New, Custom-designed Z-80 SBC (Single Board Computer) locally designed and manufactured. I got the Z80 and SIO and PIO, clock, and memory chips from Mouser a few days back. And yesterday, the board designer flashed the EPROM with a small "monitor" program which allows code to be dropped into the RAM on the board. Today, I was able to load a Basic interpreter into the Z80's RAM, and then load a tiny program that just jumps to the start of the location where the binary Basic file was loaded to, and suddenly, we have a working computing machine. I've christened it the "NorthStar DC-Z80 SBC Pr-8" (it was eighth revision of the prototype). I think it's the coolest thing I've played with in years.

"NorthStar" circuit, pg 1: This is created using KiCad. Simple, tractable, testable, and knowable. This is the schematic for the actual "NorthStar" Z80 board I am now experimenting with.

Ok, lets get the little "NorthStar" board doing something that might be useful. I've converted a Fortran Matrix-Multiply program to MS-Basic, and built a couple of little tools to load a program into memory, and then run it with a realistic data file that describes a couple of matricies to be multipied. Being able to multiply matrix values is useful if you want to iterate thru a neural-network model, and generate the output result from your input data. The little matrix-multiply procedure works on the Z80, and its result matches the Fortran program. Now, to extend it to calculate inverse matricies, and solve a linear-equation system.

Example of Gauss-Jordon "Solver" running on Z80. (the white background screen). Here, it solves a simple system that appears on the Wikipedia page for "Simultaneous Linear Equations" and the matrix algebra representation.

More hacking with the prototype Z80 "NorthStar" SBC (Single Board Computer). Now driving an old "Practical Peripherals" modem (that little beige box, between the Z80 and the old laptop.) The Z80 can now call my cell-phone using the old modem. Dining-room table hacking, using an ancient (but crazy-solid) old laptop, an Android tablet, and an old modem. A 20-line Basic program is all that is needed operate the modem, and dial up to my cell-phone. Who needs the internet!? We can use the POTS (Plain Old Telephone System) - ie. 19th-century technology. (Anyone remember the magazine "2600"?) :D

MMX Hack. Old Pentium MMX running MS-DOS and APL. I just converted this old Mandelbrot program from 16-bit to 32-bit APL. The picture on the new monitor took over 1 hour to generate. It's a good exercise of the MMX processor. MMX stood for Matrix Math eXtensions - but Intel said no, it didn't really stand for anything (so they could TradeMark the name.) Intel Pentium chips with MMX are fine technology, and work very well. The guy with the best and fastest math wins. (See my Oct. 11, 2019 note below.) I can use Kermit on this MS-DOS Pentium board to connect to the Z80 board thru the MS-DOS board serial port.

Z80 Matrix Solver matches FORTRAN5 Solver, but BOTH are different from the APL Solver results APLwin and SAPL. WHY?

Z80 Solver (in MS-Basic) matches FORTRAN5 Solver, and BOTH MATCH the APL results. Compare with previous screen. Spot the difference? It is 2nd matrix, row 5, col. 2, which was 743 in the APLs, and 734 in FORTRAN and Z80 Basic examples. This result was done on Windows-XP machine, and matches results from 64-bit CentOS-7 machine, where FORTRAN5 runs in DOSbox,and APLwin runs under WINE.

The Z80 MS-Basic runs on bare hardware, and does its 32-bit floating point calcs in software. On the Z80, in 8K MS-Basic, the SOLVER example takes about 2 seconds to run.

The Z80 results are visible in window on lower-left of screen image, via the Termite program. The 8K MS-Basic is loaded as a "packet" file by simply copying RAMBASIC.PKT to the COM4 port.

The Z80MON monitor program loads the .pkt file to location 2000h. A Z80MON command "C" prompts for a hex starting address. You enter ">C", press return, enter 2000, press return, and the Basic Interpeter says hello. You can then copy SOLVER.BAS to COM4 port, slowly. (I have little batch line-by-line file copy with a "ping -n 1" (a ping to self) between each line written to COM4.

The Windows-XP laptop had to have the FT232R USB driver installed, so it could use the COM4 port to communicate with the Z80 "NorthStar" board. That driver was found at site: https://www.usb-drivers.org/ft232r-usb-uart-driver.html . The RAMBASIC.PKT file is loaded into the Z80 with a WinXP CLI command: copy /B rambasic.pkt com4: /B

The RAMBASIC.PKT file is simply the compiled binary image that results from a ZASM compile of the BASIC.ASM (a modified 8K MS-Basic program, written in 8088 assembler, modified to operate on this particular Z80 board). The "start-pkt" and "end-pkt" characters bracket the RAMBASIC.bin binary to create RAMBASIC.PKT, and are simply ASCII SOH (start of Header) and EOT (End of Transmission), or simply binary chars 0x1 and 0x4. (I believe. I will check with DEBUG)

I remain seriously impressed that a bag-o-parts from Mouser can be turned into a matrix-inverting and equation-system solving machine!

The Z80 can now be run from another experimental board, the Pentium MMX, which runs MS-DOS. The same matrix math calculation is done on the Z80, with the results displayed in a Kermit screen-session, running on the MMX and MS-DOS 5.0. Without the overhead of "Windows", the Pentium MMX board can run very fast, and with hardware mods to the MMX board serial ports, MS-DOS (and programs running under it) can successfully communicate with the Z80 SBC. The matrix-math example here is the same shown in in the photo before this one. [Oct. 15, 2019]

The Z80 running in Kermit session on MMX Pentium board, under MS-DOS 5.0. It was quite a trick to get MS-DOS to communicate sanely thru the serial port to the Z80. Loading the RAMBASIC interpreter required tweaking the MMX/DOS-5 board hardware. RS232 pins CTS, DSR and DCD need to be strapped to DTR, so the MS-DOS O/S can "see" the serial port. Once this hack is made, it becomes possible to copy the binary packet file that contains the MS-Basic interpreter from the MMX box to the Z80 NorthStar board (in box at screen right). With the MS-Basic running, I can run an MS-Fortran 5.1 program that copies Basic programs to the Z80. One such program is the Matrix-multiply and Solver program. Once it is loaded, files that contain matrix definition data can be copied to the Z80, and results displayed. The first record of the matrix file can simply be "run", and the Z80 will operate as a little asynchronous appliance that can process matrix-math data and display the result in the Kermit session screen. The "eMachines" monitor shown here cost $5.99 at the local Value Village store. (Works quite nicely) :)

Little "NorthStar" Z80 SBC Running a Ripple Pattern.

Cool running. Little Z80-SBC (single board computer), designed & built locally, running a ripple pattern on the on-board display. We can load code to and save from, the little 56K memory area. Program Z80MON written using "zasm" assembler, allows reading and writing to RS-232 serial port. Currently, uses the Linux "screen" program to communicate with it. Not fast (only 10mhz), but runs Microsoft Z80 Basic, which can do floating-point calcs, and it fits in 8K! With the Z80MON in first 8K of ROM, the MS-Basic can be loaded and still offers 48K of user space - enough to do a little matrix multiplication. I believe the Zilog chips are manufactured in the Phillipines. Leaks no detectable RF, has no radio circuits, not even a video driver on the board. Real "Ghost Fleet" technology, it is. :)

The "zasm" program running on the MacBook Pro, and the TL-866II+ ROM-loading hardware programmer (at right), lets you create a BASIC interpreter, and either copy it into the Z-80 "NorthStar's" working memory area, or load it into an SST ROM chip, and plug it onto the Z-80's board.

In the old days, you bought massively expensive stuff from Intel and electronics makers in California to accomplish this. Now, you can do the design, fabrication and system setup, on a desktop. More than just "cottage industry", it's "El Ranchero Productivo!" or something like that.

Getting "zasm" (the Z-80 Assembler package) to compile and build from source on this MacBook, has been a major effort, but it works, and I've confirmed that I can build the "rambasic.pkt" (the "rambasic.bin" binary that "zasm" creates, wrapped up by the "pkt" program, into a loadable file, with a hash-code, which Z80MON uses to load a binary into NorthStar's memory area.). The just-built "rambasic.pkt" file is exactly identical to the original "danbasic.pkt" file, confirmed using Linux "diff" command.

VT-100 Terminal Board (on the left), logged into USB serial port on MacBook Pro on right. We are running "top" on both "Bash" terminal sessions. Havn't you always wanted to use your MacBook as if it were a Vax 780, or a DECsystem 20? You can literally take any RS-232 terminal, and connect it to the Macbook. I am using Geoff Graham's VT-100 software, running on Peter Hizalev's VT-100 terminal board. The display is a small VGA screen (built from a nifty Chinese kit), which plugs into the VT-100 board. The little VT-100 board also accepts a PS/2-style keyboard (using an old "Luxor" keyboard here, you can just see the top right corner of it.)

The little VT-100, with VGA screen and keyboard normally connect to the "NorthStar" Z-80, but here, we connect directly to the MacBook, after having created "serialconsole.plist", started the serial console with "launchctl", and tweaked the "/etc/gettytab" termcap file. Note that you need a "null-modem" cable (which swaps pins 2 and 3, for transmit and recieve on the RS-232 spec.), and also a unique 9-pin to USB-connector cable. Whole thing works fine. The "top" session updates every second, and shows the top running processes on the Mac (of which there are 150 running here - same display running in real-time, on both screens).

For technical details, click the "Serial USB Login Mac" tab in top menubar.