12 lines
460 B
Python
12 lines
460 B
Python
"""Build an Atari 2600 cartridge (.a26) from a conversion."""
|
|
from __future__ import annotations
|
|
from .viewer.assemble import build_cart
|
|
|
|
|
|
def export_a26(conv, output_path, source_path=None, display="forever", seconds=0):
|
|
if not output_path.lower().endswith((".a26", ".bin")):
|
|
output_path += ".a26"
|
|
rom = build_cart(conv.data, display=display, seconds=seconds)
|
|
with open(output_path, "wb") as f:
|
|
f.write(rom)
|
|
return output_path
|