diff options
author | B. Watson <urchlay@slackware.uk> | 2024-05-19 03:13:50 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-05-19 03:13:50 -0400 |
commit | 52b7325b29bac770bd1a9c1715466c25155eb295 (patch) | |
tree | 6c9a70af573b5b8634bc1040cf423697d7e51520 | |
parent | ac17f6e65a89a344955da2ab93a6ad37cceab56a (diff) | |
download | bw-atari8-tools-52b7325b29bac770bd1a9c1715466c25155eb295.tar.gz |
unprotbas: clean up output, remove stale TODO comment.
-rw-r--r-- | unprotbas.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/unprotbas.c b/unprotbas.c index de7c441..b1c611d 100644 --- a/unprotbas.c +++ b/unprotbas.c @@ -1,10 +1,3 @@ -/**** TODO: - if the rebuilt variable name table ends up larger than the - scrambled one, the rest of the program needs to be moved upwards - in memory to make room for it. currently this isn't done, so - the variable *value* table gets corrupted by the last few - variable names overwriting the first few values. */ - #include <stdio.h> #include <unistd.h> #include <stdlib.h> @@ -78,14 +71,9 @@ void setword(int addr, int value) { } void dump_header_vars(void) { - fprintf(stderr, "LOMEM %04x\n", lomem); - fprintf(stderr, "VNTP %04x\n", vntp); - fprintf(stderr, "VNTD %04x\n", vntd); - fprintf(stderr, "VVTP %04x\n", vvtp); - fprintf(stderr, "STMTAB %04x, codestart %04x\n", stmtab, codestart); - fprintf(stderr, "STMCUR %04x\n", stmcur); - fprintf(stderr, "STARP %04x\n", starp); - fprintf(stderr, "vvstart %04x\n", vvstart); + fprintf(stderr, "LOMEM $%04x VNTP $%04x VNTD $%04x VVTP $%04x\n", lomem, vntp, vntd, vvtp); + fprintf(stderr, "STMTAB $%04x STMCUR $%04x STARP $%04x\n", stmtab, stmcur, starp); + fprintf(stderr, "codestart $%04x, vnstart $%04x, vvstart $%04x\n", stmcur, starp, vvstart); } void read_header(void) { @@ -149,7 +137,7 @@ int fixline(int linepos) { while(!done) { offset = data[linepos + offset]; token = data[linepos + offset - 1]; - fprintf(stderr, "offset %02x token %02x\n", offset, token); + /* fprintf(stderr, "offset %02x token %02x\n", offset, token); */ if(token != 0x14) done++; } @@ -187,7 +175,7 @@ int fixcode(void) { if(lineno == 32768) break; } - fprintf(stderr, "End program pos %04x/%d\n", pos, pos); + fprintf(stderr, "End program pos $%04x/%d\n", pos, pos); if(filelen > pos) { fprintf(stderr, "trailing garbage at EOF, %d bytes, %s\n", @@ -495,7 +483,7 @@ int main(int argc, char **argv) { if(fixcode()) fprintf(stderr, "Fixed invalid offset in code\n"); else - fprintf(stderr, "No invalid offsets (maybe wasn't protected?)\n"); + fprintf(stderr, "No invalid offsets\n"); fwrite(data, filelen, 1, output_file); return 0; |