How Can Chips Address 128K?
I have two questions, one of which has been bothering me for some time. How can an 8-bit chip such as the new MOS 6509 and 6510 address more than 64K? Commodore's new P128 computer will have 128K RAM. How is this possible? Although the Commodore 64 has 64K RAM, you have stated that only 38K (52K for M.L.) is available for programming. Does this mean that software that had been embedded in ROM in previous CBM machines must now be soft-loaded upon power-up, or is it contained in a plug-in ROM cartridge?
My second question is if programs written for the Commodore 64 will run on the P128, and vice versa. I am particularly interested in the compatibility of the various plug-in cartridges that will become available.
Ron Dagostino
The 6510 chip will not address more than 64K of memory. The 6509 can, however, through a technique known as "bank switching," whereby large blocks of memory (banks) may have the same addresses. The microprocessor must then select which to use from among the banks. Details on exactly how the 6509 makes this selection are not yet available.
In any case, the 64K limit on memory addressing is not because the 6500 family of chips are eight-bit processors. Rather, it is a result of the chips having 16 address lines (216 = 65536). For example, the 8086 microprocessor used in the IBM Personal Computer provides a 20-bit address which can directly address one megabyte of memory (220 = 1048576).
The Commodore 64 has 64K of memory. BASIC ROM takes up part of this space, and quite a bit of RAM is used by the computer for pointers, screen memory, sprites, etc. This is why only 38K is normally available to the user. (See COMPUTE!, October 1982, for a 64 memory map.) You can bank-switch the 64 by POKEing address 1. POKE 1,6, for example, makes BASIC go away and the RAM "behind" it is available. The bottom three bits of address 1 are memory control bits and direct the computer's attention to the available alternatives. Of course, what takes control of the machine when BASIC is gone is up to you.
Look for an article on controlling the 64's "hidden" RAM in an upcoming COMPUTE!.
Commodore is not yet sure whether the P128 will be software compatible with the 64.