Jump to content

[Info] compiling/running z80pack imsaisim/altairsim on armbian Desktop


Recommended Posts

Posted

If you know the movie "Wargames" then you may know the computer of "David Lightman" a IMSAI 8080 ;)

 

Udo Munk did create the software z80pack (last version from 2017 v1.36 at https://www.autometer.de/unix4fun/z80pack/ )
which does include

- IMSAI 8080

- Altair

- Cromemco Z1

and 

- cpmsim

Emulation.

 

Against the text based cpmsim emulation the other features a graphical frontpanel with "blinken lights" :)

 

Yesterday I did try to compile/start my favourite IMSAI 8080.

I did follow the instructions - which I collect and wrote for me - see attached to this message.

 

But yesterdy I only got limited success (after many "bad" compiles with missing dependencies) in starting the IMSAI 8080 emulation.
I did get the graphical frontend *yeah* - but after POWERON/RUN the computer I didnt get any terminal-output :(

 

After MANY retries I did give up :( 

Today I did the same compile-session on a PC with Ubuntu MATE 20.04LTS and it did work in the first try :) 

 

At first I got no idea what wasnt working....but then I discovered that - when moving the graphical frontpanel - the terminal-output was written VERY SLOWLY to the terminal-screen *Aha*

 

Because the garphical frontpanel seem to work perfectly (and did also compile very well) I searched inside the directorys of imsaisim and found in the "conf"-directory the file system.conf

 

There in system.conf is a line where the FPS-rate of the frontpanel as default is configured to 60 FPS (Frames per second).

While taking a look at htop the NanoPi A64 (where my armbian buster Desktop does run) the cpu-utilization is near 90%

 

So my gut instinct did tell me thats to much and the NanoPi has to much work with the frontpanel than writing to the terminal.

 

I changed the framerate in

- for the IMSAI 8080: ~/z80pack-1.36/imsaisim/conf/systemconf

- for the Altair: ~/z80pack-1.36/altairsim/conf/systemconf

- for the Cromemco Z1: ~/z80pack-1.36/cromemcosim/conf/systemconf

to

# front panel framerate
fp_fps                  10

After that change all 3 emulators with graphical frontend did startup and give output on the terminal :)

 

I contacted Udo Munk via email about this topic and he already knew it :)
He wrote that he had implemented the FPS option, because some lower-spec systems had problems to achieve the power for producing a framerate of 60 FPS for the frontpanel.

 

 

Here my write-up / documentation how I did compile /  successfully start the IMSAI 8080 emulation:
(many thanks to John Kennedy from the FB-Group Altair 8800 for double-checking my instructions!)

======================================================================
My normal evironment for compiling source:
======================================================================
apt install gcc libncurses5-dev liblua5.3-dev git make zip unzip -y


======================================================================
Getting z80pack-source:
======================================================================
cd ~
wget https://www.autometer.de/unix4fun/z80pack/ftp/z80pack-1.36.tgz
tar -xvf z80pack-1.36.tgz
cd ~/z80pack-1.36/


======================================================================
Dependencies named by z80pack:
======================================================================
 libjpeg
 X11
 OpenGL
 c++ compiler (g++)
 libpthread


======================================================================
Packages for the z80pack-dpendencies:
-------------------------------------
apt install libjpeg-dev x11-common libpthread-stubs0-dev libxmu-dev
apt install mesa-common-dev z80asm libglu1-mesa-dev freeglut3-dev 
======================================================================


==>                                                         <==
==> I built all packages of z80pack in the following order: <==
==>                                                         <==
==> ATTENTION: for some commands you may have to use sudo   <==

======================================================================
1.) FRONTPANEL
======================================================================
cd ~/z80pack-1.36/frontpanel/
make -f Makefile.linux

NOTE: Be sure to copy libfrontpanel.so to a shared library path!
NOTE: cp ~/z80pack-1.36/frontpanel/libfrontpanel.so /usr/lib

make -f Makefile.linux clean


======================================================================
2.) CPMSIM
======================================================================
cd ~/z80pack-1.36/cpmsim/srcsim/
make -f Makefile.linux
make -f Makefile.linux clean


======================================================================
3.) CPMSIM-TOOLS
======================================================================
if you are user root:	mkdir /root/bin
if you are user pi: 	mkdir /home/pi/bin
cd ~/z80pack-1.36/cpmsim/srctools
make
make install

NOTE: (does install in /root/bin/)
NOTE: Tools installed in /root/bin, make sure it is
NOTE: included in the systems search PATH
NOTE: export PATH=$PATH:/root/bin
NOTE: or
NOTE: export PATH=$PATH:/home/pi/bin

make clean


======================================================================
4.) ALTAIRSIM
======================================================================
cd ~/z80pack-1.36/altairsim/srcsim/
make -f Makefile.linux
make -f Makefile.linux clean

NOTE: change framerate to "fp_fps 10" in 
NOTE: ~/z80pack-1.36/altairsim/conf/system.conf

======================================================================
5.) CROMEMCOSIM
======================================================================
cd ~/z80pack-1.36/cromemcosim/srcsim/
make -f Makefile.linux
make -f Makefile.linux clean

NOTE: change framerate to "fp_fps 10" in 
NOTE: ~/z80pack-1.36/cromemcosim/conf/system.conf

======================================================================
6.) IMSAISIM
======================================================================
cd ~/z80pack-1.36/imsaisim/srcsim/
make -f Makefile.linux
make -f Makefile.linux clean

NOTE: change framerate to "fp_fps 10" in 
NOTE: ~/z80pack-1.36/imsaisim/conf/system.conf

======================================================================
PREPARE 1st start of imsaisim;
======================================================================
cp ~/z80pack-1.36/frontpanel/libfrontpanel.so /usr/lib
cd ~/z80pack-1.36/imsaisim
rm conf
ln -s conf_2d conf
export PATH=$PATH:/root/bin
NOTE: maybe add the export-command to your ~/.bashrc


======================================================================
START of IMSAI 8080 CPM v2.2 from the x-terminal on the desktop 
(needs to be a "x-terminal) for connecting to the X-Server for 
creating the graphical frontpanel:
======================================================================
./cpm22
NOTE: maybe root has to give access-rights:  
NOTE: chmod -R 666 ~/z80pack-1.36/imsaisim/disks
NOTE: on the x-terminal root and the to the desktop logged in user can 
NOTE :start the application and connect to the X-server on a 
NOTE: SSH-terminal ONLY the to the desktop logged in user can start the
NOTE: application and connect to the X-server to give root access to 
NOTE: the X-server from a SSH-terminal the he to the desktop logged 
NOTE: in user has to give root access via the xhost command:
NOTE: xhost SI:localuser:root

======================================================================
POWER-UP the IMSAI 8080 in the graphical frontpanel
======================================================================
Press "POWER ON " upper part on the first switch on the right side 
(POWER ON / POWER OFF)

Press "RUN" upper part of the third (red) switch (RUN/STOP)

======================================================================
Exit the IMSAI 8080
======================================================================
Enter "bye" on the CP/M-commandline
OR press "POWER OFF " lower part on the first switch on the right side 
(POWER ON / POWER OFF)

OR close the graphical frontpanel with the close button X 
(Window-Manager-close)

 

Pictures (screenshots are done with Mirage as you can see) of my "success" :)
IMSAI8080_screenshot_cut.thumb.jpg.0bc8b3688aafd614983f7cdbcf1db824.jpg

IMSAI_8080_Wargames.jpg.2c336c2a018605fb0f780e31217ff40d.jpg

Altair_screenshot_cut.jpg

Cromemco_Z1__screenshot_cut.jpg

Posted

Here an additional write-up for using/starting imsaisim not only from the x-term, but also from a text-based SSH-console where you may have to give some additional access-right for accessing the x-server where the graphical frontpanel should be displayed:

using/starting imsaisim
- from the graphical x-terminal
- from the via SSH connected text.based terminal

======================================================================
from the graphical x-terminal:
======================================================================
imsaisim could be started from the graphical x-terminal with the user
guido (here in my example) because Iam logged in with the user guido
and on this x-terminal also with the user root with the following 
commands:
cd ~/z80pack-1.36/imsaisim
./cpm22

This will work because the variable DISPLAY is already set to :.0,0
NOTE: echo $DISPLAY
NOTE: :0.0

Normally the user guido (when logged in to the Desktop) has to allow root
to use the - under the user guido started - x-server.

======================================================================
from the via SSH connected text.based terminal:
======================================================================

As default only user guido is allowed to use the x-server (because he 
is logged in the desktop):
NOTE: when root it logged into the desktop-environment only root has 
NOTE: access to the x-server
NOTE: because when logged in via SSH the variable DISPLAY isnt set
guido@npi-a64$ export DISPLAY=:0.0
guido@npi-a64$ xhost
==> access control enabled, only authorized clients can connect
==> SI:localuser:guido

-----------------------------------------------------------------------
user guido can ALLOW/ADD root the access to the x-server with the 
following command
-----------------------------------------------------------------------
guido@npi-a64$ xhost SI:localuser:root
==> localuser:root being added to access control list

-----------------------------------------------------------------------
or user guido can DISALLOW/REMOVE root the access to the x-server with
the following command
-----------------------------------------------------------------------
guido@npi-a64$ xhost -SI:localuser:root
==> localuser:root being removed from access control list

-----------------------------------------------------------------------
to REVIEW the actual state just give the following command:
-----------------------------------------------------------------------
guido@npi-a64$ export DISPLAY=:0.0
guido@npi-a64$ xhost
==> access control enabled, only authorized clients can connect
==> SI:localuser:root
==> SI:localuser:guido
NOTE: setting this via xhost is a TEMPORARY setting

Now after allowing/setting the access rights the user guido and the 
user root can access the x-server.

Now when giving the commands
cd ~/z80pack-1.36/imsaisim
./cpm22

-----------------------------------------------------------------------
 #####    ###     #####    ###            #####    ###   #     #
#     #  #   #   #     #  #   #          #     #    #    ##   ##
#     # #     #  #     # #     #         #          #    # # # #
 #####  #     #   #####  #     #  #####   #####     #    #  #  #
#     # #     #  #     # #     #               #    #    #     #
#     #  #   #   #     #  #   #          #     #    #    #     #
 #####    ###     #####    ###            #####    ###   #     #

Release 1.36, Copyright (C) 1987-2017 by Udo Munk
IMSAI 8080 Simulation Release 1.17, Copyright (C) 2008-2017 by Udo Munk

CPU speed is 2 MHz
RAM size is 54 KB

Loader statistics for file bootrom.hex:
START : d800H
END   : df7fH
LOADED: 0780H (1920)

FrontPanel Simulator v2.1 Copyright (C) 2007-2015 by John Kichury
-----------------------------------------------------------------------

NOTE: the graphical frontpanel will start at the desktop-screen, 
NOTE: BUT the normal terminal-output would be displayed at the 
NOTE: text-based SSH-console from where you logged in to the computer
NOTE: who is holding the imsaisim-directory - which will give you much
NOTE: more space for the frontpanel and the text-based terminal also
NOTE: has more space at the SSH-console - maybe for a bigger font ;)

 

Posted

armbian focal bad and armbian buster good for compiling/using z80pack v1.36?

 

While trying to reproduce the compilation-process I did observe a problem AFTER all packages were compiled:

On my armbian-systems with armbian ubuntu focal and dev-kernel 5.6.15 I could start ./cpm22 from imsaisim and do get the graphical frontpanel BUT when I do switch on the IMSAI with the frontpanel I do get a segmentation fault :( 

 

imsai_crash.thumb.jpg.c2c1802c4b06ab8bba374f626bbfdf38.jpg

 

This did happen on a NanoPi K1 Plus and a Orange Pi PC2 where the armbian focal dev-image was/is installed :(
 

Welcome to Armbian Focal with Linux 5.6.15-sunxi64
package bsp-kernel[20.05.2] u-boot[20.05.2] dtb   [20.05.2]
firmware          [20.05.2] config[20.05.2] branch[dev]

Linux npi-k1-plus 5.6.15-sunxi64 #20.05.2 SMP Tue Jun 2 17:33:03 CEST 2020 aarch64 aarch64 aarch64 GNU/Linux

Because my NanoPi A64 with armbian buster and dev-kernel  5.6.13-sunxi64 didnt got the problem I did compile a armbian buster with dev-kernel for my Orange Pi PC2 which did show the segmentation fault while using armbian focal.

 

After finishing the image-compile I ended up with

Welcome to Armbian buster with Linux 5.6.16-sunxi64
package bsp-kernel[20.08.0-trunk] u-boot[20.08.0-trunk] dtb   [20.08.0-trunk]
firmware          [20.08.0-trunk] config[20.08.0-trunk] branch[dev]

Linux opi-pc2 5.6.16-sunxi64 #trunk SMP Mon Jun 8 17:23:54 +03 2020 aarch64 GNU/Linux

After that I did go through the z80pack-compile-process and happily after pushing the Power-Button on the frontpanel I didnt get the segmentation fault  from the terminal :) and the emulation is useable without problems!

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines