Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADB: NeXT Mouse - startup issue #730

Open
Tracked by #726
tmk opened this issue Apr 6, 2022 · 4 comments
Open
Tracked by #726

ADB: NeXT Mouse - startup issue #730

tmk opened this issue Apr 6, 2022 · 4 comments

Comments

@tmk
Copy link
Owner

tmk commented Apr 6, 2022

timing? It fails to change address.

https://geekhack.org/index.php?topic=14290.msg3119277#msg3119277

Waiting for device:....
Listening:

TMK:5db0ef/LUFA:d6a7df

Scan:


USB configured.

Loop start.

Device disconnected.
Waiting for new device:....
Listening:

TMK:5db0ef/LUFA:d6a7df

Scan:
 addr:3, reg3:7C01


USB configured.

Loop start.

Device disconnected.
Waiting for new device:....
Listening:

TMK:5db0ef/LUFA:d6a7df

Scan:
 addr:3, reg3:7501


USB configured.

Loop start.
M:TMP: reg3:7201
M:EXT: reg3:7001
M:Classic 100cpi
M:POL: fail reg3:7701

Scan:
 addr:15, reg3:7201

M:TMP: reg3:7F01
M:EXT: reg3:7E01
M:Classic 100cpi
M:POL: fail reg3:7501

Scan:
 addr:15, reg3:7101

M:TMP: reg3:7A01
M:EXT: reg3:7701
M:Classic 100cpi
M:POL: fail reg3:7E01

Scan:
 addr:15, reg3:7B01

M:TMP: reg3:7401
M:EXT: reg3:7801
M:Classic 100cpi
M:POL: fail reg3:7601

Scan:
 addr:15, reg3:7201

M:TMP: reg3:7501
M:EXT: reg3:7401
M:Classic 100cpi
M:POL: done

Scan:
 addr:10, reg3:7601

M:[FA FB 00 00 00] len:02
MM:[ FA FB ] mh:01
MM:[ FA FB FF FF FF ]
M:[B:00 X:-5(-5) Y:-6(-6) V:0 A:1]
M:[FF FF 00 00 00] len:02
MM:[ FF FF ] mh:01
MM:[ FF FF FF FF FF ]
M:[B:00 X:-2(-1) Y:-2(-1) V:0 A:2]
M:[FE FF 00 00 00] len:02
MM:[ FE FF ] mh:01
MM:[ FE FF FF FF FF ]
M:[B:00 X:-3(-1) Y:-6(-2) V:0 A:3]
M:[FF 80 00 00 00] len:02
MM:[ FF 80 ] mh:01
MM:[ FF 80 F8 F8 F8 ]
M:[B:00 X:0(0) Y:-4(-1) V:0 A:4]
M:[FF 80 00 00 00] len:02
MM:[ FF 80 ] mh:01
MM:[ FF 80 F8 F8 F8 ]
M:[B:00 X:0(0) Y:-5(-1) V:0 A:5]
M:[FF 80 00 00 00] len:02
MM:[ FF 80 ] mh:01
MM:[ FF 80 F8 F8 F8 ]
M:[B:00 X:0(0) Y:-6(-1) V:0 A:6]
M:[FF 80 00 00 00] len:02
MM:[ FF 80 ] mh:01
MM:[ FF 80 F8 F8 F8 ]
M:[B:00 X:0(0) Y:-7(-1) V:0 A:7]
M:[FF 81 00 00 00] len:02
MM:[ FF 81 ] mh:01
MM:[ FF 81 F8 F8 F8 ]
M:[B:00 X:8(1) Y:-8(-1) V:0 A:8]
M:[80 81 00 00 00] len:02
MM:[ 80 81 ] mh:01
MM:[ 80 81 88 88 88 ]
M:[B:00 X:1(1) Y:0(0) V:0 A:1]
M:[80 82 00 00 00] len:02
MM:[ 80 82 ] mh:01
MM:[ 80 82 88 88 88 ]
M:[B:00 X:4(2) Y:0(0) V:0 A:2]
M:[81 82 00 00 00] len:02
MM:[ 81 82 ] mh:01
MM:[ 81 82 88 88 88 ]
M:[B:00 X:6(2) Y:3(1) V:0 A:3]
M:[80 82 00 00 00] len:02
MM:[ 80 82 ] mh:01
MM:[ 80 82 88 88 88 ]
M:[B:00 X:8(2) Y:0(0) V:0 A:4]
@tmk tmk mentioned this issue Apr 6, 2022
4 tasks
@tmk
Copy link
Owner Author

tmk commented Apr 8, 2022

commit 99cf9301132c9062c7f851a512499df7c0e57517 (adb_mouse_driver_0406)
Author: tmk <[email protected]>
Date:   Wed Apr 6 14:59:20 2022 +0900

    adb_usb: Add delay for NeXT Mouse #730

diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c
index 1b217f85..520b869c 100644
--- a/converter/adb_usb/matrix.c
+++ b/converter/adb_usb/matrix.c
@@ -350,6 +350,7 @@ again:
     // Move to address 10 for mouse polling
     adb_host_flush(ADB_ADDR_MOUSE_TMP);
     adb_host_listen(ADB_ADDR_MOUSE_TMP, ADB_REG_3, ((reg3 >> 8) & 0xF0) | ADB_ADDR_MOUSE_POLL, 0xFE);
+    wait_ms(1);
     adb_host_flush(ADB_ADDR_MOUSE_POLL);
     reg3 = adb_host_talk(ADB_ADDR_MOUSE_TMP, ADB_REG_3);
     if (reg3) {

It looks better than before. but it seems to need more delay.

https://geekhack.org/index.php?topic=14290.msg3119597#msg3119597

Waiting for device:.........
Listening:

USB configured.

Loop start.
M:TMP: reg3:7401
M:EXT: reg3:7201
M:Classic 100cpi
M:POL: fail reg3:7001

Scan:
 addr:15, reg3:7401

M:TMP: reg3:7101
M:EXT: reg3:7902
M:Classic 200cpi
M:POL: fail reg3:7D02

Scan:
 addr:15, reg3:7502

M:TMP: reg3:7202
M:EXT: reg3:7A02
M:Classic 200cpi
M:POL: done

Scan:
 addr:10, reg3:7202

M:[ FE 81 ] mh:02
M:[ FE 81 F8 F8 F8 ]
M:[B:00 X:1(1) Y:-2(-2) V:0 A:1]
M:[ FC 83 ] mh:02
M:[ FC 83 F8 F8 F8 ]
M:[B:00 X:6(3) Y:-8(-4) V:0 A:2]
M:[ FC 85 ] mh:02
M:[ FC 85 F8 F8 F8 ]
M:[B:00 X:15(5) Y:-12(-4) V:0 A:3]
M:[ FD 84 ] mh:02
M:[ FD 84 F8 F8 F8 ]
M:[B:00 X:16(4) Y:-12(-3) V:0 A:4]
M:[ FE 85 ] mh:02
M:[ FE 85 F8 F8 F8 ]
M:[B:00 X:20(5) Y:-8(-2) V:0 A:4]
M:[ FF 87 ] mh:02
M:[ FF 87 F8 F8 F8 ]
M:[B:00 X:28(7) Y:-4(-1) V:0 A:4]
M:[ FE 8B ] mh:02
M:[ FE 8B F8 F8 F8 ]
M:[B:00 X:44(11) Y:-8(-2) V:0 A:4]
M:[ FF 8C ] mh:02
M:[ FF 8C F8 F8 F8 ]

with 5ms delays:

https://geekhack.org/index.php?topic=14290.msg3119857#msg3119857

TMK:d477af/LUFA:d6a7df

Scan:


USB configured.

Loop start.
M:TMP: reg3:7601
M:EXT: reg3:7001
M:Classic 100cpi
M:POL: fail reg3:7801

Scan:
 addr:15, reg3:7B01

M:TMP: reg3:7A01
M:EXT: reg3:7E01
M:Classic 100cpi
M:POL: done

Scan:
 addr:10, reg3:7901

M:[ 81 80 ] mh:01
M:[ 81 80 88 88 88 ]
M:[B:00 X:0(0) Y:1(1) V:0 A:1]

@tmk
Copy link
Owner Author

tmk commented Apr 25, 2022

similar to #643

@tmk
Copy link
Owner Author

tmk commented May 5, 2022

Elecom Trackball also fails to change its address.(TMP->POL)

https://geekhack.org/index.php?topic=14290.msg3119600#msg3119600
https://www.journaldulapin.com/2021/03/26/trackball-adb/

Waiting for device:
Listening:
M:TMP: reg3:6F02
M:EXT: reg3:6F02
M:Classic 200cpi
M:POL: fail reg3:6F02

Scan:
 addr:15, reg3:6F02

M:TMP: reg3:6F02
M:EXT: reg3:6F02
M:Classic 200cpi
M:POL: fail reg3:6F02

Scan:
 addr:15, reg3:6F02

M:TMP: reg3:6F02
M:EXT: reg3:6F02
M:Classic 200cpi
M:POL: fail reg3:6F02

Scan:
 addr:15, reg3:6F02

M:TMP: reg3:6F02
M:EXT: reg3:6F02
M:Classic 200cpi
M:POL: fail reg3:6F02

https://geekhack.org/index.php?topic=14290.msg3119857#msg3119857


TMK:d477af/LUFA:d6a7df

Scan:


USB configured.

Loop start.
M:TMP: reg3:6F01
M:EXT: reg3:6F02
M:Classic 200cpi
M:POL: fail reg3:6F02

Scan:
 addr:15, reg3:6F02

M:TMP: reg3:6F02
M:EXT: reg3:6F02
M:Classic 200cpi
M:POL: fail reg3:6F02

Scan:
 addr:15, reg3:6F02

M:TMP: reg3:6F02
M:EXT: reg3:6F02
M:Classic 200cpi
M:POL: fail reg3:6F02

Scan:
 addr:15, reg3:6F02

@tmk
Copy link
Owner Author

tmk commented Feb 17, 2023

Both NeXT and Elecom always seem to move successfully at the first time, but fails at second.

Also M2706 Ireland shows same behaviour.
#643 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant