VOGONS


Reply 40 of 262, by tabm0de

User metadata
Rank Member
Rank
Member
serisman wrote on 2022-11-25, 19:47:
Thanks for checking it over for me. Yeah, your version is definitely easier to manufacture and more premium looking. For my se […]
Show full quote
rasteri wrote on 2022-11-25, 12:30:

Looks really great! I was thinking of doing something similar originally but I wanted the PCBs to be manufacturable without manually soldering on wires so I decided on the DIN ports instead.

I haven't tested this pinout fully yet - if you can wait a couple of days I should have it tested by the end of the weekend.

EDIT : what are you planning to do for an enclosure? 3D printed?

Thanks for checking it over for me. Yeah, your version is definitely easier to manufacture and more premium looking. For my setup, though, I would rather not have such a large external box with long cables.

I went ahead and added it to my PCB order. I can always spin a new version in the future if there are important changes that need to be incorporated. It looks pretty safe to me though. The serial pins can't really change if we want to continue to use hardware serial, and the PS/2 pins look like just standard GPIOs so are probably less important where they map to.

I did make a few tweaks to my (mini) PCB. Primarily switching to SMD pull-up resistors instead of the SIP resistor networks. I realized I don't have the correct SIP RNs on hand anyway, and the individual resistors gives more flexibility in tweaking values (or leaving unconnected if needed). Speaking of which... your schematic doesn't specify values for any of the pull-ups. I assume the PS/2 ones are 4.7k to 10k and the LED ones are 330 to 1k? I added optional pull-ups for the serial lines as well, not sure if they are useful or not?

Yes, I plan on designing a 3D printed enclosure, or maybe even just use some clear heatshrink tubing.

Oh, I also designed a small PCB for the serial extension that can be embedded directly inside a DB9 shell.

Both designs are available on OSHPARK, although keep in mind these are not yet fully tested designs. I'll add them to a github repo once confirmed working.
HIDman (mini): https://oshpark.com/shared_projects/GPxhWAbz
Serial DB9 to TTL: https://oshpark.com/shared_projects/djSCnWyn

I like the Serial DB9 (Female) to TTL if only mouse is needed, I guess it would need external power to be able to power the mouse?

naa, nothing yet...

Reply 41 of 262, by serisman

User metadata
Rank Newbie
Rank
Newbie
tabm0de wrote on 2022-12-06, 17:10:
serisman wrote on 2022-11-25, 19:47:

I like the Serial DB9 (Female) to TTL if only mouse is needed, I guess it would need external power to be able to power the mouse?

Yes, if emulating only a Serial mouse, you would need an external 5V power input. If also emulating (and connected to) an AT or PS/2 keyboard port, it can pull 5V power from the keyboard port.

Reply 42 of 262, by Eivind

User metadata
Rank Oldbie
Rank
Oldbie

@rasteri I've started experimenting with the CH559 chip and your code - am I right that the current KiCad schematics and the main.c and ps2.c files don't match up with regards to the PS/2 ports...?
I'm seeing P0.5 for KBCLK, P0.3 for KBDATA, P3.7 for MSCLK and P4.3 for MSDATA in the schematics, but P3.4, P3.5, P2.0 and P2.1 in code? Unless I'm missing something (and I often do)! 😀

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 43 of 262, by rasteri

User metadata
Rank Member
Rank
Member
Eivind wrote on 2022-12-09, 22:37:

@rasteri I've started experimenting with the CH559 chip and your code - am I right that the current KiCad schematics and the main.c and ps2.c files don't match up with regards to the PS/2 ports...?
I'm seeing P0.5 for KBCLK, P0.3 for KBDATA, P3.7 for MSCLK and P4.3 for MSDATA in the schematics, but P3.4, P3.5, P2.0 and P2.1 in code? Unless I'm missing something (and I often do)! 😀

Oh I hadn't pushed the last commit - try now 😀

Reply 44 of 262, by Eivind

User metadata
Rank Oldbie
Rank
Oldbie
rasteri wrote on 2022-12-10, 12:26:

Oh I hadn't pushed the last commit - try now 😀

Thanks, that did the trick! I noticed my USB mice weren't recognized if they were already connected at power-up, so I bumped the mDelaymS(5) to mDelaymS(100) in Task.c initSystem.
Keyboard seems to be working perfectly, though I couldn't get the typematic rate up from its default in DOS (using mode con rate).
Mouse however was a bit strange, ctmouse recognizes the ps/2 mouse, but whenever I try a program that uses a mouse, the cursor immediately jumps to the lower right corner (ie, max value) when I move it. Have you experienced anything similar?

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 46 of 262, by rasteri

User metadata
Rank Member
Rank
Member
Eivind wrote on 2022-12-11, 15:10:

Mouse however was a bit strange, ctmouse recognizes the ps/2 mouse, but whenever I try a program that uses a mouse, the cursor immediately jumps to the lower right corner (ie, max value) when I move it. Have you experienced anything similar?

Maybe its report format is a bit weird. Can you gather some log data for me?

I've just pushed an update to HIDMAN that will re-enable the debugging menu facility.

Once you have it flashed, fire up a text editor (MSDOS edit, windows notepad etc) on the PC that HIDMAN is attached to and momentarily hit the reflashing button (that's wired to 4.6). A menu will be typed up by HIDMAN.

Hit "2" for Log HID Data, and then unplug/replug your mouse to get the report descriptor(s). Wiggle it around a bit to gather some report data then save the text file and post it here (or DM it to me).

(Long term I may add a "safe mode" that forces keyboards/mice to BOOT MODE to account for weirdness like this)

EDIT : Oh, and "mode con rate=blah delay=blah" works for me. I'll add some more debugging options eventually.

Reply 47 of 262, by Eivind

User metadata
Rank Oldbie
Rank
Oldbie
rasteri wrote on 2022-12-11, 23:04:
Maybe its report format is a bit weird. Can you gather some log data for me? […]
Show full quote
Eivind wrote on 2022-12-11, 15:10:

Mouse however was a bit strange, ctmouse recognizes the ps/2 mouse, but whenever I try a program that uses a mouse, the cursor immediately jumps to the lower right corner (ie, max value) when I move it. Have you experienced anything similar?

Maybe its report format is a bit weird. Can you gather some log data for me?

I've just pushed an update to HIDMAN that will re-enable the debugging menu facility.

Once you have it flashed, fire up a text editor (MSDOS edit, windows notepad etc) on the PC that HIDMAN is attached to and momentarily hit the reflashing button (that's wired to 4.6). A menu will be typed up by HIDMAN.

Hit "2" for Log HID Data, and then unplug/replug your mouse to get the report descriptor(s). Wiggle it around a bit to gather some report data then save the text file and post it here (or DM it to me).

(Long term I may add a "safe mode" that forces keyboards/mice to BOOT MODE to account for weirdness like this)

EDIT : Oh, and "mode con rate=blah delay=blah" works for me. I'll add some more debugging options eventually.

Nifty! 😀

Here's a dump of me removing and reinserting a USB mouse:

HIDMAN v0.1 Main Menu

1. Configure game controller mappings
2. Log HID Data

ESC to exit menu

Logging HID Data. Press ESC to stop...
I0 L8- 0 0 0 0 0 0 0 0


Interface 0 Report Descriptor -

05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
75 01 95 08 81 02 95 01 75 08 81 01 95 03 75 01
05 08 19 01 29 03 91 02 95 05 75 01 91 01 95 06
75 08 26 FF 00 05 07 19 00 29 91 81 00 C0



Interface 1 Report Descriptor -

05 0C 09 01 A1 01 85 01 15 01 26 5E 00 75 08 95
02 0A 25 02 09 B6 09 B5 09 B7 09 CD 09 EA 09 E9
09 E2 0A 92 01 0A 8A 01 0A 21 02 0A 23 02 0A 2A
02 0A 24 02 0A 83 01 1B 01 00 09 00 2B 4C 00 09
00 05 0C 0A 27 02 0A 26 02 09 B8 81 60 C0 05 01
09 80 A1 01 85 02 15 01 25 03 75 02 95 01 09 82
09 81 09 83 81 60 75 06 81 03 C0



Interface 0 Report Descriptor -

05 01 09 02 A1 01 85 01 09 01 A1 00 05 09 19 01
29 05 15 00 25 01 95 05 75 01 81 02 95 03 75 01
81 03 05 01 09 30 09 31 16 00 80 26 FF 7F 75 10
95 02 81 06 09 38 15 81 25 7F 75 08 95 01 81 06
05 0C 0A 38 02 81 06 C0 C0 05 0C 09 01 A1 01 85
02 19 00 2A 3C 02 15 00 26 3C 02 95 01 75 10 81
00 C0 05 0A 09 00 A1 01 85 03 19 00 29 00 15 00
25 00 75 08 95 04 81 01 C0 05 0B 09 00 A1 01 85
04 19 00 29 00 15 00 25 00 75 08 95 02 B1 01 85
05 95 02 B1 01 85 06 95 0F B1 01 85 07 95 16 B1
01 85 09 95 05 B1 01 85 0A 95 02 B1 01 C0



Interface 1 Report Descriptor -

05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
75 01 95 08 81 02 95 01 75 08 81 01 95 05 75 01
05 08 19 01 29 05 91 02 95 01 75 03 91 01 95 06
75 08 15 00 25 65 05 07 19 00 29 65 81 00 C0

I0 L8- 0 0 29 0 0 0 0 0


HIDMAN v0.1 Main Menu

Show last 7 lines
1. Configure game controller mappings
2. Log HID Data

ESC to exit menu

Goodbye

...however, after those report descriptors, if I move the mouse at all it spits out a few lines and then seemingly hangs (so I can't save the dump), but here's a couple of screenshots:

IMG_0173.jpeg
Filename
IMG_0173.jpeg
File size
1.56 MiB
Views
1322 views
File license
Fair use/fair dealing exception
IMG_0172.jpeg
Filename
IMG_0172.jpeg
File size
1.65 MiB
Views
1322 views
File license
Fair use/fair dealing exception

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 48 of 262, by rasteri

User metadata
Rank Member
Rank
Member
Eivind wrote on 2022-12-12, 00:20:

Here's a dump of me removing and reinserting a USB mouse:

Aha - your mouse uses 16bit X/Y reports. I have this working in another branch but it's not 100% there yet.

I just pushed a commit that forces Boot Mode for keyboard/mouse devices. This will reduce mouse resolution and stop NKRO but should be compatible with all devices.

Let me know if that works.

Reply 49 of 262, by Eivind

User metadata
Rank Oldbie
Rank
Oldbie
rasteri wrote on 2022-12-12, 01:12:

Aha - your mouse uses 16bit X/Y reports. I have this working in another branch but it's not 100% there yet.

I just pushed a commit that forces Boot Mode for keyboard/mouse devices. This will reduce mouse resolution and stop NKRO but should be compatible with all devices.

Let me know if that works.

After your last update (commit #9591d39), here's where I'm at:

Mouse no.1 (Razer Deathadder 2013):
Works perfectly AFAIK, the only gripe I have is that it's a bit too sensitive, even if I use ctmouse /r1. Like 1cm movement between edges of the screen.

Mouse no.2 (Roccat Kova [+]):
Left movement of the mouse causes the cursor to go up, and right goes down. Up and down movements are ignored. Any mouse buttons held down causes the cursor to move diagonally up or down to the right if I move the mouse left or right at the same time! 😀 It's also too sensitive (for my taste at least).

The HIDman debug mode still hangs after x lines of output while logging and moving the mouse around.

I've attached two files which are outputs of lsusb -v for each of the mice in a Linux VM, if that is of any help.
Thanks for your awesome work, we're almost there! 😁

Attachments

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 50 of 262, by rasteri

User metadata
Rank Member
Rank
Member
Eivind wrote on 2022-12-12, 10:13:

I've attached two files which are outputs of lsusb -v for each of the mice in a Linux VM, if that is of any help.
Thanks for your awesome work, we're almost there! 😁

Could you get me the other mouse's HID report descriptor from the debug menu? I don't need you to wiggle it this time.

Reply 51 of 262, by Eivind

User metadata
Rank Oldbie
Rank
Oldbie
rasteri wrote on 2022-12-12, 18:37:

Could you get me the other mouse's HID report descriptor from the debug menu? I don't need you to wiggle it this time.

I've attached the Roccat Kova [+] mouse's report descriptor.
For the Razer Deathadder 2013, when starting logging and attaching the mouse the input hangs after spitting out the report descriptor, and it looks like the mouse isn't properly "started" (enumerated?). It doesn't light up its internal LEDs at least.
I obviously couldn't save it, but I took a photo of the report descriptor.

Attachments

  • razer_deathadder_2013.jpeg
    Filename
    razer_deathadder_2013.jpeg
    File size
    1.57 MiB
    Views
    1262 views
    File license
    Fair use/fair dealing exception
  • Filename
    ROCCAT.TXT
    File size
    1.71 KiB
    Downloads
    37 downloads
    File license
    Fair use/fair dealing exception

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 52 of 262, by serisman

User metadata
Rank Newbie
Rank
Newbie
serisman wrote on 2022-11-25, 19:47:

Both designs are available on OSHPARK, although keep in mind these are not yet fully tested designs. I'll add them to a github repo once confirmed working.
HIDman (mini): https://oshpark.com/shared_projects/GPxhWAbz
Serial DB9 to TTL: https://oshpark.com/shared_projects/djSCnWyn

I got my PCBs back today and whipped one up (single USB port with Logitech Wireless adapter to PS/2 KB/Mouse). I did some light testing in DOS and Windows 3.11 and everything works as expected!

I haven't built up the DB9 Serial adapter, or tested the Serial mouse, or tested the 2nd USB port yet, but at this point I assume they will probably work fine as well.

@rasteri - Should I submit a pull request to include these PCB designs into your GitHub repo, or would you prefer they are kept separate?

Attachments

Reply 53 of 262, by serisman

User metadata
Rank Newbie
Rank
Newbie
serisman wrote on 2022-12-14, 00:29:
serisman wrote on 2022-11-25, 19:47:

Both designs are available on OSHPARK, although keep in mind these are not yet fully tested designs. I'll add them to a github repo once confirmed working.
HIDman (mini): https://oshpark.com/shared_projects/GPxhWAbz
Serial DB9 to TTL: https://oshpark.com/shared_projects/djSCnWyn

I got my PCBs back today and whipped one up (single USB port with Logitech Wireless adapter to PS/2 KB/Mouse). I did some light testing in DOS and Windows 3.11 and everything works as expected!

I haven't built up the DB9 Serial adapter, or tested the Serial mouse, or tested the 2nd USB port yet, but at this point I assume they will probably work fine as well.

Well, I built up the DB9 Serial adapter and attached it to my HIDman-mini, but it doesn't appear to do anything (yet?).

@rasteri - I skimmed the code, and it doesn't look like there is Serial Mouse code implemented yet. Can you confirm or deny that before I do any further troubleshooting? Also, the RGB LED doesn't seem to do much either. Is it supposed too, or is that also for a future enhancement?

Attachments

Reply 54 of 262, by tabm0de

User metadata
Rank Member
Rank
Member

Looking good i most say, doh my self i will have longer ps/2 cables as mouse not always near keyboard on some at pentiums 😀

naa, nothing yet...

Reply 55 of 262, by rasteri

User metadata
Rank Member
Rank
Member
serisman wrote on 2022-12-14, 05:17:

Well, I built up the DB9 Serial adapter and attached it to my HIDman-mini, but it doesn't appear to do anything (yet?).

@rasteri - I skimmed the code, and it doesn't look like there is Serial Mouse code implemented yet. Can you confirm or deny that before I do any further troubleshooting? Also, the RGB LED doesn't seem to do much either. Is it supposed too, or is that also for a future enhancement?

Correct - serial mice and RGB are in another branch. There's also some new report parser code that should hopefully fix Eivind's issues too. I should have some time this weekend to merge everything.

Reply 56 of 262, by serisman

User metadata
Rank Newbie
Rank
Newbie
rasteri wrote on 2022-12-14, 13:25:
serisman wrote on 2022-12-14, 05:17:

Well, I built up the DB9 Serial adapter and attached it to my HIDman-mini, but it doesn't appear to do anything (yet?).

@rasteri - I skimmed the code, and it doesn't look like there is Serial Mouse code implemented yet. Can you confirm or deny that before I do any further troubleshooting? Also, the RGB LED doesn't seem to do much either. Is it supposed too, or is that also for a future enhancement?

Correct - serial mice and RGB are in another branch. There's also some new report parser code that should hopefully fix Eivind's issues too. I should have some time this weekend to merge everything.

Thanks for confirming my suspicion! Definitely no rush on my account. I don't really need a Serial mouse at the moment, I just wanted to test it out to make sure my hardware was working properly.

Anyway, I was able to design and 3D print a cover for my HIDman-mini, and DB9-TTL adapter. Turned out pretty good. I'll clean up my files over the next couple of days and put them in a new GitHub repo in case anyone else wants to duplicate this.

Attachments

Reply 57 of 262, by serisman

User metadata
Rank Newbie
Rank
Newbie
tabm0de wrote on 2022-12-14, 07:17:

Looking good i most say, doh my self i will have longer ps/2 cables as mouse not always near keyboard on some at pentiums 😀

Well, yeah, the cable length can be optimized to whatever is needed. I built this prototype with a specific computer in mind, and wanted a smaller adapter. I may build a more general purpose one with slightly longer cables next.

Reply 58 of 262, by tabm0de

User metadata
Rank Member
Rank
Member
serisman wrote on 2022-12-15, 03:55:
tabm0de wrote on 2022-12-14, 07:17:

Looking good i most say, doh my self i will have longer ps/2 cables as mouse not always near keyboard on some at pentiums 😀

Well, yeah, the cable length can be optimized to whatever is needed. I built this prototype with a specific computer in mind, and wanted a smaller adapter. I may build a more general purpose one with slightly longer cables next.

😀 as soon I know all is good I need to order few 😀

naa, nothing yet...

Reply 59 of 262, by rasteri

User metadata
Rank Member
Rank
Member

Just to say, I've ordered a load of used hi-dpi gaming mice on eBay, and I'm determined to get them all working in non-boot-mode (or at least with appropriate sensitivity ).

Thanks all for sticking with the project, we'll get it stable 😀

(For the moment though, all the cheap generic mice I've tried work great so that's one potential workaround 😜 )