Running Z80 Cromix under Linux

326 views
Skip to first unread message

cro memcos

unread,
Jun 11, 2021, 9:53:45 AM6/11/21
to crom...@googlegroups.com
I have been ruminating about Nigel Williams' question as to running Z80 Cromix under Linux.   He suggested yaze-ag and I have another easier idea ...

It is to use the already excellent and lofty work of Udo Monk and use his Z80 pack


---

He has decent instructions for CPM but not for running cromemcosim which enables you to run CDOS or Z80 cromix under Linux.

So I have just got it all working, Cromix 11.27, 3 terminals, under x64 Linux on Ubuntu 20 ...

image.png

The big picture is this

- you download his latest Z80 pack which is at level 1.37

- you will need to compile up the frontpanel and also the simulator

- I found a couple of packages missing from my Ubuntu 20 Linux system.  Well Virtual Machine.  My notes are

sudo apt-get install libpthread-stubs0-dev
sudo apt-get install libjpeg-dev
sudo apt install mesa-common-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install -y mesa-utils
sudo apt-get install -y x11-utils


cd ~/z80pack-1.37/frontpanel
make -f Makefile.linux clean
make -f Makefile.linux clean

cd ~/z80pack-1.37/cromemcosim/srcsim
edit Makefile.linux and change LFLAGS to
FLAGS = -L../../frontpanel -lfrontpanel -ljpeg -lGL -lGLU \
         -lX11 -lm -lpthread
make -f Makefile.linux clean
make -f Makefile.linux

sudo cp libfrontpanel.so /usr/local/lib


cd ~/z80pack-1.37/cromemcosim

edit cromix script and insert this line before call to cromemcosiim

export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

./cromix



- It's necessary to interact with the Graphical Z1 front panel like this
toggle switch 12 up (to simulate C, aka C000 hex)
press right edge power switch up to switch on
press run toggle up to jump to your selected xc000
cromemcosim script loads RDOS and so then it tries to boot, load from diskette fda

I will make 100% foolproof and longer instructions to follow, just thought I would post this as a solution to the Linux issue
and will of course also try it out on a Raspberry Pi in fullness of time.  Should that work [on the pi, running PiOS i.e. Raspbain not Ubuntu preferably]  I can generate a system that is live to the internet, all you would have to do is telnet into it  (and I would have it auto regenerate itself every say 24 hours in case somebody logs in and trashes it etc).


These are my thoughts so far.   Comments and suggestions welcome.

m

Richard Deane

unread,
Jun 11, 2021, 11:12:51 AM6/11/21
to crom...@googlegroups.com
Yes, I was running that with Cromix today on my rpi, love the switch front panel.  Love to have it HD booting, at the moment it defaults to floppy.

Do you know of any compatible HD images?

Richard 

--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cromemco/CABdvdmy%3DnL6z5nboCNx%3DtoLD6kJmn5Njb-5%2BiwBb90Sov9Qi_A%40mail.gmail.com.

Richard Deane

unread,
Jun 11, 2021, 11:16:14 AM6/11/21
to crom...@googlegroups.com
The z80pack build for cromemco sim and front panel worked fine for me with default settings on my rpi.

I already had the dependencies correct from previous work with imsaisim
Richard.

On Fri, 11 Jun 2021, 14:53 cro memcos, <crom...@gmail.com> wrote:

cro memcos

unread,
Jun 11, 2021, 2:10:11 PM6/11/21
to Cromemco
Richard,

Very interesting that z80pack is running successfully  on the rpi.   Can I ask are you running a 32bit or 64bit kernel and what OS level etc.

This means I can place an order for another rpi to become a resident Cromix 11.27 emulation.  'cheaply' !!

---

In terms of HD support I cannot see this every being possible ...  Well the current z80 emulators ZEMU and z80pck are able to emulate the 4FDC and 16FDC floppy controllers,  but I have never seen any emulation of the IMI disk controller or the STDC Hard Disk controller.   In the CPM world there is a modified CBIOS that allows for a new floppy with an artificial e.g. hundreds or thousands of tracks,  to emulate a huge floppy diskette.    But for CDOS / CROMIX where only the character but not block drivers are easily replaceable I don't see this happening.

Again I would love to be proved wrong on this as 4 x 1.2MB floppies only gets you so far.

regards m

Richard Deane

unread,
Jun 11, 2021, 6:21:47 PM6/11/21
to crom...@googlegroups.com
I compiled z80pack 1.37 release with make (cromemcosim & frontpanel) and ran cromemcosim on my rpi 4B 8 GB memory using 32 bit Raspbian OS; I bought the pi for 64-bit but there has only been 1 rough 64-bit beta OS soI don't use that. I just use the latest raspbian 32 and I always do an apt update and apt upgrade before an app install,so I was using 11 Jun 2021 level.

There is no benefit to buying the 8GB version of PI4B at present due to the lack of a 64-bit release.

You could get the neat pi400 with a keyboard, very similar but slightly faster :). Being retired and on a small budget, I have not indulged that desire yet, perhaps next birthday, hopefully after another bigger, faster, better rpi release.
 
I have built and run z80pack on a pi zero but the frontpanel had to be tweaked to drop refresh frequency as it took all cpu without that.

I run my pi4Bs with bootup from the 120GB Integral SSD USB3 from Amazon, faster and more robust (I hope)  than microSD.

I am playing with Cromemco word processors at present, getting to know wps, writemaster and screen; but nothing has made me drop MagicWand / Peachtext 5000 (v2.02) as my favourite word processor on CP/M.. Magic Wand could be tweaked for Cromemco, but the Kaypro version from www.durgadas.com might work fine with generic control keys .I believe Cromemco terminals are VT52 compatible but have not checked that yet.

I have a variety of linux running under VMware on my desktop PC, for those occasions where I need an Intel-ish processor, such as Mint, Centos, and I run a win7-32  VM for MyZ80 emulator. I often have MSDOS, PCDOS and DRDOS on VM or old hardware as needed.

What I lack is a good old epson compatible printer  (or OKIDATA laser with Epson or IBM Proprinter Emulation) so if I need to print to EPSON Matrix I have to do it through DOSPRN under WinXP to convert Epson FX to PCL. I can also use the Kaypro java emulator with Diablo to Postscript support (also www.durgadas.com).

I am learning Cromemco from time to time, but my main machine for CP/M is a Steve Cousins SC131 (Z180 running RomWBW where I use zsdos or cpm3 ,and a variety of other RC2014 and/or romwbw systems.

I use Joyce (PCW), CPC6128 or SIM Coupe emulators for disk manipulation to get at cp/m apps

Really, if it has CP/M I am interested in giving it a go. Hence Runcpm and the esp32 systems with FABGL cp/m emulation, or my Arduino Due with Altairduino - Yes! I am addicted.

Cheers 
Richard






rufreaknnuts

unread,
May 26, 2023, 11:06:40 PM5/26/23
to Cromemco
I've compiled these a couple times, under Ubuntu linux, and it compiles fine, but when I start the script it presents the frontpanel but no lights or switch action.. nothing toggles. I can telnet in on 4010 but get no activity once its connected.

Has anyone had this problem or know how to fix it?

Charles

Richard Deane

unread,
May 27, 2023, 2:25:59 AM5/27/23
to crom...@googlegroups.com
You need to set switches,  then power on, stop, reset , run. Then several carriage returns on kbd at console, or if compiled with web server support then web browser localhost:8080, then open TTY and a few CRs.

Switches,  from memory,  something like 0x0940.

Richard 


rufreaknnuts

unread,
May 27, 2023, 6:24:47 AM5/27/23
to Cromemco
I saw that about setting the switches.. but I have no switch activity, as if the panel is just a picture and not something interactive.

Richard Deane

unread,
May 27, 2023, 12:27:05 PM5/27/23
to crom...@googlegroups.com
For me, mouse-clicking on the top or bottom of the switch will give switch action, e.g. Power Switch.

I assume you've tried that on the "Cromemco Z1 window" 
image.png



Try instead the switches in the CPA window of localhost:8080 (it just has the rightmost few switches). I typically use PWR-ON,STOP,RESET,RUN

Richard




rufreaknnuts

unread,
May 27, 2023, 8:14:42 PM5/27/23
to Cromemco
Yeah, I've clicked all over the frontpanel. I don't have anything running on port 8080. The ports 4010 and 4011 are available, connecting doesn't provide any activity. Is there supposed to be a web interface?

Charles

William Mahoney

unread,
May 27, 2023, 8:44:29 PM5/27/23
to crom...@googlegroups.com
Hi Charles;

I know “it worked for me” is not an answer you want, but when I had everything built I literally ran the “./cromix” script, which sets up the disks, etc. and it came right up. I built with z80pack 1.37 (is that the most recent?). The script calls out disks/library/cromix1127_8.dsk and rdos0312.hex (which is what I have been working on reverse engineering, off-and-on). I run the script, flip on the power switch, flip to “run”, hit some CR’s and it tests the memory and starts.

Not sure if that helps but it can be done - maybe encouraging?!

Bill


On May 27, 2023, at 7:14 PM, rufreaknnuts <rufrea...@gmail.com> wrote:

Non-NU Email

Richard Deane

unread,
May 28, 2023, 2:14:46 AM5/28/23
to crom...@googlegroups.com
There are some #define settings in one of the .h files which define whether Web server and front panel are used,  if I remember correctly. I don't remember the default state, but I recollect uncommenting several before the build.

Richard 


Udo Munk

unread,
May 29, 2023, 10:07:35 AM5/29/23
to Cromemco
rufreaknnuts schrieb am Samstag, 27. Mai 2023 um 05:06:40 UTC+2:
I've compiled these a couple times, under Ubuntu linux, and it compiles fine, but when I start the script it presents the frontpanel but no lights or switch action.. nothing toggles. I can telnet in on 4010 but get no activity once its connected.

You need to power on with the power switch on the frontpanel first, then some lights come on. Then you need to click Run to start the CPU
and then you should get lights activity.

The telnet server is active right after start of the application, you can connect to it with telnet, but there will be no output. For that some software like an OS must be started first, that outputs to the serial ports.

Udo Munk

unread,
May 29, 2023, 10:09:36 AM5/29/23
to Cromemco
rufreaknnuts schrieb am Sonntag, 28. Mai 2023 um 02:14:42 UTC+2:
 Is there supposed to be a web interface?

Not by default, that needs to be turned on in the sim.h configuration for the machine.

Udo Munk

unread,
May 29, 2023, 10:13:00 AM5/29/23
to Cromemco
wmahoney schrieb am Sonntag, 28. Mai 2023 um 02:44:29 UTC+2:
 I built with z80pack 1.37 (is that the most recent?).

1.37 is the latest release, but most recent is 1.38-dev with many more features. You get this by checking out branch dev
from the Github repository.
1.38-dev is the current development branch, but it is very stable and can be used.

rufreaknnuts

unread,
May 29, 2023, 11:58:41 AM5/29/23
to Cromemco
I am not getting my point across... None of the switches do anything, including the power switch (on my laptop).. trying now on the desktop I noticed the last switch on the left pops up when I hit 'power' another time when I hit 'examine' but I can't toggle it back down and no movement on any other switch..

Richard Deane

unread,
May 29, 2023, 1:37:37 PM5/29/23
to crom...@googlegroups.com
Are you getting a clean build under Linux?
Perhaps try the IMSAI build, I think that uses the front panel as well, see if that works for you, might give you confidence that your build method and dependencies are correct.


Richard





--
You received this message because you are subscribed to the Google Groups "Cromemco" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cromemco+u...@googlegroups.com.

rufreaknnuts

unread,
May 29, 2023, 6:42:01 PM5/29/23
to Cromemco
I get the same results with the imsai sim and the altairsim. The straight cpmsim works fine.

Udo Munk

unread,
May 30, 2023, 2:18:52 AM5/30/23
to Cromemco
rufreaknnuts schrieb am Dienstag, 30. Mai 2023 um 00:42:01 UTC+2:
I get the same results with the imsai sim and the altairsim. The straight cpmsim works fine.

This is some problem with OpenGL, probably it is doing software rendering not using a GPU, which
is very slow and the machine won't react. Can you run any OpenGL software on the system?
Usually glxgears is included as a demo and test program. Then what is the output of
glxinfo | grep renderer ?

Richard Deane

unread,
May 30, 2023, 2:24:33 AM5/30/23
to crom...@googlegroups.com
Have you done a good clean build of frontpanel and copied libfrontpanel.so as instructions say, and ensured the target folder is accessible (export?)

Several people have posted variations of the build method.  I noticed that make can work better than make -f Makefile.linux. I was using latest dev build from a few weeks ago, not 1.37

Which version are you using?

Try git clone -b dev {put github link here} to a fresh location in your home folder and try a complete rebuild.

Is your Linux up to date? Latest gcc etc?

Check for any missing dependencies.

Richard 


William Mahoney

unread,
May 30, 2023, 11:34:39 AM5/30/23
to crom...@googlegroups.com
Also here’s an idea. When I make something from scratch for the first time I take notes (including my mistakes, actually). Then I go back and at the end of the word doc kind of summarize: “OK I figured out what exact steps you need”. Anyway I’m happy to share, maybe there is something I did that you did not do? I built on Ubuntu 22 in a VM on a Mac, so some of the notes are specific to a Mac - just ignore those and follow the Linux notes. You’re welcome to see if it matches what you did, it is here:

 https://www.dropbox.com/s/p4n6boipm74ecc1/Building%20the%20Simulator.docx?dl=0

Bill


On May 30, 2023, at 1:24 AM, Richard Deane <rwd...@gmail.com> wrote:

Non-NU Email

rufreaknnuts

unread,
May 30, 2023, 4:15:17 PM5/30/23
to Cromemco
chuck@ZZ:~/z80pack-1.37/cromemcosim$ glxinfo | grep renderer
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_MESA_swap_control,
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_MESA_swap_control,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
chuck@ZZ:~/z80pack-1.37/cromemcosim$

I made the changes in the Makefile.linux shown at the start of this thread, with the exception of leaving the term FLAGS as LFLAGS.. it wouldn't compile, otherwise.

CH

rufreaknnuts

unread,
May 30, 2023, 6:43:03 PM5/30/23
to Cromemco
My laptop reported the same chipset, but UHD graphics. It's also got an Nvidia in there, so I installed its driver pkg and rebooted. Voila! it works now.

Not compatible with the Intel 630 chipset?

Thanks all, for your help.

CH

Udo Munk

unread,
May 31, 2023, 3:52:11 AM5/31/23
to Cromemco
rufreaknnuts schrieb am Mittwoch, 31. Mai 2023 um 00:43:03 UTC+2:
My laptop reported the same chipset, but UHD graphics. It's also got an Nvidia in there, so I installed its driver pkg and rebooted. Voila! it works now.

Not compatible with the Intel 630 chipset?

Mesa might have a problem with the internal Intel graphics, my Macbook has a different one which works OK.
glxinfo | grep renderer
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Intel Iris OpenGL Engine
Usually Nvidia and AMD drivers work well, good idea to install the drivers and use the Nvidia instead.

Udo Munk

unread,
May 31, 2023, 3:54:39 AM5/31/23
to Cromemco
rufreaknnuts schrieb am Dienstag, 30. Mai 2023 um 22:15:17 UTC+2:
I made the changes in the Makefile.linux shown at the start of this thread, with the exception of leaving the term FLAGS as LFLAGS.. it wouldn't compile, otherwise.

That probably is a typo, the development tools use LFLAGS of course, not FLAGS. So the line in the Makefile
must be LFLAGS = whatever libs are needed on the system.

Reply all
Reply to author
Forward
0 new messages