Computers Overview
Commodore PET
Sinclair ZX80
Sinclair ZX81
BBC Micro
Sinclair Spectrum
Memotech MTX
    About
    Library
    Manuals
    Options
    Photos
    Projects
    Repairs
    Software
    Tools
      Development
          Dev. Corner
              Assembler
                  MTX Shell
                  Python
                  RISCOS
              Noddy+
          EXEROM
          Resources
          SDCC
          Z88DK
      Web Tools
    User Groups
    Video Wall
Memotech CP/M
Atari ST
Commodore Amiga
PDAs
DEC 3000 AXP
OpenVMS
Raspberry Pi

 

 
 
 

The Memotech MTX Series

MTX Running Unix (sort of) !

(Screen output from MEMU with CFX-II Emulation running Fuzix)

 

Introduction


Developed by Linux developer Alan Cox, Fuzix OS, is a tiny Unix System V kernel, initially for Z80, but now also available for other CPUs, including 6809 and 68000. Reflecting its aim, Alan has tagged Fuzix on his Github repository with the comment "Because Small Is Beautiful ". The Readme on Github has some details about the current status of the project and pre-built binaries for a range of real hardware and emulators can be downloaded from fuzix.org.

Alan has written a small Fuzix wiki and also posted some Frequently Asked Questions for the wider Fuzix community; on this page, I intend to add MTX specific details.

The OS is available for a number of hosts and emulators, Alan has developed installations for the Memotech MTX with CFX / CFX-II hardware; versions for MTXPlus+ and Andy Key's REMEMORizer are in the works. Emulation under MEMU is supported.

The MEMU download on fuzix.org uses the serial port emulation that is available in Unix/Linux using named pipes which are not available in Windows. To run Fuzix under Windows, you will need Bill Brendling's Windows build of MEMU (which also includes a copy of the Fuzix image.)

Obviously, running on an 8-bit 4MHz Z80, the system isn't going to run a fancy GUI with lots of nice windows, but it is adequate to run a text based OS. On MTX, the system currently requires a minimum of 160k of RAM, so the MTX needs a RAM expansion of some sort, either using an original Memotech RAM board with an additional 96k on it, or one of Andy Key's MTX RAM boards.

The display above is a screen shot of Fuzix running on Bill Brendling's fork of MEMU that supports CFX-II and Fuzix. The screen output is from the emulated Parallax Propeller's 80 column VGA output, also running is the emulated MTX VDP's 40 column composite video output (not shown).


Functionality

In Alan's words, "It implements a fairly full classic Unix compatible kernel and file system - the command line shell is the real Bourne shell, most of the general utilities are there, it has assemblers and linkers but the C compiler and a native BASIC are ongoing projects.

It can also run CP/M apps although right now on the MTX, because of the memory layout, you are limited to a TPA of about 44k (will be 47.25 when I fix a few things). It's also quite good at playing adventure games because it's got interpreters for older Infocom, Scott Adams, Brian Howarth, Quill and older Level 9 games. Still need to do a PAW engine. It has file locking (or because it's Unix two people can modify the same file at the same time too if they want) "


Getting Started

For use on "real" hardware with CFX/CFX-II, Alan has generated a raw image file that should be written to a blank CF card. I use the free version of Minitool Partition Wizard to delete any existing partitions on the CF card, then use the portable version (no installation required) of HDDRawCopy to write the image file to a CF card.

With CFX / CFX-II connected, resetting the MTX with "C" key pressed will boot the system from the CF card, if the card contains a bootable copy of Fuzix, the loader will ask for the boot device to use (bootdev:), enter "hda1" to boot Fuzix

Enter the Date and Time when requested. Since the basic MTX computer does not have a battery backed real time clock, the starting date & time will be recalled from when the last time that the system was shutdown.

You will then be presented with the "login :" prompt, use "root" to login as, yes, you guessed it, you will be logged in as user root, with root privilidges and you will be greeted by the "Welcome to FUZIX" message and see the "#" command prompt. You now have a running Unix box !

If the MTX (or MEMU) has two video outputs, i.e., from the VDP (40 columns) and 80 column board (or CFX-II), both screens can be used for Fuzix by editing an initialisation file :

ed /etc/inittab  
1  
hit <return> until you see  02:3:off:getty /dev/tty2
then enter s/off/respawn/p
then write w
then quit q

The next time that Fuzix is started, the second screen will be active, use <Shift><F1> or <Shift><F2> to switch the user inout (keyboard) between them


Inbuilt Commands / Shell Commands

This page isn't intended to be a complete Unix reference, but I have listed the main commands present in FUZIX here - mainly as a crib sheet for Unix novices like me! The table below lists the main commands that I have used, without any great level of detail. I have included some links to more comprehensive descriptions on the web, mainly from Linux Info and Computer Hope, but if you don't know anything about Unix, you probably want to refer to a dedicated Unix resource.

The list is by no means comprehensive and will be expanded as I try out the different commands.

(A full list of the executable system programs can be found in the \bin directory.)

 
  Typical use
arithmetic Simple arithmetic questions
backgammon The classic game in text form
banner Displays or Prints a large text ASCII art version of its argument, try "banner fuzix"
cat Create / Display files
cd Change Directories
cp Copy Files & Directories
df Disk Free (Reports amount of space used/free on current filesystem (in blocks)
du Disk Usage (Reports the size of directory trees)
free Reports information on the amount of free and used memory and swap space
grep Search text for patterns (strings)
ls List Files (DIR)
mkdir Create Directories
mv Move or Rename Files and Directories
ps Process Status (Reports information about the currently running processes)
pwd Present Working Directory (Reports the current directory)
reboot * Restarts the computer - does NOT do an orderly shutdown and leaves a "dirty" file system !
shutdown * Cleanly close all open files and Shutdown the system
stty Changes and/or displays terminal line settings
ttt Tic-Tac-Toe or noughts and crosses if you prefer - 3Dimensional, in text form
uname Reports basic information on the Operating System
uptime Reports the current time, system uptime, active sessions and system load averages
wc Word Count (Counts the number of lines, words and characters in text)
who Reports who is logged in to the system and what they are doing
whoami Reports the username (login) of the current console session
wump Hunt the Wumpus (Text Adventure)
   


* Doing an orderly system shutdown is mandatory on Unix! If you simply turn off the computer, the file system will be flagged as "dirty" when the system is rebooted. It will try to clean up the file system, but this can take a while, especially at 4MHz and corruption of the system volume is still a possibility.

I **know** that I have to do this, but being so used to just switching off my MTX, hitting the power switch is a hard habit to break and I have done it quite a few times now - aaarghhhhh!

NB : The requirement to perform an orderly shutdown of Fuzix also applies when running under emulation in MEMU. If you just close the MEMU window, you WILL cause the file system to be flagged as "dirty" and a rebuild will be started the next time that you run MEMU with the Fuzix image.

 

Games 

As well as the classic games located in the /usr/bin directory, the MTX file system image contains a number of text adventure games stored in the /usr/games directory. They can be executed from the root home directory by specifying the path to the file and giving the executable name, e.g., /usr/games/startrek

Included in the distribution are
adv01 Adventureland (Adventure)
adv02 Pirate Adventure (Adventure)
adv03 Mission Impossible (Adventure)
adv04 Voodoo Castle (Adventure)
adv05 The Count (Adventure)
adv06 Strange Odyssey (Adventure)
adv07 Mystery Fun House (Adventure)
adv08 Pyramid of Doom (Adventure)
adv09 Ghost Town (Adventure)
adv10 Savage Island - Part 1 (Adventure)
adv11 Savage Island - Part 2 (Adventure)
adv12 The Golden Voyage (Adventure)
adv13  Unnamed (Adventure)
adv14a Unnamed  (Adventure)
adv14b Buckaroo Banzai (Adventure)
advent Colossal Cave Adventure
cowsay <phrase> ASCII Art Cow "says" the entered text
fortune Fortune Cookie generator
hamurabi Govern Ancient Sumeria
myst01 to myst09 Mysterious Adventures
myst02 The Time Machine (Adventure)
myst03 Arrow of Death -Part 1 (Adventure)
myst04 Arrow of Death -Part 2 (Adventure)
myst05 Escape From Pulsar (Adventure)
myst06 Circus (Adventure)
myst07 Feasibility Experiment (Adventure)
myst08 BAD FILE (Adventure)
myst09 Perseus and Andromeda (Adventure)
myst10 Ten Little Indians (Adventure)
myst11 Waxworks (Adventure)
   
startrek Star Trek - captain the USS Enterprise and save the galaxy
   
   


 

 

Downloads
Zip Version Description
190714 Bill Brendling's custom MEMU build for Windows.
Includes CFX-II emulation and a copy of the Fuzix image. To run the Fuzix image, use
 "memu-cfg -config-file fuzix.cfg -mon-ignore-init -diag-bad-port-ignore "
     
     
     
     
     



Web References 
hackaday  Z80 Fuzix is like old fashioned Linux 
tuxdiary  Fuzix OS: a lean kernel for Z80  
   
tldp Linux File System Hierarchy
Linux Info Useful Command Reference
Rapid Tables Useful Linux Reference

mailto: Webmaster

 Terms & Conditions