forked from jotego/jtcores
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjtgng_msg.py
More file actions
executable file
·89 lines (78 loc) · 3.13 KB
/
jtgng_msg.py
File metadata and controls
executable file
·89 lines (78 loc) · 3.13 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/python
# Message in the pause menu
import os
ascii_conv = {
'0':0, '1':1, '2':2, '3':3, '4':4, '5':5,
'6':6, '7':7, '8':8, '9':9,
'a':0x61, 'b':0x62, 'c':0x63, 'd':0x64, 'e':0x65, 'f':0x66,
'g':0x67, 'h':0x68, 'i':0x69, 'j':0x6a, 'k':0x6b, 'l':0x6c,
'm':0x6d, 'n':0x6e, 'o':0x6f, 'p':0x70, 'q':0x71, 'r':0x72,
's':0x73, 't':0x74, 'u':0x75, 'v':0x76, 'w':0x77, 'x':0x78,
'y':0x79, 'z':0x7a, '.':0x2e, '-':0x2d, '&':0x26, '?':0x3f,
'!':0x21, '%':0x25, '(':0x28, ')':0x29, '#':0x23, ',':0x2c,
'+':0x2b, ':':0x3a, '/':0x2f, '=':0x3d, '*':0x2a, "'":0x27,
'A':0x41, 'B':0x42, 'C':0x43, 'D':0x44, 'E':0x45, 'F':0x46,
'G':0x47, 'H':0x48, 'I':0x49, 'J':0x4a, 'K':0x4b, 'L':0x4c,
'M':0x4d, 'N':0x4e, 'O':0x4f, 'P':0x50, 'Q':0x51, 'R':0x52,
'S':0x53, 'T':0x54, 'U':0x55, 'V':0x56, 'W':0x57, 'X':0x58,
'Y':0x59, 'Z':0x5a,
' ':0x20
}
char_ram = [ 0x20 for x in range(0x400) ]
row=0
def save_hex(filename, data):
with open(filename,"w") as f:
for k in data:
f.write( "%X" % k )
f.write( "\n" )
f.close()
def save_bin(filename, data):
with open(filename,"wb") as f:
f.write( bytearray(data) )
f.close()
def print_char( msg ):
global row
pos = row
for a in msg:
char_ram[pos] = ascii_conv[a]
pos = pos+1
row = row+32
r_g = [ 0 for x in range(256) ]
blue = [ 0 for x in range(256) ]
for col in range(256):
r_g [col] = (col%8)| 0x80 | ((col%8)<<4)
blue [col] = col%16
# 00000000001111111111222222222233
# 01234567890123456789012345678901
print_char(" ") # non visible
print_char(" ") # non visible
print_char(" G&G clone for FPGA ")
print_char(" brought to you by jotego. ")
print_char(" http://patreon.com/topapate ")
print_char(" ")
print_char(" Thanks to Scralings & ")
print_char(" ")
print_char(" Andrew Moore ")
print_char(" Blackstar ")
print_char(" Bruno Silva ")
print_char(" Carlos Hasan ")
print_char(" Don Gafford ")
print_char(" Juri Fossaroli - area64.eu ")
print_char(" Michael's Workshop ")
print_char(" Oscar Laguna Garcia ")
print_char(" SmokeMonster - YouTube channel ")
print_char(" Suvodip Mitra ")
print_char(" Sweetlilmre ")
print_char(" Ultrarobotninja ")
print_char(" www.arcadexpress.com ")
print_char(" ")
print_char(" Hardware support from: ")
print_char(" Manuferhi ")
print_char(" Antonio Villena ")
print_char(" Ricardo Saraiva-Retroshop.pt ")
print_char(" ")
print_char(" Greetings to ")
print_char(" Alexey Melnikov! ")
print_char(" and Szombathelyi Gyorgy ")
save_hex( os.environ['JTROOT']+"/cores/gng/mist/msg.hex", char_ram )
save_bin( os.environ['JTROOT']+"/cores/gng/ver/game/msg.bin", char_ram )