From b3532358b55af97983418e6edbf76029bc2e7162 Mon Sep 17 00:00:00 2001
From: "B. Watson" <yalhcru@gmail.com>
Date: Thu, 7 Jan 2016 08:12:21 -0500
Subject: update readme, dike out unused sounds

---
 Makefile   |  7 ++++++-
 README.txt | 53 +++++++++++++++++++++++++++++++++++++++++------------
 sounds.c   |  6 ++++--
 sounds.h   |  7 ++++++-
 4 files changed, 57 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index 5b4639c..730ddc3 100644
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,7 @@ HOSTCFLAGS=-Wall
 XEX=taipan.xex
 
 # All the C and asm sources for taimain.xex:
+TAIMAIN_HDRS=sounds.h
 TAIMAIN_C_SRC=taipan.c sounds.c
 TAIMAIN_ASM_SRC=rand.s draw_lorcha.s timed_getch.s jsleep.s portstat.s clrtobot.s
 
@@ -128,7 +129,7 @@ help.dat: help.txt text2screen.pl
 
 # The main executable. All the C and asm code goes here, except the init
 # segment in newtitle.s.
-taimain.xex: $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC)
+taimain.xex: $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC) $(TAIMAIN_HDRS)
 	cl65 -m taipan.map $(CFLAGS) -o taimain.xex $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC)
 
 #cl65 --mapfile taipan.map $(CFLAGS) -o taimain.xex taipan.c sounds.c rand.s draw_lorcha.s timed_getch.s jsleep.s portstat.s clrtobot.s
@@ -139,6 +140,10 @@ taimain.xex: $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC)
 taipan.lst: taipan.c
 	cl65 -m taipan.map $(CFLAGS) -c -o /dev/null -l taipan.lst -T taipan.c
 
+# Another such rule for sounds.c:
+sounds.lst: sounds.c sounds.h
+	cl65 -m sounds.map $(CFLAGS) -c -o /dev/null -l sounds.lst -T sounds.c
+
 # The font gets loaded into RAM, in the area reserved by the
 # -D__RESERVED_MEMORY__ option to cl65. To actually use the font,
 # taimain.xex contains code that sets CHBAS ($02f4).
diff --git a/README.txt b/README.txt
index ed78879..f951ca1 100644
--- a/README.txt
+++ b/README.txt
@@ -23,10 +23,6 @@ can be found here: http://www.taipangame.com/
 
 What's missing:
 
-- Sound. The Linux/curses port doesn't have any, but I'm planning to
-  have the Atari mimic the sounds from the Apple II version, plus
-  maybe a few more (cannon shots and explosions during combat).
-
 - Large integer (or floating point) support. Cash, Bank, and Debt
   amounts will roll over to 0 if they exceed the max value for a 32-bit
   unsigned integer (around 4 billion). I'm not sure if this is a real
@@ -125,6 +121,12 @@ arcade game).
 
 Bugs! At least these:
 
+- The BSS overlaps the start of the title screen. Consequences: There
+  is a momentary graphics glitch when the main game is done loading and
+  before it shows the "name your firm" screen. Also, we can't go back
+  and display the title screen (but that's not something really necessary
+  anyway). The fix: make the damn code smaller!
+
 - The "negative interest" bug is currently missing, due to using
   unsigned values for debt. Plus, it's cheating. It'll get added back when
   I either start using big numbers (floats or 64-bit ints or whatever),
@@ -162,11 +164,12 @@ Bugs! At least these:
 
 - One of my playtesters reported that, when running away from combat, it
   said 4 billion ships were attacking (number of ships must have gone
-  negative).
+  negative). I was never able to reproduce this.
 
-- After a fight, "Arriving at Manila" or such sometimes appears on the
+- After a fight, "Arriving at Manila" or such would sometimes appears on the
   fight screen without clearing it first (if you ran away, you can still
-  see ships).
+  see ships). I *think* this is fixed, but I don't understand what caused
+  it so I'm leaving it in this list in case I'm wrong.
 
 Differences between the Apple II original and Linux port:
 
@@ -193,8 +196,19 @@ and it complicates the code more than I want to deal with. Also #10
 will probably not happen (to me, the slow ship-sinking of the Apple
 version is annoying anyway).
 
-Right now, items 1, 2, 4, 5, 7, 8, and 9 are implemented Apple-style;
-and 3, 6, 10 are Linux-style.
+Right now, items 1, 2, 3, 4, 5, 7, 8, and 9 are implemented Apple-style;
+and 6, 10 are Linux-style.
+
+Added a few features not in the Apple or Linux versions:
+
+- I made it possible to disable the sound, since it's kinda repetitive
+  and annoying, plus the game "freezes" while sounds are playing (no
+  threading on Atari!) which slows down gameplay.
+
+- Added a way to change the background color and text brightness. Only
+  3 brightness levels available, and only 3 colors: green, amber, and
+  black (to mimic the 3 most popular types of monitor used with Apple
+  computers back in the day).
 
 I've made a few changes to the UI, compared to the Apple version:
 
@@ -209,7 +223,21 @@ I've made a few changes to the UI, compared to the Apple version:
   it matches the "You can afford 5" inverse video box on the trading
   screen.
 
-- "You're ship is overloaded" => "Your ship is overloaded".
+- The + that indicates more ships offscreen is inverse video. I find
+  that I don't notice it's there, if it's normal video.
+
+- "You're ship is overloaded" => "Your ship is overloaded". Sorry,
+  grammar nazi.
+
+- Updating the port status screen, and text printing in general, happens
+  faster and cleaner-looking, due to using C and asm rather than BASIC,
+  and also because the static parts of the screen aren't redrawn unless
+  they need to be.
+
+- The title screen now has a help menu and some key commands to change the
+  screen colors and enable/disable sound. The "Press 'ESC' to start"
+  has been changed to "Press 'ESC' for help", and any non-command key
+  starts the game.
 
 Other things that need doing to the code:
 
@@ -271,7 +299,7 @@ Other things that need doing to the code:
   4 digits there, 9999trillion would be the max. Or, abbreviate "billion"
   as "bil", allowing 4 more digits. "99999999 bil" would be 99 quadrillion.
 
-- Size optimization. Right now, the executable is almost 27K of code. I'd
+- Size optimization. Right now, the executable is almost 28K of code. I'd
   like it to at least fit on a 16K cartridge. A lot of the C code is
   redundant, and some things can be rewritten in asm if need be. I've
   already eliminated all uses of printf() and its ilk, which removed 2K
@@ -313,7 +341,8 @@ faithful to the original, and the Plus version could have some or all of:
 - Actual market trends, rather than a base price + random number. There
   might be news events that cause prices to go up/down (e.g. Arms are
   up at Saigon because there's a gang war in progress, Opium is up at
-  some port but the chances of getting busted are higher).
+  some port but the chances of getting busted are higher). This feature
+  actually exists in Art Canfil's TRS-80 Taipan "version 10".
 
 - Ability to control a fleet of ships. Each one will either be a cargo
   ship or a warship.
diff --git a/sounds.c b/sounds.c
index de6ea83..f6a4ac0 100644
--- a/sounds.c
+++ b/sounds.c
@@ -80,6 +80,7 @@ void under_attack_sound(void) {
 	stop_sound();
 }
 
+#ifdef NEW_SOUNDS
 void cannon_sound(void) {
 	unsigned char i;
 
@@ -113,11 +114,11 @@ void weve_been_hit_sound(void) {
 
 	stop_sound();
 }
+#endif
 
 #ifdef TESTXEX
 int main(void) {
 	for(;;) {
-		/*
 		puts("Bad joss, Taipan!");
 		bad_joss_sound();
 		jsleep(30);
@@ -129,8 +130,8 @@ int main(void) {
 		puts("1.0E+97 hostile ships approaching, Taipan!");
 		under_attack_sound();
 		jsleep(30);
-		*/
 
+#ifdef NEW_SOUNDS
 		puts("We're firing on them!");
 		cannon_sound();
 		jsleep(30);
@@ -138,6 +139,7 @@ int main(void) {
 		puts("We've been hit!");
 		weve_been_hit_sound();
 		jsleep(30);
+#endif
 	}
 
 hang: goto hang;
diff --git a/sounds.h b/sounds.h
index 6dd3492..911e6dd 100644
--- a/sounds.h
+++ b/sounds.h
@@ -15,11 +15,16 @@ void bad_joss_sound(void);
 /* played when something good happens */
 void good_joss_sound(void);
 
-/* UNUSED: will be played before & during combat */
+/* played before & during combat */
 void under_attack_sound(void);
 
+#ifdef NEW_SOUNDS
+/* UNUSED: will be played when firing at an enemy ship */
+void cannon_sound(void);
+
 /* UNUSED: will be played while screen flashes in combat */
 void weve_been_hit_sound(void);
+#endif
 
 /* rest of this file is a list of all the instances of each sound,
 	gathered by playing the Apple II version in an emulator, and by
-- 
cgit v1.2.3