USB Keyboard/mouse support

If you have feature requests, this is the place to post them. Please note your idea may already be something we have already discussed and decided against, or something we are working on privately, and we cannot be held responsible for any similarities in such instance. Whilst we cannot respond to every suggestion, your idea will be read and responded to where possible. Thank you for your input!
willy
Posts: 2
Joined: Sat Jan 30, 2021 10:38 pm

USB Keyboard/mouse support

Post by willy »


Hi everyone.

I don't know where to post my thoughts, so I'll do that here.

 

I guess guys, you have overestimated the 6502 capability to handle two PS/2 channels. The performance penalty for 6502 will be so huge that almost no other action will be possible. Additional microcontroller would be necessary to keep 6502 free from handling of 2 streams of PS/2 interrupts.

PS/2 devices like keyboards and mouse are almost gone on the market ... only USB are available.

 

So if additionally microcontroller seems to be necessary, why not to use it to handle USB keyboard/mouse ??

 

I'm a constructor of a new USB device called mouSTer. The website is not ready for now: http://jil.guru/mouSTer/  some information is also here:  https://retrohax.net/the-mouster-project-is-here/

Getting back to the main lead ... I offer my help to integrate a reasonable USB interface for mouse/keyboard, likely based on the mouSTer adapter.

I have also some comments on the layout of the prototype.

 

If you are interested in the USB interface, please contact me.

 

Regards

willy.

 

User avatar
StephenHorn
Posts: 565
Joined: Tue Apr 28, 2020 12:00 am
Contact:

USB Keyboard/mouse support

Post by StephenHorn »


...what?

Developer for Box16, the other X16 emulator. (Box16 on GitHub)
I also accept pull requests for x16emu, the official X16 emulator. (x16-emulator on GitHub)
SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

USB Keyboard/mouse support

Post by SlithyMatt »


What a coincidence!

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

USB Keyboard/mouse support

Post by rje »


^ that was irony.  

I know, because I heard it in my head, too.

 

xanthrou
Posts: 165
Joined: Mon Jan 25, 2021 11:57 am

USB Keyboard/mouse support

Post by xanthrou »



On 1/31/2021 at 1:16 AM, willy said:




Hi everyone.



I don't know where to post my thoughts, so I'll do that here.



 



I guess guys, you have overestimated the 6502 capability to handle two PS/2 channels. The performance penalty for 6502 will be so huge that almost no other action will be possible. Additional microcontroller would be necessary to keep 6502 free from handling of 2 streams of PS/2 interrupts.



PS/2 devices like keyboards and mouse are almost gone on the market ... only USB are available.



 



So if additionally microcontroller seems to be necessary, why not to use it to handle USB keyboard/mouse ??



 



I'm a constructor of a new USB device called mouSTer. The website is not ready for now: http://jil.guru/mouSTer/  some information is also here:  https://retrohax.net/the-mouster-project-is-here/



Getting back to the main lead ... I offer my help to integrate a reasonable USB interface for mouse/keyboard, likely based on the mouSTer adapter.



I have also some comments on the layout of the prototype.



 



If you are interested in the USB interface, please contact me.



 



Regards



willy.



 



In my opinion, PS/2 compatible ports are still made, and the reason why X16 has PS/2 instead of USB is because the former is easier to implement than the latter.

Plus, I personally think this post is spam...

TomXP411
Posts: 1783
Joined: Tue May 19, 2020 8:49 pm

USB Keyboard/mouse support

Post by TomXP411 »



7 hours ago, xanthrou said:




In my opinion, PS/2 compatible ports are still made, and the reason why X16 has PS/2 instead of USB is because the former is easier to implement than the latter.



Yes and no... sometimes more complex is actually simpler. 

Reading from the PS/2 port means bit banging the input and handling the data one bit at a time. A single bit read cycle takes 4 steps (raise clock, read line, lower clock, push data to FIFO), and there are 13 bits in a PS/2 message. A quick guess is around 400-500 machine cycles to read a single byte, or 16,000 bytes per second. So obviously, the OP's claim that the PS/2 port will overwhelm the system is not entirely accurate. Having said that... moving the mouse WILL have an effect as the CPU has to handle every single mouse message - which will be constantly coming in as the mouse is moved. So there's actually a lot of work involved in reading the keyboard and mouse at a binary level. 

But USB is way more complicated, right? Which is why you don't implement USB at the 6502 level. Instead, you connect a "black box" that reads the USB data and just passes the decoded bytes back to the system. Using that method, you're talking about reading and saving 1 byte at a time, rather than 1 bit at a time, reducing the keyboard and mouse overhead by about 90%. There's plenty of Arduino code that can read and decode a USB keyboard, and patching an Arduino to the system bus or through a VIA is probably simpler in the long run than trying to manage the PS/2 ports in software. 

 

 

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

USB Keyboard/mouse support

Post by rje »



48 minutes ago, TomXP411 said:




Yes and no... sometimes more complex is actually simpler. 



That actually made sense to me.

 

StinkerB06
Posts: 74
Joined: Tue Jun 30, 2020 12:32 am

USB Keyboard/mouse support

Post by StinkerB06 »



On 1/30/2021 at 3:38 PM, SlithyMatt said:




What a coincidence!



How is this a coincidence? What am I missing?

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

USB Keyboard/mouse support

Post by SlithyMatt »



2 hours ago, StinkerB06 said:




How is this a coincidence? What am I missing?



That he came to this conclusion that the X16 can't handle PS/2 and IT JUST SO HAPPENS that he manufactures and sells a solution to that "problem"

willy
Posts: 2
Joined: Sat Jan 30, 2021 10:38 pm

USB Keyboard/mouse support

Post by willy »


Don't you think guys this has gone too far?

 

Locked