Good evening, everyone 🙂 I messed about with the new mouse features on an Orange Pi. Is there a method of slowing down the Y axis? The X axis movement speed seems to be perfect. The Y axis movement, at least on the only two USB mice I have, is VERY fast; as in going from 0 to 479 (on a 640x480 screen) in 5 or 6 millimeters of vertical movement.

Is there a way to slow down Y axis movement speed or do I need to do this myself inside of BASIC program?

Edit: link to Google Drive link to the simple test program I am using.
[https://drive.google.com/file/d/12Z1mKMHJ2eAH71HhcW_q4mRbKDPeksdF/view?usp=sharing](https://)

6 days later

Sorry, didn't have time to look into that yet. I have just pushed a change that enlarges the mouse event buffer because I have noticed that events are dropped/overwritten on fast movements. Not sure if that will help with your issue, but it might be worth trying.

    uli Will give that a looksee 🙂 Thank you! In any case I am going to order up a couple of new mice 🙂

    If nothing else, I will just slow it down by incrementing the variable differently. In playing about with it, I quickly saw how perfect the horizontal movement is for a Breakout game 🙂

    8 days later

    I tried your test program with a Logitech mouse (cheap one) and the latest firmware (basicengine-firmware-h3-v0.90-287-g12f2f.zip) and it worked well! X/Y seem to be similar speeds. The mouse is quite sensitive - I don't actually mind that though.

    davegardnerisme I dug around and found an older USB RF wireless mouse and it worked a good deal better. The corded USB mouse I was trying was insanely fast on the Y axis. Two millimeters would move and entire 600 pixels on a SCREEN 15 screen 🙂 The X axis was perfect....and also works much better than I imagined it would for a Breakout or Arkanoid type game. Hmm 🙂

    Hopefully the trackball I ordered will be here Wednesday, so I can give it a go.

    Thank you! Will check out your link in 3..2...1...

    Edit: Your mouse movement is perfect!

    So, I received an old, used economy low DPI trackball in today and it works great with the NG! The late model mice I had been trying were all high DPI mice. They worked fine with the NG, the only problem being the Y axis movement was insanely fast - as in a couple of millimeters of Y movement would move up or down an entire 800x600 screen 🙂

    I need to pickup a couple of other BASIC Engine related goodies, so I will purposefully grab a new low DPI trackball and mouse.

    Just FYI, the mouse driver uses the HID "boot protocol", which is intended to be used by BIOS menus and such. It may well be the case that some manufacturers do not put all that much care into implementing such a feature...

      uli That, too, makes sense. I fooled about with slowing it down by incrementing/decrementing based on time and relative positions, but that is a little much for what I was messing with. It is also a good excuse to order a dedicated BASIC Engine mouse & trackball and another H3 device (Libre H3 on Amazon).

      4 days later

      On a mouse related subject, has anyone tried a USB touchpad on the NG? Any guidance is appreciated!

      8 days later

      ...and back to mouse related stuff. It makes no sense, at least that I can figure, but I've had MUCH better luck using mice with the Libre H3 SOC vs the Opi Lite or Opi PC. The high DPI mice that I have used on the Orange PIs that moved extremely fast on the Y axis still move very fast, but traditional plain mice and trackballs that I've tried are butter smooth on the Libre H3.

      3 years later

      While working on the Cross Development issue, I was modifying painintheworld's MOUSETEST01.BAS code to access the left and right mouse buttons. The left mouse button reads the character under the mouse pointer and prints on the top line the character and the chr$() code. The right mouse button prints to the screen at the location of the mouse pointer.

      I added line 115 to find the font width and height. I had to do this because Font 0 is 6x8 and the others are 8x8. The pointer image is changed to POINTER8X8.PNG and SIZE to 16,16. I am using the MOUSETEST01.zip file linked in painintheworld's first post. I saved the code as MOUSETEST02.BAS in the same folder with the image files. The text in the upper left corner is not read by the left button because they are Pixel Graphics GPRINT characters.

      I did this to test how using a mouse could interact with BASIC Engine code. Back in the day, 8bit computers used Joysticks. BASIC Engine can use both a Mouse and/or GamePad. The USB switcher was used in coding and testing this program.


      MOUSETEST02.BAS

      10 '* * * * * * * * * *
      15 'The simplest of mouse button tests
      100 SCREEN 12:PALETTE 1: font 0:
      110 MAXX=PSIZE(0)-1:MAXY=PSIZE(1)-1:MAXCX=CSIZE(0)-1:MAXCY=CSIZE(1)-1
      115 ftWd = int(MAXX/MAXCX): ftHt=int(MAXY/MAXCY) : Rem find Font Width and Height
      120 LOAD IMAGE "POINTER8X8.PNG" AS SPRITE 0
      130 SPRITE 0 SIZE 16,16 ON
      135 LOCATE 15,10:PRINT "BASIC Engine"
      140 WHILE INKEY$=""
      150 X=MOUSEX:Y=MOUSEY
      160 MOVE SPRITE 0 TO X,Y
      164 IF MOUSEBUTTON(1) THEN CALL ltBtn(X,Y)
      166 IF MOUSEBUTTON(2) THEN CALL rtBtn(X,Y)
      170 GPRINT 0,0,"X=";X;" ";
      180 GPRINT 0,8,"Y=";Y;" ";
      190 VSYNC
      200 WEND
      300 PROC ltBtn(mx,my) rem Code for Left Mouse Button
      305 cx=INT(@mx/ftWd):cy=INT(@my/ftHt):chrNo=CHAR(cx,cy)
      320 LOCATE 24,0:PRINT " "
      321 LOCATE 20,0:PRINT "Code=";CHAR(cx,cy)
      322 LOCATE 15,0:PRINT CHR$(chrNo)
      399 RETURN
      400 PROC rtBtn(mx,my) rem Code for Right Mouse Button
      405 cx=INT(@mx/ftWd):cy=INT(@my/ftHt):chrNo=CHAR(cx,cy)
      420 LOCATE cx,cy:PRINT "Right Button"
      499 RETURN

      Powered by: FreeFlarum.
      (remove this footer)