Repository navigation
Sharp X68000
The original RaSCSI project was developed by GIMONS using the SCSI controller code of the X68000 emulator XM6 TypeG as reference. Before being forked, it was thoroughly tested on a range of X68000 models and SCSI interfaces. See this discussion on Japanese home PC compatibility for more information.
Human68k 3.02 is recommended to use the full range of features, because the network interface and remote (host) file system features are provided by the Human68k device drivers. However, SCSI storage devices will work well on NetBSD and other operating systems.
PiSCSI implements a virtual SCSI device called the Host Bridge in order to bridge the Raspberry Pi host system and the X68000. The following Human68k native software is available:
- RASDRV.SYS – Host file system driver
- RASETHER.SYS – Ethernet driver
- RASCTL.X – PiSCSI remote control app
You can either build them from C source code or use the binaries distributed on the RASDRIVER.XDF and RASDRIVER.HDS hard disk images. For convenience, it is recommended to mount these image directly with PiSCSI to easily get the drivers as well as other support programs loaded onto your X68000 system.
The source code and binaries can be retrieved from the parent RaSCSI project.
Provides equivalent networking functionality of a Neptune-X Ethernet adapter, which is an Ethernet box that's connected over the SCSI bus. It uses a network bridge on the Raspberry Pi to route network traffic. Similar to Ether+.
It was developed while referencing Shi-MAD's ether_ne.sys ver0.03 +M01 +1 +L12 driver which itself is a modified version of the ether_ne.sys driver for the ISA bus bridge Ethernet adapter Neptune-X.
It is also possible to use the original Neptune-X driver with the PiSCSI Host Bridge.
Provides a similar functionality as WindrvXM, which is the de-facto standard for file sharing between host and X68000 emulators. This makes it possible to mount the Raspberry Pi file system as a remote drive by connecting the X68000 to the host using a Host Bridge device.
You can attach the Host Bridge device to PiSCSI just like any other device, either by passing 'bridge' as the file parameter, or using the 'scbr' device type.
Similarly to scsictl for PiSCSI on the host side, a utility has been implemented as a Human68k executable called RASCTL.X which enables you to attach, detach, change media, set protection flags, stop piscsi, and shut down the Raspberry Pi from the X68000 system.
The Ethernet driver (RASETHER.SYS) attaches to the Bridge device to send and receive packets. It presents the adapter as en0 to a
Human68k TCP/IP stack.
Choose one supported host-side profile before attaching SCBR.
The wired bridge is the usual choice. It provides complete Ethernet service and puts the X68000 directly on the wired LAN. Run these commands from a local console or another recovery path: moving the Pi's address from the physical port to the bridge can briefly interrupt its network connection.
sudo piscsi-network-profile --dry-run apply bridge eth0
sudo piscsi-network-profile --console-acknowledge apply bridge eth0Replace eth0 with the selected NetworkManager-managed Ethernet interface.
The command creates piscsi_bridge; NetworkManager, not PiSCSI, owns the
bridge, its address, and its DHCP lease. Do not create, address, or attach a
persistent TAP interface manually.
For a Wi-Fi-connected Pi, proxy ARP provides IPv4 unicast and DHCP only. First install its dependencies, then select the Wi-Fi interface that currently holds the Pi's IPv4 lease:
sudo apt install parprouted dhcp-helper
sudo piscsi-network-profile --dry-run apply proxyarp wlan0
sudo piscsi-network-profile --console-acknowledge apply proxyarp wlan0Replace wlan0 as needed. Proxy ARP is not a general Ethernet bridge: it does
not provide IPv6, multicast, AppleTalk, mDNS reflection, or other non-IP
Ethernet protocols.
Attach SCBR using the matching complete profile value. For example, attach it at SCSI ID 5 on the wired bridge:
scsictl -i 5 -c attach -t scbr -f 'mode=bridge:interface=piscsi_bridge'For Wi-Fi proxy ARP, use mode=proxyarp:interface=wlan0 instead. The Web
interface exposes the same active profiles. PiSCSI creates and removes its
transient piscsi0 TAP interface as SCBR is attached and detached.
Install RASETHER.SYS from the RaSCSI X68000 driver disk or directory,
together with a Neptune-X-compatible TCP/IP stack. This guide uses the
Keisoku-Giken utilities XIP.X, IFCONFIG.X, and INETDCONF.X.
Place the driver and utilities under \NETWORK on the Human68k boot volume
(shown below as drive A:), adapting the paths to your installation.
Add this to CONFIG.SYS, then reboot so Human68k loads the Ethernet driver:
PROCESS = 3 10 10
DEVICE = \NETWORK\RASETHER.SYS
Add one of the following network configurations to AUTOEXEC.BAT. Both start
the TCP/IP stack and bring up its loopback interface.
Use an unused address on the same IPv4 LAN as the Pi profile. Replace the address, mask, router, and DNS server with the values for that LAN.
SET SYSROOT=A:\NETWORK\
SET TEMP=A:\
SET TMP=A:\
SET HOME=A:\NETWORK\ETC\
SET HOST=X68000
XIP.X
IFCONFIG.X lp0 up
IFCONFIG.X en0 192.168.68.3 netmask 255.255.255.0 up
INETDCONF.X +router 192.168.68.1 +dns 192.168.68.1 -rip
Use IFCONFIG.X en0 and INETDCONF.X without arguments to inspect the
applied settings. A static address must not duplicate another LAN client.
Human68k can use DHCP, but the historical TCP/IP utilities do not include a
client. Install IDHCPC.X in a directory
on PATH. It is a Human68k DHCP client documented for Neptune-X-class
adapters and XIP.X, which matches RASETHER.SYS's compatibility interface.
In place of the static en0 and INETDCONF.X commands above, use:
SET SYSROOT=A:\NETWORK\
SET TEMP=A:\
SET TMP=A:\
SET HOME=A:\NETWORK\ETC\
SET HOST=X68000
XIP.X
IFCONFIG.X lp0 up
IDHCPC.X en0
IDHCPC.X obtains and applies the IPv4 address, subnet mask, default router,
DNS servers, and domain information, then remains resident. Do not also set a
static en0 address or router in this configuration.
Lease renewal is manual: check the remaining time with IDHCPC.X -l; before
expiry, release the configuration with IDHCPC.X -r, then run IDHCPC.X en0
again. It retries four times when no DHCP server responds.
Pass these options on the DEVICE line in CONFIG.SYS. They are normally
unnecessary; the defaults are suitable for most systems.
| Option | Meaning |
|---|---|
| -t<number> | Use API trap 0 through 6. If it is occupied, RASETHER.SYS selects another available trap, starting at 0. |
| -n | Do not use a trap for the API. |
| -p<number> | Set the receive-packet polling interval. The default is 1 (about 16 ms), and the maximum is 8; each increment adds about 16 ms. |
| -i<number> | Select the interrupt used by polling: 0 is the default MFP FPIP (vertical-display) interrupt and 1 selects Timer-A. |
PiSCSI provides similar functionality to Windrv and WindrvXM that are commonly used with X68000 emulators XM6/XM6 Kai/TypeG. Using the RASDRV.SYS driver you can mount and access the Raspberry Pi file system from your X68000 and carry out any file operations.
Registering the device driver is simple. F.e. add this to latter part of CONFIG.SYS:
DEVICE = \SYS\RASDRV.SYSBy default, the Raspberry Pi's root directory gets mounted. When the device driver gets loaded, it will indicate which drive is getting mounted. To mount other directories aside from root, specify the the file system path. For instance, to mount /home/pi and /home/pi/data :
DEVICE = \SYS\RASDRV.SYS /home/pi/app /home/pi/dataBy specifying multiple directories, each of them gets mounted as a separate drive.
If you're using SUSIE, please configure RASDRV.SYS to be loaded before SUSIE. It has been reported that it does not get detected if loaded afterwards.
For other options, refer to the documentation for WindrvXM.
RASCTL.X is a Human68k command line management app that uses the Host Bridge to send plain text commands to the PiSCSI process over the SCSI bus.
Since this is a legacy protocol that bypasses the PiSCSI token authentication scheme, it is disabled at runtime by default. Run piscsi with -c media to allow -l and the operations on SCSI IDs with -i, or -c full to also allow --stop and --shutdown.
RASCTL.X -l
RASCTL.X --stop
RASCTL.X --shutdown
RASCTL.X -i ID [-u UNIT] [-c COMMAND] [-t TYPE] [-f IMAGE]ID is a target SCSI ID from 0 through 7. UNIT is 0 or 1 and defaults to 0; it selects one of the two logical units at that target ID.
The tool requires a discoverable RASCSI BRIDGE device with bridge-control support enabled. If it cannot find one, it exits with bridge not found.
Command names are supplied using -c; omitting -c means attach.
| Command | Effect | Required options |
|---|---|---|
attach |
Add or replace the device at ID/UNIT. |
-i; use -f IMAGE for a hard disk. Specify -t when the image extension cannot identify the type. |
detach |
Remove the existing device at ID/UNIT. |
-i |
insert |
Load media into an existing MO or CD device. |
-i, -f IMAGE
|
eject |
Eject media from an existing MO or CD device. | -i |
protect |
Toggle write protection on an existing MO device. It is not an explicit on/off setting. | -i |
-l |
Print the current device list. | None |
--stop |
Request that the PiSCSI server stop (the server schedules this after roughly three seconds). | None |
--shutdown |
Request that the Raspberry Pi shut down (also scheduled after roughly three seconds). | None |
insert, eject, and protect are rejected unless the target device is removable; protect is further restricted to MO devices. detach requires that a device already exist at the selected ID/unit.
Use -t TYPE with attach to select the device class:
| Type | Meaning | Typical image / no-media form |
|---|---|---|
hd (also s) |
Hard disk. Detects SASI or SCSI depending on recognized file endings. |
-f DISK.HDF, -f DISK.HDS, etc. |
mo |
Magneto-optical drive. |
-t mo creates an empty drive; .mos attaches media. |
cd |
CD-ROM drive. |
-t cd creates an empty drive; .iso attaches media. |
bridge |
PiSCSI host/bridge device. |
-t bridge; no image is used. |
When attaching and -t is omitted, RASCTL derives the type from the image suffix (case-insensitively): .hdf, .hds, .hdn, .hdi, .nhd, .hda, .mos, or .iso. An unrecognised suffix needs an explicit -t, although a hard-disk attachment still needs a valid hard-disk filename.
; List all configured devices
RASCTL.X -l
; Attach a SASI HDF image at target ID 0, unit 0
RASCTL.X -i 0 -f GAMES.HDF
; Attach a SCSI hard-disk image at target ID 2, unit 1
RASCTL.X -i 2 -u 1 -c attach -t hd -f SYSTEM.HDS
; Create an empty MO drive, then insert media
RASCTL.X -i 3 -c attach -t mo
RASCTL.X -i 3 -c insert -f BACKUP.MOS
; Eject that MO, or toggle its write-protect state
RASCTL.X -i 3 -c eject
RASCTL.X -i 3 -c protect
; Create a CD-ROM device and insert an ISO image
RASCTL.X -i 4 -t cd
RASCTL.X -i 4 -c insert -f INSTALL.ISO
; Remove the device at target ID 2/unit 1
RASCTL.X -i 2 -u 1 -c detach
The X68000 can use generic SCSI hard drive images, MO and CD-ROM images, which are documented elsewhere on this wiki. It also uses SASI images which is an older protocol standard.
Disk images with the '.hdf' file ending that were created by the X68000 emulator XM6 TypeG can be mounted by RaSCSI and used on a real X68000.
SASI images use the 'hdf' file extension. Recommended image sizes are 10,441,728 bytes, 20,748,288 bytes, or 41,496,576 bytes (corresponding to 10MB / 20MB / 40MB hard drives). You can also mount images between 10M to 512MB in size, as long as they are multiples of 256 bytes.
MOS file format (extension '.mos'). On the X68000 platform, the MO image size should be one of the following 4 types.
- 128MB type (127,398,912 bytes)
- 230MB type (228,518,400 bytes)
- 540MB type (533,248,000 bytes)
- 640MB type (635,600,896 bytes)
128MB, 230MB, 540MB should use a block size of 512 bytes, and 640MB should use 2048 bytes.
Note that on other platforms, the size / block size of MO drives are not limited to these values.
ISO file format (extension '.iso', ISO9660 standard). Mode 1 (2048 bytes/sector) supports both files that store only data and files that are recorded in RAW format.
PiSCSI share a heritage with the X68000 emulator known as XM6 TypeG. As such, you can use the disk image creation functionality under the "Tools" menu of XM6 TypeG. In addition, by following the file format specifications outlined elsewhere, you can create an empty image file with a command like this:
dd if=/dev/zero of=HARDDISK.HDS bs=512 count=204800Or use the disk image creation facility of the PiSCSI Web Interface.
- The X68000 can use all SCSI IDs 0-7 freely. However, normally when the computer itself is the initiator, it gets assigned one of the SCSI IDs, so in reality only up to 7 devices can be connected.
- It is possible to boot the X68000 system from a PiSCSI drive.
- Performance tests by DSKBENCH suggests that R/W performance is at least at par with a physical drive (at least SCSI1.)
The information on this page is in part derived from the RaSCSI documentation by GIMONS. A special thanks to him for the hard work, research, and testing that went into the creation of RaSCSI!