-+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+ X read command. This seems to allow the device driver to perform` V0D X what ever duty needs doing, and no hang ups occur. If you should` V0D X experience a problem with the game going into permanent LEF's,` V0D X try increasing the pause time a bit.`0D X`0D X`0D X`0D X 5.2 Hibernating The Game...`0D X`0D X At certain places in the game, I have included code to` V0D X hibernate for brief periods. Many of these were taken out with` V0D X the addition of the pause before each INKEY, but some still` V0D X exist. These are included to keep Moria "system friendly". My` V0D X philosophy has been that a well written game should not eat the` V0D X CPU up alive. If you wish to differ, these pauses can be removed` V0D X to speed up the game, but you should not remove the pauses before` V0D X INKEY unless you are running the game at baud rates less than` V0D X 9600.`0D X`0D X`0C $ CALL UNPACK AAAREADME.1ST;1 727899915 $ create 'f' X$! X$! MORIA build command file: X$! example of how to build a moria executable from the X$! source. Note that in this example moria is built with X$! no error checking on. This greatly increases the X$! efficiency of the program, but should only be used with X$! de-bugged versions. X$! X$! X$ Setup: X$ on warning then continue X$ on error then goto error_trap X$! X$ Build_paths: X$ cur_path := 'f$directory()' X$ path_dist := 'cur_path' X$ cur_len = 'f$length(cur_path)' - 1 X$ cur_path := 'f$extract(0,cur_len,cur_path)' X$ path_source := 'cur_path'.source`5D X$ path_include := 'cur_path'.source.include`5D X$ path_macro := 'cur_path'.source.macro`5D X$ path_execute := 'cur_path'.execute`5D X$! X$ Define_logicals: X$ define mor_main 'path_dist' X$ define mor_source 'path_source' X$ define mor_include 'path_include' X$ define mor_macro 'path_macro' X$ define mor_execute 'path_execute' X$! X$ START: X$ if p1.eqs."?" then goto HELP X$ if p1.eqs."LINK" then goto LINK_STEP X$ if p1.eqs."TERMDEF" then goto COMPILE_TERMDEF X$ if p1.eqs."MACROS" then goto COMPILE_MACROS X$ if p1.eqs."MORIA" then goto COMPILE_MORIA X$ if p1.eqs."" then goto COMPILE_MORIA X$! X$ BAD_PARAM: X$ write sys$output "Unrecognized parameter : ",p1 X$ exit X$! X$ HELP: X$ type sys$input XBUILD.COM : Accepts one optional parameter. By default, all steps are X`09`09executed. If parameter is used, only certain steps are X`09`09executed. X X`09Parameters:`09P1 X`09`09`09? - display this help X`09`09`09`09- Compile all source, re-link moria X`09`09`09LINK - re-link moria X`09`09`09TERMDEF - compile termdef, re-link moria X`09`09`09MACROS - compile all macro routines, re-link moria X`09`09`09MORIA - compile moria & termdef, re-link moria X X$`09exit X$! X$ COMPILE_MORIA: X$ set def mor_source X$ delete moria.lis;* X$ delete moria.obj;* X$ delete moria.env;* X$ write sys$output "Compiling MORIA.PAS." X$ pascal moria.pas /nocheck/nodebug/nolist X$ write sys$output "MORIA.PAS compiled." X$ purge moria.* X$! X$ COMPILE_TERMDEF: X$ set def mor_source X$ delete termdef.lis;* X$ delete termdef.obj;* X$ write sys$output "Compiling TERMDEF.PAS." X$ pascal termdef /nocheck/nodebug/nolist X$ write sys$output "TERMDEF.PAS compiled." X$ if p1.nes."" then goto LINK_STEP X$! X$ COMPILE_MACROS: X$ set def mor_macro X$ delete morialib.olb;* X$ delete *.obj;* X$ write sys$output "Compiling MACROS." X$ macro bitpos/nodebug/nolist X$ write sys$output "BITPOS compiled." X$ macro distance/nodebug/nolist X$ write sys$output "DISTANCE compiled." X$ macro insert/nodebug/nolist X$ write sys$output "INSERT compiled." X$ macro maxmin/nodebug/nolist X$ write sys$output "MAXMIN compiled." X$ macro minmax/nodebug/nolist X$ write sys$output "MINMAX compiled." X$ macro putqio/nodebug/nolist X$ write sys$output "PUTQIO compiled." X$ macro randint/nodebug/nolist X$ write sys$output "RANDINT compiled." X$ macro randrep/nodebug/nolist X$ write sys$output "RANDREP compiled." X$ library/create morialib.olb X$ library morialib bitpos X$ library morialib distance X$ library morialib insert X$ library morialib maxmin X$ library morialib minmax X$ library morialib putqio X$ library morialib randint X$ library morialib randrep X$ write sys$output "MORIALIB.OLB built." X$ if p1.nes."" then goto LINK_STEP X$! X$ LINK_STEP: X$ set def mor_source X$ delete moria.map;* X$ write sys$output "Linking." X$ link /notrace/nodebug moria,termdef,mor_macro:morialib/library X$ write sys$output "MORIA linked." X$ rename moria.exe mor_execute:moria.exe X$ purge mor_execute:moria.exe X$`09library /create/help mor_execute:moriahlp mor_execute:moriahlp X$ set def mor_main X$ exit X$! X$ ERROR_TRAP: X$ write sys$output "***Error resulted in termination***" X$ set def mor_main X$ exit $ CALL UNPACK BUILD.COM;1 1528047613 $ create 'f' X X`09In VMS 4.0 the following device driver bug is fixed: X X`09VAX/VMS Systems Dispatch, March 1985; AD-L034A-24 X`09Page 26 X`09Process hangs in LEF wait state X X`09This bug was a problem in MORIA. It was fixed by pausing just X`09before requesting input via QIO. If you are running VMS 4.0 or X`09greater, you should remove these pauses from IO.INC. Comments X`09showing what code should be removed are placed just before each X`09affected section. You may search for 'VMS 4.0' to locate all X`09of these sections. X X`09In addition, you should remove comments around a single line of X`09code in MORIA.INC. This line causes the player to hibernate X`09one second for every twenty turns of resting performed, which X`09keeps a resting player from eating up the system's CPU. Again X`09there is a comment just before the affected line. X X X`09`09`09-SYSRK- $ CALL UNPACK VMS4.TXT;1 942224004 $ create 'f' X The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D`0A X`0D`0A X`0D`0A X __________`0D X 1 DISCLAIMER`0D`0A X`0D`0A X Moria is intended for Public Domain, and may not be sold or` V0D`0A X marketed IN ANY FORM without the permision and written consent` V0D`0A X from the author Robert Alan Koeneke. I retain all copyrights to` V0D`0A X this program, in either the original or modified forms, and no` V0D`0A X violation, deletion, or change of the copyright notice is` V0D`0A X allowed. Futhermore, I will have no liability or responsibilty` V0D`0A X to any user with respect to loss or damage caused directly or` V0D`0A X indirectly by this program.`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X`0D`0A X 1`0D`0A X`0C X The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D`0A X`0D`0A X`0D`0A X ____________`0D X 2 INTRODUCTION`0D`0A X`0D`0A X MORIA is a huge dungeon simulation game written mainly in` V0D`0A X VAX-11 PASCAL, encompasing about 22,000 lines of code. A single` V0D`0A X executable file is all that is needed to bring up MORIA for the` V0D`0A X first time, although a MORIA help library must be present in` V0D`0A X order to use the internal help options.`0D`0A X`0D`0A X In addition to the PASCAL source code, several macro` V0D`0A X functions and procedures are present which must be linked into` V0D`0A X the moria object library. These macro routines are primarily` V0D`0A X used for greatly improved speed on IO and execution.`0D`0A X`0D`0A X`0D`0A X`0D`0A X ___ ____________ _______`0D X 3 THE DISTRIBUTION PACKAGE`0D`0A X`0D`0A X This distribution package contains many files organized into` V0D`0A X certain directories. The directory structure is as follows:`0D`0A X`0D`0A X +--------------------+`0D`0A X `7CMain MORIA directory`7C`0D`0A X `7C Build.com `7C`0D`0A X +--------------------+`0D`0A X / `7C \`0D`0A X / `7C \`0D`0A X +--------------------+ +--------------------+ +------------------ V--+`0D`0A X `7C DOC - Documentation`7C `7C SOURCE - .PAS files`7C `7C EXECUTE V - Binaries `7C`0D`0A X `7C source `7C `7C `7C `7C V and data `7C`0D`0A X +--------------------+ +--------------------+ +------------------ V--+`0D`0A X / \`0D`0A X / \`0D`0A X +--------------------+ +--------------------+`0 VD`0A X `7C MACRO - source & `7C `7C INCLUDE - Pascal V `7C`0D`0A X `7C library `7C `7C include fi Vles`7C`0D`0A X +--------------------+ +--------------------+`0 VD`0A X`0D`0A X`0D`0A X A ready to run Moria is found in EXECUTE.DIR, along with all` V0D`0A X needed data files and the Moria help library. You may execute` V0D`0A X BUILD.COM to rebuild Moria if needed. Examine BUILD.COM closely` V0D`0A X and you will notice that it will allow you to rebuild certain` V0D`0A X sections of Moria or re-link it, if the proper parameter is used.` V0D`0A X`0D`0A X Documentation source can be found in the directory DOC.DIR.` V0D`0A X MORIA.HLP is used to build the help library. MORIA.RNO is used` V0D`0A X for the manual which can be printed off.`0D`0A X`0D`0A X The source directory, SOURCE.DIR, contains only MORIA.PAS` V0D`0A X and TERMDEF.PAS. Most of the guts to Moria can be found in the` V0D`0A X directory INCLUDE.DIR, which contains all of the include files` V0D`0A X used by MORIA.PAS. MACRO.DIR contains several macro routines,` V0D`0A X whose objects are stored in MORIALIB.OLB, an object module` V0D`0A X library.`0D`0A X`0D`0A X`0D`0A X 2`0D`0A X`0C X The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D X The Dungeons of Moria - COPYRIGHT (c) Robert Alan Koeneke`0D`0A X`0D`0A X`0D`0A X ____________`0D X 4 INSTALLATION`0D`0A X`0D`0A X Because of the size of MORIA when running, it is suggested` V0D`0A X that it be installed shared. MORIA can be installed with SYSPRV` V0D`0A X so that all data files can be kept locked up to all but system.` V0D`0A X MORIA turns off SYSPRV automatically unless accessing it's own` V0D`0A X data files, so that no breach in system security is possible.` V0D`0A X Also, the game itself should be read protected, allowing only` V0D`0A X EXECUTE access, so that it can not propagate within a system.`0D`0 VA X`0D`0A X`0D`0A X Installed without SYSPRV /open/shared `0D`0A X Executable protection MORIA.EXE (s:re,o:re,g:re,w:re)`0D`0 VA X`0D`0A X Installed with SYSPRV /priv=sysprv/open/shared`0D`0A X Executable protection MORIA.EXE (s:re,o:e,g:e,w:e)`0D`0A X`0D`0A X`0D`0A X`0D`0A X When MORIA is first executed, it looks for certain data` V0D`0A X files in the same directory as the executable. If they are not` V0D`0A X found, they are created with default values and the game exits.` V0D`0A X The local MORIA WIZARD should edit these files for site specific` V0D`0A X information and running hours.`0D`0A X`0D`0A X Four data files are created and maintained by MORIA.` V0D`0A X MORIA.DAT contains a startup message and MORIA news, and can be` V0D`0A X used to tell MORIAvites about changes in playing times and such.` V0D`0A X HOURS.DAT contains a reject message and the normal operating` V0D`0A X hours for the game. Note that the only part of this file` V0D`0A X important to the game is the lines containing hours, and that` V0D`0A X text may be added before and/or after these lines. MORIATOP.DAT` V0D`0A X will contain the top twenty scores. MORIACHR.DAT contains an` V0D`0A X entry for each living, saved character, thus disallowing players` V0D`0A X to bring back dead characters.`0D`0A X`0D`0A X A fifth file is needed if you want to use the internal help` V0D`0A X command within MORIA. This is the MORIAHLP.HLB help library,` V0D`0A X which must be located in the same directory as the other data` V0D`0A X files.`0D`0A X`0D`0A X The suggested protection for these files is as follows:`0D`0A X`0D`0A X With SYSPRV Without SYSPRV`0D`0A +-+-+-+-+-+-+-+- END OF PART 2 +-+-+-+-+-+-+-+-