piStorm – basic configuration

After going through my Getting Started guide you have the piStorm starting up automatically (if followed the very last step) as a emulated 68020 CPU. If your onboard kickstart allows it, you might also have 128MB Z3 RAM. It will start up and display the “insert a disk” screen/animation depending on which Kickstart you have on the Amiga motherboard.

Configuration file

The default configuration file, named “default.cfg”, is located in the “pistorm” folder. It’s a good idea to keep this file untouched and make changes to a copy of it, then telling the emulator to use it by using the –config parameter.

In my installations, I have put the copy of “default.cfg” in /home/pi (“../” as a relative path from within the pistorm folder), and keep the rest of Amiga-related files (kickstart and hdf) in a folder named “amiga-files” in the ‘pi’ user’s home (/home/pi/amiga-files).

Here are the very initial steps to copy the default configuration to /home/pi, and to set up the amiga-files folder (after logging in as the ‘pi’ user):

cp -p pisotrm/default.cfg .
mkdir amiga-files

Stop the 68k-emulator if it is running (two methods, depending on how/if it is auto starting):
If started from rc.local:

sudo killall emulator

If set up as a service:

sudo systemctl stop pistorm

Now to autostart the 68k-emulator with a specified configuration file, edit rc.local (if it is started from there) and add –config ../default.cfg so the full command reads:

cd /home/pi/pistorm/ && sudo ./emulator --config ../default.cfg&

For the service method (using my instructions), change the file “start-emulator.sh” in /home/pi:

#!/bin/sh
cd /home/pi/pistorm/
sudo ./emulator --config ../default.cfg
exit 0

Start the 68k-emulator again by running the command from the rc.local file above (for non-service autostart), or by using systemctl if you have set it up as a service:

sudo systemctl start pistorm

For further restarts of the 68k-emulator, do as previously described with “killall” or “systemctl” depending on your choice of setup. With “systemctl” there is also the “restart” option:

sudo systemctl restart pistorm

A restart of the 68k-emulator will also reboot the Amiga.

Configuration options

The default.cfg contains some examples and descriptions of many of the options available. You can also read the current distributed configuration file on GitHub:
default.cfg

Documentation for some the piStorm features for the Amiga is located within some subfolders on GitHub:
piscsi (map hdf files as hard drives on the Amiga side)
rtg (RTG using the Picasso96/P96 package)
net (not fully implemented)
a314 (includes shared folder on sd-card, networking and shell-access to the pi)

CPU type

The easiest one, leave this at “68020”. This is the most complete and compatible CPU for the emulator.

Kickstart mapping

To get better performance and enable Z3 RAM and get P96 2.4+ working, a Kickstart version 3.1 (40.68) for Amiga 1200 is highly recommended. To obtain the kickstart file the correct way, purchase the Plus edition of Amiga Forever. If you own an Amiga 1200, you can also use any of the tools available for saving the kickstart to a file.

You can name the file whatever you want, but mine is named (renamed from the Amiga Forever set) “kick-31-a1200-40.68.rom”, and I have the file in “/home/pi/amiga-files”.

Early in the config, there is this line:

# Map 512KB kickstart ROM to default offset.
map type=rom address=0xF80000 size=0x80000 file=kick.rom ovl=0

It makes the emulator look for the file “kick.rom” in the current directory (as cd:ed to /home/pi/pistorm before starting the emulator).

Change this to:

# Map 512KB kickstart ROM to default offset.
map type=rom address=0xF80000 size=0x80000 file=../amiga-files/kick-31-a1200-40.68.rom ovl=0

Then restart the emulator to see that it uses the kickstart file (easy to spot if you have a 2.x or 1.x KS on the motherboard).

Have the installation floppy for AmigaOS 3.1 ready (also available from Amiga Forever). If you boot the installation floppy, you would end up at the Workbench and be able to see that the FastRAM (128MB Z3) has been mapped.

Memory mapping

The default memory section in the config looks like this:

# Map 128MB of Fast RAM at 0x8000000, also known as 32-bit Fast RAM or CPU local Fast RAM.
# Only supported properly on select Kickstarts, such as 3.1+ for Amiga 1200, 3000 and 4000.
#map type=ram address=0x08000000 size=128M id=cpu_slot_ram
# Map 128MB of Z3 Fast. Note that the address here is not actually used, as it gets auto-assigned by Kickstart itself.
# Enabling Z3 fast requires at least Kickstart 2.0.
map type=ram address=0x10000000 size=128M id=z3_autoconf_fast
# Max 8MB of Z2 Fast can be mapped due to addressing space limitations, but for instance 2+4MB can be chained to leave 2MB for something else.
#map type=ram address=0x200000 size=8M id=z2_autoconf_fast
#map type=ram address=0x200000 size=2M id=z2_autoconf_fast
#map type=ram address=0x400000 size=4M id=z2_autoconf_fast

Pretty self-explanatory, but some of the RAM types are not supported on all Kickstarts. There is no speed difference in using “32-bit FastRAM” compared to “Z3 Fast”. The “Z2 FastRAM” is the equivalent of a RAM expansion plugged into the expansion port of Amiga 500 and Amiga 1000, or in a Zorro slot on the Amiga 2000. These expansions could be standalone or a part of a hard drive controller for those systems.

piscsi – hard drive emulation

The next section in the configuration is about piscsi, which allows you to assign up to 7 auto-mounted and auto-bootable virtual hard drives on the Amiga.

# Uncomment this line to enable the PiSCSI interface
#setvar piscsi
# Use setvar piscsi0 through piscsi6 to add up to seven mapped drives to the interface.
#setvar piscsi0 PI0.hdf
#setvar piscsi1 PI1.hdf

My virtual disk is 1GB in size and consists of several partitions (three smaller ones for different versions of AmigaOS, and a larger one for common content) and is named “amiga-1gb.hdf”. The location for my .hdf is as the Kickstart ROM, “/home/pi/amiga-files”.
To enable the pi-scsi.device, just uncomment the line “setvar piscsi”, then put the name of the .hdf as a parameter the “setvar piscsi0” (or 1-6):

# Uncomment this line to enable the PiSCSI interface
setvar piscsi
# Use setvar piscsi0 through piscsi6 to add up to seven mapped drives to the interface.
setvar piscsi0 ../amiga-files/amiga-1gb.hdf

This will make the Amiga recognize the harddrive with the correct DEVICE tooltype of HDToolbox (“DEVICE=scsi.device” should be changed to “DEVICE=pi-scsi.device”). Once set up using HDToolbox (detect/change disk type and create the partitions), it can be used to install AmigaOS on and boot from.

Also take a look at the current documentation at GitHUb:
piscsi

RTG using Picasso96 or P96

See the documentation at GitHub:
rtg (RTG using the Picasso96/P96 package)

You need two files from the GitHub repository transferred over to the Amiga after having installed Picasso96 or the more maintaned release of P96. I use my registered 2.4.6 from Individual Computers
Google search for 'P96+2.4.6'

See my updated instructions in piStorm – AmigaOS 3.1 installation

Keyboard and mouse passthrough

It’s pretty well documented in the default.cfg:

# Forward keyboard events to host system, defaults to off unless toggle key is pressed, toggled off using F12.
# Syntax: keyboard [grab key] [grab|nograb] [autoconnect|noautoconnect]
#   "grab" steals the keyboard from the Pi so Amiga/etc. input is not sent to the Pi
#   (also helps prevent sending any ctrl-alt-del to the Amiga from resetting the Pi)
#
#   "autoconnect" connects the keyboard to the Amiga/etc. on startup
keyboard k nograb noautoconnect
# Select a specific filename for the keyboard event source.
# This is typically /dev/input/event1 or event0, but it may be event3 with for instance a wireless keyboard.
# Use ls /dev/input/event* to check which event files are available and try until you find the one that works.
#kbfile /dev/input/event1
# Forward mouse events to host system, defaults to off unless toggle key is pressed on the Pi.
# Syntax is mouse [device] [toggle key] [autoconnect|noautoconnect]
# (see "keyboard" above for autoconnect description)
mouse /dev/input/mice m noautoconnect

Just enable the kbfile line and set the correct device there if it doesn’t work with the defaults.

Real Time Clock (RTC)

The RTC is enabled in the default configuration and transfers over the time and date on the Pi to the Amiga.

# Map RTC as a register range.
map type=register address=0xDC0000 size=0x30000

To get the correct time on the Pi, it must be connected to the Internet (as set up in my Getting Started guide).
Also, you must ensure the timezone is set correct on the Pi, otherwise your time will be off an hour or two. To set the correct time zone, hse the ‘timedatectl’ command:

List the available time zones:

timedatectl list-timezones

Set the time zone:

sudo timedatectl set-timezone Europe/Stockholm

Switching between multiple configurations

When you have one configuration you’re happy with, you might want to set up alternative configurations for compatibility or experimental reasons.
I wrote this guide on how to capture keypresses on a keyboard connected to the pi on the piStorm. Before setting up the commands to execute (the very last step), make a copy of your /home/pi/default.cfg, as this file is to be overwritten when changing configuration using the defined keypress events (in my example SHIFT in combination with the F-keys, SHIFT+F12 to reboot the pi, CTRL+SHIFT+F12 to shut down the pi).

Getting files over to the Amiga

Not really a configuration thing, but I’ll explain the possible methods to transfer files (as for example archives for installing, or unpacked archives of programs ready to launch the installer from) over to the Amiga.

Since networking is not yet implemented, and a shared folder from the Linux side is not available, files have to be transferred the ‘classic’ way.

The options as I see are:
* (real) floppy disks
* (adf) through either an externally connected GoTek drive, or as a replacement for the internal drive
* (hdf) a pre-prepared hdf (full RDSK image, not a partition) file containing archives of programs to install
* (adf) from a hdf, mounting using any of the available options like GoADF
* physical disk connected to the pi, then exported as a piscsi device on the Amiga (complicated and a bit risky, described in detail in the piscsi documentation at GitHub)
* since May or June 2021, a314 emulation can be used to access a folder on the SD-card and even transferring files over to the Amiga over the a314 SANA-II network device. You find my detailed instructions on setting up the shared folder and network in my “AmigaOS 3.1 installation guide“.

4 thoughts to “piStorm – basic configuration”

    1. Yup, that’s correct since the last Github release of piStorm. default.cfg was changed to amiga.cfg because the piStorm could be used with other hardware than only the Amiga.
      Everything else is still up to date (and for the default.cfg/amiga.cfg, you could simply copy amiga.cfg to default.cfg and it will be used for that initial start/test), I have just not added info on AHI and a few other features that were going from ‘test’ to public after writing the guide.

Leave a Reply

Your email address will not be published. Required fields are marked *