Key Table Molecular 2
---------------------
key 0 - 00 FE = up
key 1 - 00 FB = down
key 2 - 01 FE = Left
key 3 - 00 FD = Right - &0A16 here you will found key 3
key 4 - 07 DF = D
key 5 - 08 F7 = Q
key 6 - 06 FB = R
key 7 - 04 DF = K
key 8 - 05 7F = Space
key 9 - 08 FB = ESC - &0A46 here you will found key 9
key 0A - 08 FE = 1
key 0B - 08 FD = 2
key 0C - 07 FD = 3
key 0D - 07 FB = E
key 0E - 05 BF = N
key 0F - 00 FD = Right
How to use the key;
ld A,key
call &131
The keycode 00 FE 00 FB 01 FE .... is precoded in &0197
Let us have a look at ESC key;
------------------------------
key 9 = ESC - ld a,&09 call &0131
08 is the row - Start counting with 0-1-2-3-4-5-6-7-8-9
FB is the column
You have to translate &FB to binary - 11111011
0 = key pressed
look in the amstrad key table
key 2 in row 8 = ESC
{..} Function key (numeric keypad).
(..) Joystick 0
[..] Joystick 1
| 0 1 2 3 4 5 6 7
___|__________________________________________________________________
|
0 | UP RIGHT DOWN {9} {6} {3} {ENTER} {.}
|
8 | LEFT COPY {7} {8} {5} {1} {2} {0}
|
16 | CLR [ ENTER ] {4} SHIFT \ CTRL
|
24 | ^ - @ P ; : / .
|
32 | 0 9 O I L K M ,
|
40 | 8 7 U Y H J N SPACE
|
48 | 6 5 R T G F B V
|
| [UP] [DOWN] [LEFT] [RIGHT] [FIRE2] [FIRE1] [SPARE]
|
56 | 4 3 E W S D C X
|
64 | 1 2 ESC Q TAB A CAPS Z
|
72 | (UP) (DOWN) (LEFT) (RIGHT) (FIRE2) (FIRE1) (SPARE) DEL
|
AMSTRAD CPC464/664/6128 FIRMWARE Appendix 1.2