aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-02-28 05:05:56 -0500
committerB. Watson <yalhcru@gmail.com>2016-02-28 05:05:56 -0500
commitbe6706ab0b2df53bc1cc9e8492a84698e1fd0f1c (patch)
tree01ec401f66800f855d9d761d8f087b6e16a8854e
parentc0b018f57b582c0c6b0ff725831cc203b3819d49 (diff)
downloadtaipan-be6706ab0b2df53bc1cc9e8492a84698e1fd0f1c.tar.gz
try to fix race condition with SpartaDOS TDLINE
-rw-r--r--checkmem.s13
-rw-r--r--newtitle.s15
-rw-r--r--taipan.c5
3 files changed, 26 insertions, 7 deletions
diff --git a/checkmem.s b/checkmem.s
index ad67f50..fedbc25 100644
--- a/checkmem.s
+++ b/checkmem.s
@@ -122,7 +122,18 @@ gr_0:
sta ICBAL,x
lda #>S
sta ICBAH,x
- jmp CIOV
+ jsr CIOV
+
+ ; save display list pointer where taipan.c's main() can find it.
+ ; this is done ASAP after the CIO call, to avoid saving the DL
+ ; after SpartaDOS's TDLINE has had a chance to modify it.
+ ; we use FR1 because the menu code in newtitle.s trashes FR0.
+ lda SDLSTL
+ sta FR1
+ lda SDLSTH
+ sta FR1+1
+
+ rts
end:
.word INITAD
diff --git a/newtitle.s b/newtitle.s
index e70e885..6bc0b4a 100644
--- a/newtitle.s
+++ b/newtitle.s
@@ -216,7 +216,7 @@ start:
; turn off screen, in case vblank happens while we work
lda #0
- sta FR0
+ ;sta FR0 ; why was I doing this?
sta SDMCTL
sta sound_disabled ; fix issue with sound not working with APE loader
@@ -279,11 +279,18 @@ start:
;; lda #$FF
;; sta SIZEM ; FF = quad width, all missiles
- ; setup our display list
+ ; save old display list
+ ; this is now done in checkmem.s for the .xex build, to avoid
+ ; bad interactions with SpartaDOS's TDLINE.
+ ; still needs to be done here for the cart.
+ .ifdef CART_TARGET
lda SDLSTL
- sta FR0
+ sta FR1
lda SDLSTH
- sta FR0+1
+ sta FR1+1
+ .endif
+
+ ; setup our display list
lda #<dlist
sta SDLSTL
lda #>dlist
diff --git a/taipan.c b/taipan.c
index 49f0b62..50344f9 100644
--- a/taipan.c
+++ b/taipan.c
@@ -163,6 +163,7 @@ extern void redraw_port_stat(void);
/**** End of atari-specific stuff. Supposed to be, anyway. */
+/* messages.c is generated by messages.pl */
#include "messages.c"
extern void __fastcall__ print_msg(const char *msg);
@@ -3330,8 +3331,8 @@ int main(void) {
sets up its own DL, and uses narrow playfield mode. First
thing we do it put things back the way they were.
FONT_ADDR is set on the command line (see the Makefile). */
- POKE(560, PEEK(212)); // restore the
- POKE(561, PEEK(213)); // display list
+ POKE(560, PEEK(0xe0)); // restore the
+ POKE(561, PEEK(0xe1)); // display list
POKE(756, FONT_ADDR / 256); // use our custom font
POKE(731, 1); // disable keyclick on XL/XE (does nothing on 400/800)
POKE(559, 34); // turn on the screen (normal playfield)