COMMODORE 128 VIDEO RAM EXPANSION by Larry Moonan The C128 computer comes equipped with 128K of RAM to be used by the computer. When the computer is running in the C64 emulation, 40 column C128 mode and the 40 column CP/M mode an area of this 128k RAM is being used by the VIC II chip to store the text and/or graphics being displayed. This takes up any- where from 1k to 10k of this 128k RAM, depending on whether any graphics are being used and if it is color graphics. When the computer is running in either the CP/M or C128 80 column mode, you are no longer using any of the computer's 128k of RAM for screen data. This is because the VIC II chip cannot handle 80 columns, so the 80 column output is being handled by another chip called the 8563 video chip. This is a chip designed by Commodore, spe- cifically for handling 80-column output. The 8563 video chip has many advan- tages over the VIC-II chip, besides being able to handle 80 columns it has both text and graphics modes. In the text mode you can simultaneously dis- play both the uppercase/graphics and uppercase/lowercase character sets on the screen. The characters can also be underlined, reversed, and/or blink- ing! The graphics mode of the 8563 is not directly supported in the BASIC 7.0 supplied with the computer, but it can be accessed using any of the many graphics expander products such as "Ultra HiRes Graphics" or "Basic 8" by Lou Wallace, or "Graphic Expander" by Horasoft. The graphics mode of the 8563 gives a resolution of 640x200 pixels on screen. This is the same as an unenhanced IBM PC or a 2 color noninterlaced medium resolution screen on the Amiga. Now, as I told you earlier, the 80 column screen data doesn't occupy the same area in RAM as the 40 column screen since the VIC II chip does not handle the 80 column screen. If you look at the memory map of a C128 you'll also notice that there is not area of memory within the 128k of the computer's memory put aside for the 8563 chip to use as screen memory. This is because the 8563 chip is designed to be able to directly address a RAM memory of its own. Looking at the schematics of a C128 you will see that the 8563 video chip is connected to a separate 16k of RAM, which is completely independent of the 128k of RAM used by the computer. It is this 16k or RAM which stores the text/graphics screen data for the 80 column screen. So in a sense you don't have 128k of RAM in a C128, but rather you have 128k + 16k = 144k or RAM present, only 16k of this is never seen by the computer directly. The C128 talks to the 8563 chip through the memory addresses 54784 ($D600) and 54785 ($D601) of bank 15 in the C128 memory map. So through only two bytes of the 128k RAM you can access the 8563 video chip and/or the additional 16k or RAM attached to it. Besides being used for the 80 column screen, this RAM can also be used for other purposes, as long as you are only running in 40 column modes of the C128, such as the RAM disk project shown in the July 1986 Transactor magazine (Vol. 7, Issue 01). You can find out more about the 8563 chip and programming for it in the C128 Internals book by Abacus, the Commodore 128 Programmer's Reference Guide by Bantam, and from information posted on Q-Link by Bill Pytlovany. When Commodore designed the 8563 chip, # # # # # # ! ! they gave it the ability to address up # # # # # # ----! !------ to 64k of RAM directly, even though ! they only supply it with 16k. The RAM ! used by the 8563 is in two standard ! 4416 RAMs, each handling 4 bits by 16k ! TV MODULATOR of memory. Together they give us 4 ! bits X 2 = 8 bits = 1 byte by 16k of ! memory for the screen data. Luckily ! for us C128 owners there is a direct -------------- pin for pin chip replacement for the ------------------------------------ 4416s called the 4464 (there are many ! -####- ! equivalent RAMs), which handles 4 bits ! **** **** ! by 64k of memory. The chips cost about ! * * -####- ! $3-4 each. This means for only $8 you ! * * ***** ******* ! can QUADRUPLE the RAM available for the ! * * * 7 * * * ! 8563 video chip. This extra RAM can be ! * * * 4 * * * ! used by the 8563 to increase the number ! * * * L * # * * ! of text screens, character sets, char- ! * * # * S * # * * ! acters displayed, and increase the num- ! * * # * 2 * # ******* ! ber of colors available in graphics ! * 8 * # * 4 * ! mode. This extra memory allows you to ! * 5 * # * 4 * #### ! display all 16 colors in graphics mode. ! * 6 * ** ** -###- ! This beats any unenhanced IBM PC and ! * 3 * ! directly compares with the maximum num- ! * * ***** ***** ! ber of colors available on the medium ! * * * * * * ! resolution (640x200) screen of the ! * * * 4 * * 4 * ! Amiga! It is also worth noting that ! * * * 4 * * 4 * ! "Basic 8" by Lou Wallace supports this ! * * * 1 * * 1 * ! increase in screen RAM. I've also been ! * * * 6 * * 6 * ! told that the new C128D will come with ! * * * * * * ! this 64k RAM as standard equipment. ! ********* ** ** ** ** ! Why Commodore didn't do this initially ! ##### ##### ##### ! with the C128 is puzzling. ------------------------------------ Replacement of the 4416 RAMs with 4464's is not very difficult if you are handy with a soldering iron and you are careful you don't fry anything. If you don't feel confident with doing the modification, please bring it to someone who is more technically proficient such as the nearest Commodore service center. Sure this will cost you a little more, since there will be a labor charge, but it's well worth the piece of mind it brings you. To replace the 4416s with 4464s you must first open up the C128 computer. This involves removing the screws from the bottom of the case and discon- necting the keyboard and LED cables (you should label them with how they were connected). After removing the keyboard/top of the computer you will see a large piece of metal which shields the computer from RF interference. This is removed by carefully bending the small metal tabs along the sides of the shield back and desoldering the ground point (it's near the joystick ports). Under the shield you will now see guts of the computer. Looking to the back of the computer near the TV modulator output jack you will see two silver boxes. One of them is the TV modulator itself (the TV output jack is directly connected to it). The next box is a little closer to the center of the computer and this houses the VIC II and 8563 chips. You will need to remove the screw from the top of the box and carefully pull the top off. Inside you will see a relatively large chip on your left. This is the 8563 chip. Just to the lower right of this chip you will find the 4416 RAMs (the relatively large chip on your right, labelled 8564 is the VIC II chip.) At this point you will also need to remove all the screws from the motherboard to remove the plastic bottom of the computer so that you can desolder the 4416s, since Commodore uses a double sided PCB for the motherboard. Again, YOU DON'T WANT TO DAMAGE THE MOTHERBOARD IN ANY WAY, SO BE CAREFUL WITH THE HEAT OF THE SOLDERING IRON!!! It might be a good idea to take a pair of right angle wire cutters and cut the 4416s out first, then you can easily desolder each of the remaining pins while pulling on it with long nose pliers. I would STRONGLY suggest solder- ing some low profile sockets in place at this point, so you will be able to swap RAMs easier in the future and avoid damaging the 4464s from the heat of soldering (the 4464s are CMOS circuits, which are easy to damage by heat or static electricity, so HANDLE THEM CAREFULLY!) Now, plug the 4464s into these sockets and you're all set. Reverse the dissassembly process, (re- member to resolder your ground point after installing the RF shield), and enjoy your newly expanded C128 computer!