-
Notifications
You must be signed in to change notification settings - Fork 0
/
README_pmars
179 lines (149 loc) · 8.25 KB
/
README_pmars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
README for pMARS version 0.9.0 - portable corewar system with ICWS'94 extensions & modified to support BBS mode
____________________
What is Core War?
Core War is a game in which two or more virus-like programs fight against
each other in a simulated memory space or core. Core War programs are
written in an assembly language called Redcode which is interpreted by a
Core War simulator or MARS (Memory Array Redcode Simulator). The object of
the game is to prevent the other program(s) from executing. For more
information about Core War check out the usenet newsgroup rec.games.corewar
and its FAQ list ftp://rtfm.mit.edu/pub/usenet/games/corewar-faq
or go to http://www.koth.org/.
____________________
pMARS highlights
* portable, run it on your Mac at home or VAX at work
* free and comes with source
* core displays for DOS, Mac and UNIX
* implements a new redcode dialect, ICWS'94, while remaining compatible
with ICWS'88
* powerful redcode extensions: multi-line EQUates, FOR/ROF text repetition
* one of the fastest simulators written in a high level language
* full-featured, programmable debugger
* runs the automated tournament "KotH" at http://www.koth.org and
http://www.ecst.csuchico.edu/~pizza/koth/ and the annual ICWS tournaments
____________________
Documentation
pmars.6 is the nroff-source for UNIX man pages. You can install it in
/usr/man/man6 for use with the UNIX "man" command or format it with nroff
-man. pmars.doc contains man pages without control characters that have
been formatted for printing.
doc/primer.94 and doc/primer.cdb contain short introductions to the ICWS'94
draft and the cdb debugger respectively. redcode.ref is a quick reference to
the redcode syntax supported by pMARS. CONTRIB has guidelines for porting
pMARS to new platforms and contributing new display code.
____________________
Compiling the source
There are a number of C preprocessor symbols that control which version
of pMARS is compiled. To enable an option, include -DSYMBOLNAME in CFLAGS
of the makefile or uncomment the relevant section in config.h.
GRAPHX
This option enables a platform-specific graphical core display.
SERVER
Disables the debugger for a non-interactive tournament version. The
pMARS program that runs the KotH email tournaments is compiled with
SERVER enabled.
EXT94
Enables the experimental opcodes SEQ, SNE and NOP, as well as the
A-field relative addressing modes *, {, and }. This option should
usually be enabled. EXT94 also enables the P-space extensions LDP,
STP and PIN.
SMALLMEM
makes all addresses 16-bit as opposed to the usual 32-bit wide. This
limits core size to 65535, but also drastically reduces the memory
footprint of the program. We found that SMALLMEM reduces the
simulation speed of pMARS on most CPUs, with the exception of those
with a very small primary cache.
BBSMODE
makes this version ignore the "shell" and "write" commands so it can
be used safely as a BBS door.
There are other compile directives described in config.h, in particular
some that fine-tune the UNIX curses display.
pMARS has been tested with various ANSI and non-ANSI C compilers. If
you can't get it to run or you had to change the source extensively,
contact the authors with a full description of the problems and
diffs to the source if applicable.
____________________
Platforms
UNIX
A standard UNIX makefile is provided. If you specify the GRAPHX
directive, a character-based display using the curses library is
built. On some systems, it may be necessary to remove -ltermcap from
the LIB variable in the makefile.
UNIX/X11
If you specify the XWINGRAPHX directive, the X-Windows display
version of pMARS is compiled. You also need to change the link
library by uncommenting the "LIB = -lX11" line in makefile. X11
pMARS has a few new command line options that are described in
pmars.doc.
LINUX
The Linux/SVGA version of pMARS has been derived from the DOS
graphical version and therefore should behave very much like that
one.
Some notes for compiling the Linux/SVGA version:
* You will need the Linux SVGA library (libvga) version 1.12 or above
to compile pMARS for Linux (it may work with older libraries, but
I have not had an opportunity to test it).
* If you #define GRAPHX in config.h or in the makefile, the graphical
version will automatically be built unless you explicitely
specify CURSESGRAPHX.
* You will have to link with -lvgagl -lvga. makefile already contains
a sample definition of LIB with these libraries.
* The code assumes that Function keys etc. map to the 'standard'
escape sequences. pMARS will not recognize these keys otherwise.
* You need root privileges for the SVGA library, so either run pMARS
as root, or a better solution is to set the SUID bit of the
executable (do the following with root privileges).
# chown root pmars
# chmod u+s pmars
* The code assumes your mouse is available via /dev/mouse. This is
usually a link to the 'real' mouse interface, e.g. on my system:
# cd /dev
# ls -l mouse
lrwxrwxrwx 1 root root 5 Mar 2 00:22 mouse -> ttyS0
* The second digit of the the argument to -v indicates (just like in
the DOS version) the graphics mode:
1 ... 640x480 with 256 colors
2 ... 800x600 with 256 colors
3 ...1024x768 with 256 colors
6 ... 320x200 with 256 colors
all other digits will result in the 640x480x256 mode.
Deficiencies/bugs of the Linux/SVGA version:
* Currently, the following keys are recognized by pMARS: F1-F10, the
cursor keys, insert, delete, home, end, page up and page down,
and Alt-a to Alt-z.
* The result of a fight is printed to the console after returning
from the graphical display -- only the last two lines or so are
not visible until you press <return>.
* Bug reports are welcome - just drop a note to [email protected]
DOS
You will need the free 32-bit DOS compiler DJGPP - a DOS port of gcc -
and ndmake or some other make program. pMARS also compiles with the
16-bit DOS compilers of the Borland/Turbo C family, but the maximum
number of warriors is limited to 8 because of memory constraints.
The GRAPHX compile directive enables the combined VGA/textmode
display of pmarsv.exe. You can enable the graphics and textmode
displays selectively with the DOSGRXGRAPHX and DOSTXTGRAPHX
directives. If you so desire, you can even link in a curses display
using the PDCurses library by specifying the CURSESGRAPHX directive.
MAC
The Mac GUI version of pMARS, MacpMARS, will compile with Think C
and MPW C, possibly others. Source code for the interface/display of
MacpMARS as well as instructions on how to make the executable are
in MacpMARS*s.cpt.hqx. The GUI code has not been updated for v0.7 of
pMARS yet, so you need the base archive for v0.6 (pmars06s.zip).
VMS
pvms*s.zip contains command files to build pMARS for VMS flavors. You
need DEC C; VAX C will not work. This file also contains a complete VMS
help system.
OTHERS
pMARS should compile with Borland C++ for OS/2, although we haven't
tried it. The OS/2 version currently doesn't have a core display.
pMARS has also been reported to compile on Amigas.
____________________
Language support
All strings are contained in the file str_eng.c for easy translation into
languages other than english. If you would like to see pMARS speak your
native tongue, translate the strings and send the file to us. We will then
include the new str_???.c in the next release and might even release the
foreign language binaries.
$Id: README,v 1.1.1.2 2018/05/28 10:22:56 marisag Exp $