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

Post by benryves »

Keyboard support is done! It now handles the difference between printable and non-printable keys happily. A layout file for a UK keyboard, containing all the various modifiers is just under 1KB, which is nice. The entire library is still under 900 bytes.

I hope to have a beta out sometime this week.
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

that's great. :)

How about US keyboard support?
In Memory of the Maxcoderz Trophy Image
User avatar
benryves
Maxcoderz Staff
Posts: 3075
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

CompWiz wrote:that's great. :)

How about US keyboard support?
Well, a UK keyboard is roughly the same as a US keyboard. The main difference is the missing AltGr modifier key on a US keyboard (you have two Alts instead, I believe).

I posted a picture of the editor for layouts a few messages ago. A UK layout file will work with a US keyboard, just a few buttons will be in the wrong place (eg Shift+2 will produce " instead of @). I'd need someone with a US layout to edit the layout file and send a copy to me. :)
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

I'd be willing to help you with it, as long as it's not too complicated. Just tell me what I need to do. And yes, we do have 2 alt's. what's an AltGr?
In Memory of the Maxcoderz Trophy Image
User avatar
benryves
Maxcoderz Staff
Posts: 3075
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

CompWiz wrote:what's an AltGr?
Alternate Graphic. It's a modifier (in the sense that Shift is a modifier), and can be used to type the third character written on keys (for example, 4 has three characters - 4, $ and €). It can also be used to type acute accented variations of some of the vowels - á, é, í, ó and ú. I think all you'd need to do is unset it as a modifier and get it to generate a 'right alt' non-printable key code. Probably doesn't make much sense without the editor. :P
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

So then the mouse routine is still under development.
Image Image Image
User avatar
benryves
Maxcoderz Staff
Posts: 3075
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

The mouse routine is done and dusted. :) It was only the keyboard support that needed updating. Watch this space (sorry, I had unexpected extra work this week).
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

Heh, no problem. Eagerly awaiting...
Image Image Image
User avatar
benryves
Maxcoderz Staff
Posts: 3075
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

OK, rather rushed beta, so a rather incomplete package I'm afraid documentation-wise.

The demo should be able to show off what the library can do at the moment, though. I'd like to add a couple of 'game' demos (for example, controlling things with the keyboard as opposed to just typing) and have a "simplest" series of demos that show you how to do things the simplest way.

What is in the demo are the full set of routines - the library is pretty much finished. The only snag is that Device.Identify can get a bit confused, and you sometimes need to reset the connected device. I shall look into that.

You can download the beta here. It has a TI-83+ demo, as well as keyboard files for a UK keyboard. The keyboard editor is included, but is a bit buggy (if you look at the code, you can see why - it's a mess).

For those without the requisite hardware, there are two video demos:

Image Image

(No comments about my inability to spell 'layout', please!)

I'm sorry about the quality of this release - the library is fine, the documentation and samples are rubbish. As is the keyboard layout tool. :( I promised to get something out this week, though, so there we go.

If you look at the Emerson/Modules/<module>.asm file, each function is documented pretty well.

Requires Brass, I'm afraid. Local labels and nested modules are required.
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

Finally got Shell Expansions working, so I'm picking through the Emerson demo source figuring out how I'm going to do the mouse SE.
Image Image Image
User avatar
benryves
Maxcoderz Staff
Posts: 3075
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Ace. The coordinates demo is probably the best bit to look at (as the cursor demo has a lot of surplus code!)

Look at the UpdateOrReinit function - it clears a flag if the mouse isn't detected, so that the next time the routine is called it reinitialises the mouse. This means the mouse is hot-pluggable, even between different hardware (you can swap an Intellimouse for a standard PS/2 mouse).
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

Ah, sweet, I'll definitely use that. That was indeed the section of the demo I was inspecting the most.
Image Image Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

benryves wrote:If you look at the Emerson/Modules/<module>.asm file, each function is documented pretty well.

Requires Brass, I'm afraid. Local labels and nested modules are required.

Yes, I love the code and the way it's commented. It slightly sucks that it isn't TASM friendly though, because that makes it pretty much impossible to put the library in the API (which has to stay "backwards" compatible with TASM).
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
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

I had a bit of trouble initially getting the library into a useable form for what I was using it for; the object-oriented aspect confused me a bit initially, but I got it figured out. Question: how important is it that the clock line be held before commands are issued?
Image Image Image
User avatar
benryves
Maxcoderz Staff
Posts: 3075
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Holding the clock line low is important as it inhibits the connected device from sending anything. If you let the keyboard send anything between calls to get data from it, you lose the bytes.

Timendus wrote:Yes, I love the code and the way it's commented. It slightly sucks that it isn't TASM friendly though, because that makes it pretty much impossible to put the library in the API (which has to stay "backwards" compatible with TASM).
Sorry. You'll probably be more upset when I say that Brass 2 will be completely dropping some of TASM's features (for example, handling modules two different ways is a nightmare, so I'll only support Brass-style nested modules). :|
Post Reply