IBM PS/1 2133

Support and general discussion.
Post Reply
mt82
Posts: 1
Joined: Wed 21 Aug, 2019 10:56 am

IBM PS/1 2133

Post by mt82 » Sat 24 Aug, 2019 8:23 am

Hi, I would like to implement emulation for the IBM PS/1 2133. I would like a complete emulation with the original ROM BIOS, and eventually including more advanced features like "Rapid Resume" (a hibernation mechanism implemented via BIOS and probably some bespoke hardware).

I have downloaded the ROM BIOS. It comes in 128KB file but it appears the first 64K is the Cirrus Logic BIOS and the last 64K is the normal BIOS.

I am not able to boot. The BIOS seems to be doing some self-tests for a while, until it eventually diverges which is followed by a long implausible (i.e. unintentional) instruction trace that even overwrites part of the BIOS, then ends up in the BIOS itself (the overwritten portions) with an #UD. I don't think it is self-modifying code, it is just random gibberish.

The BIOS code seems to use 0x190 for a kind of boot status register, because it gets incrementally (one-by-one) all the way to and including 0x17. Then just before it crashes, it gets set to 0xC0. Unfortunately, I haven't been able to find a list of what these codes mean so it is possible either 0xC0 signals that the BIOS has now detected an error and is diverging into some error handling mode (the big jump in value could indicate that). Or it could just be it has entered a further stage in the boot process.

Here's the last I/O port trace I am seeing. Problem is I don't know exactly what the code is attempting to do. It is clearly working the 0x61 register (i.e. the keyboard+magic register of PC's) quite a lot. At the end of the trace it appears to set it to 0x20 i.e. bit 5. However, this bit is not documented and I have not been able to find any information online.

log.js:13 10:06:38+713 [RTC ] cmos read from index 0xF value: 0 full index 15
log.js:13 10:06:38+713 [IO ] write8 port #0x0190 <- 0xC0
ps1.js:127 PS/1 write to 0x190: 23
log.js:13 10:06:38+713 [IO ] write8 port #0x03BC <- 0xC0
log.js:13 10:06:38+713 [IO ] write8 port #0x00EC <- 0x11
log.js:13 10:06:38+713 [IO ] write8 port #0x004F <- 0x11
log.js:13 10:06:38+713 [IO ] write8 port #0x00ED <- 0xFF
log.js:13 10:06:38+713 [IO ] write8 port #0x004F <- 0xFF
log.js:13 10:06:38+713 [IO ] write8 port #0x00EC <- 0x12
log.js:13 10:06:38+713 [IO ] write8 port #0x004F <- 0x12
log.js:13 10:06:38+713 [IO ] write8 port #0x00ED <- 0xFF
log.js:13 10:06:38+714 [IO ] read8 port #0x0061 (PORT_PS2_CTRLB)
log.js:13 10:06:38+714 [IO ] write8 port #0x0061 <- 0x3C (PORT_PS2_CTRLB)
log.js:13 10:06:38+714 [IO ] write8 port #0x0061 <- 0x30 (PORT_PS2_CTRLB)
log.js:13 10:06:38+714 [IO ] write8 port #0x0061 <- 0x3C (PORT_PS2_CTRLB)
log.js:13 10:06:38+740 [IO ] read8 port #0x0061 (PORT_PS2_CTRLB)
log.js:13 10:06:38+740 [IO ] write8 port #0x0061 <- 0x20 (PORT_PS2_CTRLB)
log.js:13 10:06:38+759 [IO ] read8 port #0x0061 (PORT_PS2_CTRLB)
log.js:13 10:06:38+759 [IO ] write8 port #0x00EC <- 0x11
log.js:13 10:06:38+759 [IO ] write8 port #0x004F <- 0x11
log.js:13 10:06:38+759 [IO ] write8 port #0x00ED <- 0x55
log.js:13 10:06:38+759 [IO ] write8 port #0x004F <- 0x55
log.js:13 10:06:38+759 [IO ] write8 port #0x00EC <- 0x12
log.js:13 10:06:38+759 [IO ] write8 port #0x004F <- 0x12
log.js:13 10:06:38+759 [IO ] write8 port #0x00ED <- 0x55
log.js:13 10:06:38+759 [IO ] write8 port #0x00EC <- 0x11
log.js:13 10:06:38+759 [IO ] write8 port #0x004F <- 0x11
log.js:13 10:06:38+759 [IO ] write8 port #0x00ED <- 0xAA
log.js:13 10:06:38+759 [IO ] write8 port #0x004F <- 0xAA
log.js:13 10:06:38+759 [IO ] write8 port #0x00EC <- 0x12
log.js:13 10:06:38+759 [IO ] write8 port #0x004F <- 0x12
log.js:13 10:06:38+759 [IO ] write8 port #0x00ED <- 0xAA
log.js:13 10:06:38+759 [IO ] read8 port #0x0061 (PORT_PS2_CTRLB)
log.js:13 10:06:38+759 [IO ] write8 port #0x0061 <- 0x20 (PORT_PS2_CTRLB)
log.js:13 10:06:38+769 [IO ] read8 port #0x0061 (PORT_PS2_CTRLB)
log.js:13 10:06:38+770 [CPU ] arpl #ud
debug.js:104 console.trace
debug.unimpl @ debug.js:104


Any help would be much appreciated.

Note that I am actually doing this debugging in another emulator (https://github.com/copy/v86). I couldn't get the ROM to run on PCEm, and I have found v86 to be quite debuggable/hackable and there's no compile turnaround time, due to it all being JavaScript. Once I figure out what it takes to get it running I will backport the changes to PCEm.

User avatar
ruben_balea
Posts: 104
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: IBM PS/1 2133

Post by ruben_balea » Sat 31 Aug, 2019 1:51 am

Some PS/1 2133 emulation is already implemented in https://github.com/86Box/86Box but please read this post before: viewtopic.php?f=2&t=502 ;)

User avatar
ppgrainbow
Posts: 460
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: IBM PS/1 2133

Post by ppgrainbow » Sat 31 Aug, 2019 3:48 am

This is because that machine is not supported under the current version of PCem for which it hasn't been updated since its v15 release on May 19, 2019.

Post Reply