VOGONS


First post, by mnlog

User metadata
Rank Newbie
Rank
Newbie

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:

ghidra_sc1.png
Filename
ghidra_sc1.png
File size
41.59 KiB
Views
3245 views
File license
Public domain

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.

IMG20220907190757_01.jpg
Filename
IMG20220907190757_01.jpg
File size
222.76 KiB
Views
3245 views
File license
Fair use/fair dealing exception

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 😉

ghidra_sc2.png
Filename
ghidra_sc2.png
File size
35.27 KiB
Views
3245 views
File license
Public domain

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.

IMG20220907191718.jpg
Filename
IMG20220907191718.jpg
File size
307.58 KiB
Views
3245 views
File license
Public domain

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 😀

IMG20220907190904_dos.jpg
Filename
IMG20220907190904_dos.jpg
File size
359.78 KiB
Views
3245 views
File license
Public domain

Reply 1 of 8, by Thermalwrong

User metadata
Rank Oldbie
Rank
Oldbie

Congratulations, what a complex path back to getting it working again, only to discover that just adding RAM wouldn't work. You got a lot further than I could have, thanks for the explanation of correcting the ROM checksum after making a change, that part makes sense.
The code commenting and appendix are a big help to follow along, I kind of get what you changed (xxx13h to xxx33h) to fit into the different 'cases' shown in the appendix, but the amount of checking it does to make sure that only 2MB can be used in that machine's original config seems kind of excessive, but I suppose is needed for it to work.

I'm currently trying to get a Compaq LTE Lite 4/25E working that has enough base RAM, but the standby battery corroded off one of the bus transceivers. Old Compaqs 😁

Reply 2 of 8, by dormcat

User metadata
Rank Oldbie
Rank
Oldbie

Excellent work, and congratulations! Wish I had a "fixable" Contura back then. It had a clean MB but a trashed LCD monitor; I really hate that proprietary LFH-60.

Reply 3 of 8, by mnlog

User metadata
Rank Newbie
Rank
Newbie
Thermalwrong wrote on 2022-09-08, 02:17:

Congratulations, what a complex path back to getting it working again, only to discover that just adding RAM wouldn't work. You got a lot further than I could have, thanks for the explanation of correcting the ROM checksum after making a change, that part makes sense.
The code commenting and appendix are a big help to follow along, I kind of get what you changed (xxx13h to xxx33h) to fit into the different 'cases' shown in the appendix, but the amount of checking it does to make sure that only 2MB can be used in that machine's original config seems kind of excessive, but I suppose is needed for it to work.

Thanks! The 386SL needs just two registers set up to work with correct memory size. Although it still needs to discover and check memory somehow, so I'm not sure whether it was actually simpler to hardcode the first and second DRAM bank depending on the machine ID or was it some kind of failsafe to 'nudge' users into buying only proprietary hardware.

Thermalwrong wrote on 2022-09-08, 02:17:

I'm currently trying to get a Compaq LTE Lite 4/25E working that has enough base RAM, but the standby battery corroded off one of the bus transceivers. Old Compaqs 😁

Ouch! Sorry to hear that. Tried to fix corroded traces on one MB, but without success. Especially that the corrosion was so bad, that the IO controller chip had fallen off the MB ripping off pads and traces.

Reply 4 of 8, by mnlog

User metadata
Rank Newbie
Rank
Newbie
dormcat wrote on 2022-09-08, 02:27:

Excellent work, and congratulations! Wish I had a "fixable" Contura back then. It had a clean MB but a trashed LCD monitor; I really hate that proprietary LFH-60.

Thank you. Out of share curiosity. Were you able to get at least some VGA output from the motherboard?

Reply 6 of 8, by dormcat

User metadata
Rank Oldbie
Rank
Oldbie
mnlog wrote on 2022-09-08, 05:04:

Thank you. Out of share curiosity. Were you able to get at least some VGA output from the motherboard?

I didn't have any LFH-60 cable; buying a new one and customizing it to VGA cable would cost (money and time) way more than the worth of the machine.

Reply 7 of 8, by Wdj2005

User metadata
Rank Newbie
Rank
Newbie

Do you happen to have a pinout for the power supply board, so that I can compare the voltages with the spec?
My 3/20 has now developed a fault where it cuts off if the LCD comes on before the CCFL is lit (I removed L2 on the inverter board and discovered this was my source of non-booting).
Any other advice welcomed on trouble shooting... the laptop immediately cuts off when the inverter board is attached to the main board via the ribbon cable.
I have re-capped all the aluminium capacitors (except the row of them inside the LCD itself.

Reply 8 of 8, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

First time noticing this thread, thanks OP for setting that all down, it's like a masterclass in hacking RAM into your laptop.

I have a somewhat similar beastie, a Contura 4/25

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.