home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 7 Games
/
07-Games.zip
/
VTREK.ZIP
/
VTREK.DOC
< prev
next >
Wrap
Text File
|
1989-12-26
|
5KB
|
116 lines
December 1989:
-------------
Visual Startrek resurrected and ported to OS/2 (and MSDOS) using
the Microsoft C compiler version 5.1 and associated programming
tools.
VTREK is the "make" file for Microsoft C. It will generate a
bound program capable of running under OS/2 or MSDOS. It requires
the ANSI.SYS driver under MSDOS or the equivalent (ANSI ON) under
OS/2.
MAKEFILE.HTC is the make file for compiling the CP/M version with
Hi-Tech C.
VTREK.EXE is the executable for MSDOS and OS/2. VTREK.CPM is the
compiled executable for CP/M. Rename it to VTREK.COM.
December 1986:
-------------
This is the latest version of the public-domain program VTREK
(Visual STARTREK), hot off the UNIX networks. Have a look at the
file VTREK.HLP for a description of the game.
It was originally set up to be compiled with 'cc' under UNIX or
Aztec C under CP/M but I have modified the source so that it can
now also be compiled with Hi-Tech C under CP/M or MS-DOS.
The UNIX and MS-DOS versions will require no changes to suit any
particular screen. The UNIX version will still use the
'termcaps' library for screen control; the MS-DOS version
requires that you be using the ANSI.SYS device driver.
It is only the CP/M version which will require patching and to
facilitate that task I have made extensive changes to the
TERMIO.C source module to drive terminals in a much more general
way than the original program allowed.
Unless you really want to recompile the program, the CP/M version
can be patched using one of the standard debugging tools.
Simply load the program under DDT, SID or whatever and using the
D command look for the string of characters "CURSES" in the
object code. The screen control follows immediately thereafter.
A:SID COM (User 0)
CP/M 3 SID - Version 3.0
NEXT MSZE PC END
8200 8200 0100 CEFF
#d7b74
7B74: 61 73 6B 20 2E 20 2E 20 2E 00 43 55 52 53 45 53 ask . . ..CURSES
7B84: 07 15 17 7F 7F 7F 7F 7F 00 00 00 00 00 00 00 00 ................
7B94: 06 16 7F 7F 7F 7F 7F 00 00 00 00 00 00 00 00 00 ................
7BA4: 01 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
7BB4: 04 7F 7F 7F 7F 00 00 00 01 00 FF FF 25 75 00 00 ............%u..
7BC4: 00 80 42 00 00 FA 49 76 74 72 65 6B 2E 73 63 72 ..B...Ivtrek.scr
7BD4: 00 72 2B 00 43 61 6E 6E 6F 74 20 61 63 63 65 73 .r+.Cannot acces
As you can see, the "CURSES" string ends at 7B83. The first
screen control is at 7B84.
Only three screen controls are used. The first two are "clear
screen and home cursor" and "clear to end of line" respectively.
16 bytes are reserved for each so that in the example above, 7B84
is the start of the "clear screen" control and 7B94 is the start
of the "clear to EOL" control.
The first byte of each control determines the number of
characters to be sent to the terminal. In the example shown, the
"clear screen" sequence is 7 bytes long and the "clear to EOL"
sequence is 7 bytes long.
To patch the "clear screen" control for, say, a VT52 terminal,
alter the byte at 7B84 to 1 and the byte at 7B85 to 0C which
tells VTREK that the "clear screen" function is performed by a
single byte (form feed).
Immediately following the "clear to EOL" control (i.e. at 7BA4)
is a more complex terminal control for cursor movement. It
comprises three 8-byte strings, a set of flags, and a couple of
"offset" values.
Again, the first byte of each 8-byte string signifies the length
of the following sequence. The first is the cursor-positioning
"lead-in" sequence which is issued to the terminal to before
either cursor address coordinate. In the example above, it
is a 1-byte sequence comprising a single 09h (TAB) character.
The second string is similar and represents the characters (if
any) to be sent to the terminal BETWEEN the cursor-positioning
coordinates. Likewise, the third string determines the charac-
ters to be sent to the terminal AFTER the second co-ordinate. In
the example above, you will see that the "between" string is
empty (7BAC) and the "after" string is 4 bytes long (7BB4).
The next byte (7BBC) should be ZERO if the terminal expects to
receive the y-coordinate (line number) first, or NON-ZERO if it
expects the x-coordinate (column number) first.
The next byte (7BBD) should be ZERO if the terminal expects co-
ordinates to be single-byte binary numbers, or NON-ZERO if the
terminal expects co-ordinates to be ASCII digits.
Finally, the next two bytes (7BBE and 7BBF) are the 'offsets' to
add to the x (column) and y (line) coordinates for cursor
addressing. The home position is (1,1) so that for most
terminals the offset will be 1Fh (31). In the example, it is
shown as 0FFh (-1).
These notes and the aforementioned modifications by:
Jon Saxton,
Sydney, NSW,
AUSTRALIA