|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: I T
Length: 3781 (0xec5) Types: TextFile Names: »InstallRules.ms.orig«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Mpss/InstallRules.ms.orig«
.TH How to install or alter MPSS. .SH SETIING UP THE FILES .LP If mpss lives in one directory, a subdirectory called "mpsslib" must be created. "mpsslib" must have permissions 0777 (rwx for all!). Before compiling the program make sure that all file names in the file "files.h" have been altered accordingly. Make sure that this file contains the FULL pathnames of any files accessed. inside mpsslib we put 3 files, with permissions as follows and owner of all three being daemon. (ALL THIS MUST BE FOR THE GAME TO WORK!!) All files in mpsslib must have permission 4755 or 4777 as shown below. (i.e. they set uid as soon as they are invoked.) "mpsslib" should look like this : .DS L total 144 -rwsrwxrwx 1 daemon 59 May 11 15:06 mpssmail (file exec. on a new game) -rwsr-xr-x 1 daemon 44032 May 12 11:07 slave (invoked by ../mpss) -rwsr-xr-x 1 daemon 98304 May 12 11:11 startrek (the master game&process!) the directory above mpsslib should look like this : -rwsr-xr-x 1 daemon mpssclean (to clean up a mess if there is one) -rwxr-xr-x 1 anyone mpss (proggie to invoke the full game) -rwxr-xr-x 1 anyone mpssrules (nroff -ms format) drwxrwxrwx 1 anyone mpsslib (subdirectory for all files.) .DE .SH How to change mpss. .LP To add another type of terminal. .LP All the terminal control strings are defined in cursor.c . So, if you wish to add another terminal, put in another case for it in all 3 relevant procedures in that file. Then edit slave.c and allow the variable tty_type to get that value. (look in procedure gettermdata() ). Make sure not to mess about with case 0, which is to exit the proggie in case of doubt. After that invoke mpss not using the -t option and choose the terminal you have implemented. .SH Structure of the game.. .LP First note that the entire game is controlled by one main master process. Heres a sample run of what goes on. (The file main.c contains the main game iteration loop.) .LP A guy invokes mpss. This tiny proggie only sets the players umask to 000 and opens the /dev/ttyxx file of the player and makes it rw access for all, so the master proggie can write/read from that terminal. Mpss then execls /mpsslib/slave which is owned by daemon so it can send signals to the master-star-trek proggie that is also owned by daemon. Now, slave starts running. If the mpsslib/masterpid (MASTERPIDFILE) isnt there, this means that the master process isnt running yet. Slave makes a LOCK file and if the master isnt there, invokes it. If it is there (i.e. masterpid is present) it carries on. After waiting until the masterpidfile appears, slave makes a PLAYERFILE, mpss/player, reads the master process id out of masterpid, and signals the masterprocess that a playerfile is there. The master process gets the signal, reads the playerfile enters the player into the list of players and starts to play him. The master removes the playerfile then, and then slave removes the LOCK file. No other slave will make a player file if the lock file is present. The playerfile contains the shipnumber,cursor motion and clear screen strings, as well as the players terminal name. After a player starts playing, if he dies, a playerscorefile is made, and the waiting slave process is signalled. It reads the playerscorefile, then the score file (which contains the scoreboard) adds him in, writes back the scoreboard and removes the playerscorefile.r Other files in the game are "shipnumber" wich only contains a number between 0-28 keeping track of which ship is to be allocated next. omakefile makes everything with the -O option, gmakefile makes everything with the -g option. LIVE LONG & PROSPER Any problems? ask Peer Schmitz, Department of Computer Science University of Keele, Keele, Staffs, ST5-5BG