Support for Amiga ScrollWheel in mouse
From Hugues Labbe:
There is no readily available scroll wheel support for a mouse connected to DB9 port (scroll wheel on Amiga is only supported through USB or serial AFAICT). The main reason is due to the limited number of signal pins avail. on a single DB9 which are already pretty much all used for a standard amiga (tank) mouse (just one pin left for middle button press is all that is left avail.). Now, after looking thru your bluepad32 code, I can think of 2 ways it could try and support/emulate a scroll wheel:
-
- use existing capability in FreeWheel (https://aminet.net/package/util/mouse/FreeWheel) to detect middle button press + apply vertical scrolling according to mouse movement. I.e. during process_mouse() in uni_platform_unijoysticle.c, have a custom user-defined mode/option where bluepad32 would detect "wheel scroll" events and simply emulate a middle button press + mouse movement along the Y-axis that'd correspond to the amount + direction of the wheel scroll. Disadvantage: may interfere w/ actual mouse movements that may be happening at the same time as the wheel scroll (although this may be mitigated by interleaving mouse movements + wheel scrolls, i.e. alternate between the 2 types of events being sent to the DB9 port).
-
- Leverage existing custom support for scroll wheel from WBM ;) (see https://aminet.net/package/util/mouse/WheelBusMouse). From what I understand from reading the doc and looking at the src code, this would simply require Unijoysticle to send the scroll event data to the 2nd (joystick) port pins corresponding to mouse movements (i.e. quadrature data). This would address the potential issue in 1) above but would mean we'd lose the 2nd mouse capability (Although this scroll wheel support could be enabled only when using a custom user-defined mode/option whenever the user does not care about a 2nd mouse being connected on the joystick port :}).