Difference between revisions of "Microstyle RAMROM"
(Added 300 dpi scan of the interface PCB) |
|||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | A RAM expansion board from Microstyle which behaves like ROM useful for ROM development<br> | + | A RAM expansion board from Microstyle which behaves like ROM useful for ROM development. Up to 2 units can be used simultaneously allowing the development or use of up to 4 ROMs.<br> |
− | + | [[Image:Ramrom.jpg|thumb|right|240px|Image of a Microstyle RAMROM]] | |
− | + | ||
− | + | ||
== Manual <br> == | == Manual <br> == | ||
− | + | '''32k RAMROM - INSTRUCTIONS''' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | The 32k RAMROM's main component is its 32k static ram chip which is capable of being loaded with 1 or 2 rom programs of up to 16k each. That's the maximum size that the CPC allows. When loaded, the program(s) remain usable, surviving resets, as long as the computer is on. The RAMROM is quite literally a 2 slot romboard that allows the rom programs to be written to it. What it is not is a memory expansion like the 64k and 256k memory add-ons. However, it is ram and can be used as such by imaginative programmers. Its main function, though, is to simulate roms for whatever purpose is required - usually for rom development. | |
− | + | ||
− | + | In developing the RAMROM we considered including many features such as battery backup but decided against them in order to keep the price down. | |
− | + | ||
− | + | ||
− | + | The 464 and 664 can access up to 7 background roms (slots 1 to 7) and 6128, 15 (slots 1 to 15). If 2 or more roms occupy the same slot number then they won't work although nothing will be harmed. To avoid such clashes, the RAMROM's slot numbers are flexible, to a degree. | |
− | + | ||
− | + | ||
− | + | Facilities are incorporated on the board to load 2 different rom programs which can each use a different slot (serial) or can both use the same slot (parallel). In the latter case they cannot both be initialised at the same time, of course. | |
− | + | === SWITCHES & LINKS === | |
− | + | ||
− | SWITCH | + | SWITCH ONE - left (write switch):- when set to its left position, the ram can be written to. When set right, the ram cannot be written to. |
− | + | ||
− | + | ||
− | be written to | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | SWITCH | + | SWITCH TWO - centre (parallel/serial select):- set to its left position = serial; set right = parallel. Serial: two of rom slots 3 to 6 are selectable as shown in the diagrams. Only the four configurations shown are possible. If a link is removed then its associated rom slot can neither be written to nor read from. It is ok to leave the links on their pins when not using the RAMROM but problems (not damage) could occur if an actual rom is occupying the same slot as a linked but unused RAMROM slot. In serial mode the position of switch 3 doesn't matter. Parallel: only 2 slots can be used - 3 or 6. In this mode the high and low 16Ks of the total 32k can each hold a different rom program in the same slot. Switch 3 is used to switch between the two. |
− | + | ||
− | low | + | |
− | + | ||
− | + | SWITCH THREE - right (high/low):- see switch two. This switch must be set prior to loading a program in the parallel mode and is then used to swap between the programs in the high half and low half of the 32k. After switching from hi to lo, or vice versa, the computer must be reset to initialise the new program. | |
− | + | === USING THE RAMROM === | |
− | + | ||
− | + | ||
− | + | ||
− | + | We are grateful to ROMBO PRODUCTIONS for allowing us to use their loader program which has been modified for our needs. It is used to load programs into the RAMROM but will be run only once. After that, its machine code remains in memory (not in the RAMROM) surviving resets. Type it in and save it. | |
− | the | + | |
− | + | With the computer turned OFF, push the RAMROM onto the CPC's expansion port (disc drive port on the 464). It doesn't matter if other peripherals are closer to or further away from the computer. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | LOADING A ROM PROGRAM: Set the links, switch 2 and, if wanting parallel mode, switch 3 according to your choices. Run the typed-in program. Once run, the BASIC part is deleted but the machine code remains ready for further uses. Type: memory &3fff and press return. Enter your selected slot number with the following command: poke &be01,x (x = your slot number). Load your program into memory area &4000 to &7fff with: load"yourprog.rom",&4000 | |
− | + | ||
− | + | That's your program ready to be loaded into the RAMROM. Set switch 1 to write (left) and type: call &be00 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | SWITCH | + | The screen will fill very quickly. When it has done so, switch SWITCH 1 to the right. The Ready prompt will appear after a few seconds and you can then reset the computer by pressing CNTRL, SHIFT and ESC simultaneously. Assuming that your program is written correctly for rom use, it is initialised and the computer is aware of its presence. To load a second rom, set the links and switches again but don't alter the existing program's link. Poke the 2nd slot number into &be01, load the 2nd program into &4000 and call &be00. |
− | don't | + | |
− | + | ||
− | + | ||
− | and | + | |
− | + | SWITCH SUMMARY:- Once you've grasped their uses, it will be easy. SWITCH ONE selects write and don't write (load or don't load). It has no other function. SWITCH TWO selects serial or parallel mode. Serial = 2 different slot numbers; parallel = 2 programs in the same slot number. SWITCH THREE selects the high or low 16k rom bank when in parallel mode only. It is used when loading and also to decide which will be initialised. | |
− | Contrary to what is often thought, any old machine code program cannot be put into a rom and be | + | === ABOUT ROM PROGRAMS === |
− | expected to run. The CPC has excellent background rom facilities and, in fact, it looks for and | + | |
− | initialises any that are present at every reset but in order for a rom to be recognised and work | + | Contrary to what is often thought, any old machine code program cannot be put into a rom and be expected to run. The CPC has excellent background rom facilities and, in fact, it looks for and initialises any that are present at every reset but in order for a rom to be recognised and work properly, its contents must be layed out in a certain way. Only certain parts of the rom must be layed out correctly and it is beyond the scope of these instructions to teach rom programming. |
− | properly, its contents must be layed out in a certain way. Only certain parts of the rom must be | + | |
− | layed out correctly and it is beyond the scope of these instructions to teach rom programming. | + | |
and finally... | and finally... | ||
− | A BASIC program can be put into a rom as long as a machine code program to download it to where | + | A BASIC program can be put into a rom as long as a machine code program to download it to where BASIC programs run is also included. Several separate programs can be included in one rom, each accessible with a BAR command. The RAMROM does not need to be erased in any way before being overwritten with new programs. It is probablt that somebody will attempt to use the RAMROM as a standard romboard by piggybacking a rom chip onto the 32k ram chip. Alas, it won't work. The data and address buses are not connected to the same pins as an eprom would need. |
− | BASIC programs run is also included. Several separate programs can be included in one rom, each | + | |
− | accessible with a BAR command. The RAMROM does not need to be erased in any way before being | + | |
− | overwritten with new programs. It is probablt that somebody will attempt to use the RAMROM as a | + | |
− | standard romboard by piggybacking a rom chip onto the 32k ram chip. Alas, it won't work. The data | + | |
− | and address buses are not connected to the same pins as an eprom would need. | + | |
− | + | <br> | |
− | + | ||
− | + | ||
− | 10 FOR a=&BE00 TO &BE1F | + | === TYPE-IN LOADER PROGRAM (the Os are zeroes and not letter Os) === |
+ | <pre>10 FOR a=&BE00 TO &BE1F | ||
20 READ b$ | 20 READ b$ | ||
30 POKE a,VAL("&"+b$) | 30 POKE a,VAL("&"+b$) | ||
Line 115: | Line 63: | ||
220 DATA ED,B0,06,10,1B,7A,B3,20 | 220 DATA ED,B0,06,10,1B,7A,B3,20 | ||
230 DATA FB,10,F9,C1,CD,18,B9,C9 | 230 DATA FB,10,F9,C1,CD,18,B9,C9 | ||
+ | </pre> | ||
+ | <pre> | ||
+ | ------------- ------------- ------------- | ||
+ | SWITCHES:- | 1 | | 2 | | 3 | | ||
+ | ------------- ------------- ------------- | ||
+ | READ/WRITE PARL/SERIAL BANK SELECT | ||
− | |||
− | |||
− | |||
− | |||
+ | o o o o o o o o | ||
+ | |6 5| 5| |6 | ||
+ | o o o o o o o o | ||
+ | LINKS:- 3| |4 3| |4 | ||
+ | o o o o o o o o | ||
− | + | (SLOT NUMBERS) 3 4 3 6 5 4 5 6 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | </pre> | |
− | - | + | ===ROM LAYOUT AS EXPECTED BY THE CPC=== |
+ | <pre> | ||
+ | C000 Rom type - Rom type (0 = foreground; 1 = background) | ||
+ | C001 Mark number ) for use of the programmer but | ||
+ | C002 Version number ) they aren't essential to the | ||
+ | C003 Modification number ) rom's operations | ||
+ | C004 COMMAND NAME TABLE address (low byte address) | ||
+ | C005 COMMAND NAME TABLE address (high byte address) | ||
+ | C006/7/8 Jump to INITIALISE ROM routine start address ) | ||
+ | C009/A/B Jump to 1st command's program start address ) JUMP TABLE | ||
+ | C00C/D/E Jump to 2nd command's program start address ) | ||
+ | </pre> | ||
+ | etc. etc. etc. | ||
− | + | When the CPC is turned on or reset, it enters the rom at C006/7/8 and runs the INITIALISING ROUTINE that is jumped to from that address. Accessing roms is done via bar (|) commands either at the keyboard or within BASIC programs and each command is listed in the COMMAND NAME TABLE. C004/5 (low byte first) point to the start address of the COMMAND NAME TABLE which can be anywhere in the rom. The last character of each command name must have bit 7 set to 1 and the table must be ended with a 0. When the computer encounters a bar (|) command it searches the command name table for a match. If found, it uses the JUMP TABLE to run the associated program. NAMES and JUMPS must therefore be in the same order. A name must be included at the start of the table for the INITIALISING ROUTINE. Sorry I can't explain in depth but, once grasped, it is easy to understand. | |
− | + | ---- | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | MicroStyle 28 BELMONT AVENUE, LOW MOOR, BRADFORD, BD12 OPA Telephone: 0274-602180 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | <br> | |
− | + | == Manual == | |
− | + | ||
+ | [[Media:Ramrom.txt|Microstyle RAMROM manual as text file]] | ||
+ | == Pictures == | ||
+ | <Gallery> | ||
+ | Image:MicroStyle_RAM-ROM_PCB_Top.jpg|PCB Top | ||
+ | Image:MicroStyle_RAM-ROM_PCB_Bottom.jpg|PCB Bottom | ||
+ | </Gallery> | ||
− | + | [[Category:Peripherals]] [[Category:Manual]] | |
− | + |
Latest revision as of 10:29, 1 November 2010
A RAM expansion board from Microstyle which behaves like ROM useful for ROM development. Up to 2 units can be used simultaneously allowing the development or use of up to 4 ROMs.
Contents
Manual
32k RAMROM - INSTRUCTIONS
The 32k RAMROM's main component is its 32k static ram chip which is capable of being loaded with 1 or 2 rom programs of up to 16k each. That's the maximum size that the CPC allows. When loaded, the program(s) remain usable, surviving resets, as long as the computer is on. The RAMROM is quite literally a 2 slot romboard that allows the rom programs to be written to it. What it is not is a memory expansion like the 64k and 256k memory add-ons. However, it is ram and can be used as such by imaginative programmers. Its main function, though, is to simulate roms for whatever purpose is required - usually for rom development.
In developing the RAMROM we considered including many features such as battery backup but decided against them in order to keep the price down.
The 464 and 664 can access up to 7 background roms (slots 1 to 7) and 6128, 15 (slots 1 to 15). If 2 or more roms occupy the same slot number then they won't work although nothing will be harmed. To avoid such clashes, the RAMROM's slot numbers are flexible, to a degree.
Facilities are incorporated on the board to load 2 different rom programs which can each use a different slot (serial) or can both use the same slot (parallel). In the latter case they cannot both be initialised at the same time, of course.
SWITCHES & LINKS
SWITCH ONE - left (write switch):- when set to its left position, the ram can be written to. When set right, the ram cannot be written to.
SWITCH TWO - centre (parallel/serial select):- set to its left position = serial; set right = parallel. Serial: two of rom slots 3 to 6 are selectable as shown in the diagrams. Only the four configurations shown are possible. If a link is removed then its associated rom slot can neither be written to nor read from. It is ok to leave the links on their pins when not using the RAMROM but problems (not damage) could occur if an actual rom is occupying the same slot as a linked but unused RAMROM slot. In serial mode the position of switch 3 doesn't matter. Parallel: only 2 slots can be used - 3 or 6. In this mode the high and low 16Ks of the total 32k can each hold a different rom program in the same slot. Switch 3 is used to switch between the two.
SWITCH THREE - right (high/low):- see switch two. This switch must be set prior to loading a program in the parallel mode and is then used to swap between the programs in the high half and low half of the 32k. After switching from hi to lo, or vice versa, the computer must be reset to initialise the new program.
USING THE RAMROM
We are grateful to ROMBO PRODUCTIONS for allowing us to use their loader program which has been modified for our needs. It is used to load programs into the RAMROM but will be run only once. After that, its machine code remains in memory (not in the RAMROM) surviving resets. Type it in and save it.
With the computer turned OFF, push the RAMROM onto the CPC's expansion port (disc drive port on the 464). It doesn't matter if other peripherals are closer to or further away from the computer.
LOADING A ROM PROGRAM: Set the links, switch 2 and, if wanting parallel mode, switch 3 according to your choices. Run the typed-in program. Once run, the BASIC part is deleted but the machine code remains ready for further uses. Type: memory &3fff and press return. Enter your selected slot number with the following command: poke &be01,x (x = your slot number). Load your program into memory area &4000 to &7fff with: load"yourprog.rom",&4000
That's your program ready to be loaded into the RAMROM. Set switch 1 to write (left) and type: call &be00
The screen will fill very quickly. When it has done so, switch SWITCH 1 to the right. The Ready prompt will appear after a few seconds and you can then reset the computer by pressing CNTRL, SHIFT and ESC simultaneously. Assuming that your program is written correctly for rom use, it is initialised and the computer is aware of its presence. To load a second rom, set the links and switches again but don't alter the existing program's link. Poke the 2nd slot number into &be01, load the 2nd program into &4000 and call &be00.
SWITCH SUMMARY:- Once you've grasped their uses, it will be easy. SWITCH ONE selects write and don't write (load or don't load). It has no other function. SWITCH TWO selects serial or parallel mode. Serial = 2 different slot numbers; parallel = 2 programs in the same slot number. SWITCH THREE selects the high or low 16k rom bank when in parallel mode only. It is used when loading and also to decide which will be initialised.
ABOUT ROM PROGRAMS
Contrary to what is often thought, any old machine code program cannot be put into a rom and be expected to run. The CPC has excellent background rom facilities and, in fact, it looks for and initialises any that are present at every reset but in order for a rom to be recognised and work properly, its contents must be layed out in a certain way. Only certain parts of the rom must be layed out correctly and it is beyond the scope of these instructions to teach rom programming.
and finally...
A BASIC program can be put into a rom as long as a machine code program to download it to where BASIC programs run is also included. Several separate programs can be included in one rom, each accessible with a BAR command. The RAMROM does not need to be erased in any way before being overwritten with new programs. It is probablt that somebody will attempt to use the RAMROM as a standard romboard by piggybacking a rom chip onto the 32k ram chip. Alas, it won't work. The data and address buses are not connected to the same pins as an eprom would need.
TYPE-IN LOADER PROGRAM (the Os are zeroes and not letter Os)
10 FOR a=&BE00 TO &BE1F 20 READ b$ 30 POKE a,VAL("&"+b$) 40 NEXT 50 MODE 2 60 PRINT"POKE the ROM SLOT NUMBER into &BE01 65 PRINT"Slot 6 is selected by default. 70 PRINT:PRINT"Disable the RAM after the screen has filled 80 PRINT"and before the Ready prompt. 90 PRINT"Reset to initialise the ROM. 100 NEW 200 DATA 0E,06,CD,0F,B9,F3,C5,21 210 DATA 00,40,11,00,C0,01,00,40 220 DATA ED,B0,06,10,1B,7A,B3,20 230 DATA FB,10,F9,C1,CD,18,B9,C9
------------- ------------- ------------- SWITCHES:- | 1 | | 2 | | 3 | ------------- ------------- ------------- READ/WRITE PARL/SERIAL BANK SELECT o o o o o o o o |6 5| 5| |6 o o o o o o o o LINKS:- 3| |4 3| |4 o o o o o o o o (SLOT NUMBERS) 3 4 3 6 5 4 5 6
ROM LAYOUT AS EXPECTED BY THE CPC
C000 Rom type - Rom type (0 = foreground; 1 = background) C001 Mark number ) for use of the programmer but C002 Version number ) they aren't essential to the C003 Modification number ) rom's operations C004 COMMAND NAME TABLE address (low byte address) C005 COMMAND NAME TABLE address (high byte address) C006/7/8 Jump to INITIALISE ROM routine start address ) C009/A/B Jump to 1st command's program start address ) JUMP TABLE C00C/D/E Jump to 2nd command's program start address )
etc. etc. etc.
When the CPC is turned on or reset, it enters the rom at C006/7/8 and runs the INITIALISING ROUTINE that is jumped to from that address. Accessing roms is done via bar (|) commands either at the keyboard or within BASIC programs and each command is listed in the COMMAND NAME TABLE. C004/5 (low byte first) point to the start address of the COMMAND NAME TABLE which can be anywhere in the rom. The last character of each command name must have bit 7 set to 1 and the table must be ended with a 0. When the computer encounters a bar (|) command it searches the command name table for a match. If found, it uses the JUMP TABLE to run the associated program. NAMES and JUMPS must therefore be in the same order. A name must be included at the start of the table for the INITIALISING ROUTINE. Sorry I can't explain in depth but, once grasped, it is easy to understand.
MicroStyle 28 BELMONT AVENUE, LOW MOOR, BRADFORD, BD12 OPA Telephone: 0274-602180
Manual
Microstyle RAMROM manual as text file