1750 RAM Expansion Clone Users Guide Project64.txt
From ReplayResources
Revision as of 01:40, 19 February 2021 by Count Zero (talk | contribs)
1750 RAM Expansion Clone Users Guide
text included from Project64
Please check the text for credits!
********* Welcome to Project 64! The goal of Project 64 is to preserve Commodore 64 related documents in electronic text format that might otherwise cease to exist with the rapid advancement of computer technology and declining interest in 8- bit computers on the part of the general population. If you would like to help by converting C64 related hardcopy documents to electronic texts please contact the manager of Project 64, Cris Berneburg, at 74171.2136@compuserve.com. Extensive efforts were made to preserve the contents of the original document. However, certain portions, such as diagrams, program listings, and indexes may have been either altered or sacrificed due to the limitations of plain vanilla text. Diagrams may have been eliminated where ASCII-art was not feasible. Program listings may be missing display codes where substitutions were not possible. Tables of contents and indexes may have been changed from page number references to section number references. Please accept our apologies for these limitations, alterations, and possible omissions. Document names are limited to the 8.3 file convention of DOS. The first characters of the file name are an abbreviation of the original document name. The version number of the etext follows next. After that a letter may appear to indicate the particular source of the document. Finally, the document is given a .TXT extension. The author(s) of the original document and members of Project 64 make no representations about the accuracy or suitability of this material for any purpose. This etext is provided "as-is". Please refer to the warantee of the original document, if any, that may included in this etext. No other warantees, express or implied, are made to you as to the etext or any medium it may be on. Neither the author(s) nor the members of Project 64 will assume liability for damages either from the direct or indirect use of this etext or from the distribution of or modification to this etext. ********* The Project 64 etext of the Super 1750 Clone User's Guide. Converted to etext by anonymous. Formatted for Project 64 by Cris Berneburg. 1750CL10.TXT, July 1996, etext #49 ********* THE SUPER 1750 CLONE USER'S GUIDE Copyright 1991 Chip Level Designs Congratulations! You now have the power of a full 512 Kbytes of RAM to add to your C64 or C128. But this is not just any RAM expander, although it is the size of a small game cartridge, it is fully 100% compatible with the original Commodore 1750 RAM Expansion Unit. This means that ANY software written for the 1750 RAM Expansion Unit (REU), will work perfectly with the Super 1750 Clone. Another noticeable benefit of being 100% compatible is the speed at which it will transfer data. Only the original 1700 series of REUs and the Super 1750 Clone can claim a transfer rate of over 1 million bytes of information per second. No other C64 or C128 RAM expander can even come close to this mark. The Super 1750 Clone has some features that set it apart from the original 1750 REU. Yes, its small size is very convenient, but due to the low power consumption of the chips used inside, no additional power supply is needed. In most cases it will consume 1/4 of the power required by the original 1750 REU. Enclosed with the Super 1750 Clone is a double sided User Disk that contains various REU utility and demonstration programs. These programs were gathered from the Commodore section of Quantum Link. Many useful public domain programs, that work with the Super 1750 Clone, can be found and downloaded from large Bulletin board and information services such as Quantum Link. The following sections of this manual will diagram some of the uses for the Super 1750 Clone, and explain the functions of the programs included on the User Disk. Section 1: Getting Started 2 Section 2: The User Disk 5 Section 3: RAMDOS 8 Section 4: C128 Mode Use 11 Section 5: CP/M Mode Use 12 Section 6: Programmer's Reference 14 Section 7: Appendix 17 Section 1: Getting Started Introduction A RAM Expansion Unit is a device that increases the amount of memory of your computer, giving you more room for storing programs and data. Your computer has two kinds of memory, Random Access Memory (RAM) and Read Only Memory (ROM). RAM is used for temporary storage. Information stored in RAM remains there as long as the computer stays on. ROM stores the operating system of your computer, and cannot be changed. The Super 1750 Clone increases the amount of RAM of your C64 or C128. The REU contains indirectly accessible RAM, meaning that programs stored in the REU cannot be executed directly by the C64/C128. You must first transfer the program into the computer's main memory, which happens very quickly. Keep in mind that RAM is not permanent storage; the information held in RAM is gone when you turn off the computer. If you want to save something permanently, be sure you store it onto a disk. The Super 1750 Clone increases the memory capacity of your C64/C128 by 512 Kbytes. To give you an idea of how much space your Super 1750 Clone gives you, an entire word processor takes up under 30 Kbytes. A 15 page document takes up about the same amount of memory, So you see how much extra memory your Super 1750 Clone provides for your use. But the Super 1750 Clone gives you more than memory, it gives you speed and convenience. You won't have to wait for the computer to access the disk drive for parts of programs, or to use utilities. You can store these in the extra RAM, for immediate access, You can also use this added speed to perform animation by cycling sequences of pictures or graphics that you wouldn't ordinarily be able to manage on a C64 because of memory and processor speed limitations. In short, you'll find your Super 1750 Clone REU a useful, convenient addition to your computer system. The original Commodore REUs came in three varieties: The 1764 : Equipped with four RAM banks containing 64 Kbytes (256k total), originally created for the 64/64C. The 1700 : Equipped with two RAM banks of 64 Kbytes (128k total), created for the C128/C128D. The 1750 : Equipped with eight RAM banks of 64 Kbytes (512k total), also created for the C128/C128d. The units are essentially the same except for the amount of RAM available. The reason that the 1764 was not recommended for use on the C128 was the small timing difference between the C64 and C128. The Super 1750 Clone is not affected by this problem. The Super 1750 Clone can be used in three ways: 1) On a C64 or C128 in '64 mode'. 2) On a C128 in '128 mode'. 3) On a C128 in CP/M mode. In 64 mode, quite a few programs take advantage of the RAM Expansion Module. The GEOS operating system sets it up as one or two fast RAM disks, and uses it to move memory around inside the computer. The Commodore RAMDOS sets up a standard type disk drive that can be accessed by some of the simpler uses of the computer such as BASIC programming and simple filing programs. In 128 mode, many commercial programs use the RAM. Also three commands in BASIC 7.0 are available to access the RAM. In CP/M mode the RAM Expansion Module acts like a very rapid disk drive. Large application programs, such a word processors or databases, can be stored in the REU at the beginning of a work session. From then on, you command the computer to find program utilities and modules in the RAM, rather than an external disk drive. The CP/M operating system has its own RAM Expansion driver program and will control the REU transparently. Connecting the Super 1750 Clone RAM Expander 1) Turn off your computer and all peripherals. 2) Insert the Super 1750 Clone cartridge into the Expansion port on the back of your computer. This port is located to the right of the computer when facing the front. It is the closest port to the power switch. 3) Turn the computer and all peripherals back on. Your REU is now ready to use. Section 2: The User Disk Even if you know nothing about writing programs or memory maps, you can do a lot with your REU by running the programs on the User Disk. You can install the REU, test the RAM, load the RAMDOS operating system, transfer information from disk into RAM, and run demo animations. The User Disk that came with your Super 1750 Clone contains the following programs: Startup Menu, RAMDOS, DOS wedge, File copier, Change unit number, Animated sequences (pound, globe, slider and bounce), Diagnostic tests. All of these programs are explained in this section except RAMDOS. The RAMDOS is an elaborate REU based disk operating system. It is explained in detail in Section 3 of this manual. Loading the Startup Menu The best way to get started with your Super 1750 Clone is to load the Startup Menu from the User Disk by following these procedures. On a C64 type: LOAD"?*",8 <RETURN> RUN <RETURN> On a C128 either put the disk into the drive and power-up/reset the computer or type: BOOT <RETURN> The C128 MUST be in 40 column mode to display the Startup Menu. The program to load the Startup Menu is the first program on the disk. The Startup Menu lets you automatically load the specific program you select when you enter a number. The Startup Menu options: 1. INSTALL RAM DISK 2. INSTALL DOS WEDGE 3. FILE COPY UTILITY 4. CHANGE UNIT NUMBERS 5. RAM-PAK TEST PROGRAM 6. RAM-PAK POUND DEMO 7. RAM-PAK GLOBE DEMO 8. HELP 9. QUIT Installing the DOS wedge The DOS wedge adds commands to C64 BASIC 2.0 and C128 BASIC 7.0. These commands make it easier to display directories, send instructions to disk drives, and manipulate files. All commands in the DOS wedge may be used with the 1541/1571/1581 series of disk drives, as well as the REU RAMDOS. You can load the DOS wedge by selecting option 2 from the Startup Menu. After you select option 2, the wedge boot message and help screen appear. The help screen lists syntax for commands you can use. This typical form for a DOS command is: Character <Unit #,> <Filename> The unit number is optional. If there is no unit number specified in the command, the last unit number referenced is assumed by the DOS. The wedge symbols you can use and examples of syntax are displayed on the help screen. Technical Note: The DOS wedge replaces C64 DOS 5. 1, which was located at $CC00-$CFFF in the C64 memory. The REU DOS wedge is located at $CC00-$CEFF in the C64. It interfaces via IERROR vector. Note that DOS 5.1 is incompatible with RAMDOS. File Copy Utility Option 3 is a very handy utility, which you can use to copy files from your disk drive to RAM, from RAM to disk drive, or from one disk drive to another. The file copier reads a disk drive file (or files), and then stores the information in the REU. That information can now be used immediately when you recall the file. The file still remains on disk, but is now accessible within the computer's memory. Remember that the file is available, but not automatically loaded up when it sits in RAM. You still have to load and run the file as you would from a disk drive. The difference is the speed at which the program is loaded. Note: This program can copy PRG, SEQ, REL and USR files. Load the file copy program by selecting option 3 from the Startup Menu. At the first two prompts, specify your SOURCE unit number and DESTINATION unit number. If you are copying a file from a disk in the drive to the REU memory, your source is unit 8 and destination is unit 9 (assuming you installed the Super 1750 Clone as unit 9). Then you are prompted: ENTER TEMPLATE OR <RETURN> ? If you press the <RETURN> key, the entire directory is read, and you are asked, one file at a time, whether you want to copy that particular file, answer Y or N for each. After the last file, you are asked CONTINUE? (Y/N): If you still wish to copy the files, answer Y. If you've changed your mind, answer N. Instead of pressing <RETURN>, you could enter a template, either a wild card name (like PROG*) or an asterisk. Typing * loads everything from the directory and skips to the CONTINUE? prompt. Answer N to abort, or answer Y to copy the entire contents of the disk into the REU. After the copying is completed, you are prompted MORE? (Y/N) for additional files to copy. Change Unit Numbers Sometimes you'll need to change the unit numbers of the Super 1750 Clone or a disk drive. Even though you can choose the unit number when you install the Super 1750 Clone, you may find it necessary to change to a different number. You may want the REU to be unit number 8 when you no longer need to use a disk drive. Option 4 of the Startup Menu is used to change unit numbers. It's pretty straight forward: you are asked for the current number of the unit you want to change, then the new number. The change is almost instant, and a line describing the unit type and DOS will be displayed. An initialization message (DOS error #73) lets you know the change is complete. You are prompted for additional changes. If you answer N, you exit the program. Tutorial Example The file copy program provides you with one way to store data in the REU for your convenience. For example, you can load a game into the Super 1750 Clone by copying the file. Some games utilize the unit number 8 in their code, and you must re-number the REU as unit 8 after you copy the file. Here's the procedure to follow to load such a game: Install the REU as unit 9 using option 1 of the Startup Menu. Answer Y to initialize the REU. Load the File Copy Utility by selecting option 3 from the Startup Menu. When the prompt ENTER TEMPLATE OR PRESS <RETURN> is displayed, change the disk in the drive to the one you wish to load. Then type * <RETURN> to copy every program on the disk. There is a pause while the directory of the disk is read from the drive into the RAM. At the prompt CONTINUE? (Y/N), answer Y, which begins the copying process. Had you answered N, no files would have been copied. After the programs have been stored in the REU, answer N to the MORE? prompt, unless there are additional files you want to copy. Now do a directory for unit 9 (to make sure the programs are all in RAM). Change disks back to the User Disk. If the unit number is referenced in the program, there's one more change you have to make. Since the Super 1750 Clone is installed as unit 9, that is where the program is now. However, many programs reference unit number 8 in the code. In this instance, change the unit number of the Super 1750 Clone from 9 to 8, using option 4 of the Startup Menu. Perform a directory for unit 8 (which is now the Super 1750 Clone). You should get the same listing as you did when you ran a directory for unit 9. Load and RUN the program from the REU, and it should begin almost instantly. Super 1750 Clone Diagnostic Test Option 5 is a test to check if the Super 1750 Clone is operating properly. The test wipes out everything in RAM storage, and you are given a chance to abort the test. There is both a fast and a slow test program available. The fast test will quickly check the unit and see if it seems to be performing correctly. The slow test takes about one minute to complete, it does a very extensive test of each bit of RAM in the REU. Both tests will inform you of the result when done. After the fast test is completed, reset you computer. After the slow test is completed, you may re-run it by pressing the space bar, or exit by pressing RUN/STOP. Be careful not to press RUN/STOP while test is running. Full explanations of the slow diagnostic test can be found in Section 7 of this manual. These tests should be run if you suspect any operating problem. The Animation Demos The User Disk contains two animation demos, which you can select from options 6 and 7 of the Startup Menu, and two C128 demos (SLIDER & BOUNCE) that are accessible from the disk directory only. The programs are documented, so when you list them, you can see for yourself how the cycling of images is done. Option 6 is the POUND demo, consisting of 32 separate images which are stored and cycled from RAM. GLOBE, option 7, features 36 images. Both demos work similarly. Do NOT use option 1 to install the RAMdisk before running either option 6 or 7. If you install the RAMdisk using option 1, there will not be enough space left in RAM to load all the images in POUND and GLOBE. So instead, select option 6 or 7 from the Startup Menu, and when you are prompted LOAD RAM? (Y/N), answer Y. A message then appears on the screen, telling you which image is being loaded. When all the images are loaded, the animation starts. If you halt the demo by pressing RUN/STOP RESTORE, you can start it again by typing 'RUN' <RETURN>. Answer 'N' to the LOAD RAM? (Y/N) prompt. Section 3: RAMDOS RAMDOS is software which allows the Super 1750 Clone to emulate a disk drive. The software is installed into the computer, causing it to treat the REU as an additional disk drive. This dramatically increases the speed of disk operations. RAMDOS is a compatible subset of the 1541/1571/1581 disk drive operating system. In effect, RAMDOS is a DOS without disks. The RAMDOS consists of two programs, which in effect allow you to use the Super 1750 Clone as a disk drive. It is much faster, however, because once the program is held in the extra RAM made available by the Super 1750 Clone, it's no longer necessary to access the disk drive; every part of the program is instantly available. Some applications (especially games) may not work with the RAMDOS installed. This is because the games depend on the physical aspects of the disk drive, sometimes executing proprietary code within the disk drive itself. Those applications that directly read and write tracks and sectors or attempt to execute proprietary code within the 1541/1571/1581 disk drive cannot be run properly with RAMDOS. Installing RAMDOS You initiate RAMDOS by selecting option 1 from the Startup Menu. After the program loads, you are asked for a unit number to give the REU. Normally, you will install the RAMdisk as unit 9, which is the default. This allows you to use the file copy utility to copy files into the RAMdisk from a normal disk drive (which would be unit 8). You can always change the unit number of the RAMdisk to 8 later, using the change unit number option of the Startup Menu program. While it is possible to make the REU unit 8 (assuming you are currently using a 'real' unit 8 drive), you should realize that unless you have previously placed programs into the REU or have a second 'real' drive, you will have nothing to load. Next, you can specify where the RAMDISK INTERFACE PAGE is to be installed. Unless you have a good reason for putting it elsewhere in memory, accept the default, which is 207 ($CF00) on a C64 and 14 ($0E00) on a C128. See the RAMDOS technical details section for further information. You are then prompted to initialize (clear) the REU. Normally, you will answer yes (the default, which is Y) to initialize the REU. If you wish to retain the information in the REU, answer N. Always initialize the RAMdisk after power-up. If your computer has crashed or been reset, you may use this option to re-install the RAM driver without losing any information in the RAMdisk. Once the RAMDOS is installed, you can press any key to return to the Startup Menu, unless the REU is installed as unit 8 (in which case the program simply ends). Using the RAMDOS The RAMDOS behaves like any normal disk drive. It has a directory, and supports PRG, SEQ, REL and USR files. It has a command channel and an error channel, just like a 1541, 1571 or 1581 drive. However, not all DOS commands are supported, due to a different track and sector organization. The following DOS commands are supported: Rename Copy (only one file; no concatenation) Scratch New lnit (closes all files) Validate (returns OK) Pointer (used for REL files) UJ (same as init) UJ0 (full init) UI (same as init) U0>chr$(n) (set unit number, where n = unit number) The following DOS commands are NOT supported: & Auto-Execute B-R Block-Read B-W Block-Write B-A Block-Allocate B-F Block-Free B-P Buffer-Pointer M-R Memory-Read M-W Memory-Write (see note below) M-E Memory-Execute Note: The M-W command may be used to change the unit number of the disk drive by using it to write to locations 119 or 120. The RAMDOS designates this single area to write to. Attempts to write to different areas in RAMDOS memory are trapped as syntax errors. Note that the M-W colon is mandatory. 1541/1571/1581 DOS Emulation The following 1541/1571 operations are emulated by Super 1750 Clone DOS. The DOS supports fifteen concurrent channels, specified by the secondary address. Channels 0 and 1 are treated like channels 2-14. Channel 15 is the command/error channel. All accesses to the directory are treated as the interpreted version, which has a memory format similar to a BASIC program (i.e., line numbers and links are included). Wild cards are supported. Save with replace is supported. DOS supports file level activity. Direct access to tracks and sectors is not supported. PRG, SEQ, REL, and USR file types are supported. The DOS interface to the kernel is through the standard indirection vectors for the following standard kernel calls: OPEN, CLOSE, CHKIN, BASIN, BSOUT, GETIN, LOAD, SAVE, INMI RAMDOS Technical Details The RAMDOS software comes in two parts: RAMDOSxxxxxx.BAS RAMDOSxxxxxx.BIN Where xxxxxx represents the date the software was generated. RAMDOSxxxxxx.BAS is a small BASIC program that guides the user through the process of installing the RAMDOS into the computer. It provides workarounds for more advanced users should software incompatibility problems arise. RAMDOSxxxxxx.BIN is the actual RAMDOS binary code which is loaded into the computer by the RAMDOSxxxxxx.BAS program. After loading, it is transferred into the REU; thereby freeing up computer memory for other uses. RAMDOS Operation RAMDOS installation overwrites system memory. Once the DOS is installed, that system memory is again free for usage, with two exceptions: 1) Indirection vectors; these vectors now point to the RAMdisk interface block, and the interface block contains the vectors' former values. 2) RAMDOS interface block; this page of code may be installed on almost any page in the system provided it is not under any ROMs or I/O. The default is the page starting at $CF00 in the C64, and $0E00 in the C128. Execution of System I/O Calls: All system I/O calls are made through the indirection vectors which point to the DOS interface block. Code in the interface block determines whether the call is for the REU or another system device. If the call is not for the REU, control is passed on according to the values of the indirection vectors prior to DOS installation. If the call is for the REU, code in the interface block swaps the DOS with some normal system RAM and passes control to the DOS. The DOS then processes your call (which can involve several swaps of DOS and user RAM), which upon completion returns control to the interface block. The interface block swaps out the DOS, restoring the user's memory map, and returns control to the caller. Interrupt Operation: The DOS never creates interrupts. During the time the DOS is swapped in, IRQ's are disabled, to prevent DOS operation from interfering with your programs. NMI's are not disabled. Any NMI code used by your programs should never access or reference data within the area under DOS control. To counter this, use a DOS image which does not use memory accessed by your NMI routine. Note that the only NMI's caused by the operating system are for RS-232 and RUN/STOP RESTORE operation. Concurrent RAMDOS and RS-232 operation is not possible because of the time required by the swapping process, which is not interruptable. Do not attempt to use the RS-232 to receive or transmit while accessing the REU. RUN/STOP RESTORE: RAMDOS intercepts this operation, therefore is unaffected when you press RUN/STOP RESTORE. During DOS calls, RUN/STOP RESTORE is disabled. You may have to press these keys several times to get it to work during intense disk activity. Section 4: C128 Mode Use BASIC Commands There are three BASIC commands built into BASIC 7.0 on the C128 that were designed especially for use with the REU. These commands handle the three types of data transfers possible with the REU: STASH : Stores data from the C128 memory into the REU. FETCH : Retrieves data stored in the REU and places it into C128 memory. SWAP : Exchanges data stored in the REU with data stored in the C128 memory. Each of these command words are followed by four parameters that define how large a block of data is being transferred. These parameters are: Where in C128 memory the data is currently stored. Where in the REU (i.e. what address) the data should be transferred. What expansion RAM bank is being used. The parameters are the same for all three commands: COMMAND bytes, insta, expsa, expba Where: bytes = number of bytes involved in the transfer. intsa = starting address of C128 RAM (0-65535). expsa = starting address of expansion RAM (0-65535). expba = expansion RAM bank number (0-1 on the 1700, 0-3 on the 1764, 0-7 on the 1750 and the Super 1750 Clone). BASIC Example Program 1) Reset the computer in 40 column mode so that the power-up message is visible. 2) At the READY. prompt type: STASH1000,1024,0,0 [RETURN] This stores 1000 bytes from the computer's memory, beginning at address 1024, into the REU. Address 1024 marks the beginning of the text screen, the part of memory where the current 40 column screen contents are stored. 3) Press [SHIFT] and [CLR/HOME] to clear the screen. Type in this short program: 10 FOR X=1TO25 20 FETCH1000,1024,0,0 30 SLEEP 1 40 PRINT CHR$(147) 50 PRINT X:SLEEP 1:NEXT 4) Type RUN [RETURN]. The start-up message is fetched from the REU, displayed, then a counter flashes and the image is fetched again. This example shows how simple it is to save away sections of memory and bring them back when needed. Of course the RAMDOS utility can handle these tasks and many more. Storing other types of data, such as programs, requires being able to use machine language to view other addresses. Detailed information about machine language and the machine language monitor is contained in the C64 Programmer's Reference Guide and the C128 Personal Computer System Guide. Section 5: CP/M Mode Use Booting CP/M If you are a CP/M user, you are familiar with the CP/M system disk packed with your C128 computer. Early releases of the CP/M software packed with the C128 computer do not support the REU. An upgraded CP/M system disk, that supports the REU is available from Commodore. To start CP/M you have two options: 1) Turn off the computer. Place the disk in the drive, then turn on the computer. CP/M will boot automatically. 2) Start in C128 mode, with equipment turned on. Put the CP/M system disk in the disk drive and type the BASIC command: BOOT <RETURN> Once the system is booted, CP/M will function in the usual manner with up to four external disk drives labelled A through D and the virtual drive E. Follow the instructions in your C128 Computer System Guide for using CP/M without the RAM expansion module. Provided below are instructions for using the RAM expansion module like a fifth drive. Using CP/M Commands Once the system is loaded, you can use the REU like a fast external drive simply by referring to drive M (Memory drive). For example, to save time during a work session, you might want to store some of the more commonly used transient utilities in the REU. Here is the method: 1) With the CP/M utility disk in the external drive A, type: A> PIP M: = A:FORMAT.COM [v] <RETURN> In this example, the PIP utility would search the disk in drive A, locate the FORMAT.COM file, and store it in the RAM expansion module. The [v] verifies that the transfer occurred correctly. You can also use DIR M: to determine what is stored in the REU. Any filename could be used in place of FORMAT.COM. Be sure to use the correct filetype in addition to the filename if necessary. 2) When the computer displays the A> prompt, the transfer is complete. Now the FORMAT utility is stored in the RAM disk. 3) To compare the speed of execution from an external drive and from the REU: Type: A>FORMAT <RETURN> The disk drive will whir and eventually instructions for formatting a disk will appear on screen. Abort the format by pressing <RETURN>, then any key, then answering N to the question, "Do you want to format another disk?" Now load the FORMAT command from the RAM expansion module: Log on to drive M by typing M: at the A> prompt. Type: M>FORMAT <RETURN> Almost instantly the format command is retrieved from the REU and displayed on the screen. Alternately, you can choose to execute the FORMAT command without logging to drive M> by typing M:FORMAT at the A> prompt. This example should illustrate how the REU can speed up your operations. You can copy a number of files into the REU with a series of PIP commands. Or copy the entire contents of a disk: A> PIP M: = A: This will copy all the files from the disk in drive A into the REU. Once the REU has been loaded with a program, use of the program is no different than if the program were in an external drive. If you are saving data files for later use, however, you may want to save them on an external drive instead of in the REU. Using the reset button does not clear the expansion RAM banks, only the C128 computer's main memory. To avoid accidental loss of your work, periodically save programs or data files in progress on disk, as well as in the REU. A power surge, or an accidentally pulled electric cord, can have a devastating effect on your work if you only store it in the REU. Section 6: Programmer's Reference The RAM Expansion Controller Memory transfers involving the Super 1750 Clone are accomplished through the RAM Expansion Controller (the REC), which is an I/O device mapped into the computers memory range at address $DF00. You cannot directly access the RAM in the REU. Instead, you instruct the REC to transfer data between the REU memory and computer memory. This may be accomplished using POKEs , BASIC 7.0 commands, or via machine language. The demo programs set the REC registers directly. This type of memory transfer is known as Direct Memory Access (DMA). To see examples of this process, look at the programs on the User Disk. Remember that you can use either DMA or RAMDOS, they are not compatible as RAMDOS uses all the available RAM space for itself. Memory Locations In order for a safe transfer, you must be aware of the computers memory map. You are moving blocks of data in and out of main and expansion memory, so you must know the correct addresses to retrieve the blocks of data you intend to and store them in the proper places. You'll have to be careful not to put things in memory where they don't belong, e.g. over another program or memory allocated for a hardware function, If you transfer data into an area that is already occupied by a program or other data, you will overwrite the original data, which may affect the operation of computer. All the standard rules for C64 and C128 banking and I/O apply for the Super 1750 Clone as well. REC Operation The REC has four primary operating modes: 1) Transfer a block of data from main memory to expansion memory. 2) Transfer a block of data from expansion memory to main memory. 3) Exchange a block of main memory with a block of expansion memory. 4) Verify a block of main memory with a block of expansion memory. The REC has several internal registers which can be used to set up a particular operating mode. Modes can be selected by setting the appropriate bits in the Command Register (see Section 7). The starting computer address, expansion RAM address, expansion RAM bank and number of bytes are all programmable values. Direct Memory Access Operation Direct Memory Access (DMA) is the process the REC uses to transfer data to and from the computer's memory. During DMA, the computer's processor is temporarily halted so the REC may access the computer's memory. There are two different events which cause the REC to begin a transfer sequence. 1) If the FF00 option in the Command Register ($01) is disabled, the DMA begins right after the execute bit is set in the Command Register. 2) If the FF00 option is enabled, the DMA begins immediately after a write to address FF00 is detected, providing the execute bit was previously set in the Command Register. The propose of the FF00 option is to allow the REC to access the RAM beneath I/O space. The REC registers are I/O mapped on the C64 and C128 expansion bus, which means that, without the FF00 option, I/O space would be enabled when DMA was initiated. This option, therefore, allows the user to bank out the computer I/O space, replacing it with the RAM underneath, before the DMA takes place. The FF00 option is cleared each time it is used. Special Features AUTOLOAD: When you select this option in the Command Register, the computers Base Address Registers, the expansion memory Base Address Registers, the expansion memory Bank and the Byte Counter Registers at the end of a transfer are automatically reloaded. This is useful if one operation is to be executed repeatedly on one particular block of data. Note that if AUTOLOAD is selected in verify mode, the address where the verify error occurred is lost. Ordinarily, upon finding a verify error, the REC halts the DMA cycle and both Address Registers and the Bank Register point to one location above the address that failed to verify. Address Control: Another special feature of the REC is the ability to hold a source and/or destination address fixed in any mode. This is accomplished by setting the appropriate bits in the Address Control Register ($0A). The default is that addresses will increment for both source and destination. It is possible, with a fixed computer address, to DMA to any I/O device except the C128's 8563's internal RAM, the 6510/8502 I/O ports at $00 & $01, the C128's 8722 MMU, and the REC itself. Interrupts: An interrupt can be generated on an end of block condition or verify error by enabling interrupts and setting the corresponding mask bits in the Interrupt Mask Register ($09). In either case, the corresponding flag is set in the Status Register. Interrupt flags are cleared upon reading the Status Register. The Interrupt Mask Register bits stay as they were before the interrupt/clear sequence. For proper operation, the Status Register ($00) must be read at least once before a DMA is initiated with interrupts enabled. It is important to clear out the previous status before any mode is used with the interrupt option. Operation Details If a specified address range exceeds the address range in the selected REU expansion bank, a 'wrap' occurs into the next bank, This happens whenever the given byte counter exceeds the number of bytes left in the selected bank. The computer side always wraps to the beginning of the same bank. Under normal operation (no AUTOLOAD, address increment), both Address Registers point to the next sequential memory location outside the selected transfer range at the end of the transfer. This is true for any mode and applies to both Base Address pointers except one that is held fixed. The Bank pointer is also updated (if necessary) at the end of the transfer. Also note that under normal operation, the Byte Counter decrements to the value 1. Care should be taken, therefore, to check the Transfer Complete bit in the Status Register and not rely on the Byte Counter value to indicate an end to the transfer condition. A Byte Counter of 0 results in a transfer of a full 64 Kbytes. Again, wrapping occurs in all modes of operation. Important Notes: 1) The Z80 must not be in control of the C128 when a DMA is requested. 2) The C128 MUST be in 1 Mhz (SLOW) mode when a DMA is requested. 3) The REC cannot reconfigure the C128's MMU during a DMA cycle. 4) The BASIC commands STASH, FETCH, and SWAP can only be used to transfer and retrieve data in Bank 0 of the C128 internal memory. To access Bank 1 of the C128 it is necessary to alter a special control register on the C128. This register is the RAM control register in the MMU at address $D506. Bits 6 and 7 of this register control both the VIC RAM bank pointer and the C128 DMA bank pointer. To transfer into Bank 1 set bit 7 of the MMU register: POKE DEC("D506"),PEEK(DEC("D506"))OR128 Then do the DMA command into Bank 1. To reset the VIC video back to Bank 0 use: POKE DEC("D506"),PEEK(DEC("D506"))AND127 4) The effective transfer rate of the REU is 1 Megabyte/second for uni-directional transfers via STASH and FETCH, and 500 Kilobytes/second for bi-directional transfers accomplished with SWAP. This transfer rate does not include VIC DMA time. The VIC chip has the highest priority on the C64 and C128 computers since it has to refresh the internal RAM and the display. This means VIC DMA's take precedence over REC DMA's. If one were to disable all sprites and blank the VIC screen, REC DMA's would occur a bit faster. 5) I/O is enabled for the three BASIC commands in Version 0 of the C128 Kernel ROM. In later versions of the ROM I/O can be disabled by using the BANK command. The kernel ROM version can be determined by PEEKing location $FF80, Version 0 contains a 0. Section 7: Appendix Operation Of The Slow RAM Test The diagnostic test program runs a series of tests, then passes or fails the Super 1750 Clone based on its performance. TEST 1: Checks all memory on the expansion RAM. Four data patterns, $00, $AA, $55 and $FF, are written in every memory location. The verify mode of operation checks the data transfer. TEST 2: To check the REU memory, a checker pattern. $AA and $55, is written into alternating memory locations. All locations of every bank are checked. TESTS 3 & 4: This checks the capabilities for data transfer from the REU to the computer. Data patterns of $FF's are stored in memory in the following areas: $0002-$004F $0080-$0136 $0200-$03FF $0800-$7FFF $C000-$CFFF $E000-$FEFF Data transfers from the REU to the computer memory fill locations $1000-$2FFF and $3000-$5FFF with the alternating $55 $AA data patterns. A thorough check of all filled memory in the computer checks for RAM corruption in the computer memory. Test 4 repeats this procedure, using $00 pattern for background fills before the data transfer occurs. TEST 5: Checks the AUTOLOAD feature of the REU. After a data transfer, the REU registers should reset themselves to the setting prior to the transfer. This test checks the Base Address Register, the RAM Expansion Base Register, the Byte Transfer Length Register and the RAM Bank Register. TEST 6: The previous test checks 3 of the 4 transfer modes; this test checks the remaining transfer mode, REU to computer transfer with fixed expander address. A 1 Kbyte transfer occurs to locations $3000-$33FF. The data should be the same in all these locations, indicating the REU read from the proper locations. TEST 7: This checks the $FF00 decode option selectable in the Command Register. The data transfer should not occur until a WRITE to $FF00. After a time out subroutine executes, the program checks to see that the transfer did not occur before the write to $FF00. TEST 8: This checks the interrupt generating capability of the REU. If an interrupt is generated at the end of the block transfer, the status register interrupt pending bit goes high. 64 mem map 128 mem map REC map WARRANTY AND DISCLAIMER --> 90 Day Limited Warranty <-- Chip Level Designs will exchange this product within 3 months from the date of purchase to the original purchaser if defective in manufacture. The merchandise for exchange must be returned to our current distribution outlet, Software Support International, along with proof of purchase. The repair or replacement will be free of charge, provided that the returned product has not been subject to misuse, damage, excessive wear, or tampering. This warranty is in lieu of all other warranties, expressed or implied. Although we have made every attempt to verify the accuracy of this manual, and the included software, we cannot assume any liability for omissions or errors. We reserve the right to correct and/or improve this manual and the related software at any time without notice to prior purchasers of this product. Chip Level Designs and Software Support International shall have no liability or responsibility to the purchaser or any other person or entity with respect to any liability, loss or damage caused or alleged to be caused directly or indirectly by this product, including, but not limited to, any interruption of service, loss of business and anticipatory profits or consequential damages resulting from the use or operation of this product. Defective products should be returned to: Software Support International 2700 N.E. Andresen Rd, #A-10 Vancouver, Wa 98661 Tech Line : (206) 695-9648 Include a COPY OF YOUR INVOICE as well as the filled out BLUE RETURN FORM included with your purchase. WARNING: Any attempt to open the case of this product will void it's warranty. There are no user serviceable parts inside. SUPER 1750 CLONE PAGE [�] 1991 CLD SUPER 1750 CLONE PAGE [�] 1991 CLD ********* End of the Project 64 etext of the Super 1750 Clone User's Guide. *********