Skip to content

Commit

Permalink
Moved sdmac version to the Makefile so release builds may be automated
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hooper committed Oct 17, 2024
1 parent c81337a commit f81dda7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 6 additions & 3 deletions sdmac.c
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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 <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -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' <major> '.' <minor>
*
* 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.
Expand Down

0 comments on commit f81dda7

Please sign in to comment.