aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-02-24 16:25:39 -0500
committerB. Watson <yalhcru@gmail.com>2016-02-24 16:25:39 -0500
commitad6e5ee981f85839443cc359537bf2997f5ad11d (patch)
tree8183e2a0c5c6529436daafcf3a022a6fcab222b8
parentf898176dd3871dcb15ecfbb3eca46f539d284b8b (diff)
downloadtaipan-ad6e5ee981f85839443cc359537bf2997f5ad11d.tar.gz
remove some unused conio code, move newtitle.s variables to \$cb-\$ce
-rw-r--r--conio/chline.s14
-rw-r--r--conio/cputs.s16
-rw-r--r--newtitle.s13
-rw-r--r--soundasm.s2
-rw-r--r--taipan.c6
5 files changed, 28 insertions, 23 deletions
diff --git a/conio/chline.s b/conio/chline.s
index 2ad7fed..85d2e28 100644
--- a/conio/chline.s
+++ b/conio/chline.s
@@ -1,3 +1,5 @@
+; modified for taipan:
+; - commented out _chlinexy as taipan never uses it.
;
; Ullrich von Bassewitz, 08.08.1998
;
@@ -5,7 +7,7 @@
; void chline (unsigned char length);
;
- .export _chlinexy, _chline
+ .export _chline
.import popa, _gotoxy, cputdirect
.importzp tmp1
@@ -15,11 +17,11 @@ CHRCODE = 14
CHRCODE = $12+64
.endif
-_chlinexy:
- pha ; Save the length
- jsr popa ; Get y
- jsr _gotoxy ; Call this one, will pop params
- pla ; Restore the length
+;_chlinexy:
+; pha ; Save the length
+; jsr popa ; Get y
+; jsr _gotoxy ; Call this one, will pop params
+; pla ; Restore the length
_chline:
cmp #0 ; Is the length zero?
diff --git a/conio/cputs.s b/conio/cputs.s
index 13cf847..80b770e 100644
--- a/conio/cputs.s
+++ b/conio/cputs.s
@@ -1,3 +1,5 @@
+; modified for use with taipan:
+; - _cputsxy commented out as taipan never uses it.
;
; Ullrich von Bassewitz, 06.08.1998
;
@@ -5,16 +7,16 @@
; void cputs (char* s);
;
- .export _cputsxy, _cputs
+ .export _cputs
.import popa, _gotoxy, _cputc
.importzp ptr1, tmp1
-_cputsxy:
- sta ptr1 ; Save s for later
- stx ptr1+1
- jsr popa ; Get Y
- jsr _gotoxy ; Set cursor, pop x
- jmp L0 ; Same as cputs...
+;_cputsxy:
+; sta ptr1 ; Save s for later
+; stx ptr1+1
+; jsr popa ; Get Y
+; jsr _gotoxy ; Set cursor, pop x
+; jmp L0 ; Same as cputs...
_cputs: sta ptr1 ; Save s
stx ptr1+1
diff --git a/newtitle.s b/newtitle.s
index 3a5c73c..610fc60 100644
--- a/newtitle.s
+++ b/newtitle.s
@@ -22,16 +22,17 @@ origin = *
; location sound code will look at to see whether sound
; is disabled (0 = enabled, !0 = disabled). If you
; change this here, change it in sounds.h also!
- ; in case you're wondering, $03c0 is the start of the printer
- ; buffer. Taipan doesn't print, so no problem.
-sound_disabled = $03c0
+ ; $cb is free zero page, not used by the OS or DOS. These
+ ; don't have to be zero page, but it saves a few bytes if
+ ; they are.
+sound_disabled = $cb
; since we're changing the font and colors, we'll save the old
; ones here. If you change these, change them in taipan.c and soundasm.s
; also.
-fontsave = $03c1
-color1save = $03c2
-color2save = $003c3
+fontsave = $cc
+color1save = $cd
+color2save = $ce
version:
.incbin "ver.dat"
diff --git a/soundasm.s b/soundasm.s
index b47de30..c1663a4 100644
--- a/soundasm.s
+++ b/soundasm.s
@@ -40,7 +40,7 @@ repeats = tmp4
; this must agree with newtitle.s
; 0 = enabled, 1 = disabled
-sound_disabled = $03c0
+sound_disabled = $cb
_under_attack_sound:
; C version was:
diff --git a/taipan.c b/taipan.c
index 301290c..f0974f7 100644
--- a/taipan.c
+++ b/taipan.c
@@ -2091,12 +2091,12 @@ void final_stats(void)
/* restore CHBAS to its original value, generally the ROM font.
This is called fontsave in newtitle.s. */
- POKE(756, PEEK(0x3c1));
+ POKE(756, PEEK(0xcc));
/* restore COLOR1 and COLOR2. These locations are called
color1save and color2save in newtitle.s. */
- POKE(709, PEEK(0x3c2));
- POKE(710, PEEK(0x3c3));
+ POKE(709, PEEK(0xcd));
+ POKE(710, PEEK(0xce));
#endif
exit(0);