First post, by ps1ftw
I thought this might be of interest here, particularly to anyone interested in the stranger corners of early-1990s IBM PC hardware.
The IBM PS/1 2168 was IBM's tower-format PS/1 from around 1993. My particular machine was a 2168-552, bought late 1993 with a 486SX/25, 4 MB RAM, ~129 MB IDE hard disk, Cirrus Logic graphics, MS-DOS 6.0 and Windows 3.1.
It was my first PC after a C64, and the machine on which I learned QBASIC, experimented a little with assembly language, and generally discovered how PCs worked.
The original machine is unfortunately long gone, but earlier this year I started looking into emulating it by modifying PCem.
I have now got emulation of the PS/1 hardware — including the relevant custom chipset/peripherals — working well enough that I can boot the original IBM PS/1 BIOS, install the machine using the original recovery disks, and run the resulting installation much as the real machine did.
One of the more interesting things to get working was IBM Rapid Resume.
For anyone unfamiliar with it (I would guess most!), Rapid Resume was essentially an early system-wide suspend/hibernate mechanism. On the real PS/1, pressing the power button did not necessarily cut the power immediately. When Rapid Resume was disabled it would indeed cut power, but otherwise the hardware/firmware/BIOS cooperated to save the machine state to disk, and when the machine was powered on again the BIOS could restore that state. Rapid Resume was enabled either in the BIOS or in a Windows utility (that made proprietary calls to the BIOS to enable/disable it). It also depended on a program in AUTOEXEC.BAT that would ensure the save file was allocated on disk as a contigous file sized based on RAM size. It would write the location of the file to BIOS, so the BIOS had an easy job when later saving.
For the emulator I added a special “PS/1 Off” action which simulates this soft-power-off behaviour that triggers the saving seqeuence. The next boot you get the original Rapid Resume screen and return to the previous session (the BIOS detects the presence of a saved session via CMOS values and the image on disk).
What I particularly like about this is that there is no emulator-specific implementation of “hibernate” as such — I am emulating the hardware behaviour and letting IBM's original BIOS machinery do what it did on the physical machine.
The emulator also helped me resolve mystery: why did my BIOS suddenly become English?
When we bought the machine, the BIOS/setup interface was in the local language. At some point it mysteriously changed to English. If I restored the computer using IBM's recovery disks, Danish would come back — but after using the machine for some time it could disappear again. Turns out there's a language overlay stored in the last cylinder of the harddrive, however if this gets overwritten the overlay is lost and the BIOS reverts to the default (the BIOS checks for various magic values and a checksum).
This also works naturally in my emulator. I didn't have to special-case the mechanism, it just followed from the BIOS behavior (the PS1/1 recovery disks, which I found online, re-establishes the area as part of the restore).
There is, however, a rather interesting flaw in IBM's implementation.
The recovery process creates a partition entry covering the final cylinder, apparently to reserve/protect the BIOS overlay area, but it doesn't help that much because it only does this as an 'adjustment' step after the first primarty partition has been created and formatted to cover the whole drive. So the boot sector and FAT system of the primary partition still act as if they own the whole disk even though the MBR says differently.
If the filesystem becomes sufficiently full, DOS can therefore eventually allocate and overwrite sectors in that last cylinder. This was probably not that likely in practice because the disk is also doublespaced by default (is also setup by the recovery disks) so one would need to fill the host drive to see this effect. As most users likely used mostly the compressed drive, they wouldn't encounter it.
There are several other oddities in the 2168 that I'm still investigating, but Rapid Resume and the disk-based BIOS extensions have been particularly interesting because they show how blurred the boundary between “PC-compatible hardware”, firmware and software is.
I'd be very interested to hear from anyone else who owned or has worked on a PS/1 2133/2155/2168, particularly if you've investigated any of this. Also let me know if you're interested in me upstreaming the emulator.
I can also post more technical details/screenshots of the emulation and the disk layout if there is interest.