Page 7 of 8

Posted: Mon 18 Sep, 2006 2:50 pm
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.

Posted: Mon 18 Sep, 2006 3:07 pm
by CompWiz
that's great. :)

How about US keyboard support?

Posted: Mon 18 Sep, 2006 3:39 pm
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. :)

Posted: Mon 18 Sep, 2006 7:41 pm
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?

Posted: Tue 19 Sep, 2006 10:32 am
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

Posted: Thu 21 Sep, 2006 5:02 pm
by KermMartian
So then the mouse routine is still under development.

Posted: Thu 21 Sep, 2006 5:41 pm
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).

Posted: Fri 22 Sep, 2006 1:02 am
by KermMartian
Heh, no problem. Eagerly awaiting...

Posted: Fri 22 Sep, 2006 11:36 am
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.

Posted: Sun 01 Oct, 2006 7:05 pm
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.

Posted: Mon 02 Oct, 2006 3:20 pm
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).

Posted: Mon 02 Oct, 2006 4:24 pm
by KermMartian
Ah, sweet, I'll definitely use that. That was indeed the section of the demo I was inspecting the most.

Posted: Mon 09 Oct, 2006 10:28 pm
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).

Posted: Mon 09 Oct, 2006 11:52 pm
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?

Posted: Tue 10 Oct, 2006 9:59 am
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). :|