VOGONS


First post, by SirNickity

User metadata
Rank Oldbie
Rank
Oldbie

It's quirky and weird, so I'm into it. But IBM really tripped over their own 😲 with this thing. I'm trying to get a handle on what can and cannot be done with it, and could use some clarity on things that aren't totally apparent from the research I've been doing.

Hokay! First...

Time-keeping
I can't believe this is something we even have to deal with, but there's no RTC. I know about the 1216 SmartWatch, but wow is that thing a kludge. I would really like to fashion some way of using a good old 1287-style clock, accessible via I/O to 0x70, like God intended. I know the sidecar bus can do this, but it has become a brief obsession to exhaust any internal means first.

1) Can't use the modem slot. The slot is selected on I/O to 1F8-1FF and 3F8-3FF, so we only get A9 and A2:0 to decode. No good.

2) I thought maybe the memory expansion slot could be hijacked. I haven't found a pinout to see what is even on that connector (looking for classic IBM over-documentation ATM), but as I understand it, the Jr uses bank-switching to interleave even and odd access between the onboard memory and the expanded memory. That implies A0 wouldn't be accessible, obscuring 0x70 vs 0x71. MIGHT be able to use a CS line as an A0 stand-in, since we would only be selected if it's asserted (or not -- whichever way it goes) *IF* the majority of other bus signals are there -- IO/MEM, R/W, etc.

What was the other thing I was wondering about.... OH YEAH...

Memory
So, you get 64KB for free, and 128KB with the expansion card installed. Great. Part of that (32KB) is consumed on account of video RAM. This is where I get confused. I've heard tell that video memory is relocatable?

E.g.: https://www.atarimagazines.com/compute/issue5 … cjr_memory.html

Does this work only with BIOS calls, or direct access as well? Are programs using the CGA memory space at 0xB8000 and the Jr is handling the trickery? If so, what's actually doing that substitution?

Moar memory
Next... anything >128KB needs "a device driver" for DOS to know about it. I've heard this is because of the video memory "hole" (although, that article suggests it can be placed in a reserved memory region down low, so ... what hole?) I've also heard it's because DOS is getting a report of top-of-memory from the BIOS, and that says 128K. But the BIOS can see and count memory up to 640K. Wut? Esplain, please!

What is this "driver" doing? Is it just patching the address of TOM? Windowing, ala Expanded Memory?

If there's some real black-magic going on, is it even necessary to use the 64K expansion, or can you use the base 64K and add a sidecar with 512K, and not have to do any of that crazy stuff like allocating RAM drives to intentionally consume the bottom 128K? (I still don't entirely understand what that's supposed to fix, other than ensuring the slow multiplexed memory is unavailable to applications.)

Reply 1 of 14, by Caluser2000

User metadata
Rank l33t
Rank
l33t

Get a hold of Mike Brutman https://www.brutman.com/PCjr/ over at the vcfed forum by throwing a post in the PCs and Clones section. He'll be able to give you some insight. Also sometimes he hangs out at #vc on Slashnet. His email mbbrutman at gmail.com He actually work at IBM I understand when these came out.

There's a glitch in the matrix.
A founding member of the 286 appreciation society.
Apparently 32-bit is dead and nobody likes P4s.
Of course, as always, I'm open to correction...😉

Reply 2 of 14, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Caluser2000 wrote:

Get a hold of Mike Brutman https://www.brutman.com/PCjr/ over at the vcfed forum by throwing a post in the PCs and Clones section. He'll be able to give you some insight. Also sometimes he hangs out at #vc on Slashnet. His email mbbrutman at gmail.com He actually work at IBM I understand when these came out.

he also has an account here (mbbrutman)...

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 3 of 14, by mbbrutman

User metadata
Rank Member
Rank
Member

Quick answers:

The only way you are going to add a clock accessible at I/O port 0x70 is to use the sidecar bus. The modem slot and memory slot don't have the pins you need available.

The memory is shared and the memory window can be moved around.

The memory drivers move the video memory down into lower memory and then force DOS to load above it so that DOS has access to contiguous memory.

All of these things are well documented at http://www.brutman.com/PCjr/ .

Reply 4 of 14, by Scali

User metadata
Rank l33t
Rank
l33t
SirNickity wrote:

Memory
So, you get 64KB for free, and 128KB with the expansion card installed. Great. Part of that (32KB) is consumed on account of video RAM. This is where I get confused. I've heard tell that video memory is relocatable?

Technically there *is* no video memory, at least, not as we know it from regular PC style display adapters, which carry dedicated memory on an expansion card.
There's one big pool of memory, that is used by the entire motherboard, so CPU, video circuit and anything else that uses the bus.
This is similar to other home computers such as Commodore 64, Amiga, Atari 8-bit etc.

Basically you just point the video chip to the correct segment/bank, and that's what it will display.
It is your own responsibility to make sure you are using that memory as display memory, and it is not being used by DOS or whatever to store code or data.

SirNickity wrote:

Does this work only with BIOS calls, or direct access as well? Are programs using the CGA memory space at 0xB8000 and the Jr is handling the trickery? If so, what's actually doing that substitution?

The CGA memory is basically just 'mirrored': the chipset redirects any reads/writes to the B800 segment to the segment that is currently active as your video memory.
There isn't actually any physical memory located at B800 (you only have 64k or 128k), unlike on regular PC display adapters. The B800 mirroring is just for CGA compatibility.

Direct access will work fine, this is the 80s 😀
IBM includes the entire BIOS source code listing in the manual.

SirNickity wrote:
Moar memory Next... anything >128KB needs "a device driver" for DOS to know about it. I've heard this is because of the video m […]
Show full quote

Moar memory
Next... anything >128KB needs "a device driver" for DOS to know about it. I've heard this is because of the video memory "hole" (although, that article suggests it can be placed in a reserved memory region down low, so ... what hole?) I've also heard it's because DOS is getting a report of top-of-memory from the BIOS, and that says 128K. But the BIOS can see and count memory up to 640K. Wut? Esplain, please!

What is this "driver" doing? Is it just patching the address of TOM? Windowing, ala Expanded Memory?

If there's some real black-magic going on, is it even necessary to use the 64K expansion, or can you use the base 64K and add a sidecar with 512K, and not have to do any of that crazy stuff like allocating RAM drives to intentionally consume the bottom 128K? (I still don't entirely understand what that's supposed to fix, other than ensuring the slow multiplexed memory is unavailable to applications.)

It's actually quite simple, once you understand how the PCjr works.
As said, there is no separate video memory, it is just taken from the 128k pool, and you can basically pick any 'bank' from there to use as your video memory, and switch banks whenever you like, how often you like.

This means that the video memory is ALWAYS in that 128k pool, even if you were to use a memory expansion sidecar. The PCjr video circuit is designed in a way that it has to use the 128k onboard (Tandy does not have this limitation, they can use more memory onboard, and the video circuit can use the entire range of onboard memory, so the 'hole' problem does not exist).

By default, the video memory bank is located at the end of the 128k. This makes it trivial for DOS to co-exist with the PCjr video, because DOS always allocates memory from the lowest address upwards. So once you hit the video memory, you are 'out of memory' anyway.

However, when you start adding extra memory beyond the initial 128k, there will be a bank of video memory somewhere 'in the middle'.
DOS will just continue allocating memory, and will barge all over your video memory. So, you use a simple device driver which is loaded at DOS startup, which will allocate all memory up to 128k, but never uses it. This way the memory is 'reserved', and you can use it as video memory without worrying about overwriting any DOS or application code or data. So basically you use the driver to create that 'hole', so that DOS will not use it.
DOS will then continue allocating memory beyond the initial 128k, so you can use the rest of the 640k just like on a regular PC.

The PCjr was not specifically designed to be a DOS machine. Many early games were booters, so they did not use DOS at all, and as such would not be hampered by DOS' memory allocation scheme. Applications could also be supplied as cartridges, so again no need for DOS. The problem is a DOS-specific one (and possibly BASIC).

There is *some* black magic going on in that the video circuit requires a high bandwidth mode to get the 320x200 16-colour mode (you know, that same high-bandwidth mode that gives CGA snow in 80-column mode).
The PCjr video circuit is designed to access the memory in an interleaved fashion to get that bandwidth without having snow. It interleaves the two 64k segments, so the 16-colour mode only works when you have 128k installed in your machine.
The 64k model was sold without a disk drive. I'm not sure if it would even run DOS at all, in a meaningful way, given that you lose 16k to video memory, leaving only 48k to run DOS and applications.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 5 of 14, by mbbrutman

User metadata
Rank Member
Rank
Member

It is very much a DOS machine; just a more limited one.

By default the machine allocates 16KB to the video buffer. On a 128KB machine that leaves 112KB free. If you boot DOS 2.1 (which was designed for the PCjr) you get 87KB of free space in RAM. That was adequate for the expectations of 1984. WordStar 3.31, Microsoft Multiplan, the BASIC Compiler, and other applications ran just fine on it. (The slower effective speed of the system and the single floppy disk were irritating, but functionally it worked.)

Applications on cartridge such as Lotus 1-2-3, ColorPaint, Andrew Tobias Managing Your Money, and Electric Desk still depend on DOS to load and save their files. Only Cartridge BASIC has the ability to use the cassette tape.

It is more fair to call it a low-end DOS machine where the cartridge ports were supposed to make it more competitive against high end "home" machines than to say it was not designed for DOS.

Reply 6 of 14, by Scali

User metadata
Rank l33t
Rank
l33t

I say it's not *specifically* designed for DOS. As in: it can do DOS, but it can also be used in other ways. Indeed, in ways that are similar to home computers, not PCs (and to some extent this is also true for the regular PC: there were booter games, and there were other OSes available for the PC, such as CP/M and Xenix).
That's basically what IBM wanted: a cost-reduced version of their PC architecture, converting the PC from a business machine into a home computer. Which also explains why they spent some effort on improving the graphics and sound: better gaming.
You could say the PCjr is the 'Amiga 500' of the family, where the regular PC and XT are more like the Amiga 1000 and 2000 (although obviously the analogy breaks down in terms of performance and hardware functionality, because with the Amiga they were identical, where the PCjr has less performance, but better graphics/sound).

The memory in a PCjr is also similar to the Amiga, which has 'chipmem' and 'fastmem'.
Chipmem is memory that can be used by all chips in the machine. This is also how the first 128k of memory are used in a PCjr.
Fastmem is memory that can only be used by the CPU. This is how memory located on a sidecar is used with the PCjr.
And, like the Amiga, the sidecar-memory on a PCjr is faster than the system memory. This is because the video circuit adds wait states on the bus while it accesses memory to generate the output image.
The sidecar-memory does not require waitstates (except possibly for memory refresh, which is a lot less often than video access. But modern memory expansions, such as the jrIDE, use SRAM, so no refresh is required at all), so it is faster. The same goes for BIOS and cartridge ROM.

On a regular PC, all system memory can be seen more or less as 'fast memory', because the video card has its own dedicated memory, and wait states are only required when the CPU wants to read or write the video memory, not the system memory.
There are not a lot of other devices that use system memory directly, via the DMA controller. There's floppy and possibly harddisk, and a sound card. But none of them are anywhere near as bandwidth-hungry as a video chip, so the amount of wait states they insert on the bus is not that dramatic (the PCjr does not have a DMA controller, so only the video circuit and the CPU access memory directly. The sidecar bus does not allow you to add a DMA controller to a PCjr. On early Tandy machines, there is no DMA controller, but they do allow you to add one. Later Tandy models have the DMA controller onboard).

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 7 of 14, by SirNickity

User metadata
Rank Oldbie
Rank
Oldbie

That helps considerably -- thank you!

I read about a lot of this at Mike's site, among others, but Mike's it definitely the most curated PCjr resource I found. It was just the semantics of how these things actually worked under the hood that tripped me up. Particularly how I kept hearing of this "driver" to enable memory. The scheme makes perfect sense once described -- allocate the lower 128K it to avoid it being clobbered by DOS, then let DOS use everything above it. Tell the video chip where its memory is, or leave it at the top of 128K. Then write to that or the mirrored CGA compatibility segment. Got it.

It's such a limited machine that it must have been frustrating to use it as a primary PC, and now with endless practical alternatives, it's wrapped back around to quirky and interesting. Plus those 2.54mm pitch pins will definitely make for convenient hardware hacking.

Reply 8 of 14, by Scali

User metadata
Rank l33t
Rank
l33t
SirNickity wrote:

It's such a limited machine that it must have been frustrating to use it as a primary PC

Yea, part of the reason why it was such a big flop:
It wasn't good enough as a regular PC. Poor performance, poor compatibility, limited expandability (yes, you could expand it, but not with standard ISA cards available for PCs).
I wonder how it competed price-wise. I mean, PCjr was cheap compared to IBM PCs, but I wonder what a really cheap-but-good no-name Taiwanese PC clone would go for in those days.

And as a home computer, it wasn't good enough either. It didn't have the capabilities or software library that the Commodore 64 had. And it was nowhere near as cheap.

The Tandy 1000 struck a better balance: cheaper, better DOS compatibility, better expandability. Amazing how IBM could have missed how to execute this properly. IBM was so close, yet so far away.

SirNickity wrote:

it's wrapped back around to quirky and interesting.

Indeed. It's interesting to write software for a machine this limited. I mean, I've done tons of 8088 stuff, but I had pretty much assumed that you had 640k, and never gave it any thought.
Normally when you optimize code for 8088, your strategy is generally to make use of all the memory to maximize performance.
When I wrote my first PCjr code, I was immediately confronted with the fact that this rule does not apply here. And then you find that 8088 and DOS really cramp your style. You may have twice as much as a C64, but 8088 code is not as compact as 6502 code is, and the C64 doesn't really have an OS as such (you can swap out BASIC if you don't use it), where DOS takes up a considerable amount of memory. So the 128k more or less feels like the 64k on a C64. Which means you may need to spend a few extra CPU cycles in order to fit things in less memory.

That's one reason why I don't want to write any code that needs more than 128k. I feel it completely changes the character of the machine.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 9 of 14, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

I wonder how it competed price-wise. I mean, PCjr was cheap compared to IBM PCs, but I wonder what a really cheap-but-good no-name Taiwanese PC clone would go for in those days.

According to DTACK GROUNDED, IBM dropped the price of the PCjr to $999 in June 1984. That was for a revised version with new keyboard and power supply. There was speculation that IBM had a large inventory of unsold juniors and the revisions were meant to help clear it out:

Look, folks, facts are facts. IBM has a large inventory of completed PCjrs, and that is a fact. (The exact size nobody knows. The 350,000 is a reasonable guess based on IBM's plan to sell one million PCjrs this year and also that big companies can't turn off the tap very fast, especially when Teledyne is mass-producing jr under contract.) It is also a fact that IBM's auditors are not going to let that inventory slide past two consecutive audits.

Question: is IBM going to follow Timex' and TI's lead and sell off that inventory at 15 cents on the dollar or are they going to take Atari's lead and bulldoze that inventory into the side of a hill? (Better make that the side of a mountain!)

(The last time we wrote something like the above the folks at Apple got real mad at us for some reason. We believe that illegal photocopies of issue #4 were circulated in Apple's legal department. Let's see now: IBM is about forty times larger now than Apple was then... )

It was also stated that the lowest price AT was $4000 for one FDD, no HDD, and no video. This was said to be more than double the price of a PC clone.

Reply 10 of 14, by Scali

User metadata
Rank l33t
Rank
l33t
bakemono wrote:

According to DTACK GROUNDED, IBM dropped the price of the PCjr to $999 in June 1984.

That was the the full 128k model with floppy, I take it?
Imagine that. The C64 was introduced at $595 in 1982. By 1984 it only cost about $215, I believe.

Commodore ran an ad, comparing the C64 with the base PCjr: https://steemit.com/retrocomputing/@darth-azr … dore-64-vs-pcjr
Commodore quotes a price of $669 for the base model PCjr, and $215 for the C64.
Ouch.

A large part of the PCjr stock was sold to IBM employees. I got one in the original box, and it has a big orange sticker on it, saying it was for IBM employees only. I wonder what the employees paid for it.

bakemono wrote:

It was also stated that the lowest price AT was $4000 for one FDD, no HDD, and no video. This was said to be more than double the price of a PC clone.

Here's the PC mag for June 1984: https://books.google.com/books?id=amQldGdl9Lk … epage&q&f=false

I see a clone from $1099 on page 47 (which is an extremely interesting machine by the way, designed by former Atari people).
On page 415, there's a PC clone for $1300.
So I suppose it would have been possible to get a decent PC clone, better than a PCjr, at considerably less than $2000. The closer you can get to $999, the more doomed the PCjr is.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 11 of 14, by SirNickity

User metadata
Rank Oldbie
Rank
Oldbie
Scali wrote:

I wonder how it competed price-wise. I mean, PCjr was cheap compared to IBM PCs, but I wonder what a really cheap-but-good no-name Taiwanese PC clone would go for in those days.

Well, isn't the Tandy 1000 pretty much exactly the comparison you're looking for? Not a cheap Taiwanese clone, per se, but it does have the advantage of being a clone OF the Jr, vs. just comparable to it.

Scali wrote:

Amazing how IBM could have missed how to execute this properly. IBM was so close, yet so far away.

Yeah, I've thought about this a bit.

The PC, XT, and AT were all belt-and-braces construction. Off the shelf parts, over-engineered, over-documented, robust.... that's an expensive way to manufacture a computer. Then the clone companies come along and basically steal the architectural work, and merely (....) have to optimize the design to undercut IBM.

When I first really thought about all of this, I would wonder, "why didn't they just work on the design-for-manufacture aspect and bring the cost down?" Then the other factor occured to me: IBM was a B2B company, catering more to large businesses. So budget wasn't quite as important as durability and serviceability. That's a very different market from small businesses and especially consumers. I'm sure they knew that, but I don't think they really appreciated it enough. The industry coverage leading up to especially the PC Jr's release didn't help. They were already throwing the victory celebration before IBM had even officially announced the product.

IBM's never been a lean company. Tight margins would suffocate them -- they just can't operate in that kind of space. But, they had the resources to set the standard that others COULD adopt and manufacture with agility. I'm not sure how much that benefits IBM, but it sure had a huge positive impact on the industry. We would eventually arrive at a standard platform, I'm sure, but when and what would it have been, and would it have survived up to today? Would it be better if it had not?

So anyway that's what I made of it.

Reply 12 of 14, by Scali

User metadata
Rank l33t
Rank
l33t
SirNickity wrote:

Well, isn't the Tandy 1000 pretty much exactly the comparison you're looking for? Not a cheap Taiwanese clone, per se, but it does have the advantage of being a clone OF the Jr, vs. just comparable to it.

Well, I was mostly thinking about the situation when the PCjr first hit the market, compared to the cheapest/most low-end PC clones already available.
The Tandy 1000 clearly was more bang for the buck than the PCjr, but it was also very much inspired by the PCjr, and adopted some of the cost savings. Also, the Tandy 1000 was not as compatible as the Taiwanese clones would be, I would think, given that it was still a quirky PCjr-like machine.

I think another good example of a cheap PC clone is the Amstrad PC1512, but that arrived 2 years later.
Like the PCjr and Tandy, it adopted a plastic case, rather than metal, resulting in a cheaper, lighter and more compact unit than your average PC.

What IBM didn't do that much with the PCjr though, was integration. Tandy and Amstrad didn't just use stock chips, but integrated a lot of functionality in a few custom chips. The PCjr was mostly still off-the-shelf parts.

SirNickity wrote:

The PC, XT, and AT were all belt-and-braces construction. Off the shelf parts, over-engineered, over-documented, robust.... that's an expensive way to manufacture a computer. Then the clone companies come along and basically steal the architectural work, and merely (....) have to optimize the design to undercut IBM.

Yea, although amazingly, nearly everyone copied the IBM designs quite closely, including the bulky metal cases and industrial power supplies and all.

SirNickity wrote:

But, they had the resources to set the standard that others COULD adopt and manufacture with agility. I'm not sure how much that benefits IBM, but it sure had a huge positive impact on the industry. We would eventually arrive at a standard platform, I'm sure, but when and what would it have been, and would it have survived up to today? Would it be better if it had not?

Well, in my experience, the Tandy 1000 was pretty much a standard-within-a-standard.
Many of the games I grew up with in the 80s and early 90s had Tandy (actually PCjr) sound and video. So I would say that Tandy actually succeeded with the idea that IBM had with the PCjr.
I suppose the reason it didn't survive in the end is because EGA/VGA and Sound Blaster superceded the Tandy, and made the special graphics and sound obsolete. Which meant there no longer was a relevant difference between a Tandy+VGA+SB and a regular PC clone+VGA+SB.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 13 of 14, by SirNickity

User metadata
Rank Oldbie
Rank
Oldbie

You raise a good point about the clones. I was thinking you were looking for a clone of the Jr -- which, as you said, is the Tandy. 😀 But you're right, the PC (proper) clones of the time were pretty stout as well. The early AST stuff comes to mind as being nearly IBM levels of hardiness and presentation, and that was probably their most successful period.

That's all a little before my time, though. I jumped in during the early-mid 386 days, when clones had nearly dominated the PC landscape. And not just OEM, but custom builds. At least in my region, genuine IBM machines were still to be found in businesses and schools, but rarely in a home. I still have a couple magazines from that time period, with $2000 486s and such. Not a lot of XT/AT class hardware though.

During those earlier days, we had a ZX81, a TRS-80 model 3 (my first go at programming), and a C64 which we used for quite a few years before finally moving to PCs. I typed a lot of school reports in GEOS. 😀

I wish I could go back and see the development of personal computing through the eyes of an adult. It was fascinating even as a kid, but it would be a whole other level of a wild ride now.

Reply 14 of 14, by Scali

User metadata
Rank l33t
Rank
l33t
SirNickity wrote:

But you're right, the PC (proper) clones of the time were pretty stout as well. The early AST stuff comes to mind as being nearly IBM levels of hardiness and presentation, and that was probably their most successful period.

Yea I suppose that 'industrial' style of building computers has survived to the present day. PCs are still housed in metal cases, with an 'industrial' PSU in the case and such.
Many cheap early PC/XT/AT clones used cases that looked VERY similar to the original IBM cases.
I think an explanation there is the same that you still have today: there are certain form-factors, and you can easily get replacement parts for that form-factor.
In the early clone days, you had various upgrades and replacement parts for the original IBMs, such as turbo XT motherboards, replacement PSUs etc. It would make sense to also build a replacement case, so that you could build an entire clone from 'replacements/upgrades' from scratch.

The bigger companies could design their own PCBs, PSUs and such, and as such, were not as limited by form factors. So they would have their own form factor, and generally have smaller, more integrated mainboards than IBM, to reduce price. But most of them would still be built with a metal case and PSU unit inside the system case.

I suppose up to about the late 486/early Pentium age, there was a clear distinction between 'generic' clones and big-brand clones:
Generic clones would have a bare motherboard, and use separate video card and multi-IO card. Big brands would generally have at least the IO integrated on the motherboard (floppy controller, HDD controller, printer/serial port), and some of them also had the video integrated.
In the late 486/early Pentium age, chipsets became more and more integrated, and even Intel began supplying its own chipsets. These would generally include the multi-IO functionality, so even generic clones would now have this functionality on-board, and multi-IO cards became a thing of the past.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/