MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 114 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next
Author Message
 Post subject:
PostPosted: Tue 21 Feb, 2006 1:03 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4095
Location: I cant seem to get out of this cryogenic chamber!
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 1:25 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 1:38 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 1:47 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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.

Quote:
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.

Quote:
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 1:58 pm 
Offline
MCF Legend

Joined: Mon 20 Dec, 2004 8:45 am
Posts: 1601
Location: Budapest, Absurdistan
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.

_________________
The Independent Z80 Assembly Guide
Acelgoyobis
PindurTI


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 2:07 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 4:08 pm 
Offline
MCF Legend

Joined: Mon 20 Dec, 2004 8:45 am
Posts: 1601
Location: Budapest, Absurdistan
No, only bit 2 has to be kept 0, so the values for the 83 shouldn't interfere with anything.

_________________
The Independent Z80 Assembly Guide
Acelgoyobis
PindurTI


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 5:19 pm 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
Great work Ben, it is amazingly fast and I hope to try it soon if I can find the time :D.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 1:49 am 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
Good to see this project back to life :)

Quote:
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 10:21 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4095
Location: I cant seem to get out of this cryogenic chamber!
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 10:56 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 3:13 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 3:27 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 3:37 pm 
Offline
Calc King
User avatar

Joined: Sun 23 Jan, 2005 12:37 am
Posts: 1727
Location: Netherlands
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 3:42 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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 :(


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 114 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 8  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt