	+----------------------------------------------------+
	|                                                    |
	|   SSSS                     GGG                     |
	|  S                        G   G                    |
	|  S      aaa  mm m   eee   G      aaa  mm m   eee   |
	|   SSS      a m m m e   e  G GGG     a m m m e   e  |
	|      S  aaaa m m m eeeee  G   G  aaaa m m m eeeee  |
	|      S a   a m   m e      G   G a   a m   m e      |
	|  SSSS   aaaa m   m  eee    GGG   aaaa m   m  eee   |
	|                                                    |
	|                   v1.3 by Adamman                  |
	|                      10/17/97                      |
	|                    For  Ash 3.0                    |
	|                                                    |
	+----------------------------------------------------+

	OK...I am finally releasing version 1.3 of this game that I have been exhaustedly coding :) for a while now.  I must say that even though this is a very simple game to make, I had my share of bugs while making this, and I also learned a lot about Z80 ASM in the process of making my first real, God-honest Z80 program.  I think that it is very well coded, and in this version, I've happily included the source!!!
	Let's also note that I am a KickASM member!!!  Even though there seem to not be any traces of me nor SameGame on the KickASM page, this qualifies as the FIRST KICKASM PROGRAM!!!!!!!!  Wowie, jump for joy!  Be sure to visit KickASM @ http://www.teleweb.net/arenfrow/kickasm/.
	OK, that was nifty, now for some useful info:

	From the Insane Game for ZShell docs...

"...Do you have too much time on your hands?  Do you need to play a puzzle game
that is so frustratingly addictive that it will eat up all of your spare time?
Do you need to play an action game that so intense, it could result in some
sort of neural injury?  Do you need to play a game against a friend that could
result in a lawsuit?  If so, Insane Game is for you.  If not, well, try it
anyway :)..."

	OK, that's a pretty good description if I do say so myself...:).  Here's more:

"...I'm not too sure about the history of this game,
so please Send Me E-Mail if you have any information.  From what I can gather,
this game was created by someone in Japan.  There are 5 or so versions of this
game for Windows 3.1 alone, and all of them were made by Japanese people.  All
signs seem to point to Hudson Soft, a Japanese software company, as its
creator.  I'm not sure about the specific person, but I'm pretty sure that it
was Ken Takahasi.  There are many ports of the game.  If you have a browser
that supports Java (like Netscape 2.0 or higher or Internet Explorer 3.0),
http://www.cse.nd.edu/java/SameGame.html is a good version of the game.  It's
what turned me into a SameGame-maniac in the first place.

The object of Insane Game is to get rid of all the tiles.  In real life, you
could just dump the tiles into a garbage can and that would be the end of it,
but that would get boring after a while.  In Insane Game, you must eliminate
tiles by choosing groups of at least 2 or more touching tiles that are the
same type.  Hence the original name SameGame.  Here's an example:

12325
25555
12331

There are 2 eliminatable groups here.  Firstly, there is the gigantic group of
5s.  Secondly, there's the two 3s near the bottom that are hard to notice.

Ah, but this game would be pretty simple if all you did was choose the
existing groups of tiles.  It would be too obvious.  SO, we add the extra
factor of Gravity to the mix.  The pieces first want to fall downward.  If a
column is totally devoid of pieces after their initial descent, the pieces
will shift sideways to the left to eliminate it.  Let's see what would happen
if you got rid of those 5s:

1232           1
2        ->    2232
12331          12331

And look!  A new group of 2s has appeared out of nowhere!  Furthermore, the
existing group of 3s expanded to include another.  If you eliminated the 3s:

1              1              1
22 2     ->    22        ->   22 
12  1          12 21          1221

Note how first, the 2 fell, and then, the newly-empty column was eliminated
when everything else shifted to the left.

You can't always eliminate all the pieces.  In fact, you usually can't.
However, most of the time you can eliminate almost all of the pieces.  Just
think ahead and look for patterns.  And a surprising amount of the time, you
CAN eliminate all of the pieces.  Work from the top-right down, then to the
left.  Here, if we get rid of the 2s, and finally the 1s, we just got rid of
something that was seemingly pretty impossible!  Although the "official"
object is to get rid of every tile, in order to get the most points, it is
better to eliminate large groups of tiles and leave some remaining than to
eliminate small groups of tiles and get rid of all of them.

Scoring: The score increases exponentially depending on the number of pieces
eliminated.  Basically, the score is calculated using the algorithm: (x-1)^2,
where x is the number of pieces eliminated at once.  Here is a brief chart:
# Eliminated   Score
2              1
3              4
4              9
5              16
6              25
7              36
8              49
9              64
10             81
11             100

and so on.  If you win, points are QUADRUPLED!  Go for it!  However, the key
to the top score is not to win so much as to blast large pockets of pieces...."

	Yeah...that's all true to my game.  Oh wait, one more quote...Some tips for you, the gamer!!!

"...Some strategies for a high score:
* THINK AHEAD.  This is the most important skill for mastering this game.  Of
  course, I'm not any good at it :)
* If you want to keep all of the existing groups intact, eliminate from the
  top down.
* If you see some big groups at first, it's often best to get rid of them
  before something happens to them.  Big Groups = Mucho Points.
* Don't lose your head!  Pause if you can sense an explosion coming on.  Or
  just give up if you're playing against a friend.
* If you're working in Action or Versus mode, try getting the whole thing to
  shift to the left.  A new column is a good piece repository.
* Also for Action or Versus, don't press Enter/2nd unless you're going to
  eliminate some pieces!  Pressing it makes a new pieces more likely to appear
  than if you're just waiting or pressing directions...."

	Yeah, I could keep going on and on with quotes from Mr. Hock's lovely document, but then you wouldn't learn anything about my program, my SameGame.  Here's what was in the docs for the demo version of this game:

* There is no score

* There is no high score

* There is no action mode

* There is no, and probably never will be a, versus mode

* There is no teacher key

* The cursor key input is kinda jerky and hard to control...I'm workin' on it

* This is a demo version

* It is very barebones

* So consider the last two, and shut your mouth!


	Well since that was the demo, it's outta date!


* There is score

* There is high score

* There is action mode

* Still no versus mode

* No teacher key (until Dines decides to fix the BOOS_OUT)

* Cursor is very smooth

* This is version 1.0!

* It's a full version!

* Rejoice!

	That's outta date, too, but not by that much.  There's some features I have added...else it would still be 1.0!!!

* Hi Score clearer - see game controls, the next section

* SSSSSSSSlllllllllllooooooooowwwwwwwwwwweeeeeeeerrrrrrrr action mode - nobody actually complained about it, but I found it a little too chalenging:P  I'll get even more acurate in 1.2, I promise...

* Well, see the version history section for more detailed info on everything added

	Nothing will be added to this part after 1.1


	+----------------+
	|                |
	|  Game Controls |
	|                |
	+----------------+

Arrows:
	Move around cursor

2nd and Enter:
	Select ("Click on") a piece

Mode:
	Pause, show score

Del:
	Undo last move

Clear:
	Quit Game

Y=+Graph: (at title screen only)
	Reset hi scores

Y=: (while playing)
	Save game and quit to Ash

	Hey, I almost forgot, we have to get down and techie now!!!

	+-------------+
	|             |
	|  E-Mail!!!  |
	|             |
	+-------------+

Don't be shy when sending comments, suggestions, flames, etc.  I LOVE EMAIL!!!!!!!
Also, don't be afraid to give me your awes about it, the nice, fast removal of your pieces...the lovely gravity functions...the great cursor routine...stuff like that.  To make it easy for you, I have so graciously given you the below text to copy and paste if you want to send me something.  Bye bye!!!

ADAMMAN106@aol.com

	+---------------------------------+
	|                                 |
	|  Known Bugs/undesired fearures  |
	|                                 |
	+---------------------------------+

This is the part I hate...telling everyone what's wrong with my program...

- I got the new input routine online (the blinking cursor was the culprit!), but I can't get the  blinking now.  I'd appreciate it if someone would look at the Input routine (just search for INPUT) and find out what's wrong.  Thanx!

- The teacher key doesn't go to the home screen, it can only get to the Ash menu

	+---------------------+
	|                     |
	|  Upcoming Features  |
	|                     |
	+---------------------+

This section is new to version 1.1!

- Input routine with a blinking cursor

- Teacher key that exits to the homescreen

- More efficient title picture (=less memory taken up)

	+-------------------+
	|                   |
	|  Version History  |
	|                   |
	+-------------------+

0.9
-----
First release, my FIRST Z80 game!!!
Minor bug that deals with the cursor sprite...is it just my calc?
Absolutely NO frills...sorry people, it's just a demo
I had some time to write docs so I'm releasing it

1.0
-----
Hmm...there were a bunch of versions in between 0.9 and 1.0, but I didn't document them...oh well, here they all are:
Added score and high score, plus a really kewl input routine
Made action mode
Fixed the cursor sprite bug (thanx Waff)
Added the exact random routine that is in Insane Game 85
Took it away, returned to the old one (Marty I know agrees w/ me about it)
Added really nifty title screen
Added routines to check the clearing of the screen, no moves left, etc.
Fixed a small bug in the gravity funtions
Added Pause/View Score button
Added undo
Things too numerous to remember - just think of it as the full, done version
Converted to Ash 3.0 (sorry Alpha...)

1.1
----
Fixed the annoying 'Enter Your Initials' bug
Added a hi score clearer
Nifty new random routine!!! (I told you it was coming...)
Generally optimized code
Fixed the horizontal gravity function (if you really want to know, email me)
I am including getrand.asm, whoops
Fixed some stuff dealing with when you've cleared the screen
Managed to dump 150+ bytes off of the proggie.  WOOHOO!
Gained back the 150+ bytes that I scraped off with the new stuff you see above...doh!
Added hi score viewing at pause
Slowed down action mode a bunch
Added the 'Hi Score:' text to the title screen
(NOTE: there will be no teacher key until the new shell comes out for reasons of relocation)

1.11
----
DOH!!!
I can't believe it!  I never actually fixed the "Enter Your Initials" bug!  I guess it was so simple I forgot! :)
I changed the description string from 1.0 to 1.11. sheesh
Fixed an error in the docs. so many stupid mistakes!!!

1.12
----
This was a short-lived version, only released (leaked, actually) to people at my school
I fixed a bug concerning the undo feature.  When you made a match that changed the msb of the score, it was not undone.  This allowed you to cheat very badly.
The bug was first discovered by nblizard@bellsouth.net, then Ilya Winham (ilyamojo@geocities.com) found it a while later.

1.2
----
Added a "teacher key" that saves your game and exits to the Ash menu
Optimized quite a bit
Now when you pause it, the screen is cleared, as to not be able to cheat :)
Shreaded 100 bytes, then gained back 200
Removed unneeded push/pops
I no longer use the 2nd text mem
Commented and "prettied up" the source
Removed most commented commands
Fixed some spelling errors in the docs
THERE WILL BE A 1.3 WHEN THE NEW SHELL IS RELEASED!  SEE UPCOMING FEATURES SECTION

1.3
----
Fixed a minor bug dealing with inputing initials for puzzle mode

	+------------------------------------------+
	|                                          |
	|  Special Thanks to those who deserve it  |
	|                                          |
	+------------------------------------------+

Martin Hock -- without him, none of us would even know about this crazed puzzle game.  Maybe it's worth noting that we had a long discussion on IRC about how each of our games worked...expect the really neat randomizer that's in SameGame 1.11 to be in Insane Game 3or PhatOS and maybe ZShell, too...

Jimmy Mrdell -- for the Online ZShell School where I learned Z80!!!  Oh, Joy!!!  Some programming help and background information on SameGame.

Jason Todd -- he and Jimmy and Marty and Waffy and so many others who gave me help when I needed it

All those calculator hackers -- this one's obvious...

The creator of SameGame

Ilya and Phil for emailing me.  Thanx for the interest, guys

Randy for consistantly jabbering me about it :)

TheBadger (Kyle), Randy, and many others for their support

Someone sent me a nice email saying that, even though it locked up his calc, he kept loading SameGame back on his calc so he could play it <:].  What can I say?  I'm touched

nblizard@bellsouth.net for finding the undo bug.

My friend Brian, javin@seanet.com, and rawjaw@earthlink.net for finding a stupid bug

Hope I didn't miss anyone.



Final notes: SGPieces.h is the include file for all of the SameGame Sprites
             getrand.asm is the random number mutator that Jason Todd gave me

That's it.  Hope you like version 1.3 of SameGame!!!

----------------------------------------------------
Adamman                           ADAMMAN106@aol.com