15 lines
596 B
Python
15 lines
596 B
Python
"""Build a TI-99/4A cartridge (.rpk) from a conversion."""
|
|
from __future__ import annotations
|
|
import os
|
|
from . import cartridge
|
|
|
|
|
|
def export_rpk(conv, output_path, source_path=None, display="forever",
|
|
seconds=0, video="ntsc"):
|
|
if not output_path.lower().endswith(".rpk"):
|
|
output_path += ".rpk"
|
|
title = os.path.splitext(os.path.basename(source_path or output_path))[0]
|
|
rom = cartridge.build_rom(conv.data, title, display=display,
|
|
seconds=seconds, video=video)
|
|
cartridge.write_rpk(rom, output_path, title)
|
|
return output_path
|