recarted 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- recarted/__init__.py +1 -0
- recarted/atx.py +125 -0
- recarted/capture.py +127 -0
- recarted/cli.py +99 -0
- recarted/convert.py +85 -0
- recarted/example.py +42 -0
- recarted/images.py +219 -0
- recarted/loaders/disk.bin +0 -0
- recarted/loaders/memory.bin +0 -0
- recarted-0.2.0.dist-info/METADATA +91 -0
- recarted-0.2.0.dist-info/RECORD +14 -0
- recarted-0.2.0.dist-info/WHEEL +4 -0
- recarted-0.2.0.dist-info/entry_points.txt +3 -0
- recarted-0.2.0.dist-info/licenses/LICENSE +21 -0
recarted/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""ReCarted! Atari 8-bit image inspection and conversion."""
|
recarted/atx.py
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"""ATX v1 track inspection. Never resolve a duplicate or invent a sector."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from struct import unpack_from
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@dataclass(frozen=True)
|
|
8
|
+
class Track:
|
|
9
|
+
number: int
|
|
10
|
+
# ID, controller status, track-relative data offset (0 = no data)
|
|
11
|
+
headers: list[tuple[int, int, int]]
|
|
12
|
+
block: memoryview
|
|
13
|
+
data_end: int
|
|
14
|
+
flags: int
|
|
15
|
+
extensions: bool
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def tracks(data: bytes) -> list[Track]:
|
|
19
|
+
if len(data) < 48 or data[:4] != b"AT8X":
|
|
20
|
+
raise ValueError("Truncated or invalid ATX header.")
|
|
21
|
+
version, minimum = unpack_from("<HH", data, 4)
|
|
22
|
+
if version != 1 or minimum > 1:
|
|
23
|
+
raise ValueError(f"Unsupported ATX version {version} (minimum {minimum}).")
|
|
24
|
+
pos, end = unpack_from("<II", data, 28)
|
|
25
|
+
if end == 0:
|
|
26
|
+
end = len(data)
|
|
27
|
+
if not 48 <= pos < end <= len(data):
|
|
28
|
+
raise ValueError("Invalid ATX track-data bounds.")
|
|
29
|
+
result = []
|
|
30
|
+
while pos < end:
|
|
31
|
+
if pos + 32 > end:
|
|
32
|
+
raise ValueError("Truncated ATX track header.")
|
|
33
|
+
size, kind = unpack_from("<IH", data, pos)
|
|
34
|
+
count = unpack_from("<H", data, pos + 10)[0]
|
|
35
|
+
flags, header = unpack_from("<II", data, pos + 16)
|
|
36
|
+
if kind or not 32 <= header <= size or pos + size > end:
|
|
37
|
+
raise ValueError("Invalid ATX track record.")
|
|
38
|
+
block = memoryview(data)[pos : pos + size]
|
|
39
|
+
q = header
|
|
40
|
+
headers = None
|
|
41
|
+
data_span = None
|
|
42
|
+
extensions = False
|
|
43
|
+
while q + 8 <= size:
|
|
44
|
+
length, tag = unpack_from("<IB", block, q)
|
|
45
|
+
if not length:
|
|
46
|
+
if q + 8 != size:
|
|
47
|
+
raise ValueError("Unexpected bytes after ATX track terminator.")
|
|
48
|
+
break
|
|
49
|
+
if length < 8 or q + length > size:
|
|
50
|
+
raise ValueError("Invalid ATX track chunk length.")
|
|
51
|
+
if tag == 1:
|
|
52
|
+
if headers is not None or length != 8 + count * 8:
|
|
53
|
+
raise ValueError("Invalid ATX sector list.")
|
|
54
|
+
headers = []
|
|
55
|
+
for i in range(count):
|
|
56
|
+
sector, status, _, offset = unpack_from(
|
|
57
|
+
"<BBHI", block, q + 8 + i * 8
|
|
58
|
+
)
|
|
59
|
+
headers.append((sector, status, offset))
|
|
60
|
+
elif tag == 0:
|
|
61
|
+
if data_span is not None:
|
|
62
|
+
raise ValueError("Multiple ATX sector-data chunks not supported.")
|
|
63
|
+
data_span = (q + 8, q + length)
|
|
64
|
+
else:
|
|
65
|
+
extensions = True # weak/extended sectors, etc.
|
|
66
|
+
q += length
|
|
67
|
+
else:
|
|
68
|
+
raise ValueError("Missing ATX track terminator.")
|
|
69
|
+
if headers is None:
|
|
70
|
+
raise ValueError("Missing ATX sector list.")
|
|
71
|
+
for _, _, offset in headers:
|
|
72
|
+
if offset and not (data_span and data_span[0] <= offset < data_span[1]):
|
|
73
|
+
raise ValueError("ATX sector points outside its data chunk.")
|
|
74
|
+
result.append(
|
|
75
|
+
Track(
|
|
76
|
+
block[8],
|
|
77
|
+
headers,
|
|
78
|
+
block,
|
|
79
|
+
data_span[1] if data_span else 0,
|
|
80
|
+
flags,
|
|
81
|
+
extensions,
|
|
82
|
+
)
|
|
83
|
+
)
|
|
84
|
+
pos += size
|
|
85
|
+
return result
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def description(records: list[Track]) -> str:
|
|
89
|
+
errors = duplicates = total = 0
|
|
90
|
+
seen = set()
|
|
91
|
+
for track in records:
|
|
92
|
+
for sector, status, _ in track.headers:
|
|
93
|
+
key = (track.number, sector)
|
|
94
|
+
duplicates += key in seen
|
|
95
|
+
seen.add(key)
|
|
96
|
+
errors += status != 0
|
|
97
|
+
total += 1
|
|
98
|
+
return f"ATX v1: {len(records)} tracks, {total} sector records, {duplicates} duplicate IDs, {errors} flagged records."
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def linear_sd_disk(data: bytes, track_count: int) -> bytes:
|
|
102
|
+
"""Used only on allowlisted complete 18-sector single-density tracks."""
|
|
103
|
+
sectors: dict[int, memoryview] = {}
|
|
104
|
+
for track in tracks(data):
|
|
105
|
+
if (
|
|
106
|
+
track.flags
|
|
107
|
+
or track.extensions
|
|
108
|
+
or track.number >= track_count
|
|
109
|
+
or len(track.headers) != 18
|
|
110
|
+
):
|
|
111
|
+
raise ValueError("Unexpected ATX geometry for this recipe.")
|
|
112
|
+
for sector, status, offset in track.headers:
|
|
113
|
+
key = track.number * 18 + sector
|
|
114
|
+
if (
|
|
115
|
+
status
|
|
116
|
+
or not 1 <= sector <= 18
|
|
117
|
+
or key in sectors
|
|
118
|
+
or not offset
|
|
119
|
+
or offset + 128 > track.data_end
|
|
120
|
+
):
|
|
121
|
+
raise ValueError("Cannot map this ATX sector losslessly.")
|
|
122
|
+
sectors[key] = track.block[offset : offset + 128]
|
|
123
|
+
if len(sectors) != track_count * 18:
|
|
124
|
+
raise ValueError("Incomplete ATX disk.")
|
|
125
|
+
return b"".join(sectors[i] for i in range(1, len(sectors) + 1))
|
recarted/capture.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"""Let a known disk's own loader run in Atari800. Never execute unknown ATX images."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import shutil
|
|
5
|
+
import subprocess
|
|
6
|
+
import tempfile
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from hashlib import sha256
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(frozen=True)
|
|
13
|
+
class Capture:
|
|
14
|
+
title: str
|
|
15
|
+
disk_sha256: str
|
|
16
|
+
entry: int
|
|
17
|
+
code_sha256: str # 128 bytes of loaded code at the hand-off
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
CAPTURES = (
|
|
21
|
+
Capture(
|
|
22
|
+
"The Tail of Beta Lyrae",
|
|
23
|
+
"51ae8054c0acb775aa4f2805445750ec5cc6e3f3294d6137f95e5bd32f69e2f3",
|
|
24
|
+
0x4E8D,
|
|
25
|
+
"197c236b59c8cb5c5524896463b23ef2cfc5df5fe14c7665c7a04674b9d842c3",
|
|
26
|
+
),
|
|
27
|
+
Capture(
|
|
28
|
+
"Bruce Lee",
|
|
29
|
+
"781081a971950cfcf5573341311bd6396abf5a9ce08124649edea66b00d5bf78",
|
|
30
|
+
0x0418,
|
|
31
|
+
"d46fba5c0e3fc344d1ef63c5708c61634367c2ffea80254757660780146a508b",
|
|
32
|
+
),
|
|
33
|
+
)
|
|
34
|
+
OS_REV2 = "a77050b2d81db2d11eaa3dbafd8ec2531b478abcc3bcc4b0d846b634e885edb1"
|
|
35
|
+
LOAD = 0x0400
|
|
36
|
+
END = 0xC000
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def capture_program(disk: bytes, os_rom: Path | None) -> tuple[bytes, int]:
|
|
40
|
+
digest = sha256(disk).hexdigest()
|
|
41
|
+
spec = next((s for s in CAPTURES if s.disk_sha256 == digest), None)
|
|
42
|
+
if spec is None:
|
|
43
|
+
raise ValueError("No verified emulator hand-off for this ATX revision.")
|
|
44
|
+
if os_rom is None or not os_rom.is_file():
|
|
45
|
+
raise ValueError(
|
|
46
|
+
"This ATX needs Atari800 and --os-rom pointing to your stock Atari XL/XE OS revision 2 ROM."
|
|
47
|
+
)
|
|
48
|
+
with os_rom.open("rb") as stream:
|
|
49
|
+
rom = stream.read(16385)
|
|
50
|
+
if sha256(rom).hexdigest() != OS_REV2:
|
|
51
|
+
raise ValueError(
|
|
52
|
+
"Unrecognized OS ROM: this recipe requires the 16 KiB stock Atari XL/XE OS revision 2."
|
|
53
|
+
)
|
|
54
|
+
emulator = shutil.which("atari800")
|
|
55
|
+
if not emulator:
|
|
56
|
+
raise ValueError(
|
|
57
|
+
"Install Atari800 (with the text monitor) to convert this ATX."
|
|
58
|
+
)
|
|
59
|
+
with tempfile.TemporaryDirectory(prefix="recarted-") as tmp:
|
|
60
|
+
root = Path(tmp)
|
|
61
|
+
source = root / "disk.atx"
|
|
62
|
+
source.write_bytes(disk)
|
|
63
|
+
source.chmod(0o444)
|
|
64
|
+
(root / "xl.rom").write_bytes(rom)
|
|
65
|
+
(root / "private.cfg").write_text("Atari 800 Emulator, Version 5.2.0\n")
|
|
66
|
+
cmd = [
|
|
67
|
+
emulator,
|
|
68
|
+
"-config",
|
|
69
|
+
"private.cfg",
|
|
70
|
+
"-no-autosave-config",
|
|
71
|
+
"-monitor",
|
|
72
|
+
"-xl",
|
|
73
|
+
"-ntsc",
|
|
74
|
+
"-nobasic",
|
|
75
|
+
"-nopatchall",
|
|
76
|
+
"-xlxe_rom",
|
|
77
|
+
"xl.rom",
|
|
78
|
+
"-no-video-accel",
|
|
79
|
+
"-nosound",
|
|
80
|
+
"-turbo",
|
|
81
|
+
"disk.atx",
|
|
82
|
+
]
|
|
83
|
+
# Every monitor command and filename is ours, not derived from a user path.
|
|
84
|
+
commands = (
|
|
85
|
+
f"bpc {spec.entry:04x}\ncont\nwrite {LOAD:x} {END - 1:x} game.bin\nquit\n"
|
|
86
|
+
)
|
|
87
|
+
env = {
|
|
88
|
+
**os.environ,
|
|
89
|
+
"HOME": tmp,
|
|
90
|
+
"SDL_VIDEODRIVER": "dummy",
|
|
91
|
+
"SDL_AUDIODRIVER": "dummy",
|
|
92
|
+
}
|
|
93
|
+
try:
|
|
94
|
+
with (root / "monitor.log").open("w+b") as log:
|
|
95
|
+
result = subprocess.run(
|
|
96
|
+
cmd,
|
|
97
|
+
cwd=tmp,
|
|
98
|
+
env=env,
|
|
99
|
+
input=commands.encode("ascii"),
|
|
100
|
+
stdout=log,
|
|
101
|
+
stderr=subprocess.STDOUT,
|
|
102
|
+
timeout=30,
|
|
103
|
+
check=False,
|
|
104
|
+
)
|
|
105
|
+
log.seek(0)
|
|
106
|
+
transcript = log.read(65536).lower()
|
|
107
|
+
except subprocess.TimeoutExpired as exc:
|
|
108
|
+
raise ValueError(
|
|
109
|
+
"Timed out waiting for the ATX loader. Use an Atari800 build with the text monitor (tested: 5.2.0)."
|
|
110
|
+
) from exc
|
|
111
|
+
dump = root / "game.bin"
|
|
112
|
+
if (
|
|
113
|
+
result.returncode
|
|
114
|
+
or f"(breakpoint at {spec.entry:04x})".encode() not in transcript
|
|
115
|
+
or not dump.is_file()
|
|
116
|
+
or dump.stat().st_size != END - LOAD
|
|
117
|
+
):
|
|
118
|
+
raise ValueError(
|
|
119
|
+
"Atari800 did not reach the verified ATX hand-off. Check that it has the text monitor (tested: 5.2.0)."
|
|
120
|
+
)
|
|
121
|
+
body = dump.read_bytes()
|
|
122
|
+
i = spec.entry - LOAD
|
|
123
|
+
if sha256(body[i : i + 128]).hexdigest() != spec.code_sha256:
|
|
124
|
+
raise ValueError(
|
|
125
|
+
"Unexpected program at the ATX hand-off; refusing to build a cartridge."
|
|
126
|
+
)
|
|
127
|
+
return body, spec.entry
|
recarted/cli.py
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"""Installed entry point for the ReCarted! CLI."""
|
|
2
|
+
|
|
3
|
+
import shutil
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
from importlib.metadata import version
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
from cyclopts import App
|
|
10
|
+
|
|
11
|
+
from .convert import convert_image, save_new
|
|
12
|
+
from .example import example_image
|
|
13
|
+
from .images import RECIPES, identify, read_input
|
|
14
|
+
|
|
15
|
+
app = App(
|
|
16
|
+
name="recarted",
|
|
17
|
+
help="ReCarted! Atari 8-bit cassette and floppy converter for A8PicoCart.",
|
|
18
|
+
version=version("recarted"),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@app.command
|
|
23
|
+
def inspect(source: Path) -> None:
|
|
24
|
+
"""Identify an image by content and check for a conversion recipe."""
|
|
25
|
+
image = identify(read_input(source))
|
|
26
|
+
print(f"{source.name}: {image.medium}. {image.detail}")
|
|
27
|
+
if image.recipe:
|
|
28
|
+
print(f"Matched: {image.recipe.name}. Output: A8PicoCart type 41 (128 KiB).")
|
|
29
|
+
if image.recipe.loader == "capture":
|
|
30
|
+
print("Conversion needs Atari800 and --os-rom (stock XL/XE OS revision 2).")
|
|
31
|
+
elif image.medium in ("ATR", "CAS", "ATX"):
|
|
32
|
+
print("No matching recipe; this revision cannot be converted yet.")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@app.command
|
|
36
|
+
def recipes() -> None:
|
|
37
|
+
"""List known cassette and disk recipes and their output formats."""
|
|
38
|
+
for recipe in RECIPES:
|
|
39
|
+
formats = {
|
|
40
|
+
"disk": "CAR (read-only virtual disk)",
|
|
41
|
+
"capture": "CAR (Atari800 + XL/XE OS rev. 2 required)",
|
|
42
|
+
}.get(recipe.loader, "CAR or XEX")
|
|
43
|
+
print(f"{recipe.medium} {recipe.name}: {formats}")
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@app.command
|
|
47
|
+
def convert(
|
|
48
|
+
source: Path, *, output: Path | None = None, os_rom: Path | None = None
|
|
49
|
+
) -> None:
|
|
50
|
+
"""Convert to a new cartridge. Some ATX recipes need a stock XL/XE OS via --os-rom."""
|
|
51
|
+
image = identify(read_input(source))
|
|
52
|
+
out = output if output is not None else source.with_suffix(".car")
|
|
53
|
+
artifact = convert_image(image, out.suffix.lower().lstrip("."), os_rom=os_rom)
|
|
54
|
+
save_new(out, artifact)
|
|
55
|
+
print(f"Created {out} ({len(artifact):,} bytes).")
|
|
56
|
+
if image.recipe and image.recipe.loader == "disk":
|
|
57
|
+
print(
|
|
58
|
+
"The virtual disk is read-only; use a writable disk setup to save changes."
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@app.command
|
|
63
|
+
def example(output: Path) -> None:
|
|
64
|
+
"""Create an original colour-bar demo tape (.cas) or disk (.atr or .atx) to try."""
|
|
65
|
+
save_new(output, example_image(output.suffix.lower().lstrip(".")))
|
|
66
|
+
print(f"Created {output}. Now run recarted convert on this file.")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@app.command
|
|
70
|
+
def test(car: Path, *, os_rom: Path | None = None) -> None:
|
|
71
|
+
"""Open a type-41 CAR interactively in Atari800; judge the result on screen."""
|
|
72
|
+
image = identify(read_input(car))
|
|
73
|
+
if image.mapper != 41:
|
|
74
|
+
raise ValueError("test expects a type-41 .car. Convert your input first.")
|
|
75
|
+
emulator = shutil.which("atari800")
|
|
76
|
+
if not emulator:
|
|
77
|
+
raise ValueError(
|
|
78
|
+
"Install Atari800 to use test; conversion does not need an emulator."
|
|
79
|
+
)
|
|
80
|
+
cmd = [emulator, "-no-autosave-config", "-xl", "-pal", "-nobasic", "-nopatchall"]
|
|
81
|
+
if os_rom is not None:
|
|
82
|
+
if not os_rom.is_file() or os_rom.stat().st_size != 16384:
|
|
83
|
+
raise ValueError("Expected a 16 KiB XL/XE OS ROM file.")
|
|
84
|
+
cmd += ["-xlxe_rom", str(os_rom.resolve())]
|
|
85
|
+
print(
|
|
86
|
+
"Starting Atari800; this is an interactive check, not a hardware certification.",
|
|
87
|
+
flush=True,
|
|
88
|
+
)
|
|
89
|
+
result = subprocess.run([*cmd, "-cart", str(car.resolve())], check=False)
|
|
90
|
+
if result.returncode:
|
|
91
|
+
raise ValueError(f"Atari800 exited with status {result.returncode}.")
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def main() -> None:
|
|
95
|
+
try:
|
|
96
|
+
app()
|
|
97
|
+
except (ValueError, OSError) as exc:
|
|
98
|
+
print(f"recarted: {exc}", file=sys.stderr)
|
|
99
|
+
raise SystemExit(1) from exc
|
recarted/convert.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""Package recognized payloads with ReCarted's own 6502 loaders."""
|
|
2
|
+
|
|
3
|
+
from importlib.resources import files
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from struct import pack
|
|
6
|
+
|
|
7
|
+
from .capture import LOAD, capture_program
|
|
8
|
+
from .images import Image
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def save_new(path: Path, contents: bytes) -> None:
|
|
12
|
+
try:
|
|
13
|
+
stream = path.open("xb")
|
|
14
|
+
except FileExistsError as exc:
|
|
15
|
+
raise ValueError(
|
|
16
|
+
f"Will not overwrite {path}. Choose a new output filename."
|
|
17
|
+
) from exc
|
|
18
|
+
try:
|
|
19
|
+
with stream:
|
|
20
|
+
stream.write(contents)
|
|
21
|
+
except OSError:
|
|
22
|
+
path.unlink(missing_ok=True)
|
|
23
|
+
raise
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def segment(addr: int, data: bytes) -> bytes:
|
|
27
|
+
return pack("<HH", addr, addr + len(data) - 1) + data
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def convert_image(
|
|
31
|
+
image: Image, kind: str = "car", *, os_rom: Path | None = None
|
|
32
|
+
) -> bytes:
|
|
33
|
+
recipe = image.recipe
|
|
34
|
+
if recipe is None:
|
|
35
|
+
raise ValueError(
|
|
36
|
+
f"No conversion recipe for this {image.medium}. No file written. Run recarted recipes to see supported revisions."
|
|
37
|
+
)
|
|
38
|
+
if kind not in ("car", "xex"):
|
|
39
|
+
raise ValueError("Choose .car or .xex as the output extension.")
|
|
40
|
+
payload = image.payload
|
|
41
|
+
loader = "memory"
|
|
42
|
+
if recipe.loader == "disk":
|
|
43
|
+
if kind != "car":
|
|
44
|
+
raise ValueError(
|
|
45
|
+
"This program reads sectors after startup. Choose a .car output, not .xex."
|
|
46
|
+
)
|
|
47
|
+
loader = "disk"
|
|
48
|
+
params = payload[2:4] + payload[1:2]
|
|
49
|
+
else:
|
|
50
|
+
if recipe.loader == "capture":
|
|
51
|
+
if kind != "car":
|
|
52
|
+
raise ValueError("This ATX recipe produces a .car, not an .xex.")
|
|
53
|
+
payload, run = capture_program(payload, os_rom)
|
|
54
|
+
load, casini = LOAD, 0
|
|
55
|
+
elif recipe.loader == "bruce":
|
|
56
|
+
# The first sector is the disk reader; the next $7400 bytes are
|
|
57
|
+
# relocated to $0400 by the original final-stage loader.
|
|
58
|
+
payload = payload[128 : 128 + 0x7400]
|
|
59
|
+
load, run, casini = 0x400, 0x400, 0
|
|
60
|
+
else:
|
|
61
|
+
load = int.from_bytes(payload[2:4], "little")
|
|
62
|
+
casini = int.from_bytes(payload[4:6], "little")
|
|
63
|
+
run = load + 6
|
|
64
|
+
if not (0x400 <= load and load + len(payload) <= 0xC000):
|
|
65
|
+
raise ValueError("Program is outside supported Atari RAM.")
|
|
66
|
+
if kind == "xex":
|
|
67
|
+
return (
|
|
68
|
+
b"\xff\xff"
|
|
69
|
+
+ segment(load, payload)
|
|
70
|
+
+ segment(9, b"\x02")
|
|
71
|
+
+ segment(0x244, b"\0")
|
|
72
|
+
+ segment(0x0C, pack("<H", casini))
|
|
73
|
+
+ segment(0x2E0, pack("<H", run))
|
|
74
|
+
)
|
|
75
|
+
payload = bytes(load & 255) + payload
|
|
76
|
+
params = pack("<BBHH", load >> 8, (len(payload) + 255) // 256, run, casini)
|
|
77
|
+
boot = files("recarted").joinpath("loaders", loader + ".bin").read_bytes()
|
|
78
|
+
if len(boot) > 0x1F00 or len(payload) > 15 * 8192:
|
|
79
|
+
raise ValueError("Loader or payload does not fit a type-41 cartridge.")
|
|
80
|
+
rom = bytearray([0xFF]) * 131072
|
|
81
|
+
rom[: len(boot)] = boot
|
|
82
|
+
rom[0x1F00 : 0x1F00 + len(params)] = params
|
|
83
|
+
rom[0x1FF9:8192] = bytes.fromhex("60 00 a0 00 04 f9 bf")
|
|
84
|
+
rom[8192 : 8192 + len(payload)] = payload
|
|
85
|
+
return pack(">4sIII", b"CART", 41, sum(rom), 0) + rom
|
recarted/example.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""An original, redistributable one-sector program: ANTIC scanline colour bars."""
|
|
2
|
+
|
|
3
|
+
from struct import pack, pack_into
|
|
4
|
+
|
|
5
|
+
# Boot header: one record at $2000, init $2006. Disable NMI and playfield DMA,
|
|
6
|
+
# then feed VCOUNT to GTIA's background register. No Atari ROM bytes here.
|
|
7
|
+
SECTOR = bytes.fromhex(
|
|
8
|
+
"00 01 00 20 06 20 78 a9 00 8d 0e d4 8d 00 d4 ad 0b d4 8d 1a d0 4c 0f 20"
|
|
9
|
+
).ljust(128, b"\0")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def tape_checksum(data: bytes) -> int:
|
|
13
|
+
total = sum(data)
|
|
14
|
+
return (total - 1) % 255 + 1 if total else 0
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def example_image(kind: str) -> bytes:
|
|
18
|
+
if kind == "atr":
|
|
19
|
+
return pack("<HHH", 0x296, 8, 128) + bytes(10) + SECTOR
|
|
20
|
+
if kind == "atx":
|
|
21
|
+
# One complete single-density track: sector list, data, terminator.
|
|
22
|
+
listing = pack("<IB3x", 152, 1) + b"".join(
|
|
23
|
+
pack("<BBHI", i + 1, 0, i * 1388, 192 + i * 128) for i in range(18)
|
|
24
|
+
)
|
|
25
|
+
chunks = listing + pack("<IB3x", 2312, 0) + SECTOR + bytes(17 * 128) + bytes(8)
|
|
26
|
+
track = bytearray(32)
|
|
27
|
+
pack_into("<I", track, 0, 32 + len(chunks))
|
|
28
|
+
pack_into("<H", track, 10, 18)
|
|
29
|
+
pack_into("<I", track, 20, 32)
|
|
30
|
+
header = bytearray(48)
|
|
31
|
+
header[:8] = pack("<4sHH", b"AT8X", 1, 1)
|
|
32
|
+
pack_into("<II", header, 28, 48, 80 + len(chunks))
|
|
33
|
+
return bytes(header + track + chunks)
|
|
34
|
+
if kind != "cas":
|
|
35
|
+
raise ValueError("Choose a .cas, .atr or .atx filename for the example.")
|
|
36
|
+
tape = bytearray(b"FUJI" + bytes(4) + b"baud" + pack("<HH", 0, 600))
|
|
37
|
+
for marker, body, gap in [(0xFC, SECTOR, 20000), (0xFE, bytes(128), 250)]:
|
|
38
|
+
record = bytes((0x55, 0x55, marker)) + body
|
|
39
|
+
tape += (
|
|
40
|
+
b"data" + pack("<HH", 132, gap) + record + bytes([tape_checksum(record)])
|
|
41
|
+
)
|
|
42
|
+
return bytes(tape)
|
recarted/images.py
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"""Parse containers before consulting the small, content-addressed recipe table."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from hashlib import sha256
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from struct import unpack_from
|
|
7
|
+
|
|
8
|
+
from . import atx
|
|
9
|
+
from .capture import CAPTURES
|
|
10
|
+
from .example import SECTOR, example_image, tape_checksum
|
|
11
|
+
|
|
12
|
+
MAX_INPUT = 4 * 1024 * 1024
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass(frozen=True)
|
|
16
|
+
class Recipe:
|
|
17
|
+
name: str
|
|
18
|
+
medium: str
|
|
19
|
+
loader: str
|
|
20
|
+
digest: str
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
RECIPES = (
|
|
24
|
+
*(Recipe(spec.title, "ATX", "capture", spec.disk_sha256) for spec in CAPTURES),
|
|
25
|
+
Recipe(
|
|
26
|
+
"Jumpman",
|
|
27
|
+
"ATX",
|
|
28
|
+
"disk",
|
|
29
|
+
"496d3b2561c2b1154f3dea6bbca1f58715f95a10d598fe7a8755a2950eb0da79",
|
|
30
|
+
),
|
|
31
|
+
Recipe(
|
|
32
|
+
"ReCarted! colour bars", "ATX", "tape", sha256(example_image("atx")).hexdigest()
|
|
33
|
+
),
|
|
34
|
+
Recipe(
|
|
35
|
+
"Attack of the Mutant Camels",
|
|
36
|
+
"CAS",
|
|
37
|
+
"tape",
|
|
38
|
+
"7d875a1c346baf8be767f3cdc98fd56ee55a71726b470d550ca8427155109926",
|
|
39
|
+
),
|
|
40
|
+
Recipe(
|
|
41
|
+
"Gridrunner",
|
|
42
|
+
"CAS",
|
|
43
|
+
"tape",
|
|
44
|
+
"0d6a93ecb7bc0846878635d3a08bd4c065adb2fbff2763007df05bfdc100a7a5",
|
|
45
|
+
),
|
|
46
|
+
Recipe(
|
|
47
|
+
"Hover Bovver",
|
|
48
|
+
"CAS",
|
|
49
|
+
"tape",
|
|
50
|
+
"dbd31fa69e7775d92c2ddfa8ea7ea782266ea898e8747ccc875f16657eb5ac86",
|
|
51
|
+
),
|
|
52
|
+
Recipe(
|
|
53
|
+
"Bruce Lee",
|
|
54
|
+
"ATR",
|
|
55
|
+
"bruce",
|
|
56
|
+
"74b0f21a628b6233eae96ca164ccbf70b2e098bd79b01cc802414a381c19750f",
|
|
57
|
+
),
|
|
58
|
+
Recipe(
|
|
59
|
+
"Jumpman",
|
|
60
|
+
"ATR",
|
|
61
|
+
"disk",
|
|
62
|
+
"cff56945c4b3cc3e4dd1ed3ab7f2176c0df4455624050b39a39cf8436db04d97",
|
|
63
|
+
),
|
|
64
|
+
Recipe(
|
|
65
|
+
"Pinball Construction Set",
|
|
66
|
+
"ATR",
|
|
67
|
+
"disk",
|
|
68
|
+
"a7d08dab8436c1414186e38bd20243171d65b45732adffcd1dbbf81ca6eb5767",
|
|
69
|
+
),
|
|
70
|
+
*(
|
|
71
|
+
Recipe("ReCarted! colour bars", medium, "tape", sha256(SECTOR).hexdigest())
|
|
72
|
+
for medium in ("CAS", "ATR")
|
|
73
|
+
),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@dataclass(frozen=True)
|
|
78
|
+
class Image:
|
|
79
|
+
medium: str
|
|
80
|
+
detail: str
|
|
81
|
+
payload: bytes = b""
|
|
82
|
+
recipe: Recipe | None = None
|
|
83
|
+
mapper: int | None = None
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def read_input(path: Path) -> bytes:
|
|
87
|
+
if not path.is_file():
|
|
88
|
+
raise ValueError(f"Not a regular file: {path}")
|
|
89
|
+
with path.open("rb") as stream:
|
|
90
|
+
data = stream.read(MAX_INPUT + 1)
|
|
91
|
+
if len(data) > MAX_INPUT:
|
|
92
|
+
raise ValueError("File exceeds the 4 MiB inspection limit.")
|
|
93
|
+
return data
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def match(medium: str, detail: str, payload: bytes) -> Image:
|
|
97
|
+
digest = sha256(payload).hexdigest()
|
|
98
|
+
recipe = next(
|
|
99
|
+
(r for r in RECIPES if r.medium == medium and r.digest == digest), None
|
|
100
|
+
)
|
|
101
|
+
return Image(medium, detail, payload, recipe)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def disk(data: bytes) -> Image:
|
|
105
|
+
if len(data) < 16:
|
|
106
|
+
raise ValueError("Truncated ATR header.")
|
|
107
|
+
paragraphs, sector, high = unpack_from("<HHH", data, 2)
|
|
108
|
+
payload = data[16:]
|
|
109
|
+
if not payload or len(payload) != ((high << 16) | paragraphs) * 16:
|
|
110
|
+
raise ValueError("ATR length does not match its header.")
|
|
111
|
+
if sector not in (128, 256):
|
|
112
|
+
return Image("ATR", f"{sector}-byte sectors are not supported.")
|
|
113
|
+
boot_size = min(len(payload), 384)
|
|
114
|
+
rest, tail = divmod(len(payload) - boot_size, sector)
|
|
115
|
+
if tail or boot_size % 128:
|
|
116
|
+
raise ValueError("Incomplete ATR sector.")
|
|
117
|
+
detail = f"{boot_size // 128 + rest} sectors; {sector} bytes per data sector."
|
|
118
|
+
if sector != 128:
|
|
119
|
+
return Image("ATR", detail + " No double-density recipe.")
|
|
120
|
+
return match("ATR", detail, payload)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def cassette(data: bytes) -> Image:
|
|
124
|
+
pos = 0
|
|
125
|
+
blocks = bytearray()
|
|
126
|
+
records = 0
|
|
127
|
+
eof = False
|
|
128
|
+
reason = ""
|
|
129
|
+
while pos < len(data):
|
|
130
|
+
if pos + 8 > len(data):
|
|
131
|
+
raise ValueError("Truncated CAS chunk header.")
|
|
132
|
+
kind, size, aux = unpack_from("<4sHH", data, pos)
|
|
133
|
+
pos += 8
|
|
134
|
+
if pos + size > len(data):
|
|
135
|
+
raise ValueError("Truncated CAS chunk body.")
|
|
136
|
+
chunk = data[pos : pos + size]
|
|
137
|
+
pos += size
|
|
138
|
+
if kind == b"FUJI" and pos == 8 + size:
|
|
139
|
+
continue
|
|
140
|
+
if kind == b"baud":
|
|
141
|
+
if size or aux != 600:
|
|
142
|
+
reason = "Nonstandard baud rate or baud chunk."
|
|
143
|
+
elif kind == b"data":
|
|
144
|
+
records += 1
|
|
145
|
+
if len(chunk) != 132 or chunk[:2] != b"UU":
|
|
146
|
+
reason = "Custom or nonstandard tape framing."
|
|
147
|
+
continue
|
|
148
|
+
if chunk[-1] != tape_checksum(chunk[:-1]):
|
|
149
|
+
raise ValueError(f"Bad cassette checksum in record {records}.")
|
|
150
|
+
if eof:
|
|
151
|
+
reason = "Multiple tape stages."
|
|
152
|
+
if chunk[2] == 0xFC:
|
|
153
|
+
blocks.extend(chunk[3:131])
|
|
154
|
+
elif chunk[2] == 0xFE:
|
|
155
|
+
eof = True
|
|
156
|
+
else:
|
|
157
|
+
reason = "Partial or custom tape record."
|
|
158
|
+
else:
|
|
159
|
+
reason = f"Unsupported CAS chunk {kind!r}."
|
|
160
|
+
if reason:
|
|
161
|
+
return Image("CAS", reason + " No conversion recipe.")
|
|
162
|
+
if not eof or len(blocks) < 128:
|
|
163
|
+
raise ValueError("Incomplete cassette boot stream (missing data or EOF).")
|
|
164
|
+
# Some mastering tools wrote one extra complete record beyond the count
|
|
165
|
+
# requested by the Atari boot header. It is never loaded by these games.
|
|
166
|
+
count = blocks[1] or 256
|
|
167
|
+
if len(blocks) // 128 not in (count, count + 1):
|
|
168
|
+
return Image("CAS", "Tape does not match a single-stage boot program.")
|
|
169
|
+
return match(
|
|
170
|
+
"CAS", f"600 baud; {count} boot records.", bytes(blocks[: 128 * count])
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
# The two Atarimax formats are often confused: 1 Mbit != 1 MiB.
|
|
175
|
+
def cartridge(data: bytes) -> Image:
|
|
176
|
+
if len(data) <= 16:
|
|
177
|
+
raise ValueError("Truncated or empty CAR.")
|
|
178
|
+
mapper, checksum = unpack_from(">II", data, 4)
|
|
179
|
+
payload = data[16:]
|
|
180
|
+
if checksum != sum(payload) & 0xFFFFFFFF:
|
|
181
|
+
raise ValueError("Bad CAR checksum.")
|
|
182
|
+
expected = {41: 131072, 42: 1048576}.get(mapper)
|
|
183
|
+
if expected is not None and expected != len(payload):
|
|
184
|
+
raise ValueError(
|
|
185
|
+
f"Type {mapper} needs {expected} payload bytes, not {len(payload)}."
|
|
186
|
+
)
|
|
187
|
+
support = {
|
|
188
|
+
41: "Mapper supported by stock A8PicoCart.",
|
|
189
|
+
42: "Unsupported by stock A8PicoCart. Changing the header is not a conversion.",
|
|
190
|
+
}.get(mapper, "Compatibility not assessed by ReCarted.")
|
|
191
|
+
return Image(
|
|
192
|
+
"CAR",
|
|
193
|
+
f"Type {mapper}; {len(payload)} bytes; checksum OK. {support}",
|
|
194
|
+
mapper=mapper,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def identify(data: bytes) -> Image:
|
|
199
|
+
if data.startswith(b"FUJI"):
|
|
200
|
+
return cassette(data)
|
|
201
|
+
if data.startswith(b"\x96\x02"):
|
|
202
|
+
return disk(data)
|
|
203
|
+
if data.startswith(b"CART"):
|
|
204
|
+
return cartridge(data)
|
|
205
|
+
if data.startswith(b"AT8X"):
|
|
206
|
+
image = match("ATX", atx.description(atx.tracks(data)), data)
|
|
207
|
+
if image.recipe and image.recipe.loader in ("disk", "tape"):
|
|
208
|
+
demo = image.recipe.loader == "tape"
|
|
209
|
+
sectors = atx.linear_sd_disk(data, 1 if demo else 40)
|
|
210
|
+
payload = sectors[:128] if demo else sectors
|
|
211
|
+
# Prove this exact track layout yields the already-tested ATR program.
|
|
212
|
+
equivalent = match("ATR", "", payload)
|
|
213
|
+
if not equivalent.recipe or equivalent.recipe.name != image.recipe.name:
|
|
214
|
+
raise ValueError("ATX sectors do not match the expected program.")
|
|
215
|
+
return Image("ATX", image.detail, payload, image.recipe)
|
|
216
|
+
return image
|
|
217
|
+
raise ValueError(
|
|
218
|
+
"Unrecognized file signature. Expected CAS, ATR, ATX or CAR (not a ZIP or WAV)."
|
|
219
|
+
)
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: recarted
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Turn recognized Atari 8-bit cassette and floppy images into A8PicoCart cartridges
|
|
5
|
+
Author: Christopher Patti
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
10
|
+
Classifier: Topic :: System :: Emulators
|
|
11
|
+
Requires-Dist: cyclopts>=4,<5
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
|
+
Project-URL: Homepage, https://github.com/feoh/recarted
|
|
14
|
+
Project-URL: Repository, https://github.com/feoh/recarted
|
|
15
|
+
Project-URL: Issues, https://github.com/feoh/recarted/issues
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# ReCarted!
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
Give an Atari cassette or floppy a second life in the cartridge slot. ReCarted is a **Linux command-line converter for the Atari 8-bit XL/XE and A8PicoCart**. Give it a supported `.cas` cassette, `.atr` floppy, or `.atx` track image and it writes a new cartridge file. It never overwrites your original.
|
|
23
|
+
|
|
24
|
+
## Try it in a minute (no game images needed)
|
|
25
|
+
|
|
26
|
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and Git on Linux, then:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
uv tool install recarted
|
|
30
|
+
recarted example rainbow.cas
|
|
31
|
+
recarted inspect rainbow.cas
|
|
32
|
+
recarted convert rainbow.cas
|
|
33
|
+
recarted inspect rainbow.car
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
To update later, run `uv tool upgrade recarted`. If the shell can't find `recarted`, run `uv tool update-shell` and open a new terminal. Python 3.11 or newer is required; uv can supply it. No assembler is needed. Only the two emulator-assisted ATX recipes require Atari800 and an Atari OS ROM.
|
|
37
|
+
|
|
38
|
+
The example is an original Atari program that displays colour bars. Try `recarted example rainbow-disk.atr` for the floppy equivalent, or `recarted example rainbow-track.atx` to try the ATX workflow without an emulator or ROM. Use distinct names: both `rainbow.cas` and `rainbow.atr` would otherwise want to write `rainbow.car`.
|
|
39
|
+
|
|
40
|
+
## Convert your own image
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
recarted recipes
|
|
44
|
+
recarted inspect 'Gridrunner.cas'
|
|
45
|
+
recarted convert 'Gridrunner.cas'
|
|
46
|
+
recarted convert 'Bruce Lee.atr' --output 'Bruce Lee.xex'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`inspect` reads the contents, not the filename. `convert` writes a `.car` beside the source unless you choose `--output`. If the output already exists, choose a new name. For one-load games you can request `.xex` instead: the A8PicoCart loads that directly into RAM. For games that still need disk sectors, use `.car`.
|
|
50
|
+
|
|
51
|
+
| Source | Recognized games in 0.2 | Output |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| Cassette (`.cas`) | Attack of the Mutant Camels, Gridrunner, Hover Bovver | CAR or XEX |
|
|
54
|
+
| Disk (`.atr`) | Bruce Lee (Datasoft, US a2) | CAR or XEX |
|
|
55
|
+
| Disk (`.atr`) | Jumpman (Epyx, US), Pinball Construction Set | CAR with a **read-only** virtual disk |
|
|
56
|
+
| Track disk (`.atx`) | Jumpman (Epyx, US) | CAR with a **read-only** virtual disk |
|
|
57
|
+
| Track disk (`.atx`) | The Tail of Beta Lyrae (Datamost), Bruce Lee | CAR; Atari800 + stock XL/XE OS revision 2 required |
|
|
58
|
+
|
|
59
|
+
These are **specific releases**, not every dump of each title. If `inspect` says “No matching recipe,” changing the name won't help. No commercial games, game data, or Atari OS ROMs are distributed with ReCarted. Use images you have the right to convert.
|
|
60
|
+
|
|
61
|
+
## Convert an ATX disk
|
|
62
|
+
|
|
63
|
+
Run `recarted inspect` first. If the disk is the recognized Jumpman release, `recarted convert 'Jumpman (1983)(Epyx)(US)[!].atx'` works directly. For *The Tail of Beta Lyrae* and *Bruce Lee*, install Atari800 with its text monitor (tested with 5.2.0) and supply your own stock 16 KiB XL/XE OS revision 2 ROM. For example, from the directory containing the game and `ATARIXL.ROM`:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
recarted inspect 'Tail of Beta Lyrae (The) _ Datamost.atx'
|
|
67
|
+
recarted convert 'Tail of Beta Lyrae (The) _ Datamost.atx' --os-rom ATARIXL.ROM
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
ReCarted boots a temporary copy of the original track image in the background. The resulting `.car` needs neither the disk nor that ROM file on the cartridge. An unknown dump isn't flattened into an ATR; it may need the disk's duplicate sectors, timing or error status. If you're upgrading the Git-based install, run `uv tool upgrade recarted`.
|
|
71
|
+
|
|
72
|
+
## Play it
|
|
73
|
+
|
|
74
|
+
- **A8PicoCart:** With the cartridge **removed from the Atari**, connect it to the computer over USB. Copy the resulting `.car` or `.xex` to it, eject it, and **disconnect USB before inserting it into the powered-off Atari**. Power on, select the file normally, and it boots straight into the program. No DiskCart menu or disk in D1: is needed.
|
|
75
|
+
- **Linux emulator:** Install `atari800` separately and run `recarted test rainbow.car`. For the disk-reader games, use a stock XL/XE OS: `recarted test 'Jumpman.car' --os-rom ATARIXL.ROM` (supply the path to your own ROM). The command opens Atari800 so **you** can check the screen and controls; it does not claim the game passed just because the emulator started. For XEX, use `atari800 -xl -nobasic -run 'Bruce Lee.xex'`.
|
|
76
|
+
|
|
77
|
+
**Can I save a pinball table?** Not to the embedded cartridge disk. Use your original ATR in a writable disk setup for authoring and saving.
|
|
78
|
+
|
|
79
|
+
**“Unsupported Cartridge Type”?** Run `recarted inspect` on the file you actually copied. ReCarted generates **type 41, 128 KiB** (Atarimax **1 Mbit**). The older type 42 is **1 MiB / 8 Mbit** and is not supported by stock A8PicoCart. Renaming a ROM or editing that header byte doesn't fix it. If type 41 is rejected, tell us your cartridge model and firmware version.
|
|
80
|
+
|
|
81
|
+
## What's next?
|
|
82
|
+
|
|
83
|
+
More **cassette** recipes are a priority, especially multi-stage tapes such as Preppie! and the two sides of International Karate. Additional ATX releases, more floppy layouts, and tested **macOS and Windows** installations are also on the roadmap. WAV recordings, raw ROMs, and arbitrary disk/tape ports are not supported.
|
|
84
|
+
|
|
85
|
+
## Contribute a recipe
|
|
86
|
+
|
|
87
|
+
Got another Atari disk or tape running from a cartridge? [Send a pull request](https://github.com/feoh/recarted/compare) with your recipe. ATX, ATR, and CAS recipes are all welcome, including ones for a different release of a game we already support. Tell us which release you converted and what you saw when you booted it in Atari800 or on hardware. Share the recipe and the image’s SHA-256, not the commercial image or OS ROM. See [how to add and verify a recipe](docs/TECHNICAL.md#verification-and-adding-recipes) for the testing details.
|
|
88
|
+
|
|
89
|
+
[Request a recipe or report a hardware result](https://github.com/feoh/recarted/issues): include the title and release, `recarted inspect` output, the source's `sha256sum`, your Atari/cart model and firmware, and what you saw. Please **don't attach commercial images or OS ROMs**.
|
|
90
|
+
|
|
91
|
+
For how recognition works, emulator evidence, limitations, or building and testing the loaders, see [Technical notes](docs/TECHNICAL.md). [MIT license](LICENSE).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
recarted/__init__.py,sha256=xfZ0xhXVrF6kjzdYK1WHcSC-junFNxiojDQLLZb2epU,61
|
|
2
|
+
recarted/atx.py,sha256=1e2hgmkYFrBB6nay7pl797qeyYrw5_PL5SEWXxhrvDM,4694
|
|
3
|
+
recarted/capture.py,sha256=IiZPIU-a3wz0ckAsbiWf0xALcUrb5YX3iFHPQc5nPgA,4303
|
|
4
|
+
recarted/cli.py,sha256=4zymCb096Q0lQ6s1Cv2fSxGHdEAA2X1YpjGL3_nhve0,3637
|
|
5
|
+
recarted/convert.py,sha256=5H9PTxdu79IhdsNSX8U8yGvpmq2txNPu5NVvK61f728,3215
|
|
6
|
+
recarted/example.py,sha256=bK-G78Weca0H1od8Yn_PLMeAHh6tqb4lWHQbJkLFh8Q,1754
|
|
7
|
+
recarted/images.py,sha256=bhDFga82q4puQgKU1cCv37OqxvP1bl7BZhWTMA-IBLg,7386
|
|
8
|
+
recarted/loaders/disk.bin,sha256=SZ5pWkNDQ7GYCEJTI8Ya96347d86Gl3sCpLBmwQoDyQ,343
|
|
9
|
+
recarted/loaders/memory.bin,sha256=hVM9X36bB-1VvtBDAJ2PcEe9FpLNmvxVKZ-XxvXmQg4,138
|
|
10
|
+
recarted-0.2.0.dist-info/licenses/LICENSE,sha256=Rqo1O2_et4mvBPziIYlEEEN5Y3i4NJjhV8JiNfaDIpM,1074
|
|
11
|
+
recarted-0.2.0.dist-info/WHEEL,sha256=G_-rrEibZr7OEM7zdH1dSO6s-VdjfnS5PA4CLAdI9Vw,80
|
|
12
|
+
recarted-0.2.0.dist-info/entry_points.txt,sha256=CPl_ULaWg3zDi3HPgvRzGkmJlZA31dlny4P7fPFDoQw,48
|
|
13
|
+
recarted-0.2.0.dist-info/METADATA,sha256=3cKsrF3c8DMHboPrn-vmZA9lvRQIjr4kePcfDNhEgXA,6779
|
|
14
|
+
recarted-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Christopher Patti
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|