For those who own a Kempston mouse and have been baffled by the instruction sheet (I wonder if they wrote the Amstrad manual?), I have managed to uncover the port addresses where the x and y co-ordinates are stored and may be accessed. Type: PRINT INP (&FBEE)*638/255 to view the x co-ordinate of the mouse cursor PRINT INP (&FBEF)*398/255 to view the y co-ordinate of the mouse cursor PRINT INP (&FAE7) to view the state of either mouse button.Note that only numbers in the range 0 to 255 can be stored at these locations, therefore both the x and y co-ordinates must be magnified to cover the entire screen. The port location &FAE7, used to detect the state of the mouse buttons, returns the value 124 when both buttons are pressed simultaneously, 125 when the left button is pressed, 126 when the right button is pressed, and 127 when neither button is pressed.The following short listing demonstrates how the Kempston mouse may be implemented into your own programs: ![](/im4/2/KremptonDraw.jpg) Moving the mouse with neither button depressed will move the arrow cursor. Pressing and holding a button will cause the arrow to disappear and, when the mouse is moved, a line to be drawn. Beware that crossing the highlighted border whilst holding a button will prompt undesirable effects. You may move the mouse at any speed, the line will not break. This is a small section of an art package I have written for the Kempston mouse. I have written several other utilities, including a mouse-driven filing system. The best art package available for the Kempston mouse is the Advanced OCP Art Studio, which allows you to select the mouse from the input devices menu (see the manual). If you own a Kempston mouse (indeed, any mouse), this package is an essential. Matthew Prescott , AA ★ AMSTRAD CPC ★ DOWNLOAD ★ |
|
CPCrulez[Content Management System] v8.7-desktop/c Page créée en 152 millisecondes et consultée 150 foisL'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko. |
|
|