Andrew Collier
Tue, 07 Aug 2007 16:54:22 -0700
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 <[EMAIL PROTECTED]> wrote: Could anyone tell me the address's to read using IN (or should thatbe 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'tbe 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/ --- --