-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakep234fonts.py
45 lines (41 loc) · 1.28 KB
/
makep234fonts.py
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
36
37
38
39
40
41
42
43
44
p1fonts = (
( 0x00, 0x04, 0x11, 0x11, 0x15, 0x11, 0x11, 0x11 ),
(0x00, 0x14, 0x11, 0x11, 0x15, 0x11, 0x11, 0x14 ),
(0x00, 0x05, 0x10, 0x10, 0x10, 0x10, 0x10, 0x05 ),
(0x00, 0x14, 0x11, 0x11, 0x11, 0x11, 0x11, 0x14 ),
(0x00, 0x05, 0x10, 0x10, 0x15, 0x10, 0x10, 0x05 ),
(0x00, 0x05, 0x10, 0x10, 0x15, 0x10, 0x10, 0x10 ),
)
# Player 2
for c in p1fonts:
nd = []
for d in c:
dp = 0
if d & 0x40 != 0:
dp = dp + 0x80
if d & 0x10 != 0:
dp = dp + 0x20
if d & 0x04 != 0:
dp = dp + 0x08
if d & 0x01 != 0:
dp = dp + 0x02
nd.append(dp)
nd[0] = 0
print('{ 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X }, ' % (nd[0], nd[1], nd[2], nd[3], nd[4], nd[5], nd[6], nd[7]))
print()
# Player 3/4
for c in p1fonts:
nd = []
for d in c:
dp = 0
if d & 0x40 != 0:
dp = dp + 0xc0
if d & 0x10 != 0:
dp = dp + 0x30
if d & 0x04 != 0:
dp = dp + 0x0c
if d & 0x01 != 0:
dp = dp + 0x03
nd.append(dp)
nd[0] = 0
print('{ 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X }, ' % (nd[0], nd[1], nd[2], nd[3], nd[4], nd[5], nd[6], nd[7]))