Sharp PC-1350
La RAM vidéo (Video RAM)
La RAM vidéo du PC-1350 occupe 600 octets découpées
en 20 sections :
The PC-1350's video RAM is 600 octets long, splited in 20 parts :
\|/ poids faible \|/ |
&70 |
&72 |
&74 |
&76 |
&78 |
<- poids fort |
&00 -> &1D |
01 |
05 |
09 |
13 |
17 |
&40 -> &5D |
02 |
06 |
10 |
14 |
18 |
&1E -> &3B |
03 |
07 |
11 |
15 |
19 |
&5E -> &7B |
04 |
08 |
12 |
16 |
20 |
|
Donc, la zone 10 va de &7440 à &745D.
So, the part #10 starts at &7440 and finish at &745D.
|
Les indicateurs sont stockés sur l'octet &783C.
&783C holds the display indicators.
0 |
SHIFT
|
1 |
DEF
|
2 |
P <-> NP
| indicateur fantôme, rien n'apparaît à l'écran
Ghost indicator, nothing is displayed
|
3 |
Reverve
| indicateur fantôme, rien n'apparaît à l'écran
Ghost indicator, nothing is displayed
|
4 |
RUN
|
5 |
PRO
|
6 |
KaNa
|
7 |
SML
|
Scrutage du clavier (Keyboard)
Le clavier est scruté par la routine située en &436. Le résultats se trouve dans l'accu. Si aucune touche n'est appuillée A=&FF
et C=1
. Si plusieurs touches sont appuillées en même temps, A=&40
.
The keyboard is read by &436. The result is stored in the accumulator. A=&FF
and C=1
if no key is pressed, and A=&40
is more than one key is pressed in the same time.
Internal code | Key | Raw reading |
00 | Y | @0/6 |
---|
01 | H | @0/5 |
---|
02 | N | @0/4 |
---|
03 | [DEL] | @0/3 |
---|
04 | [INS] | @0/2 |
---|
05 | | |
---|
06 | U | @1/6 |
---|
07 | J | @1/5 |
---|
08 | M | @1/4 |
---|
09 | [MODE] | @1/3 |
---|
0A | | |
---|
0B | I | @2/6 |
---|
0C | K | @2/5 |
---|
0D | [SPC] | @2/4'RamVideo' |
---|
0E | [CLS] | @2/3 |
---|
0F | O | @3/6 |
---|
|
Internal code | Key | Raw reading |
10 | L | @3/5 |
---|
11 | [ENTER] | @3/4 @4/3 |
---|
12 | P | @4/6 |
---|
13 | = | @4/5 |
---|
14 | Lock | |
---|
15 | [SHIFT] | #0/6 |
---|
16 | [DEF] | #0/5 |
---|
17 | [SML] | #0/4 |
---|
18 | , | #0/3 |
---|
19 | ; | #0/2 |
---|
1A | : | #0/1 |
---|
1B | ) | #0/0 |
---|
1C | Q | #1/6 |
---|
1D | A | #1/5 |
---|
1E | Z | #1/4 |
---|
1F | - | #1/3 |
---|
|
Internal code | Key | Raw reading |
20 | * | #1/2 |
---|
21 | / | #1/1 |
---|
22 | ( | #1/0 |
---|
23 | W | #2/6 |
---|
24 | S | #2/5 |
---|
25 | X | #2/4 |
---|
26 | + | #2/3 |
---|
27 | 3 | #2/2 |
---|
28 | 6 | #2/1 |
---|
29 | 9 | #2/0 |
---|
2A | E | #3/6 |
---|
2B | D | #3/5 |
---|
2C | C | #3/4 |
---|
2D | . | #3/3 |
---|
2E | 2 | #3/2 |
---|
2F | 5 | #3/1 |
---|
|
Internal code | Key | Raw reading |
30 | 8 | #3/0 |
---|
31 | R | #4/6 |
---|
32 | F | #4/5 |
---|
33 | V | #4/4 |
---|
34 | 0 | #4/3 |
---|
35 | 1 | #4/2 |
---|
36 | 4 | #4/1 |
---|
37 | 7 | #4/0 |
---|
38 | T | #5/6 |
---|
39 | G | #5/5 |
---|
3A | B | #5/4 |
---|
3B | [->] | #5/3 |
---|
3C | [<-] | #5/2 |
---|
3D | [\|/] | #5/1 |
---|
3E | [/|\] | #5/0 |
---|
3F | [BRK] | |
---|
|
Si plusieurs touches peuvent être
appuyées en même temps (par exemple dans un jeu), il
faut lire le clavier directement en utilisant les ports.
Évidement, pour diminuer le
nombre de pattes nécessaire au scrutage du clavier, une sorte
de multiplexage est utilisé : le clavier est découpé
en zones que l'on sélectionnent en activant leur bit. Ce bit
est le premier chiffre de 'Raw reading'. Un '#'
indique que le latch situé en &7E00 est utilisé
pour faire se multiplexage. Si elle contient un '@', il faudra
utiliser le port A.
Une fois le latch initialisé, on
peut lire la valeur par un INA . Si la touche est appuyée,
le bit correspondant au second chiffre sera à 1.
Ne pas oublier non plus les retours : par exemple, si port A=&10 et que l'on appuit sur [SPC], INA renvera &04.
|
If many keys can be pressed in the same time (for example, in a game), I/O ports must be used.
To reduce the number of input chanels, the keyboard is multipexed : it's splited in areas that can be selected but setting their bit to 1. This bit is the first number of 'Raw reading'. A '#' means to use the &7E00 latch and with '@', it's the A port.
After setting the latch, the value is read by INA . If the key is pressed, the bit numbered by the second value is set.
|
Testing [SPC] @1/3
|
LIA &04 ; = 2 ^ 2
LIP $5C ; Port A
EXAM
OUTA
NOPT
INA
TSIA &10 ; = 2 ^ 4
...
|
|
Testing [T] #5/6
|
LIA &20 ; = 2 ^ 5
LIDP &7E00
STD
NOPT
INA
TSIA &40 ; = 2 ^ 6
...
|
|