Changes

Jump to: navigation, search

AMX Mouse

993 bytes added, 12:14, 23 August 2015
/* Technical */
== Technical ==
The AMX Art software uses the CPC's 300Hz interrupt to read the joystick port 0 (at least it tries to do that, while moving the mouse pointer, the software accidently disables IRQs, and so, misses some interrupts). This is giving it a relative low resolution of max 300 mickeys per second (or actually less, due to the missed IRQs).
The AMX Interface hardware basically converts the incoming mouse signals to joystick 0 signals, issuing LOW pulses (per mickey) on the corresponding direction lines. The protocol is thus very simple (unlike modern RS232 and PS/2 mice, the hardware interface doesn't contain any motion countersreport anything for joystick 1 when connected to the CPC's joystick port (which provides both joystick 0 and joystick 1 input).
In addition the AMX mouse doesn't appear to clash with the keyboard.  The protocol is thus very simple (unlike modern RS232 and PS/2 mice, the hardware doesn't contain any motion counters).  Row9.Bit0 Joy1up LOW for 1/300s per mickey, when mouse moved up Row9.Bit1 Joy1down LOW for 1/300s per mickey, when mouse moved down Row9.Bit2 Joy1left LOW for 1/300s per mickey, when mouse moved left Row9.Bit3 Joy1right LOW for 1/300s per mickey, when mouse moved right
Row9.Bit5 Joy1fire1 LOW when Right mouse button pressed
Row9.Bit4 Joy1fire2 LOW when Left mouse button pressed
Note: The exact hardware timings are '''unknown''', the values "1/300s" in the above description assume that the AMX '''hardware''' timings were designed to match up with the 300Hz AMX '''software''' timings.
Note II: Looking at the photos, it seems that /joystick1 (keyb row 9 select) is wired to the multivibrator, so the mickey timings may be software controlled; accordingly, software would be required to deselect keyb keyboard row 9 between each read. Confirmed: Software MUST deselect keyboard row 9 to read the mouse correctly. For example, the loop here doesn't work: [code]ld bc,&f40e ;; PSG register 14 (keyboard) out (c),c ld bc,&f6c0out (c),c ld bc,&f600out (c),c  ld bc,&f792 ;; PPI port A inputout (c),c update_loop:ld b,&f4 in a,(c) jp update_loop[/code] whereas the following does work: [code]ld bc,&f40e ;; PSG register 14 (keyboard)out (c),c ld bc,&f6c0out (c),c ld bc,&f600out (c),c  ld bc,&f792 ;; PPI port A inputout (c),c update_loop: ld bc,&f649 out (c),c  ld b,&f4 in a,(c)  ld bc,&f640 out (c),c jp update_loop[/code] 
Contains the following ICs:
2,541
edits