Langage de programmation utilisé : | C Description Complète : | BACKGAMMON for the TI-92/92E/92II by Kevin Kofler - 2.00
========================================================
I) Use
This is a simple backgammon game. It plays only classical backgammon WITHOUT the
doubling cube.
Also, you can only play against the calculator, as there is no 2 player mode (at
least not at the moment).
II) Execution
To run the TI-92 version of BACKGAMMON:
1. Install Fargo II.
2. Simply type bgammon() from the home screen and press [ENTER].
III) How to play
1) Rules
The game follows the official rules of backgammon, EXCEPT that there is NO
doubling cube (and of course that you cannot win or lose any money ;-) ).
See http://www.bkgm.com/rules.html for the backgammon rules.
2) Keys
+---------------+--------------------------------------------------------------+
| Key | Action |
+---------------+--------------------------------------------------------------+
| LEFT, UP | Select previous move |
| - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
| DOWN, RIGHT | Select next move |
| - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
| ENTER | Confirm selection |
| - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
| ESC | * Cancel a partial move |
| | * If there is no partial move, exits the game (shows a |
| | confirmation message before - press ENTER or y to confirm, |
| | or ESC or any other key to cancel) |
| - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -|
| 2nd + ON, | Turn the calculator off |
| DIAMOND + ON | |
+---------------+--------------------------------------------------------------+
3) Move selection
The program will let you select only the pieces or blocks of pieces which can
move. In case the piece can move with either of the 2 dice, the program will let
you select the destination field (in order to choose which die to use).
When bearing off, you will be shown 1-> if this is an exact bearoff, or 2->, 3->
etc. if you are moving beyond the bearoff point (this is of course only allowed
when it is legal according to the backgammon rules). For example, when you throw
a 6, if you bearoff a piece from the sixth to last piece, the selection will
show "1->". If you bearoff a piece from the fourth to last piece, it will show
"3->".
In order to facilitate checking your moves for legality, the program expects you
to make your moves in a certain order:
* Move the piece which is MOST BEHIND first.
* When moving 2 pieces from the same block, use the die on the LEFT first. (The
program will automatically select the destination corresponding to that die by
default, so just press [ENTER].)
As far as I can tell, ALL legal moves can be done this way. If I am wrong,
please send me a bug report.
This also allows the program to select one of the 2 dice automatically in some
cases, saving you the keypresses to choose the right die.
If you didn't respect that order, when noticing that you cannot complete your
move the way you wanted, just press [ESC] and redo the move respecting the
order. That strict order takes some time to get used to, but you should be able
to get familiar with it after a few games.
4) Link play
You can play against another calculator running Backgammon 2.00 (and possibly
later versions) over the link cable. First of all, you have to decide who will
play the white pieces and who will play the black pieces. (As the first to move
is decided randomly in Backgammon, there is no advantage for either player.) The
player with the white pieces becomes the host calculator, the player with the
black pieces becomes the guest. White has to start the game first, so black can
join it. In the event of a game interruption, the savegame will be kept only on
the host calculator. Black can join a game loaded by white just as it would join
a new game.
IV) History
Current version:
2.00 for Fargo: * Now showing an error dialog when out of heap memory.
* Fixed memory leak when Gray3POn fails.
* "Really quit?" can now be confirmed with 'Y' too.
* Added 2 player on 1 calc mode.
* Added linkplay modes (see section III.4).
Previous versions:
BETA 1: This version was the first public release.
BETA 2: * Using larger buffers for the number of legal moves. I didn't take all
combinations into account when computing the buffer sizes for doubles,
so there was a remote possibility of a buffer overflow. (I am not sure
it would have been possible in practice. It never occurred to me. But
better safe than sorry.)
* Moved the main move list buffer from the stack to an allocated block
as a result of the size increase.
* Added some compile options to decrease code size (but the new version
is still larger due to the bugfixes).
* Fixed a bug in user selection when pressing ENTER after pressing DOWN
or RIGHT more often than necessary: the program wouldn't let you
complete your move in all possible legal ways.
* Fixed the following 2 bugs (they had the same origin: a missing bound
check):
- Sometimes the program made you choose which die to use first even
though you threw doubles.
- Similarly, sometimes the program wanted you to choose your die when
reentering from the bar even though only one was valid.
BETA 3: * Now pressing ESC is allowed even when the throw which decides the
beginning player is a tie (because otherwise, you could theoretically
get trapped in an infinite or very long loop).
* Now using the full screen on the TI-92+/Voyage 200. (The calculator
model is automatically detected.)
BETA 4: Using dithering (3/4 100, 1/4 011) for medium gray (instead of straight
100) to workaround a hardware bug in the TI-89/92+/V200 screen.
BETA 5: * Added key input routine which handles turning the calculator off via
2nd+ON, DIAMOND+ON or APD.
* Using low power mode in the key input routine in order to reduce
battery usage.
* Added possibility to save interrupted games.
RC 1: Added a text-based title screen.
(branchpoint): Some size optimizations (reduced PPG size by 1372 bytes):
* Recompiled with a GCC 3.3 prerelease
(GCC 3.3-20021230-tigcc-pre7).
* Added -l assembler switch to make references PC-relative by
default.
* Added -fno-strict-aliasing compiler switch because I am not
following the strict aliasing rules and because it gives me a
smaller PPG.
* Added -fno-if-conversion compiler switch.
* Added -fomit-frame-pointer compiler switch.
* Added -fno-defer-pop compiler switch, because the code
generated that way can be compressed better.
ALPHA 1 for Fargo: * Ported to Fargo II.
* Removed the -l switch because it doesn't work with the Fargo
ROM call method.
* Removed the -fno-function-cse switch because it is not
necessary for the Fargo ROM call methods.
* Removed the -fno-defer-pop switch because the Fargo version
is not compressed, which makes not deferring pops a bad
idea.
BETA 1 for Fargo: * Recompiled with TIGCC 0.95 Beta 1, using linker optimization.
* Eliminated initialization warnings using a GCC extension.
* Now using DlgMessage to show dialog boxes.
* CheckForVictory now returns the actual values (3,-3) for
backgammons.
RC 1 for Fargo: * Rebuilt with TIGCC 0.95 Beta 8.
* Fixed an AI bug where during endgame, the AI sometimes took 2
moves to win where one would have been enough.
* Changed web page URL.
1.00 for Fargo: Rebuilt with TIGCC 0.95 Beta 16.
V) Bugs
Some game positions cause individual columns of the screen to be lighter than
they should. This is (as far as I can tell) a hardware problem, which I
attempted to minimize, but which I cannot completely eliminate. Other than that,
there are no known bugs.
If you have to report a bug to me, see section VIII. PLEASE report any bugs
you find, or else I cannot correct them.
VI) License
The following is the minimum of legal sentences I have to write to avoid
getting into trouble:
-----------------------------------------------------------------------------
Kevin Kofler's TI-89 Program License
====================================
a.I CAN'T BE HELD RESPONSIBLE FOR ANYTHING! NO WARRANTY!
b.YOU CAN'T SELL MY PROGRAM OR CLAIM IT IS YOURS!
c.IF YOU TRANSMIT ONLY PARTS OF THIS PROGRAM, YOU MUST SAY THAT IT'S A PART
OF THE (package name) PACKAGE AND ONLY A PART!
d.NORMAL RIGHT APPLIES TO THE THINGS I'VE FORGOTTEN!
-----------------------------------------------------------------------------
Also PLEASE do NOT distribute this program without my permission (transmitting
it to a friend's calculator via calculator-to-calculator linking is OK as long
as you follow paragraphs b and c of the license, but putting it on a website,
CD-ROM or ANY such medium requires my permission).
If anything is not clear, just ask me for my permission (notably for matters
of distribution on websites and/or modified versions).
Note that the 3 plane grayscale routines and the ported TIGCCLIB routines are
licensed under the TIGCCLIB license, which is the GPL, but with a specific
exception allowing me to release BACKGAMMON under a different license. The above
license does NOT apply to the 3 plane grayscale routines nor to TIGCCLIB, NOR
does the TIGCCLIB license apply to this program.
VII) Credits
Thanks to:
* My teammates of the TIGCC Team (http://tigcc.ticalc.org) for TIGCC:
- The people who worked on the GCC port: Jean Canazzi, François Révol,
Sebastian Reichelt
- Zeljko Juric for TIGCCLIB, including the documentation of some important
operating system functions
- Sebastian Reichelt for the TIGCC IDE (integrated developer environment) and
the ld-tigcc linker, which were used for this program
- All other team members or former team members for their respective
accomplishments
* Julien Muchembled and Thomas Nussbaumer for the grayscale routines on which my
3 plane grayscale routines are based
* Rusty Wagner for the Virtual TI emulator
* David Ellsworth for Fargo
VIII) Contact me
Homepage: http://members.chello.at/gerhard.kofler/kevin/ti89prog/
E-Mail: Kevin@tigcc.ticalc.org | Archive mise en ligne par : | | Date de mise en ligne : | 5/09/2004 à 16:07:17 | |