[comp.sources.games.bugs] mpss on SYS V ???

mike@pcsbst.UUCP (Mike Schroeder) (07/27/88)

ok, so I got mpss to compile (no problem there ;-) on our SYS V.3
machine. Set all permissions as specified in InstallRules, got
the right directory (/usr/games/mpsslib) and then tried to
run it ;-(

Calling just "mpss" gave the start menu asking for my TERM type,
entered "0", got a message saying "found automatic terminal type"
or something like that and then:

"Memory fault" ;-(

No core, nothing else, just my prompt.

Any hints from anyone???? PLEASE!

Cheers
--
Mike Schroeder			(msc@pcsbst.UUCP)
PCS GmbH; Pfaelzer-Wald-Str. 36; D-8000 Muenchen 90; W. Germany
UUCP:  ...uunet!unido!pcsbst!msc
DISCLAIMER: #include "std-disclaimer.h" ;-)

torsten@pcsbst.UUCP (Torsten Homeyer) (07/28/88)

In article <301@pcsbst.UUCP> cochise!mike@pcsbst.UUCP (Mike Schroeder) writes:
>Calling just "mpss" gave the start menu asking for my TERM type,
>entered "0", got a message saying "found automatic terminal type"
>or something like that and then:
>
>"Memory fault" ;-(

	You can type in what ever you want.  What you will get is a
	Memory fault.

	Perhaps that's the game ?-)

		Torsten.

angus@lfcs.ed.ac.uk (Angus Duggan) (07/29/88)

In article <301@pcsbst.UUCP> cochise!mike@pcsbst.UUCP (Mike Schroeder) writes:
>Calling just "mpss" gave the start menu asking for my TERM type,
>entered "0", got a message saying "found automatic terminal type"
>or something like that and then:
>
>"Memory fault" ;-(

I solved this problem by altering the calls to time() in slave.c - on the
4.2bsd system time() requires a (long *) parameter, and returns a long.

Angus Duggan, Department of Computer Science, University of Edinburgh,
JCMB, The King's Buildings, Mayfield Road, Edinburgh, EH9 3JZ, Scotland.
JANET:  angus@uk.ac.ed  ARPA: angus%ed@nss.cs.ucl.ac.uk
USENET: angus@ed.ac.uk  UUCP: ...!mcvax!ukc!ed!angus

hoyt@polyslo.UUCP (Sir Hoyt) (07/30/88)

In article <302@pcsbst.UUCP> sws4!torsten@pcsbst.UUCP (torsten) writes:
>In article <301@pcsbst.UUCP> cochise!mike@pcsbst.UUCP (Mike Schroeder) writes:
>>"Memory fault" ;-(
>	Memory fault.
>	Perhaps that's the game ?-)
>		Torsten.


The reason for the 'Memory fault' is the impropper use
of time(3) in slave.c at line 322.

It was:
        srand(time() % 10);
        sleep(rand() % 10);

It should be:
        srand(time(0L) % 10);
        sleep(rand() % 10);

	
	Note the missing '0L' in the first case.

-- 
John H. Pochmara				 A career is great, 
UUCP: {csun,voder,trwind}!polyslo!hoyt		 But you can't run your 
Internet: hoyt@polyslo.CalPoly.EDU		 fingers through its hair
							-Graffiti 4/13/83

tek1@mtuxj.att.com (Thomas E. Kenny) (07/31/88)

I haven't even gotten mpss to compile on Sys V! Could somebody and there 
appear to be a few of you out there that have gotten that far post the fixes?
Thanks!

oleg@gryphon.CTS.COM (Oleg Kiselev) (08/01/88)

Somehow "setupuniverse.c" (was that its name?) has become missing in my sources
for mpss.  If someone has it, please e-mail it to me.  Thanx

P.S.  I don't mind getting 10 copies so don't hesitate on that account. :-)
-- 

Oleg Kiselev		ARPA:{lcc|bilbo|frodo}.oleg@seas.ucla.edu
(213)452-2435x354	USENET: oleg@gryphon.cts.com
			UUCP:...!{trwrb|ucla-cs}!lcc!oleg
			old adress: oleg@quad1.quad.com (still forwarded)
DISCLAIMER:  I speak for myself only.

jas@dadent (Jay Shrauner) (08/02/88)

In article <5091@gryphon.CTS.COM> oleg@gryphon.CTS.COM (Oleg Kiselev) writes:
>Somehow "setupuniverse.c" (was that its name?) has become missing in my sources
>for mpss.  If someone has it, please e-mail it to me.  Thanx

I thought I had this problem as well but you may actually have a copy of it:
on some of our machines "setupuniverse.c" is simply too long of a file name
so it got truncated.  Look for a "setupuniver" or somesuch in your mpss
directory.  I changed ours to "setup.c"

Of course, none if this did me any good because this program was simply not
written for a Masscomp or AT&T 3B2.  I discovered the time() bug mentioned
by people but after drawing the crosshairs and some random numbers with no
explanation for what they are the program freezes and has to be remotely
killed.  Anybody figure out how to deal with this?

Jay Shrauner
jas@dadent.wustl.edu

mike@pcsbst.UUCP (Mike Schroeder) (08/02/88)

In article <4675@rpp386.UUCP> jfh@rpp386.UUCP (The Beach Bum) writes:
>In article <3382@polyslo.UUCP> hoyt@polyslo.calpoly.edu.UUCP (Sir Hoyt) writes:

[stuff deleted]
>
>incorrect again.  it SHOULD be
>
>	srand (time ((time_t *) 0) % 10);
>
>or if time_t is not typedef'd,
>
>	srand (time ((long *) 0) % 10);
>

Well, since my original question I've tried all three suggestions,
with some results at least: no more memory faults ;-)

BUT: this doesn't mean the game runs ;-(

What happens now is that I get Info on my ship etc.etc.
up to the "Hit any key" message, which I do. I then proceed
to wait, wait, wait, wait, wait...........
After a couple of minutes, I decide something must be wrong, so I go
off to another terminal and do a ps. Lo and behold, here we have a
couple of processes eating cpu like crazy, apparently doing something
without success, namely the slave and something called peer.
Killing these, I then get a message on my terminal saying something
like "The game seems to have been started twice. Try again, it should
work now" - not that it does ;-(

So, I suppose its into the code I go - or has someone found a
solution? Has anyone got it running under SYS V.3??

Mike
--
Mike Schroeder			(msc@pcsbst.UUCP)
PCS GmbH; Pfaelzer-Wald-Str. 36; D-8000 Muenchen 90; W. Germany
UUCP:  ...uunet!unido!pcsbst!msc
DISCLAIMER: #include "std-disclaimer.h" ;-)

wolfer@ihuxy.ATT.COM (Wolfson) (08/03/88)

In article <850@mtuxj.att.com>, tek1@mtuxj.att.com (Thomas E. Kenny) writes:
> I haven't even gotten mpss to compile on Sys V! Could somebody and there 
> appear to be a few of you out there that have gotten that far post the fixes?
> Thanks!


Compiling is only half the battle. The reason I, for one, have not posted the 
"fixes" to get it to compile, is that, while the thing runs, I can't get control
of the keyboard. The problem is with the way the program uses curses.

It look from the code that it is using its own version of raw() and noraw()
to turn off echoing of the characters. This might be part of the problem.
I replaced the functions with library routines which I thought would do the
the same thing, ( cbreak() noecho() nonl() etc). but still no good.

Tomorrow I will be turning the program source over to our resident
"C"/unix guru. 

If no one else posts any fixes, and the program is working reasonably
well, I'll post the fixes he comes up with..

Paul Wolfson
ihnp4!ihuxy!wolfer

nick@agsm.unsw.oz (Nick Frisina) (08/08/88)

i have mpss working under system 5.3 on a pyramid 90e.
i had already implemented the changes to time etc...
i'm not very good at the game, i keep getting killed!
such is life in a big universe!
nick
ps - the berkley environment in OSx4.0 has a termcap library
so i guess i cheated.....