diff options
author | Ian C <ianc@noddybox.co.uk> | 2017-01-05 15:34:45 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2017-01-05 15:34:45 +0000 |
commit | a703276adc97fae897589e133290ab76e1806d87 (patch) | |
tree | 4384ed1d49b8059e2c32983d3e5036842884aa10 /src | |
parent | ef52d1190254a085d8a2c027d80827fcce42d343 (diff) |
Tweaks to (still broken) CPC output.
Diffstat (limited to 'src')
-rw-r--r-- | src/cpcout.c | 19 | ||||
-rw-r--r-- | src/example/Makefile | 2 |
2 files changed, 15 insertions, 6 deletions
diff --git a/src/cpcout.c b/src/cpcout.c index c893097..b962340 100644 --- a/src/cpcout.c +++ b/src/cpcout.c @@ -165,11 +165,11 @@ int CPCOutput(const char *filename, const char *filename_bank, first = 0; last = 0; - WriteWord(fp, 10); + WriteWord(fp, 0x10); WriteWord(fp, 1000); - WriteWord(fp, 0x1d + 2); + WriteWord(fp, 0x40 + 2); - WriteWord(fp, 0x1d); + WriteWord(fp, 0x40); WriteByte(fp, 0x2c); if (f == 0) @@ -189,7 +189,15 @@ int CPCOutput(const char *filename, const char *filename_bank, if (block == 0) { first = 255; - blocklen = BLOCK_SIZE; + + if (len > BLOCK_SIZE) + { + blocklen = BLOCK_SIZE; + } + else + { + blocklen = len; + } } if (block == blocks) @@ -205,12 +213,13 @@ int CPCOutput(const char *filename, const char *filename_bank, WriteByte(fp, first); WriteWord(fp, len); WriteWord(fp, options.start_addr); + WriteString(fp, "", 64 - 28, 0, CP_ASCII); addr += blocklen; /* Output file data */ - WriteWord(fp, 10); + WriteWord(fp, 0x10); WriteWord(fp, 1000); WriteWord(fp, blocklen + 5); diff --git a/src/example/Makefile b/src/example/Makefile index a1807a2..93bef30 100644 --- a/src/example/Makefile +++ b/src/example/Makefile @@ -36,7 +36,7 @@ spectrum.tap: spectrum.asm $(CASM) c64.t64: c64.asm $(CASM) $(CASM) c64.asm -cpc.cdt: cpc.asm +cpc.cdt: cpc.asm $(CASM) $(CASM) cpc.asm zx81.p: zx81.asm $(CASM) |