FOX ELECTRONICS LIMITED
FOX ELECTRONICS SPECTRUM JOYSTICK INTERFACE INSTRUCTIONS.

IMPORTANT-FIRST TIME USE
Before plugging the interface into the Spectrum, read the sections "Setting-up and "Writing a tape" carefully.
DESCRIPTION - The interface consists of CMOS 2K - byte RAM system, maintained by a trickle-charged Nicad battery. The RAM contains a program to allow the user to store sets of keys used by up to sixteen programs. One of the Key sets is selected as the current set, and for this set the program generates and loads data into the ram in such a way that the joystick simulates the keyboard. All the key set data is saved in the RAM, and the information is kept even after power is turned off. The RAM contents can be saved to tape, and this allows several different groups of up to sixteen key sets each to be kept. The interface is controlled by a single switch on its side, and by using the keyboard and >' screen. Note: for games programs for which you have the choice of keyboard or various joysticks, select the keyboard option.
SETTING-UP - (IMPORTANT - FIRST TIME USE: The program in the interface can be corrupted by incorrect operation. The interface can only be reloaded from a back-up tape. You must create such a tape straight away, so get ready to do this by connecting the MIC lead and having a tape ready. Write the tape at step 7 below.)
1.	Ensure that the switch is down (towards the joystick socket).
2.	Ensure that power is off the Spectrum.
3.	Plug the interface into the Spectrum.
4.	Connect a joystick into the interface.
5.	Turn power on. You will get a normal reset and copyright notice.
6.	Turn the interface switch up. You should now have a display on the screen (if not, see "Operating the switch') below).
7.	First time use; now write a tape and verify it, using the procedure given in the section "Writing a tape" below.
OPERATING THE SWITCH – In the down position, the Spectrum operates as if the interface i.3 not connected. Use this position for all programs not- involving a joystick. Putting the switch up starts the interface program, which puts a display on your screen. You then use the keyboard to select what you want to do next. Programs using a joystick are run with the switch up; they can be terminated without turning the power off, by putting the switch down. Note however, that you should break into any programs running with the switch down by putting the switch up; you should still turn power off to reset these programs. To protect the program in the interface, don't switch up unless the copyright notice is on the screen. When you switch down, wait for the copyright notice before switching up again. And when you want to get back to BASIC from the interface display without loading a joystick-type program, don't just switch down; press the E key, and wait for the copyright notice, then switch down.

Sometimes, switching up may not produce a correct display; you may get a corrupted display or just a copyright notice, bee use the interface program couldn't start properly. Try switching down, waiting for the copyright notice, and switching up again, and. if the program is not corrupted, the display should then appear. This is normal operation, not a fault. If the program is corrupted, it must be reloaded from one of your tapes (see the section "Loading from a tape" below).

INTERFACE PROGRAM - Messages are displayed at the bottom of the screen. Press the necessary keys to choose the function required.
CREATING A KEY SET - To create a new key set, or overwrite an old one, press the C key. Then press 0-F to select the key set you want to create. Then fill in the program name, which can be up to 13 characters long, consisting of capital letters (selected automatically; don't press caps shift) or numbers. Use single, slow, firm keypresses. Complete the full 13 characters name with spaces if necessary. Then press the five keys that you want to use with the program; any keys can be used. You can't backspace to correct errors; carry on with any keys to the end of the line, and start again.
SELECTING THE CURRENT SET - The current set line flashes on the screen. To select a new one, press the S key, then 0-F.
EXITING TO BASIC - Pressing the E key copies all the key set data into the interface, activates the joystick, and then gives you a copyright notice ready for you to load your program. Leave the switch up, and load your program in the normal manner. To go to another program, put the switch down (this will break into any program), wait for the copyright notice, and switch up again to select the new key set. You don't need to power off.

WRITING A TAPE - Pressing the T key copies all the key set data into the interface (including any new key sets that you may have just created), and then gives you a start tape message. When you-press any key, the tape is written. After the tape is written, you get a copyright notice,; this a simulated NEW operation, and the interface program is still in Spectrum storage so that you can verify the tape. Rewind the tape, connect the earphone lead, and enter MERGE "". Start the tape, and stop it when you get the OK message. Press ENTER and check that you have this BASIC program:
10 LOAD ""CODE : RANDOMIZE USR 28653
Now enter VERIFY ""CODE, and start the tape (rewind again if you didn't stop it soon enough after the MERGE). If you don't get an OK message, the tape is bad and you must write another. To restart the interface program, switch down, wait for the copyright notice,and switch up.
LOADING FROM A TAPE - To load the interface with a fresh group of key sets from a tape that you have made of them, or to recover from a corrupted program, use this procedure. Put the switch down, then enter the command LOAD "". When the tape has been loaded, the interface program starts and you get a magenta border. Now stop the tape. Plug in the joystick if it is not already corrected. Then copy the program into the interface by pressing and holding, the FIRE button on the joystick, and switching up. Nothing should happen; (if you get a copyright notice, you were not holding the FIRE button, or you have a fault in your interface or in your joystick). Now release the FIRE button, and press the ENTER key you should now get a copyright notice, and the program should be in the interface.
DISCONNECTION - The interface can stay attached to your Spectrum at all times . Once a normal exit to BASIC has been performed, and as long as the switch stays down, the interface program is completely protected, and cannot be corrupted by any Spectrum program. While power is on, the battery continues to charge and about 7 hours a week (typically a lot less ) is enough to keep the battery fully charged (but you would have to leave your interface unused for more than a year before it ran down). Only disconnect the interface with the switch down and the power off. 
USING THE MICRODRIVE - The contents of the interface can be saved on a microdrive. First write a tape; then follow this sequence. Enter the following program ("jscode" is your choice of name):
10 LOAD *"m";1;"jscode"CODE : RANDOMIZE USR 28653
Save this program to the microdrive using the command ("jstick" is your choice of name):
SAVE *"m";1;"jstick" LINE 10
Get the code from the tape using LOAD ""CODE. Save the code to the microdrive using the command ("jscode" must be the name used in the BASIC program ):
SAVE *"m";1;" jscode"CODE 26624,2048
To reload the interface from the microdrive, use the command:
LOAD *"m";1;"jstick"
You will get a magenta border; ..hen copy the code to the interface using the FIRE switch-up procedure described in the section “Loading from a tape".
USING THE INTERFACE AS A PSEUDO-ROM - The interface can be reprogrammed to store programs or data with power off, to be made available above RAMTOP later. The interface cannot be used for joystick operation and and as a pseudo-rom at the same time. The reprogramming can achieved only in machine-code, and it must be emphasized that this is a suitable project only for advanced programmers. An explanatory leaflet is available, giving sample machine code mnemonic sequences to load and retrieve data; If you would like a copy, send a stamped, self-addressed envelope to Fox Electronics Ltd.
FOX ELECTRONICS LIMITED,  FOX HOUSE, 
35, MARTHAM ROAD, HEMSBY,
GREAT YARMOUTH, 
NORFOLK, NR29 4NQ
TEL (0493) 732420

______________________________________________________________________

FOX ELECTRONICS SPECTRUM JOYSTICK INTERFACE
PSEUDO-ROM INSTRUCTIONS
DESCRIPTION - When the joystick interface is not required for use with a joystick, it can be re-programmed to operate as a pseudo-ROM; that is, it can be loaded with programs or data, which can be stored within the unit after power-off, and can be accessed later, even from a BASIC program. Note that it is only possible to program the interface using machine-code instructions. This sheet contains suitable routines for this purpose, but they are intended only for experienced machine-code programmers; we cannot offer additional individual assistance.
Two machine code programs are needed to operate the interface. The first is a header program, which must be loaded into the interface followed by the data you wish to store; when the interface switch is operated, control will pass to this header program, and it will copy your data into the Spectrum. The second is a 1oader program, which loads the header program and your data into the interface.
HEADER PROGRAM - The header program has two parts. The first part must be assembled to execute at address 0000; it copies the rest of the header program and the user data into the Spectrum, and then jumps to the second part, which will then be in Spectrum memory. The second part must, therefore be assembled to execute at the location where it is to be loaded in Spectrum memory. The second part sets protective switches within the interface, and then performs a simulated NEW operation, giving a cleared Spectrum, with your data located above RAMTOP, ready for you to load a program. The following is an example of a suitable header program. For simplicity, the header program copies itself and the user data into the Spectrum in a contiguous 2048-byte block. The address in brackets in the assembler org statements is the execute address. 1he example header program is assembled at address 40000, and the contents of the interface are to be copied to address 60000. (All data is in decimal).
 	org 40000(0000)     	(part 1)
 	ld hl,0000
 	Id de,60000	(Note 1)
 	ld bc,2048
 	ldir	(copy from the interface)
 	jp 60014
 	org 40014(60014)     	(part 2)
 	ld a,1
 	out (254),a	(blue border)
 	Id (32768),a	(Note 2)
 	im 1	(set up for interrupts)
 	ei
 	ld bc,50000
Loop0;  	dec bc	(delay for interrupt)
 	ld a,b	(and to see blue border)
 	cp 0
 	jr nz, Loop0	(continued overleaf)
 	ld hl, 60000	(new RAMTOP)
 	ld (23730),hl
 	jp 4535	(NEW operation)
Data;    	(your data starts here)
(maximum length = 2048 1ess header program length)
Notes:
1. The content of the interface must he copied to an area of storage lying completely within the ranges 16384-32767 or 49152-65535: if you need the data to be copied to an area of storage in the range 32768-49151, use a further ldir instruction, executing after the jump to Spectrum storage, to copy the  data within the Spectrum storage (remember that the execute address for your data will need to be corrected).
2. Can be any address in the range 32768-49151.
LOADER PROGRAM - A suitable program to load the interface with the example header program and the user data follows. This code is shown assembled at address 50000, and assumes that the header program is assembled at 40000, followed immediately by the user data.
	org 50000
	di	(disable interrupts)
	ld a, 1
	out (254),a	(blue border)
	ld bc, 49150
Loop1;	in a,(c)	(wait for "L" key) 
	bit 1, a
	jr nz.Loop1
	ld hl ,40000
	ld de,0000	
	ld be,2048 
 	ldir 	(load the interface)
 	ei	(enable interrupts)
 	ld bc,3600
Loop2;	dec bc	(delay for interrupt)
 	ld a,b
 	cp 0
 	jr nz, Loop2
 	ret	(return to BASIC) 
To load the interface, connect a joystick to the interface. If one is not already connected, perform a user call to the loader program while the interface switch is down.  When the border turns blue, hold the FIRE button down and turn the interface switch up. Release the fire button;  then press the L key. You should now be back in BASIC. Put the interface switch down, and the Spectrum will reset.  The user data is now stored and will be saved even after power off in the same way that the normal interface joystick program is maintained. When the interface switch i put up again, the border will turn blue for a while to show you that your data has been copied into high Spectrum storage. RAMTOP will be set to protect it, and a NEW operation will be performed. Leave the switch up, and load your application program to access the data as required. Note- that with the switch up, the joystick will be activated, and will be trying to operate on your data; to avoid problems if you should operate it by mistake, it is advisable to disconnect it from the interface.