Skip to content

Commit

Permalink
[KERNAL/BUILD] Set default PRERELEASE version for easier programmatic…
Browse files Browse the repository at this point in the history
… ROM version testing (X16Community#180)
  • Loading branch information
mooinglemur authored Oct 7, 2023
1 parent e854469 commit 5152994
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions bannex/help.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -39,7 +44,7 @@ uc_address = $42
phy

jsr printstring
.byte "COMMUNITY RELEASE R",0
.byte "RELEASE R",0

pla
clc
Expand Down
24 changes: 12 additions & 12 deletions bannex/splash.s
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 5152994

Please sign in to comment.