← Back to contents

ISO-8859 text, with escape sequences — 31K bytes




		Solar System Wars -- Version 1.14

Copyright © 1992 James Cleverdon.  All Rights Reserved.

The binary copy of THIS version of SSW and its other files may be freely
distributed for non-commercial purposes, including and especially by
Fred Fish's wonderful collection of software.

More legal garbage and disclaimers below.


		   New Features for Version 1.14

* First public release!

* All new support for two-button joysticks!

* Everyone now gets Hyperspace all the time, as well as an extra weapon
  from the Options menus!

* Double-thick shields for EXTRA protection!

* Improved color register handling for superior performance without
  the earlier glitching problems!

* Much smoother motion, because now SSW does one game cycle (complete with
  all gravity calculations) for every screen frame, even on standard A1000
  and A500 machines!  Yes, that's 50Hz for PAL and 60Hz for NTSC.  The only
  exception is for cycles involving sprite collisions, which take two
  screen frames per game cycle.

* All of the gravity and update subroutines have been redone in
  hand-optimized assembly code for extra speed, plus the added bonus of
  now fitting entirely in the instruction caches of 68020 and 68030 CPUs!

* Tested on A1000 (OS 1.3), A500 (OS 1.3), and A3000 (OS 2.04).
  Should run under OS 2.1.  Will almost certainly break on an AGA chip
  machine.  Is free of Enforcer hits on A3000.

* Multi-tasks.	(SSW should be the highest priority CPU-intensive task
  for smoothest game play.)

Throw away any older versions of SSW that may have escaped earlier!  This
is the latest and greatest!



			    Requirements

* Runs under OS 1.3 or 2.0X, and probably 2.1, but not 3.X.

* Needs 195K of Fast RAM and 39K of Chip RAM, in fairly large pieces.
  (Fragmented memory may prevent SSW from running, even if there is enough
   chip and fast ram listed by the Avail command.)

* Only needs 4K of stack space, but I'm keeping SAS/C's default of 8K
  in SSW.info.

* Requires all of the hardware sprites and all 4 audio channels.

* Works with one-button digital joysticks (standard Amiga joysticks), but
  two-button digital joysticks are strongly advised.  Instructions for
  joystick re-wire are included below.	Does not support analog joysticks.



			   Quick Start-up

* Install SSW.
    + If SSW isn't compressed and came on a floppy, either run it from
      the floppy, or just drag the SSW drawer to RAM or onto your hard
      drive.
    + If SSW came compressed, or was downloaded, create a drawer named SSW
      and decompress the archive file in the usual way:
	* Make a new drawer (directory) named SSW
	* open up a shell and CD SSW
	If you have SSW.lha:  lha -x -a -m x SSW.lha
	If you have SSW.zoo:  zoo -extract SSW.zoo
	* If operating under OS 1.3, then:
	    -  delete SSW.info
	    -  rename SSW.1.3.info SSW.info
	  Otherwise, if operating under OS 2.0 or greater:
	    -  delete SSW.1.3.info

* Hook up a joystick to Joyport 1, and either be ready to plug in a second
  joystick into Joyport 0, or familiarize yourself with the keyboard
  control keys.  If you have two-button digital joysticks now is the time
  to use them!	Or, you can use ordinary one-button joysticks and some
  keys on the keyboard.

* Start up SSW.  Use either the Workbench or the Shell.  Be sure that
  either its files are in the drawer with SSW, or else enter in the Shell:
    assign SSW: drawer_containing_files

* Select any desired options from the menu with the mouse or keyboard.
  (See below for a list of menu command keys.  Also, a file named
  Menu.keys has been provided for easy reference and printing.)
  An especially fun option is the Random Game (RightAmiga-R), which will
  randomly select solar systems for each round, along with a random extra
  weapon for each player.  There are also menus for torpedo velocity,
  torpedo life, ship thrust, etc.

* If you will be playing with two joysticks, then replace the mouse with
  the second one now.  Then press RightAmiga-1 to switch to joystick
  control.

* Enjoy!  The first player to reach 20 points wins!



		   Joystick and Keyboard Control

  Joystick control:
    Button   : Fire photon torpedo
    Left/Rght: Turn Left/Right
    Forward  : Thrust
    Back     : Hyperspace
    Button2  : Extra weapon
    (If you do not have two-button joysticks, the keyboard Extra keys:
     port 0: ENTER, RSHIFT
     port 1: LSHIFT)

  Keyboard control:
   (the numbers are on the keypad, not above the keyboard)
    DOWN,   5: Fire photon torpedo
    RETURN, 0: Hyperspace
    LEFT,   4: Turn Left
    RIGHT,  6: Turn Right
    UP,     8: Thrust
    RSHIFT, 2: Extra weapon
    7	     : Left & Thrust
    9	     : Right & Thrust

  Program control:
    ESC,    Q: Quit
    P	     : Pause
    HELP     : Displays Help requester



			   Common Gotchas

* Make sure the file named SSW.grv is in the current directory, or located
  at the SSW: assignment.  Otherwise, SSW will complain and die.

* You may need to adjust the screen position Preferences in order to see
  the seventh sprite.  In other words, if the purple ship's plasma bolt
  and seeker don't show up on the screen, do the following:
    + quit SSW -- type 'Q', followed by 'Y'
    + open the Preferences program for OS 1.3, or for OS 2.X and beyond,
      run the Overscan program in the Prefs drawer and select
      Edit Standard Overscan
    + shift the default screen position a little bit to the right
    + leave via the Use gadget
    + run SSW again
  Keep trying this until you find a screen position that allows the 7th
  sprite to appear, and best fits your monitor.  Once you have this,
  either save this setting in Preferences, or use one of the public
  domain Preferences savers to save this setting in a file for easy recall
  later.  (Prefs savers are available on Fred Fish disks and many BBSs.)

* If you've forgotten to press RightAmiga-1, then a joystick plugged
  into the mouse joyport won't do anything useful.



                          Menus Explained

A = Right Amiga Key, C = Control Key, other keys such as ESC are named

Project
  Pause?	       A-P		Pause the game
  New		       A-N		Start a New game
  About...	       HELP, AC-A
  Screen To Front      A-[		Move the SSW screen to the front
  Screen To Back       A-]		Push the SSW screen to the back
  Quit...	       A-Q		Leave SSW

System
  No Primaries	       A-0		No stars at all
  One Primary				Your ship orbits one star
    Red Dwarf	       A-E
    Yellow Star        A-Y
    Blue Giant	       A-B
    Small Black Hole   A-T
    Medium Black Hole  A-U
    Large Black Hole   A-I
  Two Primaries 			Your ship orbits two stars
    Red Dwarves        A-O
    Red / Yellow       A-{
    Red / Blue	       A-}
    Red / Sml BH       A-D
    Red / Med BH       A-F
    Red / Lrg BH       A-G
    Yellow Stars       A-H
    Yellow / Blue      A-J
    Yellow / Sml BH    A-K
    Yellow / Med BH    A-;
    Yellow / Lrg BH    A-:
    Blue Giants        A-'
    Blue / Sml BH      A-"
    Blue / Med BH      A-Z
    Blue / Lrg BH      A-X
    Small Black Holes  A-C
    Sml BH / Med BH    A-V
    Sml BH / Lrg BH    A-,
    Medium Black Holes A-<
    Med BH / Lrg BH    A-.
    Large Black Holes  A->
  Three Primaries			Your ship orbits three stars
    Red / Yel / Yel    A-/
    Yel / Blue / Blue  A-?
    Yel / SBH / SBH    A-DEL
    Blue / MBH / MBH   A-ESC
    BH: S / M / M      AC-B
    BH: M / L / L      AC-G
  Misc. Systems 			Other solar systems
    Black Ellipse      A-BackSpace
    Wide Red Binary    AC-J
    Wide Yellow Binary A-)
    Wide Blue Binary   A-`
    Wide Sml BH Binary A-~
    Wide Med BH Binary A-Space
    Wide Lrg BH Binary A-Tab
  Asteroid?	       A-A		Add an asteroid to 0/1 star games
  Random Game?	       A-R		Random system/weapons every round

Options
  Ship Thrust				Pick ship thrust
    Low 	       A-_
    Medium	       A-+
    High	       A-|
  Torp Velocity 			Pick photon torpedo velocity
    Low 	       A--
    Medium	       A-=
    High	       A-\
  Torp Lifetime 			Pick photon torpedo lifetime
    Short	       A-S
    Medium	       A-M
    Long	       A-L
  Screen Wrap?	       A-W		Pick screen wrap/bounce
  Green Ship Opts
    Joyport 0	       A-1		Control from mouse port
    Joyport 1	       A-2		Control from joystick port
    Keyboard	       A-3		Control from keyboard
    Full Shields       A-4		Be immune to photon torpedoes
    Flip Ship	       A-5		Do 180 degree flip
    Cloaking	       A-6		Become invisible
    Plasma Bolt        A-7		Shoot ball of electric death
    Quad Thrust        A-8		Accelerate with quadruple thrust
    Seeker	       A-9		Fire seeker missile
  Purple Ship Opts
    Joyport 0	       A-!		--Ditto--
    Joyport 1	       A-@
    Keyboard	       A-#
    Full Shields       A-$
    Flip Ship	       A-%
    Cloaking	       A-^
    Plasma Bolt        A-&
    Quad Thrust        A-*
    Seeker	       A-(



			   Weapons, etc.

* Photon Torpedo -- shoot a simple missile in the direction your ship
  is currently pointing.  A torpedo's initial velocity and lifetime are
  controlled by Options sub-menus.  You may only have nine torpedoes in
  flight at one time, but torpedoes are otherwise unlimited.

* Regular Shields -- a gray ring around your ship that absorbs Photon
  Torpedos, Plasma Bolts, and Seekers, as well as providing limited
  protection from collisions with asteroids and stars.	Torpedos erode
  holes in your shields, exposing your ship to sudden destruction.
  Contact with a star, opponent, asteroid, Plasma Bolt, or Seeker will
  overload and destroy your shield generator.

* Regular thrust -- accelerates your ship in the direction it points.
  The thrust level is controlled by an Options sub-menu.  Fuel is
  unlimited.

* Hyperspace -- activated by pulling directly back on a joystick (no
  diagonals!) or by pressing the RETURN key or 0 on the keypad.
  Hyperspace will teleport your ship to a random location on the screen.
  It takes time for Hyperspace to warp you out and back.  Your controls
  will be frozen during this time.  Also, the hyperspace field generator
  takes about two seconds to recharge and be available for use again.

* Full Shields -- when activated, your ship becomes a gray octagon,
  totally immune to photon torpedoes.  Full shields are lost under any
  circumstances that would overload your regular shields.  Your regular
  shields are lost whenever the Full Shields are lost.	Your other
  controls are frozen while the shields are up.  Full Shields only
  stay up for a maximum of about two seconds before dropping.  There is
  an about one-half second full shield generator recharge delay.

* Flip Ship -- do a 180 degree flip.  There is a short recharge delay.

* Cloaking -- your ship becomes invisible, except for a slight wavering
  in the background stars.  You may turn and accelerate while cloaked,
  at the cost of becoming partly visible, but may not fire any weapons.
  Cloaked ships are not tracked by Seekers.  There is an about one-half
  second cloaking device recharge delay.

* Plasma Bolt -- shoots a large, writhing ball of energy.  Has a limited
  range, and will be detonated by "just one" photon torpedo.  You may not
  fire another bolt until the first is gone.

* Quad Thrust -- accelerates your ship with four times its normal
  acceleration.  Note that SSW does have a maximum allowed speed for
  all objects (the "speed of light"), which is easy to reach using
  Quad Thrust.

* Seeker -- fires a missile which will seek out and hit your opponent.
  In fairness to the other player, Seekers are very simple-minded.
  Seekers can not track Cloaked ships (despite S.T. 6), but will keep
  their last acceleration vector.  You may not fire another seeker until
  the first is gone.



	   Known Offences Against the OS 2.0 Style Guide

* Topaz 8 is hard-coded into the menus, requesters, and opening screen.

* Not Internationalized.

* Uses raw key events without proper mapping.

* Turns off the mouse when a player is using Joyport 0.

* SSW's screen does not have drag or depth gadgets.  (See the Screen
  To Back and Screen To Front menu entries for a replacement.)

* The Quit and About requesters are not draggable or depth arrangable,
  and do not set a "Wait" pointer in the main window when activated.

* Game settings cannot be saved or loaded.

* Doesn't read Tool Types from icon files.

* Pays no attention to Shell command line arguments.



			 Known Deficiencies

* The use of keyboard screen dragging will misalign the sprites with
  SSW's screen.

* Uses hardware collision detection for all collisions except between
  photon torpedoes -- the Twilight Zone on Wrap games is a safety zone
  from all collisions.	Also, because there are no detection bits for
  collisions between members of a sprite pair, your own Plasma Bolts
  and Seekers won't kill you.
  (Twilight Zone: the off-screen part of the game playfield.)

* I can find no easy way of knowing whether the SSW screen is in the
  foreground, at least not without digging deep into private Intuition
  data.  This makes it hard for the Copper interrupt routine to
  know whether to consume the Copper interrupt, or not.  So I play
  around with the ScreenToFront and ScreenToBack functions and window
  activation events to try to insure that either SSW's screen is in front
  of all others, or that it is in back and the game is paused.

* Because of the fact that SSW jams its own values into the posctldata
  fields of sprites, and uses several low-level hardware registers, SSW
  has no chance of working with the AGA chip set.

* Since SSW uses a quick-and-dirty approximation for faster gravity
  calculations, some star systems are unstable.  Trinary systems will
  hit the screen edge after about 10 to 13 minutes.  This is almost
  never a problem, since most rounds last under two minutes.

* Uses ADCMD_LOCKs on the audio device, so it will release a requested
  channel, then attempt to reallocate it.  All this is according to the
  rules in the RKM, which allow sharing of audio channels.  However,
  some program's attempts to allocate an audio channel don't wait long
  enough for SSW's locks to be released, and fail.



		   Potential Portability Problems

* The ScreenToBack menu selection uses a probably non-portable kludge
  to activate the foremost window in the Workbench screen.

* Uses hardware registers for sprite/playfield collision detection, and
  changes the POTGO register to use two button joysticks.

* Directly modifies the posctldata fields of sprites, so anything that
  shifts SSW's view origin will confuse the sprite positioning.

* Reads hardware for both joysticks.

* Uses RAWKEY events for the keyboard, so no keymap translations, or
  localization.

* Installs its own Copper interrupt, and may not work well with other
  Copper interrupts.

* Assumes that Intuition screens use standard BitMaps.

* Bypasses the graphics library to read and write photon torpedoes, but
  uses MENUVERIFY and REQVERIFY to synchronize with Intuition.

* The structure used by the copper interrupt handler isn't in PUBLIC
  memory, as per the manuals.  This won't matter until virtual memory
  is attempted by Commodore.

* Sets and clears the CHECKED flag directly in MenuItems, although
  protected by Disable/Enable.



		       Implementation Details

* Sets up a Low-Res Dual Playfield screen with two bit-planes in either
  PAL or NTSC mode, based on presence of the PAL bit in GfxBase.  This
  means that a NTSC A3000 will display a NTSC screen, even if it is
  displaying a PAL Workbench.  Sorry, I couldn't find a legal way to
  override this, since any attempt to use NTSC/PAL Display IDs is set
  back to DEFAULT_MONITOR when doing the MakeScreen/RethinkDisplay after
  attaching the Dual Playfield.  Maybe this will change for OS 2.1.

* Installs a Copper interrupt Server and adds a Copper interrupt to the
  screen.

* Adds a high-priority (126) Input Event handler to the food chain to eat
  RAWMOUSE events when a joystick is plugged into joyport 0.  Otherwise,
  the menus would appear every time joystick 0's second button was pressed.
  This also keeps DMouse and other screen/mouse blankers or other
  Commodities from sometimes doing the wrong thing, like pushing the
  current screen to the back.  The handler is turned on whenever a player
  is using joyport 0, and the game isn't paused.

* Sorry, can't use AutoRequest or any other window-based requesters for
  the few requesters SSW uses.	I need the WINDOWACTIVATE and deactivate
  events to tell me when SSW has been pushed into the background.  This
  means using layer-based requesters that don't seem to be draggable.
  Yet another offense against the Style Guide.

* Allocates audio channels at priority -50, the highest standard level
  for sound effects.



			  Ask Capt'n Quirk

And now that grizzled and grouchy, veteran of Solar System Wars, Captain
Quirk -- one who deals out insults, death, and run-on sentences in all
directions, will answer some of your questions about game strategy!

   Thank you, worthless pandering announcer.  There's a big backlog today,
   so let's go right to the first member of the audience:

Q: How can I keep from getting blown out of the sky whenever my opponent
   gets Seeker and I get something wimpy like Cloaking?

A: What!  You've got Cloaking against Seeker and you come whining to me?
   Get yer pathetic rear-end back out in the arena and USE Cloaking!
   Once you are cloaked, Seekers can't track your ship!  However, they
   will keep their last heading, so if you uncloak to fire off a burst of
   torpedoes, then recloak after a Seeker is coming your way, be sure to
   accelerate away from your last course.  That will fool 'em every time.

Q: Suppose I don't have Cloaking, but have Flip instead?

A: Do I have to do all your thinking for you?  Haven't you noticed how
   totally stupid Seekers are?  Just get something massive, like a star
   or an asteroid between you and it and the Seeker will mindlessly ram
   into it.  What's more, Seekers never consider gravity in their tracking,
   programs and are easily confused by Black Hole's, or even Yellow Star's
   gravity.

Q: I try all that and still get fried.	Now what?

A: Get out of here!  <draws and waves blaster menacingly>  I haven't even
   mentioned shooting Seekers with torps, warping out of danger with
   Hyperspace, outrunning them with Quad Thrust, or blasting them with
   Plasma Bolts.

   Next questioner.

Q: If my ship can Cloak, why can't it fire Plasma Bolts when uncloaked?
   I saw that very move on an old episode of Star T<<ZZAAPP!!>>

A: <blowing on blaster barrel> Sorry, sonny!  You tried to say the "S.T."
   phrase, which is a registered trademark of Paramount Corporation.
   Don't even THINK of saying it on my show.

   Speaking of things we don't mention, <points blaster at camera> I
   don't want six hundred of you weekend-SSW geeks out there writing in
   and telling me that on S.T. 6 they had a modified torpedo track a
   cloaked ship.  <blasts nearby table>  I know that, and thought it was
   a stupid plot gimmick when I saw the movie.	Typical lazy
   screenwriters!  <burns a microphone cable in two>

   <takes a sheath of papers from a trembling stagehand>
   Our next question is from a fax:

Q: I have a hard time reaching the keyboard to use my Extra weapon.  How
   do you manage?

A: Now that's a fair question.  Either get into the habit of reaching for
   a shift key on the keyboard, or buy or build yourself some two button
   digital joysticks.  If you can locate a nine wire joystick cable and
   find some joysticks that have enough room inside to install a normally
   open push-button, then its easy to rewire an existing joystick.

   One more thing:  take the usual precautions when dealing with hot
   solder, connecting anything homemade up to your Amiga, etc.  If some
   pitiful excuse for a lawyer shows up on my doorstep, trying to serve
   me a lawsuit because I didn't warn you not to do something truly
   stupid, then I'll burn the lawyer down where he stands and spit on
   the ashes.
   <waves blaster, picture bounces as cameraman dives for cover>
   But, I've already been warned twice that I'm over my Lawyer limit for
   this season -- so don't screw up, OK?

   Now a question from the audience.

Q: Why are the orbits around Blue / Medium, Small / Medium, Yellow / Large,
   Red / Medium, and Medium / Large Binaries unstable, especially in a
   Bounce game?

A: Good question -- I won't kill you.
   <vaporizes an innocent bystander instead>  Those orbits have
   resonances with those of their primaries.  That, along with the crude
   approximation that passes for gravity in SSW does the rest.	Anyway,
   what do you care about orbits?  Are you a pilot, or what?

   Here's another fax:

Q: Cap'n Quirk, just what is Flip Ship good for?  Maybe nothing?

A: Maybe you've never found yourself around a Wide Large Black Hole
   Binary, doing an orbit once every second?  Maybe you've never had to
   suddenly thrust in the opposite direction because you were coming too
   close to a Blue Giant?  Maybe you've never had an enemy warp in
   directly behind you?  No doubt you've never had to handicap yourself
   when playing against a novice player! <throws fax into air, blasts it>

   What is the younger generation coming to?  For Zelkor's sake, use
   some imagination, will you?

   This will be our last question today.  From the audience:

Q: I had just about peeled all the shields from my opponent while only
   taking one or two hits myself, and was coming back in from the Twilight
   Zone to finish him off, when I blew up for no reason at all.
   What happened?

A: At last, a question worth answering.  Remember that while you are in
   the Twilight Zone the Amiga hardware collision detection circuitry
   isn't checking for collisions.  In the Twilight Zone, everyone and
   every torpedo is safe.  However, that also means that a torpedo that
   ordinarily would be absorbed by your shields has a chance of drifting
   inside your shields, and may still be there when you emerge from the
   Twilight Zone.  If that happens to you -- BOOM!
   <Blasts an off-camera object>  To avoid this you can use Full Shields
   on every entrance or exit from the Twilight Zone.  Otherwise, just be
   very careful out there.


That's all for today, but be sure to listen to the next exciting episode
of "Ask Capt'n Quirk!"
<fade to black as the SWAT team tackles Captain Quirk>



	  Legal Garbage and Disclaimers, In Plain English

Solar System Wars will not cure world hunger.  It will not bring global
peace.	I do not even guarantee that it is fun to play, or does anything
more useful than waste CPU cycles.

If you run this software and your disk drive bursts into flames, or your
1000 page dissertation on "Why Entropy Is Politically Incorrect" gets
corrupted, or something else goes drastically wrong, you will get my
sympathy but nothing else.  I will not provide any money or other kind
of compensation, no matter how valuable the hardware, software, or data
that you believe SSW, or SSW's interaction with some other piece of
software, has destroyed.

If you, or whoever you got SSW from, has hacked, patched, or otherwise
modified this package, then there is no telling what it will do, and I
will not be responsible for any part of any problems such changes cause.

If you don't like these limitations on my liability, then do not run
Solar System Wars.  If you do run SSW, then you have agreed to these
limitations.

Moreover, while I retain the copyright to Solar System Wars, this
version of SSW may be freely copied for non-commercial purposes, as
thanks for all the fine public domain and freely distributable software
that I have used over the years.  No one may charge more for your copy
of SSW than Fred Fish charges for one Fish disk.  SSW may eventually go
Shareware, in which case there may be registration fees.

(Aaarrrggghhhh!  I hate the paranoid attitude such legalisms require.)



	       Source Code Availability and Bug Fixes

I'm not making the source code available until I decide if I want to make
SSW shareware or not.  Enjoy this copy entirely guilt-free, without any
nagging requests to register, to send money anywhere, or to make Molotov
Cocktails in your basement for the Revolution (any Revolution).

The only thing I ask is that you mail to me any bug reports, great ideas,
and general impressions you have about SSW.  If I do decide to release
the source code, I'd like all the obvious bugs fixed first.

My address is:

		James Cleverdon
		16465 S.W. Estuary Dr., Apt. 101
		Beaverton, OR 97006
		USA

Bug fixes will be released via Fred Fish, and the other usual methods.

Ports for other machines, especially IBM PC clones?  Get real!	SSW relies
too heavily on the Amiga custom chips.


			  Acknowlegements

Thanks to my play testers:  Clark MacDonald who had the 9-wire cables and
let me crash his A3000, David Roemer for lots of good ideas (especially
the random game option), Stewart Boutcher for deadly fire and French
Vanilla ice cream, and all the others including the Bush Harbor Day gang.



			   File Manifest

Here are the files you should have received:

	   Name 	 Size	   What

	Menu.keys	  2019	(menu keys text)
	Menu.keys.info	   734	(its icon)
	SSW		 62208	(the program)
	SSW.1.3.info	   450	(the OS 1.3 icon)
	SSW.info	   463	(the OS 2.X icon)
	SSW.doc 	 31590	(this document)
	SSW.doc.info	   734	(its icon)
	SSW.grv 	123904	(the gravity table)



	      Instructions for Two-Button Joysticks

First, a crude ASCII picture of the end of a joystick cable.  This is
the DB-9 that plugs into your Amiga, taken from the Hardware Guide:

	 _____________________
	/		      \ 	The numbers are pin numbers.
	|  5   4   3   2   1  |
	 \		     /		Viewed as you would look into
	  \  9	 8   7	 6  /		its end.  Note:  female pins.
	   \_______________/

	Pin  Joystick  Mouse		* = optional button

	 1   forward   V-pulse
	 2   back      H-pulse
	 3   left      VQ-pulse
	 4   right     HQ-pulse
	 5   ---       middle button*
	 6   button1   left button
	 7   ---       +5V
	 8   GND       GND
	 9   button2*  right button

All you have to do is add a normally-open push-button with one of
the button's terminals connected to pin 8 (ground), and the other
connected to pin 9 (button2).  Push the button, which will ground pin 9,
and fire a plasma bolt.  Easy?	Maybe.

Standard joystick cables don't include pin 9.  I was lucky enough to
have a friend who had a bundle of premade DB-9 cables with all 9 wires
left over from a previous job.

You may not be so fortunate.  Check electronic surplus stores.	Look
carefully to make sure that there are pins in all nine holes.  Get a
continuity tester and verify that every wire you need is really there.

Another problem is finding a joystick that has enough room to allow
an extra button.  Also, it is hard to find a small push-button that is
both reliable and durable, plus has a button large enough not to leave
an imprint in your thumb at the end of a difficult game.

I'm assuming that you have at least some skill at electronics. If not,
check with someone who is skilled, or read the basic-technique articles
in an electronics hobby magazine.  If you've done all that, then I won't
need to tell you:

* Don't burn yourself.

* Be sure to insulate all your solder joints with electrician's tape or
  heat-shrink tubing.

* Test the finished product with a continuity tester.  Connect it between
  pin 9 and pin 8 on the joystick DB-9 connector.  The light should
  come on, the buzzer should buzz, or the ohmmeter should go to a low
  resistance value when the new button is pushed.  When it is released,
  the light should go out, the buzzer will be quiet, or the ohmmeter will
  read very high (or infinite) resistance.

About the only way you can damage your Amiga is by somehow connecting
the +5V line (pin 7) to ground (pin 8).  Since you won't even be working
with pin 7, this shouldn't happen.  Test for this mistake anyway.
Be happy by being paranoid about Murphy's Laws.



			    References

"Space Wars, or Turning Your Oscilloscope into a Telescope," Byte, way
long ago.



		      Thoughts for the Future

* Since I have to install an Input Event handler that eats RAWMOUSE
  events, then Intuition can't be moving the mouse pointer while the
  handler is turned on (unless someone uses the keyboard mouse mover).
  If so, why can't I use sprite 0?  How about four-star solar systems?
  (There are only two sets of color registers, so there could only be
  as many 4-star systems as 2-star.)

* Many analog joysticks have two buttons.  Since I already have to go
  directly to the hardware for digital joysticks, maybe I can support
  analog as well.....

* Can the Planet Cruncher be worked in somehow?  How about a Tholian
  web?

* What about a "Death Blossom" kind of weapon that shoots torpedos in
  eight different directions?  Or, maybe an Ack-ack weapon that shoots
  a sprite which explodes into a spray of torpedos.

* Maybe Flip Ship will go away.

* Would a Tractor Beam be useful?  Or, a Pressor Beam?

* I would like to do a laser beam, except that there is a 16 pixel
  width limit on sprites, and the underlying code expects that only
  point sources and spherically symmetric objects will be experiencing
  gravity.  (E.g. no provisions for bending an extended light beam
  around a black hole.)

* Maybe some way to repair your shields, like don't push a button for
  30 seconds per pixel repaired.

* Maybe add more sounds, or allow IFF 8SVX sound files.

* Get a real image of an asteroid for the asteroid sprite.

* There's another line on the joyport that is used for the middle mouse
  button.  How about 3-button joysticks?  And, what about that rumor on
  comp.sys.amiga.games that some Sega game pads are compatible with
  Amigas and already come with three buttons?  Suppose I assigned Full
  Shields to the third button?

* Would it be worthwhile to allow customized space ships?  Can I afford
  the CPU cycles?

* Maybe go from a shield erosion model, to a shield heating model, like
  in "The Mote In God's Eye" or E. E. Smith's Lensman series.  Of
  course, to do that right I would have to include heating from stars.
  This should be roughly proportional to the sum of the magnitudes of the
  gravitational force vectors, except for black holes.	And what happens
  when you finally do blow the shields?  BOOM?	Or just lose them?