PCjr
Memory Compatibility
Charles Brannon, Program Editor
Charles Brannon, Program Editor
IBM's memory expansion modules for the PCjr let you boost RAM up to 512K, allowing you to run many more PC programs that wouldn't fit before. However, there are still some compatibility problems that must be dealt with before you can fully take advantage of this extra memory.
IBM's snap-on 128K memory modules can expand PCjr memory to a whopping half-megabyte (512K), more than any other personal computer in its price range. Along with the new typewriter-style keyboard, this was part of IBM's response to months of slow sales and criticism that the PCjr was not as PC-compatible as it promised to be (see "IBM's New & Improved PCjr," COMPUTE!, October 1984). Now, finally, the PCjr can tackle many of the sophisticated but memory-hungry programs written for the IBM PC, such as Lotus 1-2-3.
Nevertheless, a few compatibility problems remain. The PCjr was not originally designed to take more than 128K RAM, and its memory lay out differs somewhat from the PC's. Ironically, in many cases a 512K PCjr cannot run programs developed for a 128K Junior. To understand why, let's look at how the PCjr addresses its internal and expansion memory.
Invisible Memory
When you switch on a system with more than 128K, the IBM logo screen counts up to the total, recognizing the extra RAM. But none of this memory is visible to DOS 2.1. Since almost all programs follow DOS conventions, they'll also fail to take advantage of the extra memory.
Before any programs can "see" the added memory, you must customize your DOS 2.1 startup disk. You can reconfigure DOS in several different ways. For example, you can set up the expansion memory as additional RAM, as a RAMdisk, or as a combination of both.
A RAMdisk, or memory disk, is simply a simulated disk drive in RAM. You set aside a chunk of memory (10K to 512K) which DOS treats as a disk drive, addressed as drive C:. It acts just like an extra drive, allowing you to save and load files, call directories, and so forth, with one important exception: The files are stored in RAM instead of on a floppy disk. This means that disk access is virtually instantaneous, even faster than a hard disk. (It also means that the files will be lost if you turn off the computer without remembering to save them on a real disk.)
IBM offers the RAMdisk option so the PCjr can run some PC programs which require two disk drives (IBM doesn't make a second disk drive for the junior, although some third-party companies do). However, some programs will not work with the RAMdisk due to memory conflicts.
Screen Memory Interference
To customize DOS for a RAMdisk or for extra memory, the memory modules come with a configuration disk containing an installation program. This program copies up to three files onto a backup of your DOS disk: CONFIG.SYS, PCJRMEM.COM, and RAMDISK.COM. By running the installation program and following its instructions, you create the customized DOS.
Why do you have to reconfigure DOS at all? On the IBM PC, DOS automatically recognizes how much memory is available. But on the PCjr, there's a complication-screen memory.
When a computer displays a picture on a screen, the image begins to fade within 1/60 second. Therefore, the video hardware must redraw the screen 60 times each second. To do this, the computer keeps a copy of the screen in memory. Different text and graphics screens require different amounts of memory-anywhere from about 2K for a 40-column text screen to as much as 32K for a 16-color graphics screen. In the PCjr, screen memory is part of regular RAM.
But in the IBM PC, screen memory doesn't consume usable RAM. Instead, it's part of the monochrome or color/graphics adapter. So a 512K IBM PC actually has 528K, including the screen RAM. In order to sell the PCjr inexpensively, some tradeoffs had to be made, so IBM decided to use part of regular RAM for screen memory.
By default, the topmost 16K of a 128K PCjr is reserved for screen memory. That's why an Enhanced Model PCjr with 128K actually has only 112K free RAM. For 32K graphics screens, such as the 320 X 200 16-color mode, extra RAM is subtracted from the top of memory. When you add memory modules to a PCjr, the extra RAM is added after the 128K boundary, but DOS still puts screen memory at the top of 128K, wedged between the internal 128K and the extra memory. This memory arrangement is shown in Figure 1.
Configuration Options
Since DOS insists that all memory be contiguous (uninterrupted), the video memory, sitting where it is, blinds DOS to the presence of extra RAM. So on a PCjr, you need a way to relocate the video memory. The configuration program can set up three new memory configurations, shown in Figures 2, 3, and 4. Figure 2 shows the default expanded memory option. This arrangement embeds 16K of screen memory within DOS, so all memory after the end of DOS is contiguous and usable. This is most like the IBM PC memory map.
The biggest problem is that since screen memory is embedded within DOS, there is no room to expand it to allow 32K graphics modes or multiple graphics screens. Programs requiring more than 16K of video memory just won't work with this configuration. However, it does allow maximum memory and the best compatibility with PC programs.
If you need more screen memory, you can use the enhanced expanded memory option (Figure 3). This puts 32K of video space within DOS. It gives you 16K less usable RAM, but allows one 32K graphics screen, two 16K screens, eight 80-column text screens, or sixteen 40-column screens. Many more PCjr programs will run under this configuration, but not those requiring more than 32K of graphics space.
The ultimate solution is the compatible expanded memory option (Figure 4). This mode allows 96K of video memory, which, like the other configurations, is stored within the area reserved for DOS. The rest of memory is continuous after the end of DOS. If you don't need 96K of screen memory, this configuration is wasteful. However, it does permit up to three 32K screens, which should be enough for almost any PCjr program.
Figure 1: Standard PCjr Memory Configuration The PCjr memory map with DOS 2.1. Video memory is stored just under the 128K boundary. Memory beyond 128K is ignored by DOS and applications programs running under DOS (including BASIC). |
Figure 2: Expanded Memory Option Screen memory (limited to 16K) is stored within DOS, and all memory after 52K is free for use. 32K graphics modes are not possible. |
Figure 3: Enhanced Expanded Memory Option 32K o f screen memory is embedded within DOS. Up to 428K of user RAM is free. |
Figure 4: Compatible Expanded Memory Option This provides the largest video area (96K), permitting screen flipping and up to three 32K screens. |
BASIC Incompatibility
Amazingly, though, none of these configurations works with PCjr Cartridge BASIC. This could be a major problem, since many applications programs are written in BASIC (including most programs published in magazines). Unfortunately, even a 512K PCjr can use no more than 64K for BASIC.
For example, "The Screen Machine" (COMPUTE!'s PC & PCjr magazine, April 1984), a graphics-drawing program written in BASIC, requires two 32K screens. Therefore, it works only with standard DOS 2.1, which ignores the extra memory. Any of the other memory configurations-even the one IBM refers to as compatible-confuses Cartridge BASIC and sometimes locks up the computer. Even the default expanded memory configuration works only with the text screen.
IBM's 128K memory expanders bolt onto the side of the
PCjr system unit. More than one expander requires the
power supply module in the first position. This PCjr has
the maximum 512K.
Since BASIC cannot use more than 64K, it would seem that the added memory would be useless to you anyway. But think of the possibilities of over 400K of screen memory. You could instantly flip between 14 detailed 320 X 200, 16color graphics screens. Alternately, you could store nearly 30 four-color frames. Since it takes 1/10 second for an image to fade from the human eye, this would allow three full seconds of high-quality animation. No other computer in the PCjr's price range would be capable of this feat. But with Cartridge BASIC, neither is the PCjr.
The IBM technical hotline (1-800-222-PCJR) had no answer for these problems. Probably Cartridge BASIC was never designed to use the extra memory. Indeed, IBM states that you should not try to use the expanded RAM with applications written especially for 128K. Only software written for the PC (and compatible with the PCjr) seems to anticipate additional memory. Some PCjr software doesn't even have the ability to access a second disk drive, which also precludes the ability to use the RAMdisk.
Nonetheless, 128K programs will still work with standard (unconfigured) DOS 2.1, since the extra memory is ignored. However, for full compatibility with all programs, you might end up maintaining four different DOS 2.1 disksstandard DOS and the three configurations. Plus a few more, if you want to configure the extra memory as various-sized RAMdisks.
The best solution would be to place screen memory at the very top of RAM, as high as 512K. This would leave room to expand the graphics screen downward. Again, though, unless an application knows how to find screen memory, there may be hopeless confusion.