Few options for emulating SGI systems are available, with MAME being the emulator furthest along.
There were graphics fixes in MAME 0.213 which allow Alias Power Animator 7.5 to run. Unfortunately, these also caused graphics regressions e.g. inverting the interface in Alias 6 (shows as black) and not displaying the grid in Softimage. Use 0.212 to make these applications work.
Networking was introduced in MAME 0.220, however it was not functioning correctly if the MTU was set to 1500 (as default), only with MTU set at 1496. This was fixed by not transmitting FCS from MAME 0.232 onwards.
Dynamic recompilation was (re)introduced in MAME 0.241. This increases the emulation speed substantially, however it did not seem to boot IRIX 6.5 reliably. There are further MIPS processor related fixes in MAME 0.254, 0.255 and 0.256, which may have improved emulation of Irix 6.5 with DRC.
- Use the latest MAME version to emulate IRIX 4.0.5 (Indigo2), 5.3 and 6.5 w/networking and DRC. If you have problems, try the "-nodrc" commandline option, though this will lose some speed.
- Use MAME 0.212 if you get graphics errors and want to run specific graphics applications, such as Alias 6 and earlier, Softimage etc.
MAME mainly supports Indy and Indigo2 with XL graphics, which run IRIX 5.3 and 6.5 well.
MAME can run IRIX 4 on an emulated Indigo2, however IRIX 4 does not support XL graphics, so you need to use a terminal interface. In theory you should be able to use X11-forwaring over the network to show graphics on a different system, and possibly even forward 3D graphics through IrisGL to another SGI (or emulated SGI).
Useful command line options
To set the key to enable the user interface on the commandline:
Installing IRIX 3
MAME currently (0.256) emulates the Personal IRIS 20/25 which can run IRIX 3. However you will get an error when the miniroot tries to identify the swap partition on install, before it shuts down.
Recent changes, however have improved the Personal IRIS 30/35 emulation, and allows you install and run IRIX 3 without the swap-partition error. Note that you need the contents of the IRIX 3.3.2 tapes plus a specific tape for 4D/35 support.
It is unclear if MAME could emulate a tape device for the PI/35 - and if there are actual tape images of IRIX 3.3.2. It's suggested to just use the tar'ed IRIX 3.3.2 tape files which are available online, and do either a network install or a harddrive to harddrive install.
Harddrive to Harddrive
For a HD to HD installation, this guide is a useful starting point, even though it applies to IRIX 6.5: https://doogielabs.com/2014/07/how-to-install-irix-from-a-hard-drive/
Here are some of the high level steps adjusted for Irix 3.3.2 and MAME:
- Basically you make two new drives using chdman, one will be the install FROM and one the install TO drive. Set them up as a rootdrive using fx (Irix 4 and later versions have simpler interface than Irix 3).
- Mount the "from" drive and add the IRIX 3.3.2 tape archives to separate directories using a previous installation (can be an emulated Indy e.g.). I used user partition (6).
- Extract the miniroot image file "mr" (actually a simple EFS image) from the PI/35 tape archive using mkboottape on the "sa" file and put it in a separate directory on the disk with the installation files.
- Then you add sash.IP12 from the PI/35 3.3.2 tape archive to the volume header of the FROM drive using dvhtool.
- The guide seems to imply you have to copy the miniroot "mr" image to the swap partition of the FROM drive. I don't think this is necessary for IRIX 3.3.2 at least.
- Start the PI/35, run sash from the FROM drive (if FROM drive setup as disk no. 6, "boot -f dksc(0,6,8)sash").
- Copy the miniroot file to the swap partition of the TO drive.
- Run the miniroot kernel from the TO drive to start installation (if TO drive setup as disk no. 1 "boot -f "dksc(0,1,1)unix")
- Mount the FROM drive from the inst shell.
- Add and install the "dist" folders of the eoe1, eoe2 and PI35 tape archives at least.
For a network installation, you will need to setup networking in MAME. For the PI35 steps, this guide can be used: https://kb.pocnet.net/wiki/IRIX_3.3_installation. I have used Reanimator on Raspberry PI with success for serving the files to MAME: https://github.com/Linux-RISC/Reanimator
There is still no system with graphics emulation which can run IRIX 3. Setup a terminal environment instead (setenv console d in the prom monitor).
IRIX 3.3.2 on PI/35 does not yet have proper audio emulation. Startup will therefore hang at "Using standalone network mode", or if the verbose flag is set at "Audio setup: dsploader". You can just mount the IRIX 3.3.2 drive on another IRIX installation, and comment out the "dsploader" line in "/etc/init.d/audio" to bypass this.
Command line options
Running headless with terminal on the serial port
To disable graphics (run the SGI headless) and enable a basic MAME emulated terminal on the serial port, use the commandline options
-gio64_gfx "" -ioc2:rs232b terminal
You will gain some emulation speed by disabling graphics. Alternatively can also enable "setenv console d" in the prom beforehand for "diagnostic" console and terminal output, without disabling graphics.
You may need to enable the terminal keyboard in the MAME option menu, under "Input Settings", "Keyboard Selection" "root:ioc2::rs232b:terminal:keyboard".
The standard mame terminal emulation has limited options, e.g. for copy paste, and a has a "classic" green colored text which you might or might not like.
To allow connections to the serial port from more advanced terminal emulators within Windows, you can use the following:
-ioc2:rs232b null_modem -bitb socket.localhost:1234
You can then connect to "localhost" and port 1234 using e.g. Tera Term or PuTTY.
Alternatively you can connect to a COM port instead, using a virtual COM-port for Windows, e.g. com0com. This is supposedly is a bit more reliable regarding cursor movement than the port method above. See: https://blog.thestateofme.com/2022/05/25/attaching-a-terminal-emulator-to-a-mame-serial-port/
-ioc2:rs232b null_modem -bitb COM6 [if COM port 6]
To enable dual head mode when emulating the Indigo2 (two emulated xl24 adapters with screens side by side in glorious 2560x1024 resolution) use:
-gio64_gfx xl24 -gio64_exp0 xl24
Quoting pmackinlay (MAME developer):
"MAME’s TAP code just maps the emulated Ethernet device to one end of a TAP pair, letting you decide what to do with the other end in the host operating system. You can route or bridge it or whatever you want. To make it do anything useful, you generally need to configure the emulated system’s network stack in a way that makes sense to whatever you have done on the other side."
For some reason the recommended method of using the TAP adapter from OpenVPN does not work with OpenVPN versions from 2.5 onwards. Running mame -listnetwork shows "no adapters". You can instead use the previous version OpenVPN 2.4.12. This seems to have been fixed in MAME from 0.255 onwards and the TAP adapter from OpenVPN v2.5 and up is again available in MAME.
Windows also seems to have some problems with bridging the TAP adapter and the Ethernet connection, and you may experience crashes and "Blue Screens of Death" (using OpenVPN 2.5 and up with MAME 0.255 and up not yet tested). However Internet Connection Sharing (ICS) in Windows seems to work with the TAP adapter from OpenVPN 2.4.12.
To enable the speed percentage counter, enable menus within MAME (press scroll lock) and then F11.
What does the percentage counter in MAME mean? Quoting pmackinlay:
"[the counter does not show the amount of frames drawn] the percentage shown is how fast the emulated system is running as a fraction of its hardware speed. 100% means it should be running with the same effective speed as the real hardware, while <100% means the emulation can't keep up with hardware."
Tips and tricks
Using the "-sound none" commanline option seems to have no or little effect on performance. Quoting MAME developer MooglyGuy:
"Back in the day, running with -nosound caused MAME to specifically exclude certain driver hardware when running the game. More recently, the decision was made for MAME to always emulate the sound hardware - mostly to reduce bug reports from people running with -nosound. So, nowadays, there shouldn't be much (if any) difference between running with -sound none and running with normal MAME. In the past, though, it might have gained you some frames per second, at the cost of potentially fucking up the emulation of the game itself."