[SRC] Backgammon 2.0[Archive déclassée]
Taille du fichier : 109.371 Ko
Nombre de téléchargements : 1140
Nombre de vues : 8778
Description rapide : Le célèbre jeu adapté à la TI par Kevin Kofler
Auteur de l'archive : Kevin Kofler
Calculatrices concernées : TI-89 TI-92+ TI-V200 TI-89Ti
Hardware concernés : HW1 HW2 HW3
ROMs (AMS) supportés : AMS1.00~1.05 AMS2.01~2.05 AMS2.07~2.09 AMS3.00~3.10 PedroM
Langage de programmation utilisé : C
Description Complète : BACKGAMMON for the TI-89/89 Titanium/92+/Voyage 200 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 BACKGAMMON, simply type bgammon() from the home screen and press [ENTER]. Make sure you have the file bgammppg on your calculator. (It is bgammon.89y, bgammon.9xy or bgammon.v2y on the PC.) Some graphical shells (such as the TICT Explorer - can also run "bgammppg" directly. BACKGAMMON does NOT require a kernel or shell of any sort to run. The same executable and the same launcher run on all supported calculators (TI-89, TI-89 Titanium, TI-92+, Voyage 200), you can send them freely between the different calculators. (The Fargo version is separate though.) 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 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: * Now throwing an error 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. RC 2: 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. RC 3: * Recompiled with TIGCC 0.95 Beta 1, using linker optimization. * Using the new way to set project options. * Removed obsolete KEY_OFF2 redefinition. * Eliminated initialization warnings using a GCC extension. * CheckForVictory now returns the actual values (3,-3) for backgammons. RC 4: * Fixed the 3 plane grayscales for the TI-89 Titanium. * Rebuilt with TIGCC 0.95 Beta 8 for TI-89 Titanium support. * Added -freg-relative-a4 to save size. * 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. * Fixed the random seed generation in order to account for 0x600017 being able to take the value 0. RC 5: Rebuilt with TIGCC 0.95 Beta 10, with updated launchers. 1.00: Rebuilt with TIGCC 0.95 Beta 16 and ttstart-universal from 2004-08-11. 1.01: Rebuilt with fixed ttstart-universal from 2004-08-14. 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 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 ( 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 VIII) Contact me Homepage: E-Mail:
Archive mise en ligne par : Vince
Date de mise en ligne : 5/09/2004 à 16:30:12

- Ti FR v3 - Ce site n'est pas le site officiel de texas instruments. En cas de problèmes techniques sur le site veuillez contacter l'administrateur. Merci de vos visites !
page générée en 4371 ms