Dupe State: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[File:Dupe State Eco.gif|frame|Collecting | [[File:Dupe State Eco.gif|frame|Collecting blue eco while in dupe state on console (PS2).]] | ||
'''Dupe state''' is a "state" that Jak can enter while performing the duplication exploit on scout flies which allows for a degree of arbitrary code execution. The state is essentially a buffer overflow in the <code>actor</code> heap involving | '''Dupe state''' is a "state" that Jak can enter while performing the [[Duplication Glitch|duplication exploit]] on scout flies which allows for a degree of arbitrary code execution. The state is essentially a buffer overflow in the <code>actor</code> heap involving <code>*hint-semaphore*</code> de-referencing a pointer. | ||
The known side effects and behaviors that can occur while in dupe state include seemingly random game crashes, infinite loops, [[Statue Glitch|statue glitch]] with red and yellow eco, baby spiders in Spider Cave not hatching, orb vents not opening while powered with blue eco, Jak's idle animation being disabled, and collectable entities or actors not disappearing after collecting them. | The known side effects and behaviors that can occur while in dupe state include seemingly random game crashes, infinite loops, [[Statue Glitch|statue glitch]] with red and yellow eco, baby spiders in Spider Cave not hatching, orb vents not opening while powered with blue eco, Jak's idle animation being disabled, and collectable entities or actors not disappearing after collecting them. | ||
This de-referenced pointer can travel across save files, which is a trait not seen in any other known exploit in the game. | |||
== Technical == | == Technical == | ||
Line 13: | Line 13: | ||
== Tutorial == | == Tutorial == | ||
To activate dupe state, | To activate dupe state, enter a level where no scout flies have been collected. Find a scout fly crate and open it. Stand next to the scout fly and press Circle and Start at roughly the same time. If done correctly, the scout fly will no longer be present on screen and Jak's foot will be slightly lifted off the ground. Now, load a save file. Dupe state will now be active. | ||
If in Debug Mode (not [[Cheat Mode]]), loading a save file while simply standing in front of the elevator door in Gol and Maia's Citadel will result in a 50% chance of dupe state being active. If the hint text is present in the top left of the screen during the pause, it will work. | |||
<youtube>https://www.youtube.com/watch?v=FYUAW7dEvBk</youtube> | <youtube>https://www.youtube.com/watch?v=FYUAW7dEvBk</youtube> |
Latest revision as of 23:37, 5 July 2025

Dupe state is a "state" that Jak can enter while performing the duplication exploit on scout flies which allows for a degree of arbitrary code execution. The state is essentially a buffer overflow in the actor
heap involving *hint-semaphore*
de-referencing a pointer.
The known side effects and behaviors that can occur while in dupe state include seemingly random game crashes, infinite loops, statue glitch with red and yellow eco, baby spiders in Spider Cave not hatching, orb vents not opening while powered with blue eco, Jak's idle animation being disabled, and collectable entities or actors not disappearing after collecting them.
This de-referenced pointer can travel across save files, which is a trait not seen in any other known exploit in the game.
Technical

*hint-semaphore*
now points to med-res-level-1
.Technical write-up by Hat Kid.
There is a variable called *hint-semaphore*
that is either always set to #f
or, if a hint is playing, a process is spawned for that hint, and *hint-semaphore*
stores a pointer to that hint. When you perform the scout fly dupe, the process pointer stored in *hint-semaphore*
no longer points to the hint process, because that got killed by loading the save file, but *hint-semaphore*
is still storing that value. Because *hint-semaphore*
is not #f
, the subtitle debug code that displays the hint in the top left is de-referencing that pointer. In this screenshot (loading a Geyser save), the process pointer that was stored just so happens to now point to the process for the med-res-level-1
entity, so the subtitle debug code is de-referencing the pointer as if it were a level-hint, which happens to lead to the med-res-level's cspace-array
(and the text ID is pointing to its root).
Tutorial
To activate dupe state, enter a level where no scout flies have been collected. Find a scout fly crate and open it. Stand next to the scout fly and press Circle and Start at roughly the same time. If done correctly, the scout fly will no longer be present on screen and Jak's foot will be slightly lifted off the ground. Now, load a save file. Dupe state will now be active.
If in Debug Mode (not Cheat Mode), loading a save file while simply standing in front of the elevator door in Gol and Maia's Citadel will result in a 50% chance of dupe state being active. If the hint text is present in the top left of the screen during the pause, it will work.
Discovery
Dupe state was inadvertently found along side the discovery of Precursor Orb, Scout Fly, and Power Cell duplication in Jak and Daxter: The Precursor Legacy, which was discovered by RNGPenguin on January 14, 2018. While other runners attempted to perform the duplication exploit, some of them reported strange side effects when failing the dupe and reloading the save file to try again. These side effects were listed earlier at the top of the page. Two days later on January 16, 2018, Ruh found a consistent setup to cause the strange side effects and coined the name Dupe State.