home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Recent / hard / hack / ps2m.lha / ps2m_manual < prev    next >
Text File  |  2001-06-03  |  15KB  |  410 lines

  1.  
  2. Amiga PS/2 Wheel Mouse Controller v1.4
  3.  
  4.  
  5. Advantages of this controller:
  6.  
  7. - full open source under GPL
  8.   (General Public License, text of license included)
  9. - linear movement interpolation: mouse movements will be
  10.   ideal smooth on any screen frame rates
  11. - MMB (Middle Mouse Button) support
  12. - System-friendly fourth mouse button support
  13. - Fifth mouse button support - now on Amiga too!
  14. - detection of Amiga mouse counters overrun
  15.   (127 pixels per frame for DblPAL 48Hz)
  16. - full Plug'n'Play support:
  17.   hotswap - you can change mouse «on the fly»
  18. - mouse hangs detection: controller checks mouse every
  19.   2 seconds and will reset it if mouse doesn't reply
  20. - support of popular Microsoft Intellimouse wheel protocol
  21.   (for example, Genius NetScroll)
  22. - support of Microsoft Intellimouse Explorer protocol
  23.   (for example, A4Tech WOP-35 - all 5 buttons work)
  24. - fully compatible with Amiga NewMouse wheel standard
  25. - fully compatible with WheelBusMouse software
  26. - you can simultaneously use mouse & 2 joysticks
  27. - no «calibration» requirements
  28. - wheel works in any screen mode
  29. - horizontal scrolling even on one-wheel mouse
  30. - very low CPU load in wheel mode
  31. - most advanced Amiga PS/2 mouse controller :-)
  32.  
  33.  
  34. More detailed info:
  35.  
  36. - detection of Amiga mouse counters overrun:
  37.  
  38.   Amiga has only one-byte signed counters for mouse, and AmigaOS
  39.   checks them only one time per vblank.  This means that mouse may
  40.   move only 127*VBlankFreq pixels per second (6096 pixels per
  41.   second for default DblPAL).  If this value was overran, AmigaOS
  42.   can't detect true movement of mouse and pointer will disorderly
  43.   jump.  For correct this, my PS/2 controller limits movement to
  44.   maximum 6000 pixels per second.  If mouse moves faster, movement
  45.   will be remembered and executed at 6000 pixels per second.
  46.  
  47.   Slower movements will be always executed at real speed.
  48.  
  49. - linear movement interpolation:
  50.  
  51.   As we know, RS-232C (aka «COM») mice at PeeCee are extremely
  52.   poor quality - mouse pointer with them doesn't move, it jumps.
  53.   It is because generic 3-button RS-232C mouse reports about
  54.   movement only 25 times per second.  PS/2 mice work better - all
  55.   of them can report about state 80 times per second, and most of
  56.   them (excluding 5-button mice) can report 200 times per second.
  57.   But it is not an ideal because refresh rate of mouse (for
  58.   example, 80fps of Genius NetScroll Optical) interferes with
  59.   similar refresh rate (for example, 72Hz of Super72).  For correct
  60.   this, my controller moves «virtual Amiga mouse» smoothly.  If
  61.   user moves PS/2 mouse at 500 pixels per second, Amiga will get
  62.   from my PS/2 controller true 500 counts per second, with true
  63.   2-milliseconds intervals - you can get oscilliscope and check it.
  64.  
  65.   Most another PeeCee-mouse-controllers don't have similar feature,
  66.   and move «virtual Amiga mouse» by «count packets» after every
  67.   byte packet from PeeCee-mouse.  For example, if user moves 
  68.   RS-232C mouse at 500 pixels per second, and mouse sends 25
  69.   reports per second, Amiga will get 25 packets of 20 fast (some
  70.   microsecond between counts) counts per second, with approx.40
  71.   milliseconds interval between packets.  If user has 75Hz screen
  72.   refresh rate, mouse pointer will update only every three vblank,
  73.   and jumps of pointer (in comparison with ideally smooth Amiga
  74.   mouse) will only incline user to suicide using mouse cord :-)
  75.  
  76.   My PS/2 controller is free from this bug.  Theoretically I can do
  77.   even smooth RS-232C mouse controller, but is it nonsense because
  78.   of RS-232C mice death.  Modern optical mice already don't have
  79.   RS-232C versions, but there is no modern mice without PS/2 version.
  80.  
  81. - mouse hangs detection:
  82.  
  83.   Some Chinese mice are very cheap and very unstable.  Integrated
  84.   to mouse controller can hang and even don't response to reset
  85.   command.  These mice on PeeCee require reconnect (and sometimes
  86.   reboot because of not-PnP initial nature of PeeCee).  My
  87.   controller in case of 2-seconds silence (user doesn't touch
  88.   mouse) asks mouse about state.  If mouse doesn't respond,
  89.   controller will automatically take away power souce for some
  90.   time.
  91.  
  92.   Take care: hardware reset does not work in 5-button version because
  93.   of lack of PIC pins - you can select between 5-buttons version with
  94.   quality mice, and 4-buttons version with bad mice.  But anyway, you
  95.   can reset mouse by reconnect it «on the fly».  It is not a PeeCee :)
  96.  
  97. - full Plug'n'Play support:
  98.  
  99.   Because of previous feature, controller will detect mouse
  100.   replacement.  Unlike PeeCee, wheel function (or it's absence)
  101.   will be detected automatically.  You don't need to replace
  102.   drivers if you change mouse «on the fly» :)
  103.  
  104. - support of popular Microsoft Intellimouse wheel protocol
  105.  
  106.   Microsoft (for this paragraph it is a company name, not an abuse)
  107.   instead of it's normal practice to hide all details, published
  108.   protocol of wheel mouse.  It has two «layers»: protocol of wheel
  109.   mouse, and protocol of 5-button wheel mouse.  There are many
  110.   Microsoft Intellimouse compatible devices (for example, Genius
  111.   NetScroll Optical), and all of them will work with wheel at my
  112.   controller.
  113.  
  114.   Some other mice are Intellimouse Explorer (5 buttons) compatible.
  115.   For example, it is A4Tech WOP-35.  That mice will work with all 5
  116.   buttons.  If you use 4-buttons version of controller, both
  117.   additional buttons will work as one.
  118.  
  119.   Another mice, like of Genius NetScroll Optical, can be compatible
  120.   with Intellimouse, but incompatible with Intellimouse Explorer -
  121.   them will work as 3-button wheeled mice.  Some mice may be even
  122.   incompatible with Intellimouse and them will work only as 2/3 button
  123.   mice without wheel.
  124.  
  125.   Current version doesn't support any other protocols than
  126.   Intellimouse/Explorer.  But now I have a protocol analyzer and can
  127.   add support of ANY mice.  Genius NetScroll Optical will be first.
  128.  
  129.   If you have unsupported mice - you can send me it (or money, enough
  130.   for buy it here) by mail, and I will do support for it.  If you are
  131.   interested - welcome to my e-mail-box ;)
  132.  
  133. - Fifth mouse button support - now on Amiga too!
  134.  
  135.   Up to this time there was only maximum 4-button mice support on
  136.   Amiga.  My controller breaks this barrier - let's be more buttons,
  137.   good and different! :)
  138.  
  139. - horizontal scrolling even on one-wheel mouse
  140.  
  141.   You can switch vertical scrolling to horizontal by qualifier
  142.   pressing - like MMB in Mroocheck, but you can select any
  143.   qualifier key or joystick/mouse button.  For example - I use
  144.   left ALT.  Additional 4th and 5th mouse buttons may be used
  145.   for this too.
  146.  
  147. - fully compatible with Amiga NewMouse wheel standard
  148.  
  149.   Amiga NewMouse standard describes an internal AmigaOS protocol
  150.   for wheel mice.  There are some NewMouse-compatible sofware,
  151.   MUIWheel and Directory Opus Magellan for example.  All this
  152.   software will work with my PS/2 controller.
  153.  
  154.   Unfortunately, Amiga NewMouse standard describes only four buttons.
  155.   But anyway, any of two additional buttons may be used as generic
  156.   fourth button, and another - as qualifier for X-Y scroll temporary
  157.   switching.
  158.  
  159. - fully compatible with WheelBusMouse software
  160.  
  161.   WheelBusMouse is a software driver early released by me, that
  162.   allows to use any wheel mouse without controller (but you must
  163.   alter the mouse).  My PS/2 controller is fully electrically
  164.   compatible with WBM package.  This means that you can install
  165.   WBM driver and use altered wheel mouse instead of soldering
  166.   PS/2 controller.  Or you even can simply plug second mouse and use
  167.   it as a scroller :-)
  168.  
  169. - you can simultaneously use mouse & 2 joysticks
  170.  
  171.   You can use joystick(s) in parallel with mouse: pressing «Fire»
  172.   of any joystick will disable mouse function on this port.
  173.  
  174.   If you press «Fire» on Joy1 (wheel function) - wheel will be
  175.   reseted to initial phase (don't touch wheel during game).
  176.  
  177.   If you press «Fire» on Joy2 (mouse port) - mouse will be disabled
  178.   at all.  For protect against probable mouse movement, mouse will
  179.   be enabled only after any mouse button pressing.
  180.  
  181. - no «calibration» requirements
  182.  
  183.   My controller doesn't use analog inputs and doesn't require
  184.   calibration (like Mroocheck interface from Elbox).
  185.  
  186. - wheel works in any screen mode
  187.  
  188.   Wheel works in any screen mode - you can simultaneously use
  189.   wheeled applications on PAL, DblPAL, Super72 or any other
  190.   screens (unlike Mroocheck with horizontal rate setting).
  191.  
  192. - very low CPU load in wheel mode
  193.  
  194.   This controller doesn't use any software emulated serial protocols
  195.   like CD32 joypad and analog-to-digital conversions like Mroocheck.
  196.   It reduces slow chipset reading/writing cycles number to absolute
  197.   minimum, and this wheel solution is the fastest ever made for Amiga.
  198.  
  199. - most advanced Amiga PS/2 mouse controller.
  200.  
  201.   Do you doubt in this yet? :) ;) =)
  202.  
  203.  
  204.   How to do it:
  205.  
  206. Download aminet:dev/cross/devpic.lha and use it for PIC16F84:
  207. picprog ps2m.hex force=16382 cw=16382
  208.  
  209. You can use any third party programmers - select options:
  210.  
  211. OSC = HS
  212. WDT = ON
  213.  
  214. After programming you can solder scheme from ps2m.png.
  215. RESISTOR AND CAPACITORS ARE RECOMMENDED, BUT NOT MANDATORY.
  216. You can solder scheme only with PIC and crystal resonator,
  217. and it will work.  If it is unstable or does not work at
  218. all, you can try capacitors with crystal, and then - capacitor
  219. and resistor near mouse.
  220.  
  221. I recommend you to use socket for PIC - it will simplify firmware
  222. upgrades.
  223.  
  224. If scheme does not work - try another mouse.  It may be
  225. incompatibility with some mice.  If several different mice
  226. don't work - check connections: scheme is already tested and
  227. doesn't contain bugs.
  228.  
  229. If you had problems with PIC programming - try new devpic
  230. release 1.6 with v3 hardware, it is more stable than v2.
  231.  
  232.  
  233.   Two versions of hardware
  234.  
  235.   From version 1.4, there is two versions of hardware and firmware:
  236.   - 4-button version with hardware reset feature
  237.   - 5-button version without hardware reset feature
  238.  
  239.   4-button version (ps2m_mousepower.#?) is intended for use with
  240. non-optical mice with potentially poor quality.  It has hardware reset
  241. feature like previous versions.  It can't be used with modern optical
  242. mice because of low-current output of PIC, and it is useless for
  243. high-quality mice that don't hang.  If you use 5-button mouse in this
  244. mode, additional buttons will act like one.
  245.  
  246.   5-button version (ps2m_5button.#?) is intended for use with
  247. high-quality, rich-featured, optical mice.  It can't reset mouse by
  248. power switching.  Anyway, even if this mouse hang, you can reset it
  249. by reconnect «on the fly».  This version can be used with any mice.
  250.  
  251.   Why it is?  It is because of lack of PIC pins :-)
  252.   Don't forget to select correct firmware for selected hardware :)
  253.  
  254.   If you don't know, what version to do - build 5-button version.
  255.   (if you mouse hangs - it is a good reason to buy some better :)
  256.  
  257.   WARNING!  That two versions has DIFFERENT connection to joystick
  258. port!  This is because of pull-up needed for joystick fire-1, used for
  259. 5th mouse button - RA lines of PIC don't have it, and it was connected
  260. to RB5 line.  RA4 was reconnected to joystick fire-0.
  261.  
  262.   For 5-button version:
  263.   connect 3-11-12-13 PIC pins with joystick port 6-9-3-1 pins.
  264.  
  265.   For 4-button version:
  266.   connect 11-12-13 PIC pins with joystick port 6-3-1 pins.
  267.  
  268.   There is reference PCB design by Marc SAVART <sil51@ifrance.com> in
  269. this package.  It was made for A4000T.  You can see this device photos
  270. in hard/hack/ps2m_example.lha.  I can't give any warranty for this -
  271. personally my ps2m was soldered by wires :-)
  272.   Warning: this design was made for 4-button version with hardware
  273. reset feature.  If you want to use 5-button version without hardware
  274. reset feature, you must reconnect some wires.
  275.  
  276.  
  277.   Recommended mouse:
  278.  
  279. Genius NetScroll Optical (PS/2 version).
  280. It have very good ergonomical design and good quality.
  281.  
  282.  
  283.   Installation:
  284.  
  285. Simply plug controller in mouse port :)
  286.  
  287. For wheel mice: insert WBM utility in your startup:
  288.  
  289. c:wbm
  290.  
  291. If you want to remove copyright message:
  292.  
  293. c:wbm quiet
  294.  
  295. If you want to reverse wheel action:
  296.  
  297. c:wbm reverse
  298.  
  299. If you want to reverse only horizontal scrolling:
  300.  
  301. c:wbm rx
  302.  
  303. If you want any Shift for horizontal scrolling:
  304.  
  305. c:wbm lshift rshift
  306.  
  307. If you want that 4th/5th buttons work as system-wide 4th mouse button:
  308.  
  309. c:wbm lfb rfb
  310.  
  311. Additional parameter - priority (0 by default):
  312.  
  313. c:wbm priority=10
  314.  
  315. Priority will be important in cases when you have continuous working
  316. program (for example, archiver) with priority higher than WBM.  WBM
  317. priority is recommended to be higher than priority of any continuous
  318. task.
  319.  
  320. Of course, you can mix options in any way.  See "wbm ?"
  321. and history for full list of options in current version.
  322.  
  323. Driver may be terminated by break signal on WheelBusMouse process.
  324.  
  325.  
  326.   How to use wheel(s) in AmigaOS:
  327.  
  328.   Download FreeWheel and MUIWheel from Aminet, and see docs.
  329.  
  330.  
  331.   History:
  332.  
  333. 1.4
  334. - my email was changed - now it is rdc@cyberlan.mtu-net.ru
  335. - added 5-button Intellimouse Explorer protocol support
  336. - added support of 4th button event into WBM
  337.   CLI options: LFOURTHBUTTON=LFB/S,RFOURTHBUTTON=RFB/S
  338. - two versions of hardware:
  339.   - 4-button version with hardware reset feature
  340.   - 5-button version without hardware reset feature
  341.  
  342. 1.3
  343. - corrected bug in PCB
  344.  
  345. 1.2pcb
  346. - added reference PCB design by Marc SAVART <sil51@ifrance.com>
  347.  
  348. 1.2
  349. - more compatible firmware, for example it supports Dexxa mice
  350. - more advanced WBM utility:
  351.   - added reverse of concrete wheel direction: RX and RY
  352.   - added qualifiers for scrolling direction change as
  353.     CLI options: LMB/S,MMB/S,RMB/S,JOYFIRE0=JF0/S,JOYFIRE1=JF1/S,
  354.                  JOYFIRE2=JF2/S,CTRL/S,LSHIFT=LSH/S,RSHIFT=RSH/S,
  355.                  LALT/S,RALT/S,LCOMMAND=LCMD/S,RCOMMAND=RCMD/S
  356. 1.1
  357. - more detailed manual
  358. - more advanced WBM utility:
  359.   - you don't need c:run for wbm startup anymore
  360.   - driver eats less CPU time (WaitTOF() instead of Delay())
  361.   - added CLI arguments: REVERSE/S,PRIORITY/N,QUIET/S
  362.  
  363. 1.0
  364. - first Aminet release
  365.  
  366.  
  367.   Near (really!) future:
  368.  
  369. - Genius NetScroll Optical 5-buttons support
  370. - Support of any your mouce, if you send it me
  371. - Advanced system-wide wheels and additional buttons support
  372.   (will be more useful than FreeWheel and any PeeCee wheel soft)
  373. - MUI configuration
  374. - two wheels support (A4Tech WOP-35).  PIC16F627 will be needed
  375.   for this - but not required if you don't use second wheel.
  376.  
  377.  
  378.   License:
  379.  
  380.   All source code (including both mouse controller code and wheel
  381. driver) and all ideas of this controller are distributed under GPL
  382. (GNU General Public License).  About ideas: it means that all
  383. product contained my ideas must be released under GPL too :)
  384.  
  385.  
  386.   Sponsors of this project:
  387.  
  388. AmiS
  389. Presizen Oleg Michaylovich
  390. Eugene Ananyeff
  391. Vitaly Chepeleff
  392. Jedi
  393. Eugene Semenkov
  394. Useless
  395. iERiS
  396. ROY
  397. Alexey Klochkoff
  398. Vinnny (Vlad Vinogradoff)
  399.  
  400.   Thanks to:
  401.  
  402. 3BEPb <ldk@channel4.ru> for beta-testing
  403. Marc SAVART <sil51@ifrance.com> for PCB design
  404.  
  405.  
  406.   Enjoy!
  407.  
  408.   rdc@cyberlan.mtu-net.ru
  409.  
  410.