The 8 Bit Mouse Utility Manual This manual was originally intended to tell the user how he or she could use the TBMOUSE6.OBJ file found on this disk. Because we feel that the improved versions of PICLOADA and P1029 would also be of interest a brief description on how to use these routines has also been included. To use any the routines you will have to move the top of memory pointer to $B0. All the routines and the player missile data are all store within pages $B0 to $BF. The memory map for this area of memory, from within TBM Draw, is as follows: $B0 - Unused $B1 - POINT Routine $B2 - Unused $B3 - CONvert Routine $B4 - TBMouse Routine $B5 - TBMouse continued $B6 - Unused $B7 - Unused $B8 - P1029 $B9 - PICLOADA $BA - PICLOADA Continued $BB - Unused $BC - Player 0 - 'C' Mark $BD - Player 1 - 'X' Mark $BE - Player 2 - Unused $BF - Player 3 - Pointer The POINT routine is used from within the POINT option on the DRAW menu. The CONvert routine is used to turn the menu lines into the format required for displaying on a GRaphics mode 0 screen. The 8 Bit Mouse This routine is heart of the drawing program TBM Draw. As well as allowing the ST mouse to be used with your 8 bit Atari it now supports the joystick. The devices should be connected as follows: Port 1: Joystick Port 2: Mouse To use within your own program you need to reserve memory above $B0 before loading the object file. Loading of the routine is performed by using BLOAD "D:TBMOUSE2.OBJ" with Turbo BASIC. If you are using Atari BASIC, forget it, buy Turbo BASIC. You then have to initialise the player missile data and the 8 bit mouse routine. This has been made easy as it can be all done with one machine call, but first you need the return string for the mouse driver: DIM MOUSE$(3):MOUSE$="000" and the call to initialise: X=USR($B400,ADR(MOUSE$),COLOUR) where COLOUR is the desired colour of the pointer. There are two ways of using this routine, both using the same call: X=USR($B400,OPT) where OPT=0 when you want to wait for the button to be pressed, and OPT=1 when you want to wait for the mouse to be moved. In both cases the X and Y values and the state of the button can be found by using the following code: X=ASC(MOUSE$(2,2)) Y=ASC(MOUSE$(3,3)) BUTTON=ASC(MOUSE$(1,1)) Of course you can directly peek the string MOUSE$, eg X=PEEK(ADR(MOUSE$)+1). In order to use this routine from within another machine code routine and allow the use of the pointer data the first 15 bytes contain a 'jump table' as follows: $B400 - JMP BASIC $B403 - JMP MOUSE_WAIT $B406 - JMP MOUSE_MOVE $B409 - X value $B40A - Y value $B40B - Button value $B40C - Address of arrow data 1 $B40E - Address of arrow data 2 The JMP BASIC entry point has already been described above. JMP MOUSE_WAIT and JMP MOUSE_MOVE allow m/c routines to call the mouse handler with either of the two options available from BASIC. Note, the routine still has to be initialised from BASIC. The X, Y and BUTTON data bytes are copies of the information stored within MOUSE$ (see above). There are two arrow tables, one with the pointer facing down, the other up. The addresses can be obtained from within Turbo BASIC like so: ARROW1_ADR=DPEEK($B40C) The arrow data tables are both 6 bytes long, with the first and last bytes being $00. PICLOADA The original version of PICLOADA (by Paul Lay), as well as loading the AtariArtist file would also set up the screen display list. Because of this it was impossible to use with TBM Draw without some modification. The version on this disk has been modified in such a way that you have to tell it where the screen is. To call from basic use the following call: X=USR($B900,ADR(F$),SCRNADR) where F$ is a string containing the filename to be loaded in the format D:name.ext and SCRNADR is the memory position the picture will be loaded into. This could be the screen or temporary store. Graphic 8 1029 Screen Dump The original version of this screen dump routine (by Jason Peasgood) had an unwanted side effect; it cleared the screen as it printed it! It also failed to print the last 15 scan lines of the graphic mode 8 screen. The version on this disk fixes both these problems and should be used with the following BASIC code: SCREEN=DPEEK(88) FOR PR=0 TO 27 CLOSE #1 OPEN #1,8,0,"P:" ? #1;CHR$(27);"9";CHR$(27);"A" ;CHR$(1);CHR$(124); FOR I=1 TO 60 ? #1;CHR$(0) NEXT I X=USR($B800,1,SCREEN) SCREEN=SCREEN+280 NEXT PR CLOSE #1