mirror of
https://github.com/MiSTer-devel/PCXT_MiSTer.git
synced 2026-04-19 03:04:47 +00:00
Unstable version: * Hardware interrupts are not executed. * No VHD or SD support. * BASIC ROM execution set in the BIOS, before the OS load routine.
40 lines
844 B
Python
40 lines
844 B
Python
fp = open('splash.txt')
|
|
lines = fp.readlines()
|
|
fp.close()
|
|
|
|
attr = ' 07 ' # char attribute
|
|
cols = 80 # columns
|
|
rows = 25 # rows
|
|
out = ''
|
|
|
|
rows_count = rows
|
|
for line in lines:
|
|
rows_count = rows_count -1
|
|
line = line.replace('\n', '')
|
|
col_count = cols
|
|
for c in line:
|
|
col_count = col_count - 1
|
|
hex_str = hex(ord(c))
|
|
out = out + hex_str.replace('0x', '').upper() + attr
|
|
if col_count == 0:
|
|
break
|
|
while (col_count > 0):
|
|
col_count = col_count - 1
|
|
out = out + '20' + attr
|
|
|
|
if rows_count == 0:
|
|
break
|
|
|
|
while (rows_count > 0):
|
|
rows_count = rows_count -1
|
|
col_count = cols
|
|
while (col_count > 0):
|
|
col_count = col_count - 1
|
|
out = out + '20' + attr
|
|
|
|
out = out.strip()
|
|
|
|
fp = open('splash.hex', 'w+')
|
|
fp.write(out)
|
|
fp.close()
|