summaryrefslogtreecommitdiff
path: root/src/signetics.h
blob: 8442f11a100d5a5ce20055162a72e60e9cb58273 (plain)
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
//	signetics.h
//	The Apple I came with its own terminal on-board, with a Signetics 2513 character ROM.


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', ':', ';', '<', '=', '>', '?'
};

byte* TerminalShiftRegister;
int TerminalShiftRegisterOffset = 0;

void InitVideo(){
	TerminalShiftRegister = malloc(1024); //maybe 960
}


byte ToAppleASCII(char x){
	if (x < 32 || x > 95)
		return -1;
	if (x >= 64)
		x -= 64;
	return x;
}

byte ToRegularASCII(char x){
	if (x < 32)
		x += 64;
	return x;
}