home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / Information / 64-EXTRA-RAM < prev    next >
Encoding:
Text File  |  2019-04-13  |  6.0 KB  |  130 lines

  1.                  ((( COMMODORE'S NEW RAM EXPANDERS )))
  2.  
  3.  
  4.   Although the rumor is that Commodore does not intend to advertise this fact,
  5. it is true that the new 256K and 512K Ram Expansion Cartridges are completely
  6. compatible for use with the C-64.
  7.  
  8.   We have tested the 512K unit with both the C-64 and C-128 and found no
  9. problems with either computer.
  10.  
  11.   The Expander Unit contains its own Command Controller and accepts storage and
  12. retrieval commands from both computers.
  13.  
  14.   You will notice that on the back side of the shipping box, Commodore warns
  15. that you must have a working knowledge of Basic or ML in order to use this
  16. product.  You will also notice that it does not mention the C-64 anywhere.
  17.  
  18.   It would appear that Commodore does not want the general public to update
  19. their C-64 but, to purchase a New C-128 in order to use this product.
  20.  
  21.   There are many advantages for the programmer but many other useful concepts
  22. are available with these expanders.
  23.  
  24.   A good example is that many of us use Commodore Bookkeeping systems. With the
  25. expansion cartridge you can write a Boot which will load all of the various
  26. programs needed for your Bookkeeping system into the Ram Expander and have the
  27. Main Program just transfer the other program modules from the expander instead
  28. of the drive.
  29.  
  30.   The transfer speed is 1 megabyte per second and saves multitudes of time in
  31. this type of operation. The applications are unlimited.  You simply address the
  32. Expander with the starting and ending address of the program or information
  33. that you wish to retrieve or store and 'WALLA', like Magic its there.
  34.  
  35.  
  36.                   ((( PROGRAMMING THE RAM EXPANDER )))
  37.  
  38.  
  39.  
  40.   There are 11 registers in the expander.  Only ten of them are used in the 64.
  41. They are located starting at $df00 (57088) and are defined as follows:
  42.  
  43. register 0 = status
  44.        bits 0-3 ram expander version #.
  45.             4 size of ram expansion.  0 = 128
  46.                                       1 = 512
  47.             5 verify.                 1 = verify error
  48.             6 overflow flag.          1 = transfer completed
  49.             7 interrupt pending.      1 = interrupt begin
  50. register 1 = command
  51.        bits 0-1 = transfer type.      00 cpu to ram
  52.                                       01 ram to cpu
  53.                                       10 swap
  54.                                       11 verify
  55.             2 = reserved for ram expander
  56.             3 = reserved for ram expander
  57.             4 = $ff00 enable.         0 = enable.
  58.             5 = load
  59.             6 = reserved for ram expander
  60.             7 = execute
  61. register 2 = low byte of computer start address.
  62. register 3 = high byte of computer start address.
  63. register 4 = low byte of computer end address.
  64. register 5 = high byte of computer end address.
  65. register 6 = ram expander bank.
  66. register 7 = low byte of ram expander start address.
  67. register 8 = high byte of ram expander start address.
  68. register 9 = interrupt mask enable.
  69.        bits 0-4 not used.
  70.             5 interrupt on verify error.     1 = enable this interrupt.
  71.             6 interrupt on end of transfer.  1 = enable this interrupt.
  72.             7 enable interrupt register.
  73. register 10= address control register.
  74.        bits 0-5 not used.
  75.        bits 6-7 00 inc both addresses.
  76.                 01 fix exp address.
  77.                 10 fix cpu address.
  78.                 11 fix both address.
  79. register $ff00 config register (only on the C-128).
  80.      A read determines current ram configuration.
  81.      A write tells mmu what ram configuration to use.
  82.  
  83.   To execute a command, you must first set up the memory locations. Set
  84. registers 1 and 2 with the starting address of the computer memory being used
  85. (low / high address format).  Set registers 3 and 4 with the ending address.
  86. Set register 5 with the 64k bank in the expander to use (there are 8 banks).
  87. And finally, set registers 6 and 7 with the starting address in the expander to
  88. use within the expander 64k bank.
  89.  
  90.   Then you set up the transfer type (cpu to expander, expander to cpu, etc.).
  91. All aspects of the command register are setup before the poke is made to this
  92. register.  The $ff00 enable flag is only set for the C128's use.  The $ff00
  93. address in the 128 is used to determine what memory bank and address to setup
  94. for the transfer.  It's also used to specify ram or rom transferring.  In the
  95. 64 you must set this bit to disable the $ff00 register since the 64 doesn't
  96. have this register. The execute bit begins the transfer type.  If you are using
  97. the C-128 then you would clear the $ff00 bit and no transfer would be made
  98. until the $ff00 register is setup.  If this bit is set then the current memory
  99. setup will be used.
  100.  
  101.   Here is a program example for the C-64 and C-128 that will transfer memory
  102. between the computer and the expander with the current computer ram setup:
  103.  
  104.     10 input"Enter source, exp ram, size, bank, cmd#";s,e,b,bk,cm
  105.     20 s1=int(s/256):s0=s-s1*256:ba=57088
  106.     30 e1=int(e/256):e0=e-e1*256
  107.     40 b1=int(b/256):b0=b-b1*256
  108.     50 pokeba+2,s0:pokeba+3,s1
  109.     60 pokeba+4,e0:pokeba+5,e1
  110.     70 pokeba+6,bkand3
  111.     80 pokeba+7,b0:pokeba+8,b1:pokeba+10,0
  112.     90 pokeba+1,cm+16+128
  113.     ready.
  114.  
  115.   The interrupt registers are used to run the ram expander through interrupts.
  116. With interrupts, for example, you could save from the ram expander straight to
  117. disk without passing through the computer's memory.  The address control
  118. register could be used for many purposes. For example, you could fix the
  119. computer's address and fill the entire ram expander with one byte value (the
  120. byte value at the computer's starting address).
  121.  
  122.   Manipulating these registers can result in many uses for the ram expander
  123. such as one or more ram disks or storage for very large programs sectioned into
  124. many smaller pieces.
  125.  
  126.  
  127.                     Complements of Comm-Net, Denver
  128.  
  129.                                Jon Almon
  130.                             Charles C. Drew