Add files via upload
This commit is contained in:
@@ -44,9 +44,17 @@ Just type "TRTREK." at the CP-V terminal command prompt, and the game will start
|
||||
next = seed;
|
||||
}
|
||||
|
||||
This algorithm was incorporated into the file F7:TRRANF, which contains function RAND() and entry point RANSET (all calls to RANF(0) elsewhere in the code were changed to RAND()). The "granularity" of this generator is based on 16-bit integers rather than 32-bit integers, but that doesn't matter for the purposes here. NOTE: this substitute code is only used for "tournament" games; for "regular" games the seed is set to 0 and calls to RAND() are just passed along to the Andrews library function RANF(), which generates a unique sequence of random numbers for each run of the game. Also NOTE: If you use an alphanumeric string as your tournament name (i.e., anything starting with a letter), then only the first four characters (32 bits worth) are significant. If you use all numbers, they get converted to floating-point and then truncated to integer to form the seed, so anything in the range 1..9999999 will work fine. A negative number is converted to its absolute value; leading 0's are ignored. The first occurrence of a letter in a string of digits terminates the number at the digit before it.
|
||||
This algorithm was incorporated into the file F7:TRRANF, which contains function RAND() and entry point RANSET (all calls to RANF(0) elsewhere in the code were changed to RAND()). The "granularity" of this generator is based on 16-bit integers rather than 32-bit integers, but that doesn't matter for the purposes here. NOTE: this substitute code is only used for "tournament" games; for "regular" games the seed is set to 0 and calls to RAND() are just passed along to the Andrews library function RANF(), which generates a unique sequence of random numbers for each run of the game. Also NOTE: If you use an alphanumeric string as your tournament name (i.e., anything starting with a letter), then only the first four characters (32 bits worth) are significant. If you use all numbers, they get converted to floating-point and then truncated to integer to form the seed, so anything in the range 1..9999999 will provide a unique sequence of pseudo-random numbers. A negative number is converted to its absolute value; leading 0's are ignored. The first occurrence of a letter in a string of digits terminates the number at the digit before it.
|
||||
|
||||
3. The source file F7:TRDEBUG is an addition to the original VAX complement, and was created in order to add some commands that facilitated testing the game without actually being able to play it very well. In particular, the "DEBUG" command was a generic command that could be attached to any subroutine that needed to be tested. In its final state, it calls the subroutine that generates a commemorative plaque (see the file "plaque.dat" in the "Original_VAX_version" directory), which can appear either on the terminal or on the lineprinter (if the latter has been set up properly). Unlike the VAX version of the plaque, the CP-V version has a hard-coded date (April Fool's Day, 2016).
|
||||
3. About "FROZEN" games: You can use the command "FREEZE" to save the current state of an in-progress game to a file and exit the current game (but not the program). You'll then get the "ENTER FILE NAME:" prompt; just typing the Return key at this point results in the "GAME NOT FROZEN." message followed by the reappearance of the "COMMAND:" prompt. The "freeze file" created contains data about the current state of the game. It gets "TK:" automatically prepended to a user-selected name, which is significant to 7 characters (not including the TK: "extension"), and should be an alphanumeric string which must start with a letter (anything typed beyond the allowed length is ignored; non-alphanumeric characters after the initial letter may be either ignored or result in a file with an unexpected name). After the "FREEZE" command is executed, you'll get the "DO YOU WANT TO PLAY AGAIN?" prompt. The game can be resumed then or at any later time by selecting "FROZEN" as the response to the initial question about the type of game wanted, and responding to the "ENTER FILE NAME:" prompt. The file name typed should omit the "TK:" prepended extension -- that's added automatically. If the file doesn't exist, you'll get the "GAME NOT FROZEN." message followed by a repeat of the question about the type of game wanted.
|
||||
|
||||
4. About the "EMEXIT" Emergency Exit command: This performs an automatic "freeze" of the game to a file named TK:EMSAVE (any previously-existing file of that name is overwritten), and then the program itself (not just the current game) is exited. Before exiting, the screen is "cleared" (by calling subroutine GETOUT in F7:TRGETOU which in turn calls SKIP in F7:TRSKIP) by emitting 24 blank lines. The game can later be resumed as with any FROZEN game, by selecting "EMSAVE" as the "freeze file" name. This facility was presumably provided to enable a quick exit in case the boss was about to make an appearance, though in our case the "EXIT" on the terminal just before the "!" Terminal Executive Language (TEL) prompt is a bit of a giveaway.
|
||||
|
||||
5. Getting a list of commands: If you type "?" at the "COMMAND:" prompt, you'll get a list of legal commands (this is true if you type anything that's not recognized as a command, as indicated by the "UNRECOGNIZED COMMAND" message). Do **not** type "HELP"! ("HELP" is a long-range transporter command to get out of a tight spot; it can save or destroy the ship.) Most commands can be abbreviated, but a few (TERMINATE, FREEZE, DESTRUCT, DEATHRAY, HELP) must be typed in full in order to be recognized.
|
||||
|
||||
6. Exiting the program: TERMINATE and EMEXIT are the "official" ways to get out, but typing "Esc F" will immediately abort the program (as will typing "Ctrl-]" to get the "telnet>" prompt, and then "send break"). ("Esc F" also clears the screen like EMEXIT, but doesn't create a freeze file.)
|
||||
|
||||
7. The source file F7:TRDEBUG is an addition to the original VAX complement, and was created in order to add some commands that facilitated testing the game without actually being able to play it very well. In particular, the "DEBUG" command was a generic command that could be attached to any subroutine that needed to be tested. In its final state, it calls the subroutine that generates a commemorative plaque (see the file "plaque.dat" in the "Original_VAX_version" directory), which can appear either on the terminal or on the lineprinter (if the latter has been set up properly). Unlike the VAX version of the plaque, the CP-V version has a hard-coded date (April Fool's Day, 2016).
|
||||
|
||||
|
||||
## History
|
||||
|
||||
Reference in New Issue
Block a user