18 lines
506 B
Python
18 lines
506 B
Python
"""Build a Commodore VIC-20 autostart cartridge (.a0) from a conversion."""
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
|
|
from .viewer import assemble
|
|
|
|
_EXTS = (".a0", ".crt", ".bin", ".rom")
|
|
|
|
|
|
def export_a0(conv, output_path, source_path=None, display="forever",
|
|
seconds=0, video="ntsc"):
|
|
if not output_path.lower().endswith(_EXTS):
|
|
output_path += ".a0"
|
|
rom = assemble.build_cart(conv.data)
|
|
with open(output_path, "wb") as f:
|
|
f.write(rom)
|
|
return output_path
|