Posted: Tue 21 Feb, 2006 1:03 pm
Wow, great stuff Ben ... keyboard AND mouse with no need for usb! Thats extraordinary! . You have any other input deviced laying around ... any megadrive controllers? .
for your 1 bit pleasure!
https://maxcoderz.org/forum/
Heh, thanks. The mouse routines are significantly smaller than the keyboard routines, as the keyboard needs tables to translate multibyte codes into single byte codes. All the mouse needs is a call to a function to reset and initialise, and then a call every so often to update the mouse_x and mouse_y counters (both 16-bit).tr1p1ea wrote:Wow, great stuff Ben ... keyboard AND mouse with no need for usb! Thats extraordinary! . You have any other input deviced laying around ... any megadrive controllers? .
It reads them, but doesn't do anything with them. Ultimately, I'll shift all the bits along for all 5 buttons into a single byte you can read and mask out the buttons you want to test.kv83 wrote:Does it already "read" the buttons aswell?
Not at all. Mine is held together with sticky-tape and Blu-TakIs it difficult to make such a controller to connect a mouse to it?
No. It crashes on the 83, I assume because of the way bport is shared with something else (ROM paging?) There's no reason it can't be fixed, though -- I'll give it a try tonight, and see where it's breaking.I would like to try it. A mouse can be bought with 3euro already. It can connect to the 83, can't it?
Thank you. Would this value affect the 83+ in any way? I assume I'm always outputting %000000xy at the moment.CoBB wrote:For the 83 always set the high nibble to %1101 when sending to the link port. More precisely, bit 4 is the culprit that's connected to bit 3 of the ROM page swapped in.
I'd still love to see it in the API though Perhaps that's not as widespread as some shells are, but it's a step in the proper direction, I suppose...Ultimately, these routines are rather useless until they become widely adopted. Ideally, they could/would be added to a shell, and form part of the standard routines. For example, the shell could provide a "get key" function, which would also transparently return keyboard keys as if they were keys on the keypad, or return four "left" keys if the mouse was moved 4 mm left -- that sort of thing.
Chances of this happening are, sadly, nil.
That would be great... though the routines are quite large, adding 600-odd bytes just for the mouse.Timendus wrote:I'd still love to see it in the API though Perhaps that's not as widespread as some shells are, but it's a step in the proper direction, I suppose...
A USB mouse will normally support the PS/2 protocol - if it came with a USB -> PS/2 adapter, then it does. Of course, the pinout is different, but using a multimeter (or something) you should be able to work out which USB pin is used for data and which for clock, as well as VCC/GND.Timendus wrote:Cool stuff Could I mod a USB->PS/2 connector to a link cable, or would that use a different protocol? I only have USB mouses lying around here... Oh, wait, that's not entirely true. But it would be easier to use that connector, since I could permanently modify it and still use my mouse on my computer
Buying those as plugs or sockets (in stereo) is rather difficult, as well... nobody seems to stock them. Stereo 3.5mm minijacks? No problem. Mono 2.5mm minijacks? No problem. Stereo 2.5mm minijacks are a no-go area, thoughTimendus wrote:Yes, now all I need is a link cable plug... I've always had a shortage of those...
*sigh*
*goes to browse through his electro shite*