• Please review our updated Terms and Rules here

1M memory upgrade mod for IBM PCXT 5160 and Portable 5155

pcdata76

Experienced Member
Joined
Apr 9, 2015
Messages
125
Location
Germany, Munich
Hello ;)

After reading the main thread about the upgrade procedure for XT's thoroughly, I've decided to apply the same modification (replecement of memory decoder ROM IC U44 with a custom programmed GAL chip) to max out the onboard memory of my IBM XT series computers (one late-model 5160 with 256-640k motherboard and one early 5155 with 64-256k board) without the need of any memory expansion adapters. It's a relatively easy job to do and definitely worth to efforts, particularly in 5155 where there is only two valuable full-length slot inside, by considering that nearly all memory expansion adapters are often come in full-length if we don't count some modern options like lo-tech's RAM card.

Our member Greg (ibmapc) supplied the preprogrammed GAL's to me. I'm very grateful to him for all his help. I've got the chips from him more than half a year ago but I was in lack of time to perform the mod, tests and share the results. Last week-end I've completed the mod and performed some tests. Now, I want to append to the chapter with my contribution including modification steps and results.

Before beginning to describe the steps, I want to give some tips about getting the 41256 chips cheaper, if you don't have them already and if you are handy in desoldering (actually a very easy job if you have a desoldering gun). Early 256k 30-pin SIMMS are often consisted of 8 (or 9 if parity) 41256 DIP chips (later ones are not in the DIP package, often SOJ and 3 chip models are made of two 44256 and only one 41256 chip so be careful to buy 8 or 9 chip ones) and they come often very cheap on ebay in lots. You can extract chips from these SIMMs and use them in the upgrade if you don't mind the time spent for the job.

x29a3Rl.png


Note that some SIMM's have trimmed legs at the back side as in the picture below. Be sure that you are not buying them since they won't fit the sockets firmly due to the shortened legs.

UoQtLGR.png


A second method of getting them cheaper is to buy a whole memory expansion adapter (the function doesn't matter, could be EMS, XMS, 16 bit and so... Just be sure that it is filled with 41256 chips completely), if you can find a one sold for a reasonable price. Otherwise, you have to pay considerably more to get the bare chips (or I don't know where to get them cheap yet :) )

So, let's continue with the hardware modification.

5160, Late revision 256-640k Board:

C9OHAD9.png


1- Desolder U44 memory decoder PROM IC (In my case, it was not socketed and i had to desolder it using desoldering gun. Everybody has their own methods and tools (desoldering wick, hand pump, hot air rework station etc.) for the job but be careful to not lift the pads. VCC and ground pins are connected to the internal power planes and they require considerable amount of heat to desolder. Apply fresh solder to the each joint and then continue with desoldering as a general rule with old solder joints.)
eWR2RMU.png


2- Solder a 16-pin IC socket in place of U44
iTaXTzG.png


3- Insert preprogrammed GAL chip as shown in the picture below (Pin#1 of the GAL should match with the pin#1 of the socket). Don't mind the overlapping part over the nearby resistor network, since the empty legs are trimmed down and don't have any electrical contact with the component below.
ZIZ1zSE.png


4- Remove all 4164 memory ICs from the banks #2 and #3 and replace with 41256s (or replace according to your planned configuration if it differs from the default)


5155, Early revision 64-256k Board:

1- Install 74LS158 multiplexer IC into the empty IC socket U84.
JpfnHEu.png


2- Remove U44 memory decoder PROM IC from its socket.
jlzQBRX.png


3- Insert preprogrammed GAL chip as shown in the picture below (Pin#1 of the GAL should match with the pin#1 of the socket). Don't mind the overlapping part over the nearby resistor network, since the empty legs are trimmed down and don't have any electrical contact with the component below.
CfCOfbm.png


4- Remove solder from the holes of the E2 jumper pads (at least for pins #1 and 2#) and solder a jumper header on these pins. (Instead of fitting a header, I've gone with direct bridging the pads 1-2, but to make a possible future changes easily, I recommend to solder a jumper header instead of directly bridging the pads)
VSPG504.png


5- Replace all 4164 memory ICs with 41256s (or replace according to your planned configuration if it differs from the default)
RawlPMd.png


Memory Configuration:
------------------------
There are various memory configuration options are available. According to your needs (and system configuration), fill each bank with required memory chips. If you need upto 128k of upper memory, three banks should be filled with 41256s and one bank with 4164s. If you want more, then fill all banks with 41256. Then configure E2 jumper and motherboard switch block SW2 #3 and #4 accordingly.

There are 6 memory segments in the upper memory region from A000 to F000. Some of these regions are already occupied with hardware ROM/RAM's and are not available to use as a UMB memory. If your computer has an EMS card, its page frame is also reside in one of these segments. Mapping for these segments are:

A000 : EGA/VGA memory for high resolution graphics. If you have CGA or MDA/Hercules adapter, this region is completely free and could be used as upper memory or to extend conventional memory above 640k.
B000 : Parts of this segment are used for CGA/MDA/Hercules or EGA/VGA text mode memory. Normally, part of this region could be used as UMB's but doesn't work in our case, so assume B region is entirely occupied and not available to provide UMBs.
C000 : Parts of this segment are occupied with EGA/VGA BIOS and disk controller BIOS if you have. As in the case with B segment, consider C segment also as unavailable unless your computer doesn't have any disk controller and EGA/VGA adapter.
D000 : Empty, could be assigned as EMS page frame or UMBs.
E000 : Empty, could be assigned as EMS page frame or UMBs.
F000 : Reserved for System BIOS/ROM Basic, not available for anything else.

By considering the above information, the most useful configuration options can be classified as follows (Note that entire information can be found in attached 1megXT.txt file):

E2 Jumper is installed at 1-2 position (default setting with 256-640k motherboards):

SW2 4 & 3 = 00 (both closed/on)=========> 640K plus Segs A, C, D, and E (no EGA/VGA and no Hard Disk, all banks have to be filled with 41256 chips)
SW2 4 & 3 = 01 (4 closed/on, 3 open/off)===> 640K plus Segments A, D, and E (no EGA/VGA, all banks have to be filled with 41256 chips)
SW2 4 & 3 = 10 (4 open/off, 3 closed/on)===> 640K plus Segments C, D, and E (no EGA/VGA and no Hard Disk, all banks have to be filled with 41256 chips)
SW2 4 & 3 = 11 (both open/off)==========> 640K plus segments D and E (Banks 0 to 3 have to be filled with 41256, bank 4 with 4164 chips)

No jumper installed at E2

SW2 4 & 3 = 00 (both closed)=======> 640K plus Segments D and E (Bank 0 has to be filled with 4164 and the rest with 41256)
SW2 4 & 3 = 01 (4 closed, 3 open)===> 640K plus Segments A and E (no EGA/VGA, Bank 0 has to be filled with 4164 and the rest with 41256. It is the best option if you have EMS board in your CGA/MDA system with hard disk controller)


DOS Configuration
--------------------

MS-DOS version 3.1 didn't work properly with the modded XT. After loading the UMB provider device driver in config.sys, system locks up at the dos prompt with blinking cursor and doesn't accept any keypress except CTRL+ALT+DEL. PC-DOS 6 and MS-DOS 6.22 work without this issue. Didn't tried yet, but DOS 5 should also run flawless. I have no idea about DOS 4.

To prevent parity error (details of this issue can be found at the main thread, I won't repeat it here), Chuck's CLEARMEM.SYS utility should be loaded at the first line in config.sys according to the configured memory segments as UMB's. In case of the need to clear non-contiguous segments, like A an E for example, command should be repeated for each non-contiguous segments as shown below:

DEVICE=DRIVE:\PATH\CLEARMEM.SYS A000 1000 ; clears one full segment of memory starting from address A000 (entire A segment)
DEVICE=DRIVE:\PATH\CLEARMEM.SYS D000 2000 ; clears two full segments of memory starting from address D000 (entire D and E segments)

Then, add following line to CONFIG.SYS to enable access to UMB's within DOS.
DOS=UMB

After this step, preferred UMB provider (USE!UMBS.SYS, HIMEM.SYS of DR-DOS, The last byte memory manager LASTBYTE.SYS) should be loaded with device command. The last byte memory manager has an option to extend conventional memory beyond 640k if you have memory in A segment, so if you want this option then go with TLBMM. The only drawback of TLBMM is the relatively long (around ten seconds usual + 30 seconds more for unregistered version) loading time. USE!UMBS loads itself almost instantly. HIMEM.SYS of DR-DOS is also relatively fast, but there is no point to use it if we have USE!UMBS option in our hands.

USE!UMBS
DEVICE=DRIVE:\PATH\USE!UMBS.SYS A000-B000 D000-F000 ; This command provides UMB's in A, D and E regions. Note that you have to declare end of the segment as the beginning of the next segment.

The Last Byte Memory Manager
DEVICE=DRIVE:\PATH\LASTBYTE.SYS PHYSICAL=Fixed APPEND=64 ;Append option should only be used if A segment is assigned for UMBs.
DEVICE=DRIVE:\PATH\HIGHUMM.SYS ; enables recognition of upper memory natively by DOS 5 and above. So loadhigh, devicehigh and installhigh commands can be used without the need of the software's its own high loaders HIGHDRVR.SYS and HIGHTSR.EXE
DEVICE=DRIVE:\PATH\HIGHAPND.SYS ON ; enables extension of the conventional memory beyond 640k

Another useful utility called DOSMAX simulates the behaviour of loading dos into HMA (which is unavailable for 808X processors) by loading DOS into upper memory. Note that after loading dosmax, available upper memory will decrease in the amount of moved DOS kernel, files, fcbs, stacks and so...

DEVICE=DRIVE:\PATH\DOSMAX.EXE
SHELL=DRIVE:\PATH\SHELLMAX.COM C:\DOS\COMMAND.COM C:\DOS /E:512 /P ; to load shell into upper memory. Can be used also for 4DOS or other similar dos shells.

and call ENVIMAX.COM at the first line of the AUTOEXEC.BAT if you want to move master environment of COMMAND.COM into upper memory too.

Then, load device drivers and TSR's that you need using DEVICEHIGH and LOADHIGH commands into upper memory and enjoy free 6XX kilobytes of free conventional memory in your XT ;)

PS:
UMBINFO.COM is a very useful tool to inspect the memory map of your PC. It is in german but you can easily use it without knowing any german word too.

View attachment DOSMAX21.ZIP
View attachment USE!UMBS.zip
View attachment umbinfo.zip
View attachment CLEARMEM.ZIP
View attachment 1megXT.txt
 
Thanks for sharing this. It never really hit me that DOS 5/6 could be loaded in to UMB instead of HMA, especially on an 8088. Might have to try that some time.
 
@pcdata76
That's a great looking write up. I have not checked it for accuracy, but it looks extremely detailed. Also, there is another modified(By Krill) version of USE!UMBS.SYS that incorporates Clearmem.sys DownLoad it here View attachment use!umbs.zip As alway's, I will provide programmed GALS for the cost of shipping for anyone interested in performing this Mod to their 5160 motherboard.
 
Last edited:
This is very nice tip to upgrade 256KB --> 1MB (for 64-256KB 5155/5160 board), or 640KB --> 1MB (for 256-640KB 5160 board)
But, remember that this is Not for IBM PC 5150 motherboard but for 5160 motherboard.
Also there is no need to replace U44 socket chip (GAL16V8B) if anyone want to upgrade 256KB-->640KB on 64-256KB 5155/5160 board.
 
Also, there is another modified(By Krill) version of USE!UMBS.SYS that incorporates Clearmem.sys DownLoad it here View attachment 44273

Yeah, CLEARMEM.SYS is not needed with version 2.2 of USE!UMBS.SYS. Though pcdata76 included this version* so I guess it might be needed when using one of the other UMB-handlers?

Nice write up BTW!

*No biggie, but I would prefer to have the source file included with the binary, not because I care about credit (I'm not in it for the fame, I'm in it for the money ;) ) but because it would be great if having access to the source inspires someone to pick up assembly programming!
 
I'm using LoTech 2Mb EMS board at my 5160
https://www.lo-tech.co.uk/wiki/2MB-EMS-Board

It occupies 64K window at E000. I suppose 2Mb EMS memory is more useful than 128Kb UMB... (IMHO)

Both kinds of memory have their own advantages. It just depends on the software intended to run. But if you have an XT with CGA/MDA, then you can both have EMS+UMB too with this mod (just assign UMB to A and E segments and map EMS page frame to the D segment. If your EMS board has an option to set page frame at A segment (most boards including lo-tech's doesn't have), then configure UMB at D and E segments (contiguous memory have better use due to less fragmentation)

@Krille

Thank you for the correction. I had to use clearmem for other UMB handlers but also didn't verify the version of USE!UMBS that I've chosen has clearmem already built-in. And I've attached the file which includes all versions with source code and test!umb utility View attachment USE!UMBS_All.ZIP.
 
Last edited:
Back
Top