Page 1 of 1

Indy and indigo2 emulation in MESS (WIP)

Posted: Mon Mar 07, 2016 4:11 pm
by dexter1
I love indy's, but since one of my Indy's mainboard bit the dust last september 2015 i have come to the conclusion that it's time to finish the indy emulation in MESS.

Over the past few months i've researched if the SGI Indy emulation in MESS is usable and if there is a real possibility of getting this driver into a complete working state.
This means that the machine should be capable of running IRIX in some form or flavor straight from a disk image or installed via CDROM up to running the desktop.
The CPU emulated should of course match a real CPU-option inside an indy.

Indy emulation started to appear in MESS0144u5 by virtue of a coding spree by a user called Arbee and Ryan Holtz (Mooglyguy) in april 2005, as stated here
They have published emulation code for the wd33c93 and newport XL graphics as well as the central Indy MC controller and HPC3 peripheral controller.
Because the Indigo2 shares many common features with the Indy, they are now sharing the same driver in MESS.

From MESS0145 to MESS0147 the indy and indigo2 emulation is functional up to and including booting the PROM, displaying graphical output and responding to keyboard input. You can go into prom, print 'hinv' and 'printenv'.

The working emulated systems are:
ip224613 : Indy R4600PC 133MHz, 128MB Memory, 24 bit newport, B6 PROM sept 28 1994
ip225015 : Indy R5000PC 150MHz, 128MB Memory, 24 bit newport, B10 PROM feb 12 1996
ip244415 : Indigo2 R4400PC 150Mhz, 128MB memory, 24 bit newport, B PROM sept 16 1993

ip204415 is a non-working emulation of the R4400PC 150MHz indigo. The console outputs:

Code: Select all

Can't determine CPU speed

                         Running power-on diagnostics...

Initializing tod clock.
setting secs=0 min=0 hour=0 day=1 month=1 year=0

Keyboard/Mouse diagnostic                  *FAILED*

        Check or replace:  CPU board

There also is no emulation driver for the Indigo1 Entry LG1/LG2 hardware yet.

This is the cool testing stuff so far...

Some notes i've collected:

- MESS swapped the designation for the roms and the Indy/Indigo2 systems: it uses ip22xxyy for the Indy and ip24xxyy for the Indigo2, but the systems true ip hardware/software designations are ip24/ip22 for the Indy and ip22/ip22 for the Indigo2.
- PROM cannot accurately determine the clockspeed and displays 16 MHz for all CPUs.
- All CPU's are being emulated without L2 or Secondary Cache. In MESS the MIPS3 emulation does not seem to have code to support the secondary cache controller for the R4000/R4400 cores. The actual QED R4600/R5000 MIPS designs do support secondary cache but lack hardware control on the die, so this is externally provided via ASICs on the CPU-board for the SC models. AFAIK documentation for these ASICs have not been released, so they cannot be emulated.
- With MESS0148 keyboard input was lost, so interaction with the PROM was not possible. This regression continues up to at least MESS0168. I have not tested MESS0171 yet, but the sgi.cpp and indy_indigo2.cpp code shows no significant changes.

What needs to be done is the following:
- Get w33c93 SCSI DMA back on track so that we can boot with CDROM images again. We probably need to include code for linked lists in w33c93 driver
- Get VDMA on the MC coded. There is a code example in to get people started.
- Add Semaphore registers on the MC
- Keyboard emulation needs to be better
- Check Newport driver state. It should be nearly finished, but maybe there are commands missing.
- Also check if the Newport driver can emulate an XL8 instead of an XL24
- Check Dallas EEPROM save and restore. It should be possible to handle EEPROM settings from a file
- Fix proper initialisation of the MC registers. currently upon power-cycle every register is initialized to zero, but it has a defined state, see
- Check/Fix PROM settings for the CPU, it can be read by the MC so it should be correct.
- Need some form of HAL2 device support, otherwise we have no sound on the emulated Indy/Indigo2
- VINO and the INDYCAM ae not supported. VINO is documented, but you need a PC/machine with video in signal, and the INDYCAM interface has no documentation.
- Need CHD images from an Indy with R4600PC or R5000PC XL24 IRIX 5.3 6.2 or 6.5 installation. Should not be too difficult to make, if you have the exact hardware/PROM/GFX combination.
- Also need CHD image of an Indigo2 R4400 XL IRIX 5.3 6.2 or 6.5 installation. Should be doable but Indigo2 XL cards are uncommon.

Well, i'll start with VDMA. I'll let you know in what millennium i will finish :)

/usr/include/sys from a recent IRIX 6.5 install.

Re: Indy and indigo2 emulation in MESS (WIP)

Posted: Mon Mar 28, 2016 3:14 pm
by darkninja
I have this Indy that sounds like the correct config. How would I make a CHD image though? Note it has Irix 6.2, but by no means a fresh install.

Re: Indy and indigo2 emulation in MESS (WIP)

Posted: Mon Mar 28, 2016 5:19 pm
by dexter1
In order to make a CHD file from an IRIX installation, it is necessary to hook up the IRIX root drive to a Linux machine and copy the raw data with dd from the drive to a file. Then invoke chdman. The MESS 0145 syntax is:

Code: Select all

chdman -createhd input.raw output.chd [inputoffs [cylinders heads sectors [sectorsize [hunksize]]]]

in our case that should be:

Code: Select all

chdman -createhd inputfile.dd irix62.chd 0 C H S 512

Where CHS are the numbers for the actual disk geometry and 512 is the sector size.

Actually you beat me to it :) i tried to make an IRIX 6.2 and 6.5.22 CHD of an Indy R5K with XL24 with the SCSI2SD emulator. it uses an SD card to emulate a harddisk, which obsoletes the use of an actual SCSI card inside a modern PC. Obtaining the IRIX disk image is simply a matter of dd'ing the SD card contents to a file.

Re: Indy and indigo2 emulation in MESS (WIP)

Posted: Sat Feb 18, 2017 8:14 am
by mia
Any update on this, I wish we had more emulators for this stuff.

Re: Indy and indigo2 emulation in MESS (WIP)

Posted: Fri Mar 24, 2017 1:06 pm
by scottE
This is incredible this is even partially a thing.

Re: Indy and indigo2 emulation in MESS (WIP)

Posted: Sun Apr 09, 2017 2:41 pm
by luchford
I would be happy to support development on SGI MESS through Patreon (?), Kickstarter or similar, and guess there is a bit of interest in this. Anyone up to the task of starting a project (Dexter already has started - but maybe some additional incentive to work on it would be nice)?

Re: Indy and indigo2 emulation in MESS (WIP)

Posted: Tue May 09, 2017 1:36 am
by dexter1
I'm not sure a kickstarter or crowdfunding would be applicable to getting specific emulation drivers into MESS. The authors of MAME and MESS are quite closed and unapproachable about code development and apart from hacking it yourself, there is not much else one can do besides bugging them.

As a fact, the SGI Indy emulation is on their TODO list, see so it might take a bit of friendly poking to get things going.