From ce6b2d2d3024d856c9538b7f4b369f52f9ef1412 Mon Sep 17 00:00:00 2001 From: mooinglemur Date: Sat, 7 Oct 2023 13:50:01 -0700 Subject: [PATCH] [KERNAL/BUILD] Set default PRERELEASE version for easier programmatic ROM version testing --- .github/workflows/build.yml | 2 +- Makefile | 9 ++++++--- bannex/help.s | 9 +++++++-- bannex/splash.s | 24 ++++++++++++------------ 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 242a0860..43f03889 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: Build Release ROM if: startsWith(github.ref, 'refs/tags/r') run: | - PRERELEASE_VERSION=$(echo "$GITHUB_REF_NAME" | grep -oP '[0-9]+$') make + RELEASE_VERSION=$(echo "$GITHUB_REF_NAME" | grep -oP '[0-9]+$') make - name: Archive Build Result run: | mkdir artifact diff --git a/Makefile b/Makefile index f69e89a0..a8fd64f9 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,14 @@ SERIAL_SOURCE_BASE ?= CBM # for both also supported # * OPENROMS +PRERELEASE_VERSION ?= "45" + ifdef RELEASE_VERSION VERSION_DEFINE="-DRELEASE_VERSION=$(RELEASE_VERSION)" -endif -ifdef PRERELEASE_VERSION - VERSION_DEFINE="-DPRERELEASE_VERSION=$(PRERELEASE_VERSION)" +else + ifdef PRERELEASE_VERSION + VERSION_DEFINE="-DPRERELEASE_VERSION=$(PRERELEASE_VERSION)" + endif endif CC = cc65 diff --git a/bannex/help.s b/bannex/help.s index c105e9f0..a387eb99 100644 --- a/bannex/help.s +++ b/bannex/help.s @@ -13,7 +13,7 @@ uc_address = $42 .proc help: near jsr printstring - .byte 13,"COMMANDER X16 ROM",13,0 + .byte 13,"COMMANDER X16 ROM ",0 lda #$80 sta poker @@ -28,6 +28,11 @@ uc_address = $42 bpl :+ eor #$ff inc + pha + jsr printstring + .byte "PRE",0 + pla + ldy #0 : cmp #10 bcc :+ sbc #10 @@ -39,7 +44,7 @@ uc_address = $42 phy jsr printstring - .byte "COMMUNITY RELEASE R",0 + .byte "RELEASE R",0 pla clc diff --git a/bannex/splash.s b/bannex/splash.s index 58a33791..e05377b6 100644 --- a/bannex/splash.s +++ b/bannex/splash.s @@ -233,15 +233,15 @@ l3msg20: l4msg40: .byte "K HIGH RAM" -.ifdef PRERELEASE_VERSION +.ifdef RELEASE_VERSION .byte " - ROM VER R" -.if PRERELEASE_VERSION >= 100 - .byte (PRERELEASE_VERSION / 100) + '0' +.if RELEASE_VERSION >= 100 + .byte (RELEASE_VERSION / 100) + '0' .endif -.if PRERELEASE_VERSION >= 10 - .byte ((PRERELEASE_VERSION / 10) .mod 10) + '0' +.if RELEASE_VERSION >= 10 + .byte ((RELEASE_VERSION / 10) .mod 10) + '0' .endif - .byte (PRERELEASE_VERSION .mod 10) + '0' + .byte (RELEASE_VERSION .mod 10) + '0' .else .byte " - GIT " .incbin "../build/signature.bin" @@ -251,15 +251,15 @@ l4msg40: l4msg20: .byte "K HI RAM",0 l5msg20: -.ifdef PRERELEASE_VERSION +.ifdef RELEASE_VERSION .byte "ROM VER R" -.if PRERELEASE_VERSION >= 100 - .byte (PRERELEASE_VERSION / 100) + '0' +.if RELEASE_VERSION >= 100 + .byte (RELEASE_VERSION / 100) + '0' .endif -.if PRERELEASE_VERSION >= 10 - .byte ((PRERELEASE_VERSION / 10) .mod 10) + '0' +.if RELEASE_VERSION >= 10 + .byte ((RELEASE_VERSION / 10) .mod 10) + '0' .endif - .byte (PRERELEASE_VERSION .mod 10) + '0' + .byte (RELEASE_VERSION .mod 10) + '0' .else .incbin "../build/signature.bin" .endif