17 lines
580 B
Python
17 lines
580 B
Python
"""Build an Atari 5200 cartridge (.a52) from a conversion."""
|
|
from __future__ import annotations
|
|
|
|
from .viewer import assemble
|
|
|
|
_EXTS = (".a52", ".bin", ".car", ".rom")
|
|
|
|
|
|
def export_a52(conv, output_path, source_path=None, display="forever",
|
|
seconds=0, video="ntsc"):
|
|
if not output_path.lower().endswith(_EXTS):
|
|
output_path += ".a52"
|
|
rom = assemble.build_cart(conv.mode, bytes(conv.data), display=display,
|
|
seconds=seconds, video=video)
|
|
with open(output_path, "wb") as f:
|
|
f.write(rom)
|
|
return output_path
|