Integer overflow bug

Discuss PoP1 for DOS here.

Moderator: English Moderator Team

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2955
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Integer overflow bug

Postby Norbert » September 29th, 2014, 12:44 pm

In your video, this somehow worked without pressing ESC?
Since I do not see a "GAME PAUSED" message at the bottom and the animation doesn't seem to be interrupted.

I still cannot replicate it.
When you write "and repeat it", do you mean the 'left, then immediately ESC' pattern or just 'ESC'.
How many times approximately is the required repetition (2-3 or 10+)?
I get the best results when I alternate left and ESC, but still nothing like in your video.
Which PoP version did you use; 1.0? Can you also do it with the version on popot.org (ZIP)?

David
The Prince of Persia
The Prince of Persia
Posts: 1344
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Integer overflow bug

Postby David » September 29th, 2014, 3:10 pm

Norbert wrote:In your video, this somehow worked without pressing ESC?

Yes, but it took me some tries to do it.
I discovered the ESC-method only on the day I wrote about it at viewtopic.php?p=15500#p15500

Norbert wrote:When you write "and repeat it", do you mean the 'left, then immediately ESC' pattern or just 'ESC'.

Here is it in pseudocode, hopefully this makes it clear now. :)

Code: Select all

Make sure the kid is near the edge, but fully onscreen.
while (the game does not show the other room) {
   Press left, then immediately ESC.
   Press ESC again.
}


I now made a video that shows my method, using the version of PoP you linked in your post.
I attached it to this post.

There is another way to do this using the mapper:
Make sure the kid is near the edge, but fully onscreen.
Press ctrl-F1 to start the mapper.
Click ESC, click Add, press the left arrow (on your real keyboard).
Click Exit. (But not Save.)
(Now everytime you press left, esc is automatically added, but only if the game is already paused.)
Now press esc and left alternatingly. (esc, left, esc, left, ...)
Attachments
through_floor_esc.zip
(46.94 KiB) Downloaded 33 times

David
The Prince of Persia
The Prince of Persia
Posts: 1344
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Integer overflow bug

Postby David » October 14th, 2014, 9:18 am

I found a bug related to the shadow on level 12.

Open level 12 in a level editor, move the start position to the sword, then replace the sword with a regular floor.
When you start the level, the shadow will immediately come, but he will be invisible!
He will become visible if you poke him.
But if you merge him while he is still invisible, then the kid will appear in the room below!
Plus the kid will be "misaligned" with the floor.
If you climb up, you might end up at some place other than you expect!
Attachments
invisible_shadow.zip
(62.82 KiB) Downloaded 19 times

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2955
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Integer overflow bug

Postby Norbert » October 14th, 2014, 1:27 pm

Cool. :)

This is the video that David attached to his last post:



When you block the shadow's attacks, you can see his sword's blade at the bottom of the screen.

Here's a variant where the shadow ends up in various rows:



User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2955
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Integer overflow bug

Postby Norbert » October 14th, 2014, 1:45 pm

More shadow weirdness:


David
The Prince of Persia
The Prince of Persia
Posts: 1344
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Integer overflow bug

Postby David » October 31st, 2014, 1:54 pm

Norbert wrote:More shadow weirdness:

It's also possible on level 6. You need to fall into the shadow's room.
(This happened to me a long time ago: http://www.popot.org/popuw_forum_archive/819a.html -- The video link is broken.)
Take a look at do_init_shad() in seg002.c. Only the first 7 bytes of Char are overwritten, the rest is copied from Kid.
Those first 7 bytes are: frame,x,y,direction,curr_col,curr_row,action. But fall_y is not among them.

---

How to kill Jaffar with one stab: (video)
stab_Jaffar.zip
(109.6 KiB) Downloaded 17 times

I'm not sure if this counts as a trick or a bug.
This might be useless, considering that my failed attempts took more time than the usual method.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2955
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Integer overflow bug

Postby Norbert » October 31st, 2014, 6:22 pm

This is the video that David attached to his last post:


User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2955
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Integer overflow bug

Postby Norbert » December 14th, 2015, 8:03 pm

This happened while I was playing (with MIDI audio, to test some stuff):



Kinda funny. :)
That never happened to me before in that location.
I was holding Shift and, I think, I let go just before touching the ledge.

User avatar
yaqxsw
Wizard Scribe
Wizard Scribe
Posts: 703
Joined: June 18th, 2012, 3:35 pm
Location: Germany

Re: Integer overflow bug

Postby yaqxsw » January 29th, 2016, 2:14 pm

New bug on The Ressurection of Jaffar - level 7

0:45 - Guard teleport


User avatar
SuavePrince
Calif
Calif
Posts: 614
Joined: January 26th, 2015, 6:21 pm

Re: Integer overflow bug

Postby SuavePrince » January 30th, 2016, 5:27 am

yaqxsw wrote:New bug on The Ressurection of Jaffar - level 7

Never before see this post.nice,shadows such as trick of thorugh level 12a...but remmenber NIkolay there a bug or event in Resurrection of Jaffar level 13 when there open gate in room 11 ,after kill jaffar,if you want pass this room,the gate close in your face...nice :D

David
The Prince of Persia
The Prince of Persia
Posts: 1344
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Integer overflow bug

Postby David » January 30th, 2016, 1:04 pm

How to "kill" the guard after the prince dies:
Not really useful, but it explains how they made this image from this page.
Attachments
guard_stabs_before_falling_2.zip
(44.25 KiB) Downloaded 15 times

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2955
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Integer overflow bug

Postby Norbert » February 4th, 2016, 8:34 pm

This is the video that David attached to his post above:


David
The Prince of Persia
The Prince of Persia
Posts: 1344
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Integer overflow bug

Postby David » July 24th, 2016, 11:16 am

If you enter a room, and a guard is standing on a button there, then he will turn towards the prince no matter how quiet he is.
I guess the guard "hears" his own button push, and then the game mistakenly assumes that it must have been done by the prince.

Seen this first in the Fred's Palace mod.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 2955
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Integer overflow bug

Postby Norbert » July 24th, 2016, 12:00 pm

I also noticed that. :)


Return to “Prince of Persia 1 for DOS”

Who is online

Users browsing this forum: No registered users and 2 guests