[Staff][Alpha] Emerson - TI-83+ Keyboard/Mouse

Here you can find side projects of the staff and great projects which we think should get extra support. (Note that featured projects are not projects by staff members of MaxCoderz)

Moderator: MaxCoderz Staff

User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

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? :twisted:.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

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? :twisted:.
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).
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

I'm really intrested in how this would work with a game or application. Mineswepper or Paint or something like that would be a good "test" candidate.

Does it already "read" the buttons aswell?

Is it difficult to make such a controller to connect a mouse to it? I would like to try it. A mouse can be bought with 3euro already. It can connect to the 83, can't it?
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

kv83 wrote:Does it already "read" the buttons aswell?
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.
Is it difficult to make such a controller to connect a mouse to it?
Not at all. Mine is held together with sticky-tape and Blu-Tak :roll:

You just need to connect the keyboard/mouse to 5V (battery pack or something) and the two leads from the calculator's data port go straight to the data or clock lines of the connected mouse or keyboard. Both use the same wiring. The diagram at the bottom here: http://www.psikan.com/keyboard.php is the way to do it.
I would like to try it. A mouse can be bought with 3euro already. It can connect to the 83, can't 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.
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

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.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

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.
Thank you. :) Would this value affect the 83+ in any way? I assume I'm always outputting %000000xy at the moment.
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

No, only bit 2 has to be kept 0, so the values for the 83 shouldn't interfere with anything.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Great work Ben, it is amazingly fast and I hope to try it soon if I can find the time :D.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Good to see this project back to life :)
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.
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...

Do you eat properly, Ben? Your hand is still skinny as ever :P You really should take good care of yourself ;)

Oh, and this could be useful for porting it to Ti-83:
http://wikiti.denglend.net/index.php?title=83:Ports:00
(Last edit by Timendus, April 28th 2005? What the hell..? Is the WikiTi dead or something?)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

lol, i would expect his hand to be all muscley because of all that programming!

I cant help but think how funny it would be to walk into a class, whip out your calc, a PC keyboard and a mouse, sit down and start messing around ... i bet you would get some funny looks :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

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...
That would be great... though the routines are quite large, adding 600-odd bytes just for the mouse.

http://benryves.com/bin/emerson/demo/mouse_demo_2.zip <- here's a better mouse demo, TI-83 friendly. It also displays the button status and supports Intellimouse extensions (scroll wheel).
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

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 :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

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 :)
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.
I'm currently using a USB mouse. I assume the controller in the mouse defaults to PS/2 mode, and if it receives a USB-style signal switches to USB mode.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

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*
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Timendus 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*
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, though :(
Post Reply