Videopac / Odyssey2 forum
October 17, 2021, 05:48:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: If you have some news and you want it to be shown here, pm Janzl!
 
   Home   Help Login Register links videopac.nl  
Pages: [1]   Go Down
  Print  
Author Topic: Key codes  (Read 1365 times)
gertk
Post Axe Pete!
*****
Posts: 866



gertk64
WWW
« on: February 06, 2012, 08:46:40 PM »

For anyone interested:

This is a list of the returned keyboard codes of the G7000
I searched the forum but could not find a list so I derived it from my experiments..


Code:
Videopac G7000 keyboard codes:

code example:

orl p1,#0xbc ; enable luminance, disable COPYMODE, NC, EXRAM, VDC and KEYBOARD
anl p1,#0xbb ; enable KEYBOARD

mov r0,#0xf0 ; preset R0
mov r2,#0x08 ; and R2
call readkey_plus ; scan keyboard plus (0x00BC)
jb7 nokey ; skip if no key pressed (bit 7 is '1')

; register A contains the key code

The returned key codes are (G7000 keyboard)

Key Hex Code Remark
---------------------------------------------
0 0x00 numeric 0
1 0x01 numeric 1
2 0x02 numeric 2
3 0x03 numeric 3
4 0x04 numeric 4
5 0x05 numeric 5
6 0x06 numeric 6
7 0x07 numeric 7
8 0x08 numeric 8
9 0x09 numeric 9

+ 0x10 plus
- 0x28 minus
x 0x29 multiply
/ 0x2A divide symbol
= 0x2B equal sign
YES 0x2C yes (equal to Y key)
NO 0x2D no (equal to N key)
CLEAR 0x2E clear
ENTER 0x2F enter

Q 0x18 q
W 0x11 w
E 0x12 e
R 0x13 r
T 0x14 t
Y 0x2C y
U 0x15 u
I 0x16 i
O 0x17 o
P 0x0F p

A 0x20 a
S 0x19 s
D 0x1A d
F 0x1B f
G 0x1C g
H 0x1D h
J 0x1E j
K 0x1F k
L 0x0E l

Z 0x21 z
X 0x22 x
C 0x23 c
V 0x24 v
B 0x25 b
N 0x2D n
M 0x26 m
. 0x27 dot
? 0x0D question mark

SPACE 0x0C space


BTW, is it safe to always use the readkey_plus call even on a G7000/Odyssey2/Jopac ? (I did not check the Bios disassembly yet)
It seems to work alright on the ol' G7000  Smiley
Logged

>>G7000 G7200(P+S) G7400 N60 JET27 VG5000 ZX80 ZX81 ORIC-1 COMX35 Aquarius<<
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!