Thanks a lot lads, I`d got them by stepping up or down
by 256`s from the ones I already knew, although I notice
that when I didn`t have the exact right addresses then
other (groups of) keys can affect the value`s (of other groups)...

Just going with using the straight addresses of
what I need and the value for the key I need, i.e.
30,29,27,23 or 15, so no BAND yet... although it`s cool
to realise it`s only using first 5 bits, and what last
3 can be used for... It`s working a treat, although
I`ll have to do it the way suggested if I allow
redefining of keys, and build a table or something?
But for now, it`s working great, nice not to have to use
the joystick keys :)

Nice to finally get these written down in a notebook *_+

Also interesting to find out why the cursor (right cursor
from memory) used to move the mouse down
and to the left on Ease. always wondered :)

Andrew Collier <[EMAIL PROTECTED]> wrote: Hi,

That's the right track, lots of things work in 256s (the high and low  
bytes of a 16 bit number).

In the case of the keyboard, the lower byte is always 254 (I think  
your number for QEWRT is suspect) and the upper byte is one of the  
eight numbers which have 7 binary digits set and one clear.

In other words:

upper lower   IN number
byte  byte     (decimal) keys

  0xfe fe      65278      VCXZ(shift)
  0xfd fe      65022      GFDSA
  0xfb fe      64510      TREWQ
  0xf7 fe      63486      54321
  0xef fe      61438      67890
  0xdf fe      57342      YUIOP
  0xbf fe      41950      HJKL(return)
  0x7f fe      32766      BNM(sym)(space)

These are all the same keys the Spectrum has. You can read the Sam's  
other keys if you use the same upper bytes and change the lower byte  
to 0xf9 and use the top three bits of the result. There's also the  
cursor keys on IN 65534, but I would avoid that in basic because  
you'll get into a lot of trouble with the mouse interface which  
shares that address (kinda).

HTH,
Andrew



On 8 Aug 2007, at 00:25, Calvin Allett wrote:

> Just realised the port address's are seperated by 256 bytes, so
> should be able to find the ones I need. I hadn't known that :)
>
> Calvin Allett  wrote: Could anyone tell  
> me the address's to read using IN (or should that
> be ports) for groups of SAM keys?
>
> I need more than one keypress, and would like to use the
> following keys (or groups)..
>
> O, and P -
> Z
> and M
> and space should be needed.
>
> 64509 seems to be keys Q,W,E,R,T
> and from FRED issue 11A, Axe`s Last Stand
> I see
> 63486 is 1,2,3,4,5 and
> 61438 is 6,7,8,9 and 0
>
> i have looked (in fact for over half an hour before)
>
> also, any tips on BAND would be an asset, although I shouldn't
> be needing that I for this, as the keys I need are in different  
> groups.
>
> not needed too urgently, but any help or links appreciated :)
>
> Cal...
>
>
> Yahoo! Mail is the world's favourite email. Don't settle for less,  
> sign up for your free account today.
>
> Yahoo! Answers - Get better answers from someone who knows. Try it  
> now.

-- 
  ---       Andrew Collier         ----
   ---- http://www.intensity.org.uk/ ---
                                       --




       
---------------------------------
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.

Reply via email to