1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// signetics.h
// Signetics refers to the various Signetics brand chips which the Apple I came with, including a character ROM, and a shift-register based video memory.
#include"../cpu/core.h"
#include"stdlib.h"
const byte CharacterROM[0x40] = {
'@' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' ,
'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' , 'Y' , 'Z' , '[' , '\\', ']' , '^' , '_' ,
' ' , '!' , '"' , '#' , '$' , '%' , '&' , '\'', '(' , ')' , '*' , '+' , ',' , '-' , '.' , '/' ,
'0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , ':' , ';' , '<' , '=' , '>' , '?'
};
const byte* TerminalShiftRegister;
byte* TerminalShiftRegisterPosition;
int TerminalShiftRegisterOffset;
byte ToAppleASCII(char x)
{
if (x < 0x20 || x >= 0x60)
return -1;
if (x >= 0x40)
x -= 0x40;
return x;
}
byte ToRegularASCII(char x)
{
if (x < 0x20)
x += 0x40;
return x;
}
|