AMX Mouse USER GUIDE For the AMX Mouse & BBC Microcomputer by D.S.
CONTENTS Page 1 INTRODUCTION............................................ 4 1:1 The AMX Mouse package..................................... 4 1.2 Uses of the AMX Mouse.............................................. 5 2 HOW TO USE THIS GUIDE........................... 6 3 SETTING UP................................................... 7 3.1 Fitting the AMX ROM................................................... 7 3.2 Connecting the AMX Mouse........................................
The AMX Mouse together with the accompanying ROM and software represent a major advance in home computing, making the BBC computer much easier to use for the average person: Together they represent remarkable value for the BBC owner, and transform the machine into a much more user friendly device, comparable with much more expensive machines. The Mouse may be used with any BBC Model B computer with either cassette or disc filing systems, and draws its power from the User port.
Together with the accompanying ROM routines, the AMX Mouse may be used with a wide range of commercial software, and when used with specially written software, the computer is transformed into an altogether more friendly tool which can easily be used by non-technical people. The Mouse is generally recognised as a superior form of pointing device, which is much more accurate than the ordinary light pen or cheap digitiser.
Full details of how to use the Mouse are given in Chapter 4, together with example programs, and a full explanation of the available ROM commands is given in Chapter 5.
The ROM can quickly and simply be fitted using only a screwdriver, but when handling the ROM care must be taken to isolate it from sources of static electricity (e.g: synthetic clothing, carpets etc.).
5. The left hand socket is used exclusively for the Operating System and will already contain a ROM which must not be moved. The other four sockets are for the paged ROMs. 6. The AMX ROM MUST be placed in a high priority socket, (i:e: one to the right) and preferably number 15 (the furthest right). If a ROM expansion board is fitted then socket 15 may be reserved for special use, if so then place the AMX ROM in the highest priority socket possible, but anyway in one of the sockets 12, 13, 14, or 15.
Fig: 2: Connecting the AMX Mouse The AMX Mouse is compatible with all other Paged roms tested, as well as with the 6502 2nd processor. Since the Mouse is connected to the only User Port it cannot be used when other devices are plugged into the port. However only 5 bits of the port, and CB1,CB2 are used: This leaves bits 1,3 and 4 available for other uses. Two vectors are used by the AMX ROM, namely the EVENT Vector (EVENTV &220, 1) and the KEYBOARD Vector (KEYV &228,9).
As the Mouse is moved it generates hardware interrupts. These interrupts are used by the ROM to update various counters. These counters are used in two modes: 1. The counters are used to hold x,y co-ordinates in the range (0-1279,0-1023 which are compatible with the graphics co-ordinate system, i.e. 0,0 is in the bottom left corner. These co-ordinates are used by the POINTER routines, and can be read using OSWORD 64. Fig.
2. At certain values (Set by the *SENSITIVITY command see. 5.13) the counters are reset to zero, and a cursor key code is generated instead. Therefore by moving the Mouse around, the cursor is moved as if the cursor keys were being used. This mode is compatible with a wide range of commercial software including programs such as VIEW and Wordwise: NOTE: The above two modes are incompatible and cannot be used at the same time.
Icons may be used in either BASIC or Assembly language programs by using the AMX ROM routines. If you wish to display a particular icon, then you simply include *ICON i,x,y in your program: This command displays icon i at TAB(x,y) on the screen. If i is in the range 32-95 then one of the icons in the ROM see 6.3, will be displayed: If you wish to create and use your own icons, use the ICON DESIGNER program ( see 6.1 later).
To remove the Pointer from the screen use the * HIDEPOINTER command (see 5.6 later). In order to move the Pointer smoothly over the screen, the * MOVEPOINTER command is used, which is a combination of both * HIDEPOINTER and * SHOWPOINTER commands. If you wish to find out the Mouse position, you may use either the OSWORD 64 or * UPDATE commands (see 5:1 and 5:15 later).
There are a large number of powerful commands provided by the ROM. Information on the Mouse commands can be checked by using the *HELP MOUSE and information about the ICONS by *HELP ICONS command. The following sections describe the commands in detail. e.g. A%=64:CALL &FFF1 This call returns in the 7 bytes pointed to by XY registers, the co-ordinates of the Mouse (in Graphics and Text form), as well as the state of the three Mouse buttons.
or in assembly languageāa simple example which plots points relative to the Mouse position: 10 .forever LDA # 64 20 LDX # block MOD 256 30 LDY # block DIV 256 40 JSR osword 50 / PL0T 69,xcord,ycord 60 LDA # 25 70 JSR oswrch 80 LDA # 69 90 JSR oswrch 100 LDX # 0 110 .loop LDA block,X 120 JSR oswrch 130 INX 140 CPX # 4 150 BNE loop 160 JMP forever e.g. *BR. The function of this command is to simulate the pressing of the BREAK key. It must be used whenever a *POINTER ON or *POINTER OFF command are used.
If you are using the *BREAK command in a program it should be followed by the END statement, e.g. 10 20 30 40 *KEY 10 CHAIN "DESIGN"|M *P0INTER 0N *BREAK END e.g. *BU. 3 *BU. OFF This command controls the action of the Mouse buttons. These three buttons can generate three key codes by varying the number given with the command. If *BUTTONS OFF is used the keys cease to generate the codes. The codes generated depend on the value of n, see below.
This file is automatically generated by the ICON DESIGNER (see 6:1) which allows the 32 User Icons to be designed using the Mouse. The format of the file is that of 32 icons, each consisting of 32 bytes organised into one icon as below: 0 . 16 : . 7 8 . 23 24 . . : 15 .
e.g. *HI. This command is used to remove the pointer from the screen. This is achieved by restoring the screen to its previous contents. These screen contents are stored in the ROM workspace which is reserved by *POINTER ON. The pointer is displayed on the screen by *SHOWPOINTER (see 5.14). If *HIDEPOINTER is used before a *SHOWPOINTER then an error (166, pointer already hidden) is generated. e.g. 10 20 30 40 50 M0DE 4 *P0INTER 80 *SH0WP0INTER *HIDEP0INTER G0T0 30 N:B.
If the icon number is from 32 to 95 the Icon definition stored in ROM is used to redefine ICON 0. Icon 0 is then displayed on the screen as usual. Since icon 0 is constantly redefined by the ROM it should not be defined as a user icon. With the computer in its normal state there is a limit of 8 ICONS which can be defined by the user, there being 0 to 7.
e.g. *MOU. ON Whenever the Mouse is to be used several vectors are changed, and interrupts generated. To use programs which are incompatible with the Mouse a *MOUSE OFF command should be used. This command stops the AMX ROM from changing this vector or servicing the interrupts from the User Port. The *MOUSE ON command should be used whenever the Mouse is needed. There is no need to use *MOUSE ON before *POINTER ON since *POINTER ON will automatically switch the Mouse on.
e.g. *PO. 80 This command is used to specify which icons are to be used as the pointer: Each pointer consists of two parts. The first icon, i1, is used as the black part of the pointer. The second icon, i2, is used inverted to draw the white mask for the pointer: If icon i2 is not specified then it is assumed that icon number i1+1 is to be used: This method is used to ensure that if the pointer moves over a black area it does not disappear, but a white border can be seen.
e.g. *SE. 2 As the Mouse is moved it generates various interrupts. These interrupts are used to add/subtract numbers (sx,sy) from the current coordinates. The purpose of the *SENSITIVITY command is to set the values of sx and sy: If sy is not used then it is assumed to be the same as sx. The relationship between sx/sy and the number added to the co.ordinate is 2^sx as shown in table 1. This gives a very wide range of sensitivities.
e.g. *UP. This command is used to move the text cursor to the current position of the Mouse (as read by OSWORD 64): The co-ordinates can then be read using POS and VPOS: Since these co-ordinates are in text characters, it is not suitable for graphics: If a window has been defined this command will not return the correct co-ordinates. To overcome this a VDU 26 (restore default window) must be used. e:g.
e.g. *WINDOW 1,30,18,1, title The purpose of this command is to draw a window on the screen. The window has a border which is especially effective when windows overlap. If a title string is given in the parameters then it will be printed on the top line of the window, with a horizontal line beneath it. The window co-ordinates are specified as text co-ordinates as in a VDU 28 command, i.e.
The ICON DESIGNER program enables you to define your own icons, which are numbered 0 to 31, and these occupy the 128 character spaces available in the exploded character set (see 5.7). The program is loaded from the MENU program by selecting the appropriate icon and pressing the EXECUTE button followed by a second press when prompted. Tape users should ensure that the tape is wound to the appropriate position before loading. Fig.
To load and run the program direct from tape or disc type *POINTER ON followed by pressing the < BREAK> key to reserve ROM workspace, followed by typing 'CHAIN " DESIGN" ' : Incidentally, ICON DESIGNER is a BASIC program which uses the AMX ROM routines and may be listed.
To alter the icon, simply move the pointer over each enlarged 'dot' and press EXECUTE to invert the colour of the dot. Pressing EXECUTE again will invert the dot back to its original colour. Moving over the window, you may create an icon of your choice.
Fig: 5: The ROM Icons
NOTES
NOTES
NOTES
NOTES