CP/M

How to experience CP/M-80 2.2 using MAME's Sharp X1 emulation?

List of FIles in Sharp X1 CP/M-80 2.2

In the last tutorial, we saw how to experience CP/M-80 2.2 using MAME's KAYPRO II emulation. There are three system on which we can run CP/M-80 2.2:

  • KAYPRO II
  • NCR Decision Mate V
  • Sharp X1

In this tutorial, we are going to use the SHARP X1 emulation. You can download the files required for this tutorial from here:

Installing CP/M-80 2.2

First you need to make sure you have installed MAME. For windows, see our tutorial on Legacy Installer on how to install MAME on Windows. For linux, you can install mame from the official repository of your distribution. See this page for a list of distributions offering the package. If your distribution does not include mame in its repositories (highly unlikely), you can build MAME from source.

After you have installed MAME, you need to create a folder in which all the files related to the emulator will reside. Open a Terminal/Command Prompt window and move to that folder. Then run:

mame -cc

You may need to specify the path to MAME if you are on Windows:

"C:\Program Files\MAME\mame.exe" -cc

This command will create some basic config files for MAME in that folder. Now open the folder in your File Manager and delete the mame.ini file. Extract the mame.ini file from the archive you downloaded above according to your platform and copy it to the folder in which you are storing all the files related to the emulator. Create a folder called roms in that folder. Copy the ROMs archive to that folder. Do not extract the ROMs from the zip file. Move the zip files without extracting to the roms folder.

Extract the disk image archive and copy the Images/ImageDisk/disk01.imd file to the folder where you are storing all the files related to the emulator.

Now switch back to the terminal and run:

mame x1

You need to prefix mame with the path on Windows as shown above. The mame window should open like this:

MAME's X1 emulation window

If the window does not open and you get a ROM not found or similar error, see the troubleshooting section below. Press any key to continue. The emulation of this machine is not perfect. You will be informed about this by MAME. Press any key to continue. Wait until you get to this screen:

Sharp X1 OS loader screen

Press the CAPS LOCK key to enable UI control. Then press the TAB key to open the menu.

Sharp X1 main menu

Then click on File Manager > floppydisk1. Choose the disk01.imd file from the list and choose Read-write.

Sharp X1 floppy disk image chooser

Then click on Return to Previous menu > Return to the machine. Press the CAPS LOCK key once again to turn off UI control. Press F key and then 0 key to start CP/M-80 2.2. Enter the following command to install CP/M-80 2.2:

movcpm

If the the command do not finish within 5 minutes, close you VM and start is again. Enter the DIR command to see a list of files. If it matches the screenshot below, then CP/M-80 2.2 is installed!

List to files in Sharp X1 CP/M-80 2.2

Now, you can close this window. The next time you open the emulator again, you don't need to go through all these steps. Just open your terminal and navigate to the folder where all the the files related to the emulator are stored and run:

mame x1

You need to prefix the above command with the path to MAME on windows as shown above.

But this method is very troublesome and lengthy. We can make a shell script which runs the above command on linux:

#!/bin/bash
mame x1

and save the file as CPM-80-x1.sh. Then make the script executable by running the following command in terminal after navigating to that folder:

sudo chmod +x ./CPM-80-x1.sh

Then we can right click on that file and click on Run as Program to open the emulator. Some DEs and distros may have other methods of running shell scripts.

On Windows, it is much easier. Create a file called CPM-80-x1.bat in that folder with the following contents:

"C:\Program Files\MAME\mame.exe" x1

Then double click on that file to launch the emulator.

That's it. We have installed and run CP/M-80 2.2 using the MAME's Sharp X1 emulation.

Troubleshooting

First make sure that you have placed the roms files in the correct place. Do not extract the files. Place the zip files directly in the roms folder.

On Linux, there might be another error. MAME might have been configured to look in your ~/.mame folder for its config files. If that is the case, running the command mame without any parameters in the folder where you have stored the files would result in MAME opening in full screen instead of a window. If you are affected by this problem, here is the solution:

  • Configure your file manager to show hidden files.
  • Go to the ~/.mame folder.
  • Delete the mame.ini file there.
  • Copy the mame.ini file you downloaded from above to that folder.

The mame.ini file you downloaded above instructs MAME to look for another mame.ini file in the current folder and use it if found. So, you can then follow the tutorial and everything will work.

Some explanation

I asked you to replace the mame.ini file with the one you downloaded from here. What are the differences between those files? Here are they:

  • It instructs MAME to open in windowed mode instead of full screen.
  • It modifies the key needed for enabling UI controls from Scroll Lock to Caps Lock. This is done because many keyboards do not have a Scroll Lock key.
  • On Linux, it instructs MAME to first look for configuration files in the current directory, and if found, use them instead of the one from ~/.mame folder.

That is it.

Manuals

Some Software

Related Pages

Credits

  • The MAME emulator is an open source project hosted on github developed by MAMEDev and contributors.
  • The disk image used above was taken from WinWorld.

Comments