aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2022-08-29 19:32:24 -0400
committerB. Watson <urchlay@slackware.uk>2022-08-29 19:32:24 -0400
commite75fe2fb01b1d28ddc1a6f038fe0dbad89cd3173 (patch)
treeb4526cb68ebf5d386a819de9f7b507c74320bc60
parent0e7df8f0ce7b1c3d5549c20a37746da4d883b392 (diff)
downloadbw-atari8-tools-e75fe2fb01b1d28ddc1a6f038fe0dbad89cd3173.tar.gz
fix rom2cart support for 2KB (type 57)
-rw-r--r--TODO2
-rw-r--r--rom2cart.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/TODO b/TODO
index 04a4c1f..5214abd 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,4 @@
for now:
-- rom2cart doesn't fully support type 57, standard 2K cart, because it
- assumes all cart images are a multiple of 4K in size.
later:
- add cassio?
diff --git a/rom2cart.c b/rom2cart.c
index f6f8754..7eaaa06 100644
--- a/rom2cart.c
+++ b/rom2cart.c
@@ -561,9 +561,11 @@ int main(int argc, char **argv) {
fprintf(stderr, SELF ": input file is empty!\n");
exit(1);
} else if(size % 4096) {
- fprintf(stderr, SELF ": %s: input size not a multiple of 4KB!\n",
- (type_override ? "warning" : "fatal"));
- if(!type_override) exit(1);
+ if(size != 2048) {
+ fprintf(stderr, SELF ": %s: input size %d bytes, not a multiple of 4KB, and not 2KB either!\n",
+ (type_override ? "warning" : "fatal"), size);
+ if(!type_override) exit(1);
+ }
}
if(!type) {