mirror of
https://github.com/MiSTer-devel/Main_MiSTer.git
synced 2026-04-26 03:04:51 +00:00
* WIP Adding Atari800 side of things * WIP Migrated some functionality from .sv to here * WIP XEX file loading works, clean-ups * WIP UART/SIO interface beginning * WIP Adding Atari800 drive emulator * WIP First version of the drive emulator working with ATR and XEX files * WIP ATX files are working * WIP HDD is now mounted separately * WIP PBI/HDD is working too * Cleaning up and adding supporting Atari ASM files * Updated versioning information in the Atari800 FW * WIP Adding support for the Atari 5200 core * Atari 5200 support complete * Atari800: fixed SIO timing bugs * Atari800: sorting out SIO timing issues still * Atari800: eliminate OSD lock up possibilities * Atari800: Improved XEX loader
41 lines
638 B
Python
41 lines
638 B
Python
#!/usr/bin/python3
|
|
|
|
f = open("xex_loader.o65", "rb")
|
|
loader = f.read()
|
|
f.close()
|
|
|
|
s = "const static uint8_t xex_loader[] =\n{\n\t"
|
|
|
|
i = 0
|
|
for b in loader:
|
|
s += f"0x{b:02X},"
|
|
i += 1
|
|
if i == len(loader):
|
|
s = s[:-1]
|
|
if i % 16 == 0:
|
|
s += "\n\t"
|
|
|
|
if i % 16 != 0:
|
|
s += "\n"
|
|
else:
|
|
s = s[:-1]
|
|
|
|
s += "};\n\n"
|
|
|
|
f = open("xex_loader.lab", "rt")
|
|
l = f.read().split("\n")
|
|
f.close()
|
|
|
|
for ll in l:
|
|
if ll[:11] == "read_status":
|
|
read_status = ll[17:19]
|
|
elif ll[:5] == "init1":
|
|
init1 = ll[11:13]
|
|
|
|
s += f"#define XEX_READ_STATUS 0x{read_status}\n"
|
|
s += f"#define XEX_INIT1 0x{init1}\n\n"
|
|
|
|
f = open("xex_loader.h", "wt")
|
|
f.write(s)
|
|
f.close()
|