In finishing off the last bits of of my Casio Prizm tank game, Prizm Obliterate 1.0 tonight, I tried out the following routine, and got some useful info:
Code:
Arguments:
- column and row are pointers to ints
- type_of_waiting: 0 to wait for a keypress and ignore the timeout argument, 1 to return immediately regardless of keypresses, and 2 to wait for either a timer expiration or key, whichever comes first
- timeout: seconds!
- menu: 0 to make the [MENU] key invoke the menu, 1 to make it return a code
- keycode: more or less irrelevant unless you injected a keycode for GetKey()
Keycodes:
In the form key: col, row
F1: 7,10
F2: 6,10
F3: 5,10
F4: 4,10
F5: 3,10
F6: 2,10
SHIFT: 7,9
OPTN: 6,9
VARS: 5,9
MENU: (?) 4,9
UP: 2,9
LEFT: 3,9
RIGHT: 2,8
DOWN: 3, 8
ALPHA: 7, 8
X^2: 6, 8
^: 5,8
EXIT: 4,8
X,Theta,T through tan: row 7, columns 765432
a b/c: row 6, columns 765432
7, 8, 9, DEL: row 5, columns 7654
4, 5, 6, times, div: row 4, columns 76543
1, 2, 3, plus, minus: row 3, columns 76543
0, ., EXP, (-), EXE: row 2, columns 76543
AC/ON: row 1, column 1
Code:
GetKeyWait_OS(int*column, int*row, int type_of_waiting, int timeout_period, int menu, unsigned short*keycode );
Arguments:
- column and row are pointers to ints
- type_of_waiting: 0 to wait for a keypress and ignore the timeout argument, 1 to return immediately regardless of keypresses, and 2 to wait for either a timer expiration or key, whichever comes first
- timeout: seconds!
- menu: 0 to make the [MENU] key invoke the menu, 1 to make it return a code
- keycode: more or less irrelevant unless you injected a keycode for GetKey()
Keycodes:
In the form key: col, row
F1: 7,10
F2: 6,10
F3: 5,10
F4: 4,10
F5: 3,10
F6: 2,10
SHIFT: 7,9
OPTN: 6,9
VARS: 5,9
MENU: (?) 4,9
UP: 2,9
LEFT: 3,9
RIGHT: 2,8
DOWN: 3, 8
ALPHA: 7, 8
X^2: 6, 8
^: 5,8
EXIT: 4,8
X,Theta,T through tan: row 7, columns 765432
a b/c: row 6, columns 765432
7, 8, 9, DEL: row 5, columns 7654
4, 5, 6, times, div: row 4, columns 76543
1, 2, 3, plus, minus: row 3, columns 76543
0, ., EXP, (-), EXE: row 2, columns 76543
AC/ON: row 1, column 1