aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2022-11-10 14:40:31 -0500
committerB. Watson <urchlay@slackware.uk>2022-11-10 14:40:31 -0500
commit6cdf85f4e44625d7452d0aeccbf01ef3191a7133 (patch)
treec11d21ea5bbde7cc489ba77fcf027d9e23dd1419
parentf42e18edc63c0a6fe60b89fc05374c0c59294fce (diff)
downloaddla-asm-6cdf85f4e44625d7452d0aeccbf01ef3191a7133.tar.gz
VERSION now set in Makefile.
-rw-r--r--BUILD.txt6
-rw-r--r--Makefile13
-rw-r--r--dla.s3
-rw-r--r--dla.xexbin4696 -> 4696 bytes
-rw-r--r--dla2csv.c4
-rw-r--r--dla2csv.xexbin8768 -> 8774 bytes
-rw-r--r--dlaver.h1
-rw-r--r--dlaver.inc1
-rw-r--r--mkver.pl13
9 files changed, 34 insertions, 7 deletions
diff --git a/BUILD.txt b/BUILD.txt
index e28a41e..55d2a6d 100644
--- a/BUILD.txt
+++ b/BUILD.txt
@@ -9,8 +9,10 @@ even be modern Windows), with the following software installed:
recent version should do; I used 2.19.
- Optional: "perl", the Perl 5 interpreter. Only used to generate the
- file dlatbl.s. You only need Perl if you're going to modify the data
- tables (the mkdlatbl.pl script).
+ files dlatbl.s, dlaver.inc, and dlaver.h. These files are part
+ of the source distribution, so you only need Perl if you're going
+ to modify the data tables (the mkdlatbl.pl script), or change the
+ version number (mkver.pl).
- Optional: "cc", a host C compiler (e.g. gcc or clang). Only used for
compiling dla2csv for the host.
diff --git a/Makefile b/Makefile
index a1f119f..cf01f8d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
# Makefile for dla-asm.
# See https://slackware.uk/~urchlay/repos/dla-asm
+VERSION=0.2.0
+
CL65=cl65
CL65FLAGS=
@@ -11,14 +13,19 @@ CFLAGS=-O2 -Wall
all: dla.xex dla2csv dla2csv.xex
-dla.xex: dla.s io.s dlatbl.s xex.inc printint.s render.s drunkwalk.s
+dla.xex: dla.s io.s dlatbl.s xex.inc printint.s render.s drunkwalk.s dlaver.inc
$(CL65) $(CL65FLAGS) -l dla.list -Ln dla.labels -t none -o dla.xex dla.s
-dla2csv.xex: dla2csv.c
+dla2csv.xex: dla2csv.c dlaver.h
dlatbl.s: mkdlatbl.pl
$(PERL) mkdlatbl.pl > dlatbl.s
+dlaver.inc: dlaver.h
+
+dlaver.h: mkver.pl
+ $(PERL) mkver.pl $(VERSION)
+
dla2csv: dla2csv.c
@echo $(CC) $(CFLAGS) -o dla2csv dla2csv.c ; \
$(CC) $(CFLAGS) -o dla2csv dla2csv.c \
@@ -34,7 +41,7 @@ clean:
rm -f dla.xex dla2csv dla2csv.xex dla.list dla.labels *.o
distclean: clean
- rm -f dlatbl.s
+ rm -f dlatbl.s dlaver.inc dlaver.h
test: all
atari800 dla.xex
diff --git a/dla.s b/dla.s
index 63f6795..3d540b3 100644
--- a/dla.s
+++ b/dla.s
@@ -7,6 +7,7 @@
; speed boost for 2 reasons: less DMA from the ANTIC chip, and we get
; to use 1 byte for the X coordinate.
+ .include "dlaver.inc"
.include "atari.inc"
.include "xex.inc"
.include "nextpage.inc"
@@ -622,7 +623,7 @@ close1:
; banner and saveprompt must start with a clear-screen code.
banner:
.byte $7d, "Diffusion Limited Aggregate",$9b
- .byte "Urchlay's ASM version 0.1.99",$9b,$9b
+ .byte "Urchlay's ASM version ",VERSION,$9b,$9b
.byte "Particle count range: 1 to 65535",$9b
.byte "How many particles [",$0
diff --git a/dla.xex b/dla.xex
index 43ee4f5..113e80b 100644
--- a/dla.xex
+++ b/dla.xex
Binary files differ
diff --git a/dla2csv.c b/dla2csv.c
index fea78d6..ca46fc1 100644
--- a/dla2csv.c
+++ b/dla2csv.c
@@ -7,6 +7,8 @@
#include <unistd.h>
#include <errno.h>
+#include "dlaver.h"
+
#define HEIGHT 170
#define WIDTH 256
@@ -145,7 +147,7 @@ int main(int argc, char **argv) {
putchar(0x7d);
#endif
- printf("DLA to CSV converter.\n\n");
+ printf("DLA to CSV converter v" VERSION ".\n");
while(1) {
err = 0;
diff --git a/dla2csv.xex b/dla2csv.xex
index 06ba846..9e551ec 100644
--- a/dla2csv.xex
+++ b/dla2csv.xex
Binary files differ
diff --git a/dlaver.h b/dlaver.h
new file mode 100644
index 0000000..a7cc638
--- /dev/null
+++ b/dlaver.h
@@ -0,0 +1 @@
+#define VERSION "0.2.0"
diff --git a/dlaver.inc b/dlaver.inc
new file mode 100644
index 0000000..8bb2e0e
--- /dev/null
+++ b/dlaver.inc
@@ -0,0 +1 @@
+ .define VERSION "0.2.0"
diff --git a/mkver.pl b/mkver.pl
new file mode 100644
index 0000000..d17efa6
--- /dev/null
+++ b/mkver.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+
+$ver = shift || die "Usage: $0 [version]\n";
+
+open F,">dlaver.inc" or die $!;
+print F " .define VERSION \"$ver\"\n";
+close F;
+
+open F,">dlaver.h" or die $!;
+print F "#define VERSION \"$ver\"\n";
+close F;
+
+exit 0;