aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--cartmsg.txt1
-rw-r--r--checkmem.s21
3 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 6dd4921..43954c4 100644
--- a/Makefile
+++ b/Makefile
@@ -153,12 +153,9 @@ comptitle.xex: titledata.dat titlecomp.pl comptitle.s.in
cl65 -l comptitle.lst -o comptitle.xex -t none --asm-define destination=$(TITLE_DATA_ADDR) comptitle.s
# tiny 1-sector memory checker, aborts the laod if a cart is present.
-checkmem.xex: cartmsg.dat checkmem.s
+checkmem.xex: checkmem.s
cl65 -o checkmem.xex -t none checkmem.s
-cartmsg.dat: cartmsg.txt text2screen.pl
- perl text2screen.pl cartmsg.txt > cartmsg.dat
-
# Init segment that loads after the title screen data. It sets up
# a custom display list and sets the GTIA for narrow playfield,
# then waits for a keypress. Afterwards, it restores the OS's
diff --git a/cartmsg.txt b/cartmsg.txt
deleted file mode 100644
index 350e093..0000000
--- a/cartmsg.txt
+++ /dev/null
@@ -1 +0,0 @@
-48K required. Remove cartridge.
diff --git a/checkmem.s b/checkmem.s
index 90d21db..a87bbd2 100644
--- a/checkmem.s
+++ b/checkmem.s
@@ -1,7 +1,10 @@
; initial load segment for taipan. intended to be a tiny (1-sector)
-; routine that checks for the presence of BASIC or a cartridge, and
-; aborts the load if found.
+; routine that checks for the presence of BASIC or a cartridge, and aborts
+; the load if found. Also, it resets RAMTOP to RAMSIZ and does a GRAPHICS
+; 0, to avoid problems with funky loaders leaving the graphics screen
+; in the wrong place (Atarimax flash cart leaves it at $9cxx) or in the
+; wrong graphics mode (Fenders 3-sector loader doesn't set up GR.0).
; cl65 -o checkmem.xex -t none checkmem.s
@@ -15,8 +18,12 @@ start = $0600 ; use page 6 for now
.org start
+; message is "Need 48K, remove cartridge" in screen codes.
msg:
- .incbin "cartmsg.dat"
+ .byte $2e, $65, $65, $64, $00, $14, $18, $2b
+ .byte $0c, $00, $72, $65, $6d, $6f, $76, $65
+ .byte $00, $63, $61, $72, $74, $72, $69, $64
+ .byte $67, $65
msglen = * - msg - 1
S: .byte "S:",0
@@ -48,11 +55,11 @@ init:
plp
bcc have_cart
- ; if ramtop is $c000 or higher, we're OK, just exit.
+ ; if RAM size is $c000 or higher, we're OK, just exit.
rts
have_cart:
- ; if ramtop is below $c000, we have a cartridge (or XL BASIC).
+ ; if RAM size is below $c000, we have a cartridge (or XL BASIC).
; print the "remove cart" message...
lda #<msg
sta FR0
@@ -66,10 +73,10 @@ msgloop:
dey
bpl msgloop
+ sty CH ; y == $ff at this point, clear keyboard
; ...wait for a keystroke...
wait4key:
- lda CH
- cmp #$ff
+ cpy CH
beq wait4key
; ...and do a warmstart.