GEMESYS "NorthStar" Z80 Computer - showing a histogram, which resulted from running a randomness-simulation. The program is a couple of hundred lines, written in BASIC! The BASIC interpreter, the system "Monitor" (a very tiny, simple "operating system", that one can "branch" to!), and the program and data - all fit within 64K (despite using a 1-megabyte chip for the on-board memory).

The "NorthStar" Z-80 was designed by a clever friend as a hobby exercise. (Circuit board designed by Dan Collins, with KiCad, and then fabricated direct from KiCad file, by JLCPCB in China - onboard ROM-chip for BASIC interpreter and Z-80 Monitor program burnt with TL866-2-plus by XGecu, also of China. Fine tech at great prices.) With a little PIC chip to provide a working VT-100 "terminal" to drive a VGA display, and an old laptop running Kermit (for off-line program storage), one can have a complete, working computer, that can be built with some parts, a soldering iron, and the "zasm" Z80 Assembler program (for the Monitor and the BASIC interpreter.)

The BASIC interpreter is a Microsoft product, for which Microsoft released the source code. We thank the folks at Microsoft for this fine generosity. The little Z-80 MS-BASIC (from the year 1978!), is a truly wonderful example of doing a very great deal, with not very much. It is really a lovely thing - a tiny, antique jewel of coding excellence.

This little Z-80 SBC (Single Board Computer) is really interesting. It can invert matrix data, and thus do real, actual, useful work - and offer real, actionable value. I am always rather surprised by this. Dial it all back to bare essentials, and sometimes, real insight is possible.

There is great learning possible, by close examination of the first, or very early versions of a technology.

Such as: It is very difficult (but not impossible) to get quality pseudo-random generated values on a deterministic system. It is difficult - but as this little Gaussian histogram shows - it is not impossible - even if using tiny code frames. You can code up a linear-regression example, and run it with real data and get real results - much like I did as a young lad, using Fortran compilers running on DECsystem 20's and the IBM VM 370 (a big, water-cooled monster that filled a room at University of Waterloo).

I fear the modern technologies are at risk of driving much of society retrograde, and killing the sense of wonder and joy that comes with honest discovery and focused learning efforts. The modern technics simply create tight, toxic neural feedback loops, so that it more resembles cocaine addiction or opium-den user-engagement models. No one seems to be actually *learning* anything, much less *doing* anything.

I spent a few days with some folks who have three kids - two boys and a young girl. The kids spent *all* their time on the computers or iPhones, watching action animation movies, Youtube or playing games. It was disturbing. None of them seemed very happy, and their relentless focus on the interactive play, or the chattering "Youtube" people, was clearly affecting their ability to interact with real people around them. It was like they were ghosts - only partly present.

These are the people who will soon be voting and determining the outcomes of elections - and they are completely immersed in a false, fantasy-world of carefully crafted neural stimulation.

I remember the crazy things that we did as kids - the wild trouble we would get into, and the powerful life-lessons we would learn as part of fixing the disasters we created - out of curiousity. This current crop of kids seems to have none of this - as all their socialization actions seem to be through online experiences which are false, fictional constructs of bitstreams. It looks a *lot* like hard-core drug addiction - and I am curious if it will have the same problematic social outcomes as we drive forward through time, to an evermore twisted and corrupted future.

Not many are looking up anymore. They just stare *down*, at their iPhones, engaged in their little fantasy worlds.

My "inner trader" whispers that this social model is gonna kill us all - far before our time. We all will die at some point, of course - but are we to be just the programmed "Eloi"? There won't even be any "Morlocks". Just lots of dead Eloi, who ran out of mental battery power, staring at their little iPhones. It's a weird and disturbing far-future vision.

[ Update: But then, I found the Naomi Wu archives, on Internet Archive. Very cool, very good. I am seriously impressed (and not just because of her *very* large synthetic breasts!) Honestly. I am most impressed by her fine use of English, truth be told. See the Sept. 13, 2021 diary entry for link to her archive of technology reviews & "Maker" videos. ]

A matrix-calc in BASIC on the NorthStar Z-80 SBC (shown at screen side right). The little 10 mhz Z-80 can actually do real work. Using an old ACER laptop running Kermit under Windows 2K, to load programs and view results. Like a guy next road over, who has an old Model-A Ford sedan, from the 1930's. Fun - because it is so delightfully clear how to maintain and operate the thing in a useful and effective manner. :)

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 127.0.0.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.