IBM 5150 Board Switches

Support and general discussion.
Post Reply
Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

IBM 5150 Board Switches

Post by BigAlUK » Thu 20 Sep, 2018 8:43 am

I've been doing some research and experimentation with both PCE and PCem regarding the switch banks on the two different 5150 motherboards and the relationship with the requested RAM in the emulator configuration.

I am quite impressed that both emulators go as far as to even drive the motherboard switches (which are usually set by human hand). But in both cases something appears to be going wrong as the 544KB "barrier" is crossed. The IBM BASIC appears to be losing its ability to provide most of its usual block of 64K it reserves and this happens when the total RAM goes above 512KB.

At first I thought both emulators were getting the switches themselves wrong - but now I'm less sure. More testing needed (by me!)

Watch this space - I've found some bugs in my own code, so the Jury's still out as to what is causing IBM BASIC to suddenly report very little RAM when I up the system memory to and beyond this point.

Last edited by BigAlUK on Fri 21 Sep, 2018 5:42 am, edited 1 time in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Thu 20 Sep, 2018 1:09 pm


It turns out the mysterious problem occurs when I run my (originally Cassette BASIC) tester program under PC DOS 1.0 BASIC or BASICA.

Essentially what is happening is that when I configure the emulated PC to have more than 512KB of RAM, running BASIC or BASICA under DOS results in BASIC immediately reporting that it has acquired barely any RAM at all (depending on the "fitted" RAM size, it could acquire as low as 6K - so math is going wrong somewhere!). However, if upon the same emulation I run the program via a Cassette BASIC boot - thereby eliminating PC DOS 1.0 from the workings - the problem goes away and BASIC reports most of its 64K page as being available. And this doesn't change whatever the "fitted" RAM (as long as it is greater than 64K of course). It is still sensible all the way up to a full 640K (or 544K with the older BIOS).

So - more experimentation will follow - it appears that PC DOS 1.0 is not managing memory properly if the hardware+BIOS reports (via the BIOS Data Area) that more than 512KB of RAM is fitted (even with the oldest BIOS a value of 544KB should've worked). I have no idea whether this is because PC DOS 1.0 is ignoring the BDA-stored values and attempting to read the switches itself, and getting it very wrong, or whether it is simply that somewhere it is doing memory maths and losing upper bits of the numbers. I guess both are likely, because back in 1981, when the DOS was written, the 5150 PC would only ever get kitted out with 256K at most. This is also, incidentally, the reason why the older BIOS code doesn't bother reading SW 2-5 on the motherboard.

I will eventually test (work is ongoing) to see if and when this problem goes away with later versions of DOS.
[UPDATE: Yes, it does! Everything fine if I use DOS 1.1 or later]

One thing my research and experimentation has established: it appears that the BIOS on its own cannot tell the difference between a 16-64K (aka PC-1) and a 64-256K (aka variously as PC-2 or Rev.B) motherboard, and thus appears to regard the switches as reporting any RAM as if it were being provided by a 16-64K board. So I am pretty sure that none of this is an issue caused by the PCE or PCem emulators (that's good news! - In fact, it's downright impressive!).

This would all explain the reasons behind the 'bugs' described on the MinusZeroDegrees website (see ... _banks.htm). It appears that this may well have arisen out of an actual design aim to hide the fact of the motherboard memory configuration difference from the BIOS. It would explain why the Technical Reference (April 1983) shows identical switch settings for both motherboards when given the same total RAM. (What? Y'all didn't notice that?)

Essentially the user who is setting the switches is being asked to "join in the lie" when setting the SW 2 block of switches. The lie being that the extra 192K on the motherboard is just "Expansion Memory" by another mother. Most confusion occurs because this lie starts to fall apart if you have a 64-256K motherboard fitted with less than 256K of RAM: i.e. no ISA Expansion RAM and up to three missing banks of 64K on the motherboard. In theory this implies you should change SW1-4 and SW1-5. But in fact you should leave them alone on a Rev.B board! Both should remain off on a Rev.B no matter how much RAM you are adding or taking away. (It is a lie by design: not actually a bug). You can observe this lie "in action" if you study page G-34 of the April 1993 issue of the IBM PC Technical Reference manual. They already acknowledge that switches SW2-1 to SW2-5 need to be involved for what is actually system board RAM. And these settings are basically the same for the same total memory as on the old board (In the Tech.Ref., see bottom of Page G-8 for 64K, Page G-10 for 128K, Page G-12 for 192K and Page G-14 for 256K). So, as I said - the upper 192K system RAM in Rev B is expansion RAM by another mother - namely the motherboard rather than the ISA card. :)

My guess (to be confirmed) is that the strange behaviour regarding BASIC/BASICA on DOS 1.0 will go away with DOS 2.1 or DOS 3.X - namely whenever the date of the DOS is younger than the date of the motherboard change. But I am becoming increasingly sure that this particular issue was a red herring when it comes to the motherboard switch settings.
[Update: Yes - it was - and very red]
Last edited by BigAlUK on Thu 27 Sep, 2018 11:12 pm, edited 14 times in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Thu 20 Sep, 2018 1:24 pm

Incidentally, what has hampered the research quite a bit is the absolute dearth of information on the web about those very early 5150 PC models. It took me a long time to realize what the three appended part number digits actually represented (it was kind of methodical, almost, but then eventually not quite so...)

This is also not helped, of course, by the fact that the "standard" releases of the 5150 changed so rapidly during the 1981-1983 era, and only stabilized after 1984. People who had bought the early models would probably have retro-fitted whatever they could as soon as they had the money and inclination to do so. As a result, a lot of the more "anecdotal" information on the web (esp. Wikipedia, but also quite a few reference books) gloss over the differences and so inadvertently give the impression that IBM immediately started releasing 5150s with two 360K double sided floppies and a hard disk option, kitted out with up to 640K of RAM (that is one of the more confusing examples of obfuscation that I encountered, others are mere flavours below that).

In truth, the IBM 5150 arguably pre-existed it's August 1981 announcement/release date for quite a few months. The very first were built by at least April 81 - which is the date of the first released BIOS chip. Tim Patterson was putting his 86-DOS onto one during June 1981 and it became PC DOS 1.0 not long after that. Those very first models (with the April 1981 BIOS) were given the part numbers 5150-001, 5150-002, 5150-003 and 5150-004. The last digit represented how much RAM would have been put on the system board by IBM before shipping. Beyond that everything else was optional - which is why some references show (for instance) a 5150-003 as having a 160K floppy drive (only if you asked for it, mate!). This quickly changed, and it would seem that it was driven by what people were asking for the most - giving rise to new standard part numbers 5150-013 and 5150-014 (where the "-01x" indicated the 160K floppy was fitted "as standard"). This appeared to be happening around the same time as a new BIOS (October 1981) was also released. So here's a question: is a 5150-003 sold with a 160K floppy drive really a 5150-013? Well I guess it depends when in those first few months after the initial release you bought it - and when did it eventually leave the factory to be shipped (that could take a month because IBM may well have been struggling to keep up with demand: anecdotal "evidence" suggests sales far exceeded expectations, which may have led to some very quick decision making for the factory). It is probably the same machine: but check the BIOS date! That said, you probably would have asked IBM for the BIOS update "kit" (a ROM chip in a bag?) and thus turned your PC into a 5150-013 in all but name.

Why were there no 5150-011 or 5150-012 machines? Because there's no point in having a floppy if you have no DOS: and DOS requires more than 32K of RAM :).

Arguably, the next option for part numbers would have been 5150-023 and 5150-024 - for two 160K floppy drives. But it seems at this stage hardly anyone wanted the expense. They probably had not realized just how awkward DOS was to use with a single drive (it was all so new, back then - not having to use a tape was already a big enough plus). So whilst some may have bought (say) a 5150-014 and added another drive as an option, IBM does not appear to have recorded this as a standard part: I can't find any mention of -02x part numbers anywhere, nor -03x and -04x that would imply 3 and 4 floppy drive models were standardized. This is not surprising because half-height drives were not available, so there's no room in the 5150 box. If you wanted THAT many drives, you'd have had to put them in their own boxes hanging of the back of the PC by the external cable interface of the floppy controller (there was no 5161 expansion box yet). So it would be illogical to standardize these options via part numbering.

They eventually did update the standard, though, when DOS 1.1 was released (in May 1982): because this supported double sided drives, and people appeared keener by then to invest in these. So IBM created the new part numbers 5150-063 and 5150-064 and then also 5150-073 and 5150-074. The '6' represented a single 320K or 360K drive, and the '7' represented two of these drives. I have no real idea why IBM skipped the -05x numbers. Also, quite why anyone would want a 320K drive is beyond me, but I can't actually discover whether it was really a separate thing, or just a "mode" of the 360K drive. Even more confusingly they still retained the older part numbers (for a single 160K drive - or would that be 180K under DOS 1.1? Was it a DOS trick, or was it actually a different drive?). I can only assume the 5150-013 and 5150-014 standards were still retained in the hope of using up stock. All this short-order cooking at this stage gave rise to a growing plethora of part numbers, when for instance 3270 terminal emulation became a standard rather than an option (parts 5150-X13 and 5150-X14, expanding to 5150-X63, 5150-X73, 5150-X64 and 5150-X74, though it is not clear if all of these were actually used and sold - some do appear in some listings). And when IBM discovered that virtually everyone wanted a serial comms card, they came up with 5150-813 and 5150-814 to make them standards as well.

An afterword here - I have found a reference to a 5150-823 here: which implies a 48K machine with two 160K floppies and a serial port all delivered as a "standard". Don't read anything into the document date though, as it's about maintenance, not sales. It confirms that the x2x pattern to the part number was being used. That it means 2x160KFDD is however still unconfirmed but very likely.

And here is where it starts to get illogical, because in October 1982 a new BIOS was released (and apparently used on 16-64K motherboards) and then not long after that a new motherboard arrived (same BIOS): the 64-256K (aka Revision B). This was denoted by a little 'B' sticker on the back of the machine. At that point the standard parts change abruptly: ALL 16-64K systems were fitted with maximum system RAM in the factory (64K) and this eliminated all the -xx3 part numbers from the inventory in one chop of the axe. This left the -xx4 parts. What is not clear is whether the -xx4 parts had the new BIOS chip or not. All I can establish for sure is that by the time the Revision B started shipping (with the BIOS) it was under a new part number pattern: 5150-1x4, where the '1' represented the "new" model (new BIOS, new board, or both?) and the -xx4 demonstrated a fully populated system RAM (64K - in theory a 16-64K board). So IBM then had new parts 5150-166 and 5150-176, where the new '6' represented 256K of system RAM (in theory a 64-256K board). This implies that 5050-164 and 5150-174 were 16-64K boards (with the new BIOS and no "B" sticker) and 5010-166 and 5150-176 were Revision B (aka PC-2) systems. Or did it? Could 5050-164 and 5150-174 have also been 64-256K boards (Rev.B) with only one 64K bank fitted? Or may be a mixture of both? And if 16-64K boards were being sold as Rev.B, was IBM doing a fiddle? Or was IBM just being practical because as far as this new 1982-BIOS (and so DOS) was concerned, they couldn't really tell the difference? Unfortunately I can't find a definitive answer to what old boards with new 1982 BIOS chips were actually sold as: was it 5150-0x4 or 5150-1x4? But there definitely appears to have been a gap between the dates of the BIOS and Rev.B boards.

[Update: I am now convinced that -1xx is synonymous with 64K-256K motherboards, and that 16K-64K boards fitted with the 10/27/82 BIOS would still have had their original part numbers (-0xx, -8xx, Xxx). All these older parts were going to be removed from price lists soon anyway, presumably because IBM wanted to move on with a simplified range]

To be honest, the evidence for what changed during those short and heady days of 256K-driven innovation is somewhat fuzzy. But by 1984, the picture was clearer, because IBM dropped all the older parts. We were left with:

5150-104 (64K RAM and no drives - but were Rev.B boards ever used, indeed, only used?)
5150-166 (256K, 1 360K drive - Rev.B board)
5150-176 (256K, 2 360K drives - Rev.B board)

Everything else were "options" to be added onto these three standard parts.

[UPDATE: I found this PDF that shows a June 1984 price list with the full range of 1xx parts. The date is long after they stopped making 16-64K motherboards - so this confirms that they did make 64-256K systems with just 64K RAM and part numbers in the -1x4 pattern. So I guess that implies that any older 16-64K board with a 1982 BIOS was probably still an -0x4. Also very interesting is that the floppy drives are still being identified as 320K. AND some people were still buying 160K floppy drives??? Was that for real? In 1984? With DOS 2.0 already the standard? Could these be used for format 180K and 360K floppies? Does anyone have an answer and a postcard?

[Another update: I have now actually seen an IBM document identifying a part 5150-114. Stunning - an old 180K drive on a new 64-256K motherboard fitted with just 64K - so no expansion RAM. Now that's IBM looking after the little guy with hardly any money to spend]

If anyone can lay their hands on absolute evidence that contradicts or clarifies this potted 'histoire', please let me know.
Last edited by BigAlUK on Wed 03 Oct, 2018 3:36 am, edited 36 times in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Sun 23 Sep, 2018 9:27 am

By the way, my little (well, not so, now) BASIC program is nearing completion.

I will see if I can post output images, and perhaps even the code if anyone may be interested, once it is finished.

It's turning out to be a bit of a CPU-Z for 5150 machines - it deduces the most likely part number, taking into account the BIOS date, the amount of system memory, the comms card and ultimately how many of the 5 ISA slots would be required before a 5161 expansion unit is implied. And then it attempts to put an 'earliest' date on that. The idea is that this would help when trying to understand whether the configuration of the 5150 is appropriately matched to the software that you might be trying to run - indeed whether the combination is even feasible. Just another tool in the armoury. :)

It would also be interesting what the program will say if it is run on real 5150 machines rather than emulators. So when it's ready, if anyone possesses such beasts in the wild and would like to try it, let me know. I'm planning to have three (otherwise identical) builds - one on Cassette (.CAS file) and an uncompiled and a compiled version on 160K floppy (.IMG file). That way, they should be usable on any emulator and with any DOS version (or indeed, no DOS at all). Hopefully, someone with the right tools may be able to get them onto a real 5150 and see what they do.
Last edited by BigAlUK on Tue 25 Sep, 2018 4:16 pm, edited 1 time in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Sun 23 Sep, 2018 10:43 am

Here's an early example of the program's output.
(Let me know if the link doesn't work - never tried this mechanism before now)

This particular example (Sample.JPG) demos some of the features (which are not yet complete). It was actually taken with PCE, but PCem works the same.

It shows the two switch blocks and below that establishes via these and also the BDA data what the emulated PC has.

It will then (still writing this part) calculate how many ISA slots this would take, and whether it is feasible based on the BIOS date to assume a 5161 expansion box might be implied. Or whether you are emulating a nonsense system. Also to identify pre- and post- Revision B alternative interpretations (as is shown in the above image). I will then modify the first line with an estimate of the part number (or two if there are Rev.A/Rev.B alternatives). I've also played around with the idea of putting an 'earliest' date for that configuration (implied parts being available or not), which will affect which version (by date) of the Technical Reference Manual will apply.

But it's all work-in-progress at the moment, to fill these rainy September days...

It's being written in Cassette BASIC C1.00. Wow, this brings back fun memories of tedium in programming :) I'm missing Turbo-whatever already... But that's the cost of time travel :)
Last edited by BigAlUK on Thu 27 Sep, 2018 11:42 pm, edited 3 times in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Mon 24 Sep, 2018 12:41 pm

Hmmm - that's interesting.
There doesn't appear to be any way to tell PCem not to include emulations of at least 2 game adapters, 2 serial ports and 2 LPT ports no matter what you do to the configuration file!

Consequently, any 5150 emulation is "forcing" the use of ISA slots that a real 5150 PC would not even have!

Thus my little emulation fantasy tester is always identifying any configuration of a 5150 with PCem as being a 5150-174 with an attached 5161 unit and no HDD, thus using 10 slots in total.

Seems a little excessive. (And at the time would have been unbelievably expensive) :)

Sarah? Anyone?
Is there any way to switch off the adapter inclusion so that these three "options" no longer cause the BIOS to write their (frankly daft and excessive) numbers into the BIOS Data Area? I mean, if I say on the config menu that I do not want (say) Game Paddles of any kind, it could at least have the courtesy to also remove the emulated adapters from the emulated ISA slots so that it does not misrepresent that there are still two games devices present? I assume the BIOS is being given the wrong emulated hardware input signals when it is checking for absence of these things.

I know my code works "correctly" with PCE. I can remove these things from the config file and PCE tells the BIOS that they really don't exist.

What I'm getting with PCem, however, can be viewed here:

Those counts of '2' are being read directly from the BDA (BIOS Data Area), but since I have set all of those things to zero (as far as I can tell) in the config file, they should all be zero! Not being able to force them would mean that you can't really test code that does something when they are NOT there. Kind of spoils a small part of the value of an emulator, don't you think?

If you want to try an interim release of the code (perhaps as a test harness for the issue), here's a temporary copy at the present version. (This is a floppy .IMG file and the app is called MotherB4.BAS).
Last edited by BigAlUK on Sat 29 Sep, 2018 12:31 pm, edited 3 times in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Mon 24 Sep, 2018 7:01 pm

Ok - I appear to have stumbled onto a problem that I cannot get my head around yet (it was a bit unexpected when things appeared to be going so well). It happened just after I made an attempt to check out the emulation used in MAME, on top of the PCE and PCem ones. What at first I thought was a difference in behaviour (and a difference from what the April 1986 manual prescribes) may actually be a common fault. It contradicts my expectation, certainly. So I am going to be spending a little while making sure I understand why: just to make sure it is not me making errors.

So watch this space - assuming there's anyone out there following this troubled "blog", that is... :)

[UPDATE: I got MAME working (sort of). God, what an awful interface! It does some peculiar things- such as not delivering the RAM that I asked it to (always 64K less than asked for). But on the plus side, it emulates an optional 8087 - so I was finally able to test my little program for that feature! - since PCE and PCem still don't appear to provide an 8087 option. As such, MAME works - but it is annoyingly awkward to skip past all this semi-automated dumbed down arcade nonsense - which is of course its main raison-d'etre, but all the same... Another annoyance is that its (admittedly clever) ISA slot manager totally ignores the fact that expansion memory is supposed to take up some of those slots! Hmmph. Still, I guess that avoids it having to admit the possible existence of an additional 5161 box]
Last edited by BigAlUK on Thu 27 Sep, 2018 11:54 pm, edited 6 times in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Tue 25 Sep, 2018 5:02 am

Just as an update as to where this is going:

It seems that there may have been some confusion, possibly sowed in the MinusZeroDegrees notes about bugs in the 1982 5150 BIOS. It may be me, or it may be the "others" (hows that for paranoia?). Personally, I'm not sure they are bugs - the behaviours observed that led to those notes may have been a result of misinterpreting the actual intent of the original BIOS programmer. But to be fair, I'm not 100% sure myself yet. To summarize where I'm going (and I need proof yet) - I am suspecting that the programmer (and thus IBM) never intended SW1-3 and SW1-4 to be anything other than "off" on a Rev.B board, because they were actually trying to make the new board "transparent" to the BIOS. As soon as I can post a proof of this I will: but it may mean that all three emulators I'm testing here may be doing something wrong. Watch this space (as long as I don't disappear in a puff of paranoid logic - I can already feel all those diodes down my left side hurting).

[Update: I am now 100% convinced that the '82 BIOS deliberately cannot tell the difference between a RevA and RevB motherboard as far as memory expansion is concerned - and that this was by design. IMHO, the only way to disprove it is either with some real world machines, or chatting with the original coders. But I'm pretty sure this viewpoint of the intent is correct. Certainly all three different emulators I've tried appear to corroborate this insofar as they can]
Last edited by BigAlUK on Sat 29 Sep, 2018 12:41 pm, edited 6 times in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Tue 25 Sep, 2018 10:21 pm

Have spent part of today pouring over the historical evidence again (IBM announcements and IBM internal news letters, mainly).

Here's the time-line regarding the period of interest:

Before all this period, the 5150-013 already existed:
10/19/81 BIOS had already replaced the 04/24/81 BIOS.
The 160K drive was considered as a "standard".
We can deduce that the 64K version of this was basically the same as a 5150-013 but given another 16K of RAM and re-badged as the 5150-014.


MAY 1982
DOS 1.1 released
320K Drive creates a new standard: 5150-064 (64K RAM with SINGLE floppy: the new 320K).
Why 320K? Why not straight to 360K? What the heck? - But this is another kettle of red herrings, so I''ll stop!
Suffice it to say that 360K was just writing stuff a little bit closer together, so maybe it was the same thing.
Likewise 160K v. 180K. I guess IBM just wanted confidence in all drives achieving this.
Certainly they didn't appear to change the part number when later selling it as a 360K standard.

JUN 1982
No longer selling 5150-013 as a standard: Are 160K drives already considered defunct technology?
Nope, because the 5150-014 is still a thing. So it's all about the system memory: less than 64K is no good.
Implication here is that all xx3 part numbers were in fact dropped here, in favour of xx4 equivalents.
This is based on the observation that these parts disappear from any records during late 1982 to 1983.
But I'm pretty sure I've seen a memo somewhere that says this more explicitly...
And as for 5150-001 and 5150-002 - well, no floppies and tiny memory is SO yesteryear man!

OCTOBER 1982 (After four months during which all but 64K+ machines became "history" to IBM)
New (and final) BIOS released - available as a kit for retrofitting if people WANTED more than 544K RAM.
But there IS a problem simply putting it onto any xx3 parts and then not actually fitting all that RAM.
This would be using the BIOS differently than was intended: for xx4 boards manufactured NOW.
This BIOS was created for xx4 parts, after all. Retrofitting to xx3 really wasn't IBM's main concern.
So - is any abnormal behaviour on xx1, xx2 and xx3 parts really a bug?
It goes away if you use the BIOS upgrade correctly and turn them all into xx4 parts first!
The whole idea, after all, was to break the 544K barrier, otherwise why bother?
Ya bunch of retrofitting whingers!

At this stage, the standard part numbers advertised were typically 5150-004, 5150-014, 5150-064, 5150-074.
These were diskless, single 180K FDD, Single 360K FDD and dual 360K FDDs - all of these come with 64K RAM.
Plus some 8xx parts for an added serial card or Xxx for 3270-terminal emulation.

MARCH 1983
The 5160 XT arrives (let's just put that out there shall we?)
The 5161-001 expansion box is available for the 5150 PC
The 5161-002 expansion box is available for the 5160 PC XT
These BOTH come with a 10MB hard drive! (Requires DOS 2.0 - also released)
So if anyone had a 5161 without a HDD, well something's been nicked.
All manufacture of 16-64K boards stops and new REV.B boards made.
These are the 64-256K boards fitted with a MINIMUM of 64K RAM.
So new base part numbers:
5150-104 (replaces 5150-004)
5150-164 (replaces 5150-064)
5150-174 (replaces 5150-074)
5150-166 (has 256K on motherboard)
5150-176 (has 256K on motherboard)
That's it: end of message: no more 5150 part number diversity
After all, for things like 3270-emulation, there's an new XT-based "PC 3270"
And the serial card - well that's just one of the options along with all that RAM...
Another fun fact: why no 5150-106? Because BASIC can only use 64K. So it would be daft to buy all that RAM and not have a way of running DOS.

[UPDATE: I have since found a document that identifies both a 5150-X66 and a 515-866. So it appears that after saying the above parts would be the only ones, IBM then relented and added these two additional revision B beasties: A 3270 one (X66) and serial comms one (866). It would not surprise me if X76 and 876 also existed - but I still can't find any examples yet. How do I know these are RevB without the '1' digit? - Well it's the trailing '6' that gives it away: 256K on the motherboard.]

APRIL 1983
New Technical Reference written - makes THREE major mistakes!
It forgets to mention that old 16-64K boards can only have less than 64K with the OLD BIOS
It forgets to mention that old 16-64K boards can only have more than 544K with the NEW BIOS
It puts the descriptions for both motherboards in the same appendix and makes them look so similar!
Because it wasn't their main concern - they were making Revision B machines now.
And this was the manual for this new machine.
And who uses less than 64K these days anyway? We don't even make those now.
That bit about the old boards was just a courtesy for the whinging retrofitters...

SO - when, as I discovered, the emulators (PCE and PCem) start to cause the 1982 BIOS to do some very strange shit when you make them set the switches for LESS THAN 64K when using that '82 BIOS - well, that is because by doing so, I have become a whinging retrofitter! I added a BIOS designed to make a machine able to have more than 544K, a machine that by that time would most probably have already HAD 128K or 256K, and mostly - if I had been in a time-capsule, lets face it, I would have also been considering a 5161 unit with a nice shiny 10MB drive in it... So why I am I trying this BIOS in a machine with 16K, 32K or 48K of RAM again?

Simply put: if you are using an emulator to emulate DOS 1.0 or DOS 1.1, you should not fit a 1982 BIOS at all. And if you do fit that BIOS, the appropriate DOS is actually 2.0 and you should have at least 64K of RAM with that and a side order of mayonnaise.

So, I will now put these newly understood constraints into my little tester program. It can then serve as a sanity-checker for situations when a really old bit of software doesn't work properly upon an emulated 5150 - a bit like that problem I had earlier where BASIC couldn't get its full 64K page under DOS 1.0. or the MESS/MAME emulator started confusing the hell out of me because it won't tell me straight how much memory it is fitting (Really not a fan of that arcade-style interface - Please Sarah, don't let that happen to PCem).
Last edited by BigAlUK on Sun 07 Oct, 2018 9:14 am, edited 1 time in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Tue 02 Oct, 2018 4:49 am

I just found something today that should "ease any contentions" about emulating early IBM PC memory and slots.

If all you were using were only IBM parts, it would be true to say that an original 5150-014 (say) could only have expanded memory up to 256KB (using three ISA slots with one top-range 64K ram card in each - this being what was available in 1981/1982 of course). So DOS 1.0 (still the only OS until CP/M-86 was ported in spring 1982, and DOS1.1 in May '82) would not have needed to worry unduly about managing memory above that, nor about the 544K barrier imposed by the 1981 BIOS's not reading the top memory related switch on the motherboard.

And then I found this:
PC Magazine June/July 1982. Yes, with this third party Maxi-RAM extender you could add a whopping 512K RAM via a single ISA slot! That could immediately take you to a total of 544K (lucky: it is in 64K banks with switches!) and thus potentially expose the memory management problem with PC DOS 1.0 (not so lucky). Just as well that PC DOS 1.1 had just arrived on the scene the month before to save the day :)

No wonder IBM then had to play catch-up by releasing the 64/256 expander card (somewhere between then and spring 1983 - can't find a definitive release date yet). Too little too late, really.
Last edited by BigAlUK on Mon 15 Oct, 2018 10:35 pm, edited 1 time in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Wed 03 Oct, 2018 3:06 am

So, all my latest found knowledge makes me realize that my little tester program (I will continue to call it that, because it has to fit in 12K, so it can run from cassette on a 5150-001) needs to be a little less prescriptive about the slots it counts. So what I have done is couple the slot counting with a bit of 5161-detector code. I fully expect that detector to always fail on an emulator, as I kind of doubt that anyone will bother to emulate an actual 5161 Expansion Box. When it does, I display that it was "presumed" but "not detected" and then add a little message that explains this away by suggesting that non-IBM parts must have been fitted! That's a somewhat terse way of saying: if you had stuck with IBM parts, then the available IBM solutions of the time matching the BIOS date and general configuration would imply that you just ain't got enough slots, mate. However, I'll allow that you're a big cheat and are assuming that some wonderful third party multi-adapters were used. However I might still penalize you on the suggested "earliest existence" date at the top, because you'd have to allow at least a few months for those third-party vendors to see the market gap and create and market those parts. Amazingly enough, this actually happened by summer 1982! (See previous post above)

That way, I can indicate when "purist" emulations are less accurate than perhaps desirable, without actually ruling out their validity.

This trick can be seen in action here.

I should perhaps add that the presence or absence of a 5161 is not actually recorded in the BDA (to my knowledge), but certainly the 10/27/82 BIOS code does try and detect its presence (and I have merely duplicated that same test in BASIC). So it still makes sense to put it all under the "BIOS" column.
Last edited by BigAlUK on Mon 15 Oct, 2018 10:40 pm, edited 1 time in total.

Posts: 33
Joined: Mon 15 Feb, 2016 8:27 pm

Re: IBM 5150 Board Switches

Post by BigAlUK » Wed 03 Oct, 2018 4:16 pm

Discovered today: IBM Notice that demonstrates (largely by its date of 1984), that 5150-X66 and 5159-X76 models that can communicate with IBM mainframes as 3270 terminals were built using revision B motherboards. But more interesting perhaps is that the older Xxx ones were also withdrawn, so these should be the only Rev.B 'X' models. Those that were withdrawn (X14, X64 and X74) will most probably only be Rev.A systems (although IBM never seems to tell us that - though it may be inferred from the March 1983 announcement). This neatly sidesteps the fact that the 'X' obscures the '1xx' needed to know we have a Rev.B: because we can also infer that from the 'xx6' (= 256K system board RAM).

Another thing I had not previously realized is that 'X' models do not necessarily mean that the 3270 stuff is added at the factory: the implication of the wording within the original 1983 notice is that the 'X' only really denotes that the normal 83-key keyboard is omitted! But maybe I'm reading too much into that. I have read somewhere that you can't take an X model and use (say) a newer 101 key keyboard - that won't work. So without an 83-key beastie, I guess it'll have to be the 3278 keyboard anyway. (In fact the Keytronic 3270 keyboard is the only one that works properly on MAME as far as I can tell - but that might be because I haven't screamed at MAME loud enough yet).

Post Reply