aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2016-12-29 10:03:47 +0000
committerIan C <ianc@noddybox.co.uk>2016-12-29 10:03:47 +0000
commit11e4ac42701e6d4b53425b806908aec3c47f548f (patch)
tree149f54b7d7c37dedf4ad71662d7146c96e0c5b98
parent4bf4be55566440d9c08a48a38759f302b2d4cb02 (diff)
Attempt to wrap CPC TAP in CDT.
-rw-r--r--src/cpcout.c13
-rw-r--r--src/example/cpc.asm2
2 files changed, 14 insertions, 1 deletions
diff --git a/src/cpcout.c b/src/cpcout.c
index 659ba28..c893097 100644
--- a/src/cpcout.c
+++ b/src/cpcout.c
@@ -140,6 +140,11 @@ int CPCOutput(const char *filename, const char *filename_bank,
/* Output the binary files
*/
+ WriteString(fp, "ZXTape!", 7, 0, CP_ASCII);
+ WriteByte(fp, 0x1a);
+ WriteByte(fp, 1);
+ WriteByte(fp, 13);
+
for(f = 0; f < count; f++)
{
const Byte *mem;
@@ -160,6 +165,10 @@ int CPCOutput(const char *filename, const char *filename_bank,
first = 0;
last = 0;
+ WriteWord(fp, 10);
+ WriteWord(fp, 1000);
+ WriteWord(fp, 0x1d + 2);
+
WriteWord(fp, 0x1d);
WriteByte(fp, 0x2c);
@@ -201,6 +210,10 @@ int CPCOutput(const char *filename, const char *filename_bank,
/* Output file data
*/
+ WriteWord(fp, 10);
+ WriteWord(fp, 1000);
+ WriteWord(fp, blocklen + 5);
+
WriteWord(fp, blocklen + 3);
WriteByte(fp, 0x16);
diff --git a/src/example/cpc.asm b/src/example/cpc.asm
index aa9fcb0..1a368f2 100644
--- a/src/example/cpc.asm
+++ b/src/example/cpc.asm
@@ -4,7 +4,7 @@
;
; RUN ""
- option output-file,cpc.tap
+ option output-file,cpc.cdt
option output-format,cpc
option cpc-start,start