Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!ihnp4!zehntel!hplabs!sdcrdcf!sdcsvax!laman
From: laman@sdcsvax.UUCP (Mike Laman)
Newsgroups: net.games.rogue
Subject: Re: Save Game bug
Message-ID: <86@sdcsvax.UUCP>
Date: Mon, 24-Sep-84 08:04:36 EDT
Article-I.D.: sdcsvax.86
Posted: Mon Sep 24 08:04:36 1984
Date-Received: Wed, 26-Sep-84 19:19:20 EDT
References: <1135@eosp1.UUCP>
Reply-To: laman@sdcsvax.UUCP (Mike Laman)
Organization: EECS Dept. U.C. San Diego
Lines: 50

Organization:
Keywords: 

In article <1135@eosp1.UUCP> robison@eosp1.UUCP (Tobias D. Robison) writes:
>
>In rogue 5.2 I also had the experience of the game saving itself when
>I stepped on a "+" sign.  The problem was 100% repeatable; I was trying
>to move OUT of a room.  After the game saved itself several times, I
>exited thru another door and everything was fine.
>
>	- Toby Robison (not Robinson!)
>	allegra!eosp1!robison
>	or: decvax!ittvax!eosp1!robison
>	or (emergency): princeton!eosp1!robison

Well, I have a fix for 5.3 (Sorry.  Maybe 5.2 is similar).
Starting at "leave_room+fb" (hex offset obviously) you will see:

		calls	$1,_wstandend
		incl	r7
		brw	leave_room+6d
		extzv	$0,$7,-2(fp),r0
		bbc	$0,__ctype_+1[r0],SomeAddressFartherDown
		bbs	$14,_Player+24,leave_room+d7
		cmpb	(r10),$43

	Opps!  If you look all through this routine you'll see that "r10" is
NOT INITIALIZED!  I leave this as an exercise to someone to find a way to
squeeze in the following change :-).  Oh, this routine seems to be optimized
code, so it'll be a little tougher to find the room in the function.

In case you're curious, this uninitialized pointer gets referenced when
you leave a room with a monster showing on your screen when you do NOT have
the ability to detect monsters.  If you think about that, you will see that
this isn't all that common.  Who can resist not hacking a monster to bits :-)?
This situation occurs more often in the deeper levels doesn't it! "Ah!" you say.

Change the "cmpb	(r10),$43" to:

		ashl	$5,r7,r1
		addl2	r8,r1
		ashl	$3,r1,r1
		cmpb	(r1),$43

Feel free to optimize this.  Sorry, but I don't have the source.  Now if
someone can come up with the patch.  Sorry, but I don't have that either.
Please post the patch, so we can be spared this bug.

		Mike Laman
		UUCP: {ucbvax,philabs,sdcsla}!sdcsvax!laman