((( COMMODORE'S NEW RAM EXPANDERS ))) Although the rumor is that Commodore does not intend to advertise this fact, it is true that the new 256K and 512K Ram Expansion Cartridges are completely compatible for use with the C-64. We have tested the 512K unit with both the C-64 and C-128 and found no problems with either computer. The Expander Unit contains its own Command Controller and accepts storage and retrieval commands from both computers. You will notice that on the back side of the shipping box, Commodore warns that you must have a working knowledge of Basic or ML in order to use this product. You will also notice that it does not mention the C-64 anywhere. It would appear that Commodore does not want the general public to update their C-64 but, to purchase a New C-128 in order to use this product. There are many advantages for the programmer but many other useful concepts are available with these expanders. A good example is that many of us use Commodore Bookkeeping systems. With the expansion cartridge you can write a Boot which will load all of the various programs needed for your Bookkeeping system into the Ram Expander and have the Main Program just transfer the other program modules from the expander instead of the drive. The transfer speed is 1 megabyte per second and saves multitudes of time in this type of operation. The applications are unlimited. You simply address the Expander with the starting and ending address of the program or information that you wish to retrieve or store and 'WALLA', like Magic its there. ((( PROGRAMMING THE RAM EXPANDER ))) There are 11 registers in the expander. Only ten of them are used in the 64. They are located starting at $df00 (57088) and are defined as follows: register 0 = status bits 0-3 ram expander version #. 4 size of ram expansion. 0 = 128 1 = 512 5 verify. 1 = verify error 6 overflow flag. 1 = transfer completed 7 interrupt pending. 1 = interrupt begin register 1 = command bits 0-1 = transfer type. 00 cpu to ram 01 ram to cpu 10 swap 11 verify 2 = reserved for ram expander 3 = reserved for ram expander 4 = $ff00 enable. 0 = enable. 5 = load 6 = reserved for ram expander 7 = execute register 2 = low byte of computer start address. register 3 = high byte of computer start address. register 4 = low byte of computer end address. register 5 = high byte of computer end address. register 6 = ram expander bank. register 7 = low byte of ram expander start address. register 8 = high byte of ram expander start address. register 9 = interrupt mask enable. bits 0-4 not used. 5 interrupt on verify error. 1 = enable this interrupt. 6 interrupt on end of transfer. 1 = enable this interrupt. 7 enable interrupt register. register 10= address control register. bits 0-5 not used. bits 6-7 00 inc both addresses. 01 fix exp address. 10 fix cpu address. 11 fix both address. register $ff00 config register (only on the C-128). A read determines current ram configuration. A write tells mmu what ram configuration to use. To execute a command, you must first set up the memory locations. Set registers 1 and 2 with the starting address of the computer memory being used (low / high address format). Set registers 3 and 4 with the ending address. Set register 5 with the 64k bank in the expander to use (there are 8 banks). And finally, set registers 6 and 7 with the starting address in the expander to use within the expander 64k bank. Then you set up the transfer type (cpu to expander, expander to cpu, etc.). All aspects of the command register are setup before the poke is made to this register. The $ff00 enable flag is only set for the C128's use. The $ff00 address in the 128 is used to determine what memory bank and address to setup for the transfer. It's also used to specify ram or rom transferring. In the 64 you must set this bit to disable the $ff00 register since the 64 doesn't have this register. The execute bit begins the transfer type. If you are using the C-128 then you would clear the $ff00 bit and no transfer would be made until the $ff00 register is setup. If this bit is set then the current memory setup will be used. Here is a program example for the C-64 and C-128 that will transfer memory between the computer and the expander with the current computer ram setup: 10 input"Enter source, exp ram, size, bank, cmd#";s,e,b,bk,cm 20 s1=int(s/256):s0=s-s1*256:ba=57088 30 e1=int(e/256):e0=e-e1*256 40 b1=int(b/256):b0=b-b1*256 50 pokeba+2,s0:pokeba+3,s1 60 pokeba+4,e0:pokeba+5,e1 70 pokeba+6,bkand3 80 pokeba+7,b0:pokeba+8,b1:pokeba+10,0 90 pokeba+1,cm+16+128 ready. The interrupt registers are used to run the ram expander through interrupts. With interrupts, for example, you could save from the ram expander straight to disk without passing through the computer's memory. The address control register could be used for many purposes. For example, you could fix the computer's address and fill the entire ram expander with one byte value (the byte value at the computer's starting address). Manipulating these registers can result in many uses for the ram expander such as one or more ram disks or storage for very large programs sectioned into many smaller pieces. Complements of Comm-Net, Denver Jon Almon Charles C. Drew