From f81dda7fac68b2379564f3eeb1e1971a1ca302a9 Mon Sep 17 00:00:00 2001 From: Chris Hooper Date: Thu, 17 Oct 2024 02:46:39 -0700 Subject: [PATCH] Moved sdmac version to the Makefile so release builds may be automated --- Makefile | 5 +++-- sdmac.c | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bdf1e50..801d7fc 100644 --- a/Makefile +++ b/Makefile @@ -6,14 +6,15 @@ # PROGS := sdmac -VER := $(shell awk '/\$$VER:/{print $$7}' sdmac.c) +VER ?= 0.9+ +#VER := $(shell awk '/\$$VER:/{print $$7}' sdmac.c) ADF_FILE := sdmac_$(VER).adf ZIP_FILE := sdmac_$(VER).zip LHA_FILE := sdmac_$(VER).lha ARC_DIR := sdmac_$(VER) CC := m68k-amigaos-gcc -CFLAGS := -Wall -Wno-pointer-sign -Os +CFLAGS := -Wall -Wno-pointer-sign -Os -DVER=\"$(VER)\" CFLAGS += -fomit-frame-pointer diff --git a/sdmac.c b/sdmac.c index 8b67165..0b325ab 100644 --- a/sdmac.c +++ b/sdmac.c @@ -1,5 +1,5 @@ /* - * SDMAC Version 0.8 2024-10-03 + * SDMAC Version 0.9 2024-10-17 * ----------------------------- * Utility to inspect and test an Amiga 3000's Super DMAC (SDMAC) and * WD SCSI controller for correct configuration and operation. @@ -14,7 +14,7 @@ * THE AUTHOR ASSUMES NO LIABILITY FOR ANY DAMAGE ARISING OUT OF THE USE * OR MISUSE OF THIS UTILITY OR INFORMATION REPORTED BY THIS UTILITY. */ -const char *version = "\0$VER: SDMAC 0.8 ("__DATE__") � Chris Hooper"; +const char *version = "\0$VER: SDMAC " VER " ("__DATE__") � Chris Hooper"; #include #include @@ -1237,8 +1237,11 @@ show_dmac_version(void) case 2: case 4: printf("SCSI DMA Controller: SDMAC-%02d", sdmac_version); - if ((sdmac_version == 4) && ((sdmac_version_rev >> 24) == 'v')) { + if ((sdmac_version == 4) && ((sdmac_version_rev >> 24) == 'v') && + (((sdmac_version_rev >> 8) & 0xff) == '.')) { /* + * SDMAC_REVISION is in the format: 'v' '.' + * * XXX: Could also key off SSPBDAT as a differentiator for * ReSDMAC. According to the A3000+ docs, it may be only * the lower 11 bits of SSPBDAT which are r/w on SDMAC-04.