----------------------------------------------------------------------
REAMDE
Nethack 1.3d -- Revived
----------------------------------------------------------------------
It's the year 2007, 20 years after the first version of Nethack
(v1.3d) was released into the wild.
Many of nowadays Nethack players never had the opportunity to play
this ancient version of Nethack, others may have and want to make a
little nostalgic trip back, to the days when the net was still
innocent and leprechaun were big `L'...
Unfortunately the original sources of Nethack 1.3d don't build out of
the box on modern systems. So I hacked them a bit up, just enough to
build and run on a GNU/Linux box of today.
So here it is: Nethack 1.3d revived!
BUILD INSTRUCTIONS:
Edit the variable PREFIX in the Makefile and HACKDIR in config.h to
the path where you want to install Nethack 1.3d. Be careful not to
override your installation of the current Nethack version!
Then simply run `make' and wait... A bunch of warnings is normal.
To install the new old Nethack run `make install' as root user.
Now you can run Nethack 1.3d as PREFIX/games/nethack (The default
PREFIX for the revived edition is /tmp/oldhack, so if you didn't
change anything /tmp/oldhack/games/nethack will do).
KNOWN PROBLEMS:
- After suspend (^Z) the game becomes unplayable.
Solution: don't do that! Save the game instead.
Besides this the game seems quite playable.
UNKNOWN PROBLEMS:
- Nethack 1.3d is not y2k safe, I added a somewhat naive fix, which
prevents the two digit year representation from overflowing but
might trigger further subtle problems.
- All segfaults I stumbled across were fixed, but I did not much
testing yet, so t is quite likely that there are still more. Bug
reports and patches are welcome.
SCM REPOSITORY:
The mercurial repository with the sources and all current changes can
be found at
http://hg.intevation.de/nethack/history/nethack-1.3d-revived
Have fun!
Sascha Wilde
2007/10/13
--------------------------------------------------------------------------------
README
NetHack V1.0 README
This file contains information on NetHack, it's history, features,
and installation proceedures.
For a detailed history of the game, see the README.OLD file, which
contains three separate readme files, dating back to the original release of
the game (then named hack) by Jay Fenlason.
History:
==========
NetHack is the product of literally dozens of people's work. I have
a list of *some* of those who made major additions to the game which appears
below:
Jay Fenlason wrote the original release of "Hack", with help from
Kenny Woodland, Mike Thome and Jon Payne.
Andries Brouwer did a major re-write on the program and publshed (at least)
two versions to the Usenet.
Don Kneller ported the 1.0.3 version of Hack to the PC, creating PC-Hack.
The following folks didn't actually re-write the game, or port it to
a new machine, but have made significant contributions to the playability of
the game:
ins_a...@jhunix.UUCP (Ken Arromdee)
New character classes.
New weapons code.
Armor weights implemented.
New tools code.
Polymorph self code.
additional bug fixes.
srt@ucla-cs (Scott R. Turner)
Rockmole & Keystone Kops code.
Squeeky Board & Magic traps.
Fountain code.
more bug fixes.
...@cornell.UUCP (Gil Neiger)
Magic Marker code.
Fountain code enhancements.
Enhancements to dozens of routines.
more bug fixes (esp. in hack.zap.c)
er...@hplsla.UUCP (Eric Backus)
#dip mods to fountain code.
yet more bug fixes.
As for myself, I have added new character classes and traps, the
Throne Room, spellbooks and spellcasting, implemented code for praying and
made some enhancements to the endgame.
NetHack is an integrated version of two major "flavors" of Hack,
Unix and PC Hack. It is designed so that you should be able to compile it
in either one of the target enviornments. The filenames of all modules have
been modified to correspond with the PC-Hack standards implemented by Don
Kneller.
config.h
==========
As distributed, it is set up to compile on my machine (a Pyramid 98xe
in the Berkeley universe). Due to the large number of "features" in NetHack,
the config file (config.h) is used to select the target options.
Here is a list of the currently supported options:
SPELLS Spell casting code
PRAYERS Prayer code
KAA Various changes made by Ken Arromdee
MARKER Magic marker modification
NEWCLASS New classes, traps, and Throne Rooms.
SAFE_ATTACK Safe attack code
PROBING Wand of probing code
DIAGS Diagnostics after death/quit
SORTING Sorted inventory
DGK Additional features by Don Kneller (PC specific)
DGKMOD Additional features by Don Kneller (Non-PC specific)
REDO support for redoing last command
HARD Enhanced wizard code among other things.
NEWTRAPS Magic and Squeeky board traps
FREEHAND Cannot use Pick-axe without wielding it.
SPIDERS Spiders and webs
FOUNTAINS Fountain code
KOPS Keystone Kops
ROCKMOLE Rockmoles
Status Line options:
GOLD_ON_BOTL
EXP_ON_BOTL
In a number of cases, code written for one specific version of Hack
or another was separated out and given it's own designation (eg. REDO has
been moved out of DGKMOD which was moved out of DGK from PC-HACK).
Some New Features:
====================
Some of the old code (eg. KOPS) has been enhanced to allow for more
functionality. Here's a couple of examples - you can find out the rest for
yourself in the traditional Hack style :-)
Kops now throw cream pies (thank/blame KAA for the suggestion).
The wizard may not stay dead!!!
There are a couple of new types of demons.
Demons may not be aggressive.
There are lots more of these little gems, with sufficient hints in
various fortune cookies to give away enough clues.
Makefiles:
============
The Unix "Makefile" has been enhanced to make installation cleaner
and also to allow "initialization" of the play directories (WARNING: this
will destroy old score files!!!). The PC Makefile hasn't been upgraded in
this respect.
The program "makedefs" has been modified in order to allow limited
use of "#ifdef/#else/#endif" sets in objects.h. Makedefs will only generate
one #define for any number of ocurrences of a given object name string. In
addition, "makedefs" also generates alternate defines for "DEAD_xxxxx" in
those cases where a monster has been given an alternate identity.
Makedefs has also been modified in order that it may be used to
initialize the following variable def files:
objects.h -o option, see above.
trap.h -t option, trap type defines.
date.h -d option, date string.
data -D option, optional monster names.
rumors -r option, optional rumor addition.
To compile the program on any 4.n or Sys V system, you should only
need to copy "Makefile.unix" to "Makefile", set up "Makefile" and "config.h",
then type "make". On a Xenix system, use "Makefile.xenix" and similarly set
up "Makefile" and "config.h", with "STUPID" defined. At this point in time,
I can get the Xenix version to build, but it will immediately dump core on
invocation.
Known Problems:
=================
There are several known problem areas and deficiencies in the code
which I haven't yet addressed, prefering to get the really fatal bugs out of
the way. Here's a short list of things someone out there might want to work
on (and it is by no means complete):
- The WALKIES code is really crude. Fido get's mnexto()'d you when
he gets out of the effective leash range. I haven't yet been able
to integrate leashed movement into dogmove(). You might just want
to comment out the #define in config.h.
- ROCKMOLES have some problems with screen updating. I didn't make
any changes to the code I received, and have noticed some distinct
problems with walls not being set to "door" until the rockmole
moves off the cell.
- There are some problems in the item selection code, the usual effect
of which is to leave the cursor sitting at some arbitrary point on
the screen instead of returning it to the upper left hand corner or
onto the "@". This doesn't affect the screen updating, so I have
ignored it up to now.
- REDO may not be completely implemented. I am still working on it
here but would appreciate any help anyone out there might want to
give.
I fully expect that about one week's worth of play on the net will
result in a couple dozen bugs being discovered. I would like to keep a lid
on the potential explosion of different sub-versions of the game, so if you
possibly can, please send me the bug reports, instead of releasing them to
the general public. I will apply them to my code here, and will generate an
update to the release when the mass of fixes (or mass * severity factor) gets
large enough. This way, we should be able to keep most of the net up to a
certain level - this may turn out to be the first truely net maintained
game. Unless circumstances change, I will continue to consolidate fixes and
modifications to the game, and will continue to post to the net through
comp.sources.games, with notices of new patches/fixes/mods going out through
rec.games.hack.
Making Bug Reports:
=====================
To send bug reports, just E-Mail me at any one of the following net
addresses (in order of connectivity):
seismo!mnetor!genat!mike
utzoo!mnetor!genat!mike
pyramid!pyrnj!genat!mike
utzoo!utgpu!genat!mike
When you send in a bug report, please keep your code fragments as
small as possible. Remember that each site along the way is paying for the
transmission of the code.
Mike Stephenson
Mail: Genamation Inc. Phone: (416) 475-9434
351 Steelcase Rd. W
Markham, Ontario. UUCP: {seismo, utzoo}!mnetor!genat!mike
Canada L3R 3W1
--------------------------------------------------------------------------------
END OF README
--------------------------------------------------------------------------------
README.OLD
This file consists of all previous README files for the game, as
released with the original version (Jay F.), first usenet version (Andries B.),
and PC-Hack (Don K.). This way "README" is current for this version.
Mike Stephenson
-- Original README file --------------------------------------------------------
This is export hack, my first semester programming project.
To set it up for your system, you will have to do the following:
1: create a hack uid, to own the top ten list, etc.
2: create a hack directory "/usr/lib/game/hack" is the default.
2.5: make the directory 700 mode. /* sav files go in there...*/
3: modify hack.main.c to use the new directory.
4: modify hack.main.c so it uses the new hack gid. Gid accounts can
go into magic mode without the password, can get cores with ^G, etc.
(make sure gid isn't checked anywhere else...)
5: recompile hack.
6: put it in games after making it set-uid hack.
8: fix the bugs I undobtedly left in it.
9: tell me what you think of it.
Hack uses the UCB file /etc/termcap to get your terminal escape codes.
If you don't use it, you will have to make extensive changes to hack.pri.c
If you find any bugs (That you think I don't know about), or have any
awesome new changes (Like a better save (One that works!)), or have ANY
questions, write me
Jay Fenlason
29 East St.
Sudbury Mass.
01776
or call me at (617) 443-5036. Since I have both a modem and a teen-age
sister, Good Luck.
Hack is split (roughly) into several source files that do different things.
I have tried to fit all the procedures having to do with a certain segment
of the game into a single file, but the job is not the best in the world.
The rough splits are:
hack.c General random stuff and things I never got around to moving.
hack.main.c main() and other random procedures, also the lock file stuff.
hack.mon.c Monsters, moving, attacking, etc.
hack.do.c drink, eat, read, wield, save, etc.
hack.do1.c zap, wear, remove, etc...
hack.pri.c stuff having to do with the screen, most of the terminal
independant stuff is in here.
hack.lev.c temp files and calling of mklev.
Because of the peculiar restraints on our system, I make mklev (create
a level) a separate procedure execd by hack when needed. The source for
mklev is (Naturaly) mklev.c. You may want to put mklev back into hack.
Good luck.
Most of hack was written by me, with help from
Kenny Woodland (KW) (general random things including
the original BUZZ())
Mike Thome (MT) (The original chamelian)
and Jon Payne (JP) (The original lock file kludge and
the massive CURS())
This entire program would not have been possible without the SFSU Logo
Workshop. I am eternally grateful to all of our students (Especially K.L.),
without whom I would never have seen Rogue. I am especially grateful to
Mike Clancy, without whose generous help I would never have gotten to play
ROGUE.
-- Hack 1.0.x README file ------------------------------------------------------
Hack is a display oriented dungeons & dragons - like game.
Both display and command structure resemble rogue.
(For a game with the same structure but entirely different display -
a real cave instead of dull rectangles - try Quest)
Hack was originally written by Jay Fenlason (at lincolnsudbury:
29 East St., Sudbury Mass., 01776) with help from
Kenny Woodland, Mike Thome and Jon Payne.
Basically it was an implementation of Rogue, however, with 52+ instead of 26
monster types.
The current version is more than thrice as large (with such new features as
the dog, the long worms, the shops, etc.) and almost entirely rewritten
(only the display routines are the original ones - I must rewrite these
too one day; especially when you are blind strange things still happen).
Files for hack:
hack The actual game
record Top 100 list (just start with an empty file)
news Tells about recent changes in hack, or bugs found ...
(Just start with no news file.)
data Auxiliary file used by hack to give you the names
and sometimes some more information on the
objects and monsters.
help Introductory information (no doubt outdated).
hh Compactified version of help.
perm An empty file used for locking purposes.
rumors Texts for fortune cookies.
(Some of these contain information on the game,
others are just plain stupid. Additional rumors
are appreciated.)
hack.sh A shell script.
(We have hack.sh in /usr/games/hack and
hack in /usr/games/lib/hackdir/hack and all the other
hack stuff in /usr/games/lib/hackdir - perhaps this
will make the script clear.
There is no need for you to use it.)
READ_ME This file.
Original_READ_ME Jay Fenlason's READ_ME
System files used:
/etc/termcap Used in conjunction with the environment variable
$TERM.
/bin/cat
/usr/ucb/more
/bin/sh Used when $SHELL is undefined.
How to install hack:
0. Compile the sources. Perhaps you should first look at the file config.h
and define BSD if you are on a BSDtype system,
define STUPID if your C-compiler chokes on complicated expressions.
Make sure schar and uchar represent signed and unsigned types.
If your C compiler doesnt allow initialization of bit fields
change Bitfield. When config.h looks reasonable, say 'make'.
(Perhaps you have to change TERMLIB in the makefile.)
1. If it didnt exist already, introduce a loginname `play' .
2. The program hack resides in a directory so that it is executable
for everybody and is suid play:
---s--s--x 1 play 206848 Apr 3 00:17 hack
Perhaps you wish to restrict playing to certain hours, or have games
running under nice; in that case you might write a program play.c
such that the program play is suid play and executable for everybody
while all the games in /usr/games are readable or executable for
play only; all the program play does is asking for the name of a game,
checking that time-of-day and system load do not forbid playing,
and then executing the game. Thus:
-r-sr-sr-x 1 play 13312 May 24 12:52 play
---x------ 1 play 206848 Apr 3 00:17 hack
If you are worried about security you might let play do
chroot("/usr/games") so that no player can get access to the rest
of the system via shell escapes and the likes.
If you #define SECURE in config.h then hack will not setuid(getuid())
before executing a chdir(). Hack will always do setuid(getuid()) with
a fork. If you do not define UNIX then hack will not fork.
3. The rest of the stuff belonging to hack sits in a subdirectory hackdir
(on our system /usr/games/lib/hackdir) with modes
drwx------ 3 play 1024 Aug 9 09:03 hackdir
Here all the temporary files will be created (with names like xlock.17
or user.5).
4. If you are not really short on file space, creating a subdirectory
hackdir/save (modes again drwx------) will enable users to save their
unfinished games.
The program hack is called
$ hack [-d hackdir] [maxnrofplayers]
(for playing) or
$ hack [-d hackdir] -s [listofusers | limit | all]
(for seeing part of the scorelist).
The shell file hack (in this kit called hack.sh) takes care of
calling hack with the right arguments.
Send complaints, bug reports, suggestions for improvements to
mcvax!aeb - in real life Andries Brouwer.
-- PC Hack 3.51 README file ----------------------------------------------------
Welcome to the sources for PC HACK (version 3.51).
Introduction
------------
This is a version of the public domain program HACK 1.03 (copyright
Stichting Mathematisch Centrum, Amsterdam, 1984, 1985.) implemented
under MSDOS with the Microsoft(tm) C v3.0 compiler.
You may copy this version of PC HACK and make any changes you want to
it. You may give it away, but you may not sell it.
The sources are in ARC format in HACK351S.ARC. The commands:
C> arc51 e hack351s makefile make.*
C> arc51 e hack351s *.h
C> arc51 e hack351s *.c
will unpack the files.
With a hard disk system, you should be able to type `make' and the sources
will start to be compiled. This takes a long time. A floppy disk system
does not really have enough storage.
Compiling
---------
The LARGE compiler model is used. To add WIZARD mode, add a -DWIZARD
to the MAKEFILE, or a #define WIZARD to the CONFIG.H file.
The MAKEFILE included with PC HACK 3.51 sources is for my version of MAKE.
It is very similar to UNIX(tm) `make'. See MAKE.DOC for details.
To compile the sources by hand the command for each `filename.c' file is:
msc -AL -DREGBUG -DLINT_ARGS -Ot -Gs filename.c;
Linking
-------
I used the Microsoft 8086 Linker version 3.01
To link the *.obj files by hand, the command is:
link @linkfile
Where the contents of the linkfile (not supplied) should be:
decl.obj apply.obj bones.obj cmd.obj do.obj +
do_name.obj do_wear.obj dog.obj eat.obj +
end.obj engrave.obj fight.obj hack.obj +
invent.obj ioctl.obj lev.obj main.obj +
makemon.obj mhitu.obj mklev.obj mkmaze.obj +
mkobj.obj mkshop.obj mon.obj monst.obj +
o_init.obj objnam.obj options.obj pager.obj +
potion.obj pri.obj read.obj rip.obj +
rumors.obj save.obj search.obj shk.obj +
shknam.obj steal.obj termcap.obj +
timeout.obj topl.obj track.obj trap.obj +
tty.obj unix.obj u_init.obj vault.obj +
wield.obj wizard.obj worm.obj worn.obj +
zap.obj version.obj rnd.obj alloc.obj +
msdos.obj
hack /NOIG /STACK:4000;
Differences from UNIX HACK
--------------------------
Changes that were introduced to port UNIX HACK to the MSDOS environment
are surrounded with `#ifdef MSDOS', `#endif' directives.
Other changes I have made are surrounded by `#ifdef DGK', `#endif'
directives. It should be possible to compile these sources without
any of my changes by removing the `#define DGK' line from CONFIG.H.
Also, functions I have added are mainly restricted to the file msdos.c,
although some of them are in other places (ie. wizard.c)
Finally
-------
If you have any questions, contact me at one of:
Don Kneller
UUCP: ...ucbvax!ucsfcgl!kneller
ARPA: knel...@ucsf-cgl.ARPA
BITNET: knel...@ucsfcgl.BITNET
USMAIL: D. G. Kneller
2 Panoramic Way #204
Berkeley, CA 94704
--------------------------------------------------------------------------------
END OF README.OLD