Nibbles 68k Version 3.2 1.0 Basic Information Nibbles 68k is a clone of the popular Nibbles snake game. The basic premise is, you are a snake who goes around a maze eating things (apples in this version) and growing larger as you eat them. When you eat enough apples, you get to the new maze and do it all over again. Nibbles 68k has made a few additions to the standard game to make it more fun to play. Cheat buttons, 10 maze levels, 3 difficulty settings (which determing how many apples you have to eat on each level and how many levels you must play to win, among other things), 9 speed settings, a scoring system (and a highscore board), and other such things. 2.0 Version History Version 3.3 - The code is much faster now, and uses low-level keyboard reading to make sure all the keystrokes get read. It should no longer be "jerky" when using the arrow keys. - The delays and speed settings are more realistic and more evenly spread out. Version 3.2 - Revamped the code to be more efficient. The program now used 300 less bytes of memory, and the design of the program is much more effective - Requires TIGCC 0.9 beta using the GNU ld dynamic linker to compile, since Xavier Vassor's linker doesn't correctly align data sections Version 3.1 - Fixed the phantom apple bug, where apples would not be drawn on screen sometimes - Changed the throttle control to use processor loops instead of timer delays for more diverse speed settings (levels below 5 are actually playable now, and leve 9 is no longer impossible, just REALLY REALLY HARD) - Removed the phantom apple debug code which showed the actual position of the phantom apple when it was not drawn on the screen, since this problem has been fixed Version 3.0 - Completely rewritten from scratch by me using TIGCC 0.8 (see tigcc.html for more information) - Apples look more like apples. They are no longer simple blocks. - The graphics are done with 8-bit sprites now. - Works under ALL current AMS versions without recompiling except TI-92+ 1.00 which has too many bugs. NOTE: IF YOU RUN THIS PROGRAM ON TI-92+ WITH AMS 1.00, IT WILL CRASH YOUR CALCULATOR, GUARANTEED! - Rereleased under the GNU GPL free software license (see license.html for more information) - Uses ROM calls for most (99%) functionality to maintain compatibility among AMS versions. - The apple and life indicators are not 4 bytes long instead of 8. The capacity has been increased from 10 to 16 marks. - Wait key routine waiting now puts the calculator in idle mode to save battery life. You can power off the calculator by hitting the ON key when it is in a wait key loop. - Changed the victory bonus to 10,000 points per difficulty level. - Fixed the score display routine so it can display values greater than 655350 (at least 7 digits are possible, but it's hard to get such a high score) - Changed messages to use dialog pop-up boxes for important messages (end game dialogs, player died dialogs, etc.) - Cheaters now have their score reduced to 0 at end game. - Cheat key was changed, but it is the same key for skipping a level as it is for infinite lives. But the first time you press it, it gives you infinite lives, the second (and higher) time you press it, it skips a level. - High score screen now uses (somewhat more) centered text. - BSS sections are no longer used as they are not supported natively by the TIOS (hence, nostub programs cannot use them, only DoorsOS and kernel programs can). Version 2.5 - Fixed the program to work with AMS 2.03 using B. Lesteven's AMS 2.0x kernel. Version 2.4 - Added BSS sections to save space (program is ~140 bytes smaller) - Included support for the TI-92+ (tested w/ AMS 1.05 + DoorsOS 1.0 final beta 2) - Included support for AMS 1.05 (on the TI-89 and TI-92+) Thanks to David Hart for his AMS 1.05 ROM patching program - Changed the name from Nibbles-89 to Nibbles 68k since we now have support for the TI-92+ also. Version 2.3 - Fixed a bug where it would lock up if you got more than 10 lives. Version 2.2 - Fixed a bug where it displayed more lives than you actually had. Version 2.1 - Fixed a bug where your score would reset if it got too high w/o cheating - Fixed a bug where ESC would not exit from the config/intro screens - Added constants to control difficulty settings. Version 2.0 - Changed from using PlusShell to using DoorsOS since PlusShell is dead - Split the source code files into modules for easier coupling - Commented the entire source code to make it easier to read - Added a scoring system to make it more fun - Added a highscore screen to display the current highscore - Added a second cheat function to give the player infinite lives - Added difficulty levels to make the game more challenging - Changed display to make it use 8x5 blocks (instead of 8x6) - Changed display to use TI-89 screen dimensions (instead of blocking out the areas of the screen that aren't available on the TI-89) - Switched to DoorsOS keyboard RAM macros - Changed the name to Nibbles-89 to reflect the new platform Version 1.1 - Added support for PlusShell 1.0a and DoorsOS 0.8 - Fixed screen display to draw the apple and life indicators Version 1.0 - Added support for PlusShell 0.99 - Changed the levels to work with TI-89 screen dimensions (extra screen positions are marked used so apples aren't drawn there) - Fixed the input routines to work with TI-89 arrow keys - Removed library requirements (util/flib) - TI-89 Historical Trivia: Nibbles 89 is the first TI-89 Assembly Game ever written 3.0 Installation Instructions Nibbles 68k is an assembly program (written in C, but called an assembly program anyway) written for the TI-89 and TI-92+ graphing calculators made by Texas Instruments. To install the game, simply transfer the nibbles.89z (or nibbles.9xz if you have a TI-92+) to your calculator via the GraphLink (or your homemade link, if you have one). Nibbles 68k does not require a kernel, or any auxillary programs or libraries to function properly, however, if you have such programs/libraries/kernels, they should not interfere with the operation of Nibbles 68k, though this has not been tested. 4.0 Game Play Instructions Nibbles 68k is very simple to operate, but there are a few nuances which may confuse some people, so we will give instructions here. The main keys used to play are ENTER, ESC, and the Arrow Keys or (4,8,6,5/2 for left, up, right, and down, respectively. Both 5 and 2 will work for down, as will the arrows). When the game starts, it will bring up an introduction screen with basic information. To start a new game, press ENTER. To quit, press ESC. If you pushed ENTER, next comes the highscore screen. This screen will show you the current highscore, and the score of your last game. Press ENTER to continue, or ESC to return to the intro screen. If you pushed ENTER again, next is the settings screen. Here you will choose your speed and difficulty settings. Speed is first, and it varies from 0 to 9. Simply input a number from 0-9 to choose your speed, or ESC to return to the intro screen. If you selected a speed, that number will be displayed on the screen. Next is the difficulty selection. This ranges from 1-3, with 1 being easy and 3 being hard. You can either select a difficulty, or press ESC to return to the intro screen. If you selected a difficulty, that number will be displayed on screen. Now it asks you to press ENTER to start the game, or ESC if you want to return to the intro screen. Assuming you pressed ENTER to start the game, you are now in the game loop. This loop continues until either 1) you win, 2) you die, 3) you lose (i.e. you lose all your lives by dying over and over again), 4) you press ESC to signify your wish to quit. At the beginning of the game loop, the game is paused. Press ENTER to start the game. You can always pause the game again by pressing ENTER. When the game is in pause mode, it goes into idle mode, which saves battery power by putting the calculator in low power usage mode. If you wait in this mode long enough, the APD timer will run out, and the calculator will automatically turn off. (APD = automatic power down). When you turn the calculator back on, it will still be waiting for you to press a key to restart game play. During non-paused gameplay, the snake is constantly moving waiting for your input on where to go. You can supply this input with the arrow keys, or at your option, 4, 8, 6, and 5/2 for left, up, right, and down (where both 5 and 2 are down). Depending upon your speed setting, the snake can move slow, or fast. The object of the game is to run around the maze eating the apples that appear on screen without running into either yourself, or the wall. This is not as easy as it may seem. :-) To pause the game during normal gameplay, you can press ENTER. To quit the game, you can press ESC. To cheat, you can press... well, you'll have to figure that one out yourself. Each level continues until you eat all the apples on the level. When that happens, you will be sent to the next level, and the snake will return to its initial size. Then you start all over again until you complete all the levels, or you lose all your lives. You can quit too, but why would you want to do that? I hope that covers game play pretty well. It's pretty much self explanatory. 5.0 Scoring System Nibbles 68k is not a simplistic Nibbles clone. We keep score! :-) Anyway, here's how the scoring system works. Apples (the things you have to eat) are worth 10 points + 5 times your level. There are other things that increase the value of apples, the speed bonus and the difficulty bonus. The speed bonus works as follows. Speeds 0-3 are not worth any extra bonus (though I hardly think these levels are even playable, because they are so slow). Speeds 4-6 are worth an additional 25 points for each apple. Speeds 7-8 are worth an additional 50 points per apple. Speed 9 gives you 100 bonus points per apple! (If you can play on speed 9! :-) The difficulty bonus also increases the value of apples. Take the number of points the apple is worth with the level bonus and the speed bonus, then multiply that number by your difficulty level. So again, what are apples worth? (10 + (5 * level) + speedBonus) * difficulty level But apples are not the only way to score points. You can also score points for completing a level. Each level you complete is worth 500 points times your difficulty level (so 500 for level 1, 1000 for level 2, and 1500 for level 3). In addition to that, add 10 points for each life you have at the time you complete the level. The life you gain for completing a level does not count in this bonus. So the completed level bonus is: ((500 * difficulty level) + (10 * lives)). The last scoring bonus is a victory bonus. The victory bonus is given when you complete all the levels (this is in addition to the last completed level bonus). The victory bonus is 10,000 points times your difficulty level (so up to 30,000 points for level 3). If you beat the high score (set initially to 1500), your score will replace the highscore and be saved in the program (unless you have the program archived). Currently, there is only room for one high score, and you cannot attach your name to it. I will fix this in the next release, hopefully. 6.0 Archiving Information You can archive the program and run it with the program archived, but you cannot save any high scores if it is archived. This is because programs do not run in FlashROM, they run in memory. So your FlashROM program gets copied to main memory first, then run. When it is finished, the copied version is deleted. 7.0 Upcoming Versions There are a variety of things I have thought up to make Nibbles a better game, but I haven't yet had a chance to implement them. Here is a list of things I am considering adding to future versions of Nibbles 68k. 1. Extra lives based on score (you get extra lives for scoring x points) 2. High Score Board to store 5 scores WITH names 3. Better snake graphics (at least make the head and tail look different) 4. Add more levels, and make level customization easier with on-calc variables. 5. More cheat codes (maybe... this game is already pretty easy.. The cheat codes we have now are really more for beta testing than actual game play) 6. Better level graphics for TI-89 and TI-92+ screen. The orignal Nibbles game by Stilgar was written for the TI-92, so the screen was much larger to support bigger levels. To translate the game, I had to crunch the levels down to fit on the TI-89 screen. This means the levels look small are are hard to navigate on the TI-92+, and big and hard to navigate on the TI-89. If there is something you would like to see added to Nibbles 68k, please send me an email [jdratlif@cs.indiana.edu] and I might just include it in the next version. 8.0 Background and Copyright Information Nibbles 68k is based on the Nibbles game by Stilgar for Fargo I on the TI-92, and on the Fargo II version port done by G. Queri. Nibbles 68k version 3.0 is a complete rewrite of the Nibbles source code in C, and is copyrighted under the GNU General Public License by John David Ratliff. Permission is granted to redistribute Nibbles 68k under the terms of the GNU GPL. Copyright (C) 2000-2001 John David Ratliff See license.html for more information. 9.0 Contact Information You can contact me via email, or the feedback form on Techno-Plaza. jdratlif@cs.indiana.edu http://www.technoplaza.net/index.cgi?p=feedback