Simple80 – unexpected use – a quick way to port CP/M to Z80 computers

257 views
Skip to first unread message

Stefan V. Pantazi

unread,
Nov 16, 2023, 10:05:30 PM11/16/23
to retro-comp
Greetings!

I recently subscribed to the group. Firstly I would like to express my sincere appreciation for the work you all do in the retro-computing arena. I am currently exploring some RC2014 modules to add to my builds. I already recognize many of the names in this group.  I have already built the Simple80. Thank you for making it Mr. Bill Shen! It worked without any problems for me. Most importantly it helped me greatly with the evolution of another project I embarked on and that I think it would otherwise been extremely difficult to complete. This is the main reason for this post.

Long story short, we wondered whether it would be possible to run CP/M 2.2 on a recently revived ZX Spectrum compatible (a.k.a. CoBra 2, Turbo Spectrum or TS for short) that some of us built about a year ago based on the documentation published here: http://cobrasov.org/ . What was needed was a good, solid starting point for a CP/M 2.2 system with easy to use mass storage (e.g., CF card). I found that Simple80 software was quite the perfect starting point. This initial exploration of the software component was done exclusively in Fuse 1.6.0 on a newly developed TS emulator. For the hardware side, the quickest way to bootstrap the CP/M hardware build was, again,  Simple80. After removing the SRAM, the EPROM and CPU and leaving only the SIO, CF Card and the glue logic in place, I connected the board through the RC2014 bus to the 96-pin extension connector of the TS. The SIO in Simple80 also provided additional possibilities of expansion: the Simple80 Monitor software was included into the boot EPROM and allowed the use of a uTerm (https://github.com/SuperFabius/uTerm) console at 115200 baud. Now we could experiment with both a 62k (CF bootable) TS CP/M 2.2 in 80-character wide text-mode serial terminal as well as with the EPROM-resident 53k CP/M version adapted for a graphical console based on the ZX Spectrum compatible hardware. These are some of the peripherals you can spot in the attached images (two screens, one text mode 80-columns, one graphical 256x192 (ZX Spectrum), two keyboards, one PS/2 for uTerm console and the extended (40+8 keys) CoBra 2 keyboard).

As a budding retro-computing hobbyist, most of the things I’ve described here are new ground for me. I hope it inspires and helps someone who was, like myself, looking into porting CP/M to specific hardware for the first time. If there is interest in additional details I am glad to provide more.

Stefan V. Pantazi
20231116_170935_1k.png
20231116_171013_1k.png

Bill Shen

unread,
Nov 17, 2023, 8:31:42 AM11/17/23
to retro-comp
I'm glad Simple80 is able to help you with CP/M development.  Another Romanian, Ladislau Szilagyi, has developed enhanced HiTechC compiler and TE editor that runs on Simple80 and use the entire 128K RAM for these programs.  https://groups.google.com/g/rc2014-z80/c/sBCCIpOnnGg

Simple80 can be overclocked to 14.7MHz by replacing 7.37MHz oscillator with 14.7MHz oscillator and change serial port to 230400.

One of your team is working on K80 and has access to KIO, Z84C90.  I have a variation of Simple80 design based on KIO instead of SIO but never even powered it up.  I probably should get it running 4 years later.
  Bill

Stefan V. Pantazi

unread,
Nov 17, 2023, 12:25:10 PM11/17/23
to retro-comp
Wonderful! Thank you for the reply and additional info and keep up the great work! I I will add Ladislau' s HiTecC compiler to my Simple80 for sure. For CP/M development I am personally more partial to the Turbo Pascal environments, I have been programming in this language for a long time. 

Indeed the K80 seems to be trickier to debug, a different level of complexity there. There seem to be some problems with accessing the RAM, Nicolae reports that the RAM test in the Monitor stops/fails after rebooting his the K80. If I remember correctly, it stops and reports a problem at 0xc000 which may well indicate RAM banking issues with the build.

I have also been thinking of building more of your designs. I am considering to skip the K80 and go directly to the Z80ALL with the separate  KIO serial board with. The only part that I am missing to build Z80ALL is the dual port RAM. 
Which brings me to another related question: have you considered a graphical (e.g. 640x480) VGA instead of the text only, or is the speed of the parts preventing that?

Thank you again!

Stefan

Stefan V. Pantazi

unread,
Nov 17, 2023, 1:03:14 PM11/17/23
to retro-comp
Replying to myself, with an update about the Nicolae's K80 build: it appears to work fine now after fixing a problem with the reset circuit. 

Bill Shen

unread,
Nov 17, 2023, 2:39:29 PM11/17/23
to retro-comp
A quick reply about Z80All and KIORC.  Ladislau has done great deal of works with that setup, but don’t order the pc boards because I’ve updated them with clean board designs.  When I get back to my desk, I’ll provide the links and updated design files.  I’ll also address your other questions
  Bill

Stefan V. Pantazi

unread,
Nov 17, 2023, 3:00:21 PM11/17/23
to retro-comp
Thank you for the heads up!

Bill Shen

unread,
Nov 17, 2023, 7:54:33 PM11/17/23
to retro-comp
I updated the Z80all and KIORC homepages with latest gerber photoplots.  This is the link to Z80all rev2 pc board; and link to KIORC rev1 pc board.  I still need to make significant update to Z80all homepage because Ladislau Szilagyi has made very significant contributions to Z80all.  CP/M BIOS now support VT52 cursor movements and Ladislau has added many software including enhanced HiTech C and TE editor.  He has a dedicated Z80all page at GitHub.

AT 25MHz, Z80all is still not fast enough to support color graphic at 640x480.  The graphic hardware is also fairly complicated.  My goal for Z80all is an economical standalone Z80 computer with basic text video and keyboard capabilities.  I'll need to experiment with few color graphic hardware before I'm smart enough to integrate such graphic into a standalone Z80 computer.
  Bill

Stefan V. Pantazi

unread,
Nov 18, 2023, 1:26:31 PM11/18/23
to retro-comp
Excellent! Thank you for the updated boards. I will order some PCBs ASAP! I am also looking forward to the software components! As luck would have it,  I also happen to be in the middle of figuring out terminal emulation and implementing a minimal set of Escape sequences on my CP/M 2.2 port to Turbo Spectrum. Maybe I can join Ladislau's efforts and share ideas and code. I will surely be looking at his VT52 cursor emulation. For myself, I was shooting for a subset of VT100 sequences inspired by this older implementation on the CPC: https://ewen.mcneill.gen.nz/programs/cpc/ewenterm/ . But maybe that is overkill. 

I looked at Laidslau github and, to my delight, I found his 64MB CF card CP/M 2.2 image with lots of software goodies, including the TE editor. And of course I had to try it on. It runs in the emulator, but of course it displays messed up, uninterpreted terminal Escape sequences. However, I am glad to see that it exists properly after the expected Esc+X key combination. I even managed to play and easily win (I do not think the algorithm is very good at playing) a game of Connect4 I found on the card image! Tetris needs more work but exits properly as well.  (I attached a few images with the emulator screen). All this gives me confidence that so far I have what appears to be a fairly stable, EPROM-residing 53k CP/M. Scrolling runs fine (took me a while to adapt the ZX Spectrum scrolling routines) and many programs run and exit nicely, albeit some requiring the VT-terminal emulation. This is great as I have been struggling a bit and only very recently managed to have zexall run without problems. Unfortunately, programs like unarj still exit with "out of memory messages" (cannot do much about that), but no longer crash or halt the computer. 

Regarding graphic displaiy, I understand your point regarding hardware not being fast enough. My noob thinking is that a CPLD solution may be required. For my Simple80 and the like I was also exploring non-VGA modules such as the ones with dedicated VDPs like TMS9918. On the other hand, I also had to track for you this link (http://tinyvga.com/avr-sdram-vga) I had in my collection since forever. It describes briefly a fascinating project about a tiny VGA implementation using a RAM chip and a DAC (possibly replaceable by a resistences ladder). Maybe it inspires or at the very least receives a critique of the approach from you or others in the group. From what I gather, using the burst- mode of the SDRAM chip (NOT SRAM nor DRAM) is the magic trick in that project. 

Stefan
Screenshot from 2023-11-18 12-34-44.png
Screenshot from 2023-11-18 12-35-29.png
Screenshot from 2023-11-18 12-36-32.png
Screenshot from 2023-11-18 12-32-59.png

Alan Cox

unread,
Nov 18, 2023, 6:18:56 PM11/18/23
to Stefan V. Pantazi, retro-comp
On Sat, 18 Nov 2023 at 18:26, Stefan V. Pantazi <svpa...@gmail.com> wrote:
>
> Excellent! Thank you for the updated boards. I will order some PCBs ASAP! I am also looking forward to the software components! As luck would have it, I also happen to be in the middle of figuring out terminal emulation and implementing a minimal set of Escape sequences on my CP/M 2.2 port to Turbo Spectrum. Maybe I can join Ladislau's efforts and share ideas and code. I will surely be looking at his VT52 cursor emulation. For myself, I was shooting for a subset of VT100 sequences inspired by this older implementation on the CPC: https://ewen.mcneill.gen.nz/programs/cpc/ewenterm/ . But maybe that is overkill.

VT100 is very much slower than VT52 on 8080 or Z80 as you have to do
very expensive number to ascii conversions in the app and even more
expensive reversals in the emulator.

Alan

Stefan Pantazi

unread,
Nov 19, 2023, 10:11:38 AM11/19/23
to Alan Cox, Stefan V. Pantazi, retro-comp
Thank you for this. I noticed the many Escape sequences with numeric parameters in VT-100 and was ready to take the bull by the horns and do the string to number conversions back and forth as implemented in ewenterm. I thought having the cursor to go to position XY was required to do terminal work. Now that I read more about VT52 and its variants I see I was wrong and understand what you mean. I will continue to explore.Thanks again.

Stefan

--
You received this message because you are subscribed to the Google Groups "retro-comp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-comp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/retro-comp/CAK9X0%2BuPHD_Hnw11XU0LMUMZq2fMJ8Pgt6etqLGs6Y%3DFG4zoFw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages