1
0
mirror of synced 2026-01-12 00:42:51 +00:00

Add files via upload

This commit is contained in:
ken rector 2025-01-24 16:06:04 -08:00 committed by GitHub
parent f2d9e1d5f7
commit bdd3dcf780
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,32 @@
Building the Super Star Trek executable from Fortran 77 source in CP-V
After booting the SimH Sigma emulator into CP-V, connecting a terminal window via telnet, and logging in, it should be a simple matter of opening the file build_TRTREK in a host system text editor, copying its contents to the host system clipboard, and then selecting the CP-V terminal window and pasting the clipboard contents into the terminal. It will take a while to empty the clipboard into the CP-V terminal window, so be patient. The file build_TRTREK contains: 1) a sequence of Tele-Edit commands to build the 63 F7:TR* Fortran source files in the user's directory; 2) a Tele-Edit command to load the game instructions as text file TX:STARTRK; 3) a sequence of F77 commands to compile 62 of the source files to the corresponding BO:TR* object files (F7:TREKCOM is INCLUDEd by the other source files, and is not itself compiled); 4) a LEMUR (CP-V object librarian) command to build the LB:TRTREK object library from 61 BO:TR* object files (i.e. all the object files except the main routine's object file BO:TRTREK; 5) a LYNX (CP-V linker) command to build the executable TRTREK. from BO:TRTREK and LB:TRTREK; 6) a sequence of DELETE commands to clean up the user directory by removing the F7:TR*, BO:TR*, and LB:TRTREK files. When all this has finished and the CP-V terminal command prompt ("!") has returned, type "L" -- List -- to satisfy yourself that that the TRTREK. Super Star Trek executable and the TX:STARTRK text file have been successfully created.
NOTE: The specific procedure for copying a file from your text editor onto the system clipboard, and then pasting the clipboard contents into your CP-V terminal window depend on the details of the host operating system, text editor, and terminal emulator you're using.
In Windows, just open build_TRTREK in notepad, type "Ctrl A" to select the whole file, and then either right-click on the text and select "Copy" from the context menu, or click Edit->Copy from notepad's menu, to get the text onto the clipboard. Then, if you're using PuTTY as your terminal emulator (for the CP-V terminal window), just putting the mouse in the terminal window and right-clicking will start transferring the text from the clipboard into the terminal window. Other terminal emulators may require a different procedure (e.g., mintty under Msys2 will open a context menu when you right-click in the terminal window, from which you would select "Paste").
In Linux, if you're using vim as your text editor, you must have a version that supports the system clipboard (":version" option list shows "+clipboard"); then ":1,$y+" will copy the entire contents of the file you've got open in the editor onto the clipboard. If your vim ":version" shows "-clipboard", then you'll have to use (or install, if necessary) a different editor (e.g., notepadqq).
In MacOS, the procedure should be pretty much the same as for Linux.
Running the Super Star Trek program
Just type "TRTREK." at the CP-V terminal command prompt, and the game will start (NOTE: the "." at the end of the file name is required -- it indicates that the executable -- the "load module" -- is to be found in the local directory).
Some tips
1. Getting output on the lineprinter (i.e., in whatever text file is attached to device "LP" in your SimH configuration file): A) On the SimH CP-V console, after CP-V has booted up (like, just before or after you've typed Ctrl-P, ON 107 <Return>) type Ctrl-P, SLP,I <Return> (to "initiate the lineprinter symbiont"); B) On the logged-in terminal, before starting the game (at the "!" prompt), type SET F:108 LP <Return> (this ensures that output to LUN -- logical unit -- 108 in Fortran is directed to the printer); C) After the game has ended and you're back at the "!" prompt, type PRINT <Return> to flush out the CP-V printer queue; D) Remember that SimH's LP buffer won't actually be flushed out to the attached text file until SimH itself exits.
2. About "TOURNAMENT" games: While requesting a "tournament" game "works", in the sense that it doesn't cause the program to crash (i.e., acts the same as requesting a "REGULAR" game), it doesn't do what it's supposed to do (on the VAX). The idea behind a "tournament" game is that the name or number you type in, to identify the tournament, is then used to seed a random number generator, resulting (on the VAX, at least) in an identical sequence of pseudo-random numbers, in turn resulting in identical games for identical actions. So it provides a level playing field for people to compete against each other -- the chance element is held constant. On the Sigma, running a test program with ten successive calls to RANF(0) generates a different sequence of ten numbers each time the program is run. So we are not implementing a proper "tournament" game as it was implemented on the VAX.
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).
History
In early 2016, following a successful attempt to "back-port" Mike Mayfield's HP BASIC version of the Star Trek text-based computer game to CP-V (on the late George Plue's DOS-based "Siggy" Sigma/CP-V emulator), Keith Calkins (Plue's erstwhile colleague at Andrews University) mentioned that students at Andrews had once run a Fortran version of a Star Trek game on the campus Sigma. After some searching, a Fortran Star Trek was discovered on the Web site of one Oleg Uryutin, who had been a student in the early 80s at the Minsk Radiotechnical Institute and had fond memories of discovering a PDP-11 version of Star Trek and who, with the help of a colleague there, had ported the game from RT-11 to RSX-11M on the PDP-11. His site (which is now, alas, defunct and not even archived on the Wayback Machine) had the source code for a VAX Fortran version of the University of Texas "Super Star Trek", which turned out to be possible to port to F77 on CP-V.
The unmodified VAX source code, along with and VMS command files to build the executable, are included here in the directory "Original_VAX_version", for reference. (The VAX code builds and runs without a hitch on a SimH VAX-11/780 running VMS 4.7 and VAX Fortran V4.8-276. The top-level build command is "@TREKBLD".)