First post, by mnlog
Hi all,
I've recently bought a cheap dead Compaq Contura 3/20 (specs).
It's got an Intel 386SL embedded processor clocked at 20MHz, 2 MB of RAM, b/w LCD. It came without a HDD, but a CF to IDE adapter with ANYDRIVE overlay does the job.
I had to put some work into it to bring it back to live:
- The power supply had a blown tantalum cap, blown fuse and a burned trace - easy to fix;
- I also needed to replace a TO-92 5V power regulator on the PSU, which was burning hot and outputting 11V. After fixing the above two issues the machine started.
- All the SMD electrolytic cap on the motherboard had leaked and I replaced them as well;
- Also the fuse at the LCD regulator was blown and had to be replaced as well as a leaking electrolytic SMD capacitor;
- Moreover I had to manually redo the contrast regulator sliding potentiometer, because the contacts inside had corroded;
- Finally after replacing the CCFL I had a working machine! Yay!
Thankfully there was no Varta battery, just a typical CR2430 to replace for the CMOS memory to hold values.
I've installed all the software that I needed. I also wanted to try using Matlab 4.x from Winworld, but unfortunately it needs 4MB of RAM to run. Also, let's be honest, 2MB of RAM is painfully little.
I've noticed that on the other side of the motherboard there were 4 empty DRAM slots. The machine uses TMS44400 4x512k DRAM chips. I had some GM71C4400 laying around and after a quick reading of the datasheet I decided that they have the same pinout, both support the fast page mode, so they should work as well.
After soldering the damn SOJ chips and connecting the RAS and CAS lines for bank 1 through some 33R resistors (see 386SL pinout in the Intel 386SL Data Book, p. 18) the boot memory count was still showing only 2M RAM. I also could not see any activity on the RAS and CAS lines going to the DRAM chips.
So I started suspecting that it was some kind of software issue. I've downloaded the BIOS ROM file and started to analyse it step by step using Ghidra. Thankfully I had a hardcopy of the "Intel's Sl Architecture: Designing Portable Applications" book that documents the basics of configuring a SL SuperSet system. It was a huge support to search for a moment when the MCBS register (responsible for bank size, see below) was being set. Thankfully I was able to find such a moment in code:
The machine sends either 0x13 or 0x33 to the MCBS register depending on the value read from port 0xC7C, which is the machine ID port for Compaq. Given the possible comfigurations for memory size that can be loaded shown in the appendix for the SL book, I saw that the value 0x13 indicated 2MB in bank 0 and nothing more. I had written on my Contura a small programme in TurboC that probes selected and it actually read 0x13.
So what I did is that I changed the value in the RAW ROM file at address 0x1C44E from 0x13 to 0x33 (adding 0x20 in hex). I also subtracted 0x20 from the last byte in the ROM file to keep the ROM checksum equal to 0 (changing from 0x84 to 0x64). I flashed the modified ROM. The system booted, but it still did not detect the additional 2M of RAM.
So I kept looking in Ghidra for an instruction pattern where the Machine ID is compared: CMP BL,0xe4.
I have found such a place not far away 😉
The code above uses the value 0x2 or 0x4 for setting the value of OMLCR, which is used to set the on-board memory limit 😀
I changed the value in the RAW ROM file at address 0x1C51F from 0x02 to 0x04 (adding 0x02 in hex) and in consequence changed the checksum byte to 0x62.
I flashed the new BIOS ROM and booted the new computer. The machine was able to detect full 4M of memory!
The BIOS issued a memory detection error and after running setup it updated the new settings. Although it detects 4096Kb properly, it still shows only 2 Megs on the system board.
Thankfully I think that it is only some hard-coded value, because I also found other place that the Machine ID is being checked.
All in all DOS sees the 4M of RAM memory, Checkit tests OK and I am able to run Matlab 4.0!
I love these kind of repairs, where old hardware is so easy to comprehend and fix 😀