From 1abeed9abb637cac2adc9964801af343b9beb1ff Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 23 Apr 2024 00:53:06 -0400 Subject: rom2cart: warn on bad checksum, add -H option for testing. --- rom2cart.rst | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'rom2cart.rst') diff --git a/rom2cart.rst b/rom2cart.rst index 0edc57d..580d77b 100644 --- a/rom2cart.rst +++ b/rom2cart.rst @@ -22,7 +22,7 @@ SYNOPSIS DESCRIPTION =========== -**rom2cart** converts between raw ROM dumps and Atari800 **.CAR** +**rom2cart** converts between raw ROM dumps and Atari800 **.CAR** images. Despite the name, conversion can be done in either direction. **cart2rom** is equivalent to **rom2cart -r**. @@ -36,7 +36,7 @@ content), and (optional) user-supplied type number or name (**-t**). If **rom2cart** is unable to narrow the selection down to one image type, it will "guess" by choosing the lowest-numbered type that matches the given parameters (unless **-n** is given to prevent -this behavior). +this behavior, in which case it will exit with an error message). When writing a **.CAR** file, **rom2cart** will calculate the checksum automatically and store it in the **CART** header (unless **-C** is @@ -121,6 +121,13 @@ useful for debugging **rom2cart** or Atari800 itself. (prefixed with $ or 0x) or decimal (no prefix). This option has no effect if the output is a raw dump (**-r** option). +-H + Test the code-detection heuristics: examine the first 8K of the ROM and + look for writes to $D2xx (8-bit computer) or $E8xx (5200) to guess the + machine type for the ROM. This option exists only for testing: normally, + the machine type gets guessed by the cartridge option bytes, and the + code-detection is only done if the option byte tests are inconclusive. + NOTES ===== @@ -134,7 +141,7 @@ be constructed from *infile* by replacing the filename extension with is no extension. **rom2cart** contains an internal database of image types. The current -version uses the list from Atari800 v2.0.3 (types 1-43). If you +version uses the list from Atari800 v5.2.0 (types 1-103 and 160). If you need to create a **.CAR** image of a type not supported in this version of **rom2cart**, you can use the **-T** option. Alternatively, look for a newer version of **rom2cart**. If no new version exists, bug the @@ -158,15 +165,21 @@ A **.CAR** image consists of a 16-byte header followed by the ROM data. The first 4 bytes contain 'C' 'A' 'R' 'T' in ASCII. -The next 4 bytes contain the cartridge type in MSB (aka -*big-endian*) format. +The next 4 bytes contain the cartridge type in MSB (aka *big-endian*) +32-bit integer format. -The next 4 bytes contain cartridge checksum in MSB format (ROM only). +The next 4 bytes contain cartridge checksum in MSB format (ROM only; +the header is not checksummed). The next 4 bytes are currently unused (zero). -The rest of the file contains the ROM data: 4, 8, 16, 32, 40, 64, 128, -256, 512 or 1024 kilobytes. +The rest of the file contains the ROM data, up to 32Mbytes as of +Atari800 5.2.0. The cartridge type determines the amount of data; see +*cart.txt* or the output of **rom2cart -l**. + +The latest version of *cart.txt* can be found at: + + https://raw.githubusercontent.com/atari800/atari800/master/DOC/cart.txt HEURISTICS ========== -- cgit v1.2.3