Major Revision

Unfortunately, the first version of this movie has been shown to be invalid because it exploited inaccuracies in the QuickNES emulator, and therefore not a faithful representation of what can be done in the game. To produce this new version I had to patch QuickNES to support the missing opcodes and re-run every level and transcribe the results to the emulator running the more accurate NesHawk core. I learned a lot of things along the way so this was not all lost time. For example, I learned I can synchronize save states containing the initial state of each level across NES cores by copying the entire low memory from one save to another. This was very useful to make sure the bot running QuickNES and the emulator running EmuHawk did not diverge too much.
Luckily, some of the skips (notably: levels 4 and 7) were actually glitches in the game that the bot was able to find anyway, so I think the movie remains somewhat entertaining. For fairness, I believe the people who already voted on the original submission should be given the chance to revise/change their vote. The new version beats the game in 55293 frames, as opposed to the 44599 in the previous version, but still a strong 3366 frames improvement over the obsoleted movie (58659).

Level Breakdown & Comparison

Level New TAS Frames Old TAS Frames Diff
01 5796 [05000 - 05796] 5794 [00000 - 05794] +2
02 4779 [05796 - 10575] 4797 [05794 - 10591] -18
03 5005 [10575 - 15580] 5030 [10591 - 15621] -25
04 4195 [15580 - 19775] 4912 [15621 - 20533] -717
05 4924 [19775 - 24699] 4933 [20533 - 25466] -9
06 1283 [24699 - 25982] 1290 [25466 - 26756] -7
07 2385 [25982 - 28367] 4809 [26756 - 31565] -2424
08 6572 [28367 - 34939] 6593 [31565 - 38158] -21
09 6264 [34939 - 41203] 6298 [38158 - 44456] -34
10 2282 [41203 - 43485] 2320 [44456 - 46776] -38
11 3813 [43485 - 47298] 3867 [46776 - 50643] -54
12 5439 [47298 - 52737] 5453 [50643 - 56096] -14
13 1753 [52737 - 54490] 1752 [56096 - 57848] -1
14 0803 [54490 - 55329] 811 [57848 - 58659] -8
I would like to thank those who gave feedback so far, in particular Alyosha for finding the problem in the original movie and FractalFusion for creating the awesome comparison movie (I should ask perhaps for a new one? :P).

Introduction

In this quirky port of Jordan Mechner's magnum opus, our hero traverses a set of dungeons and palace rooms to rescue his beloved princess from the evil <GENERIC GUARD>. Despite obvious graphical and gameplay limitations compared to other versions of Prince of Persia (see: [4477] DOS Prince of Persia by eien86 in 13:08.53), this port gets as close as the original experience as the NES hardware allows. This movie seeks to obsolete the previous submission ([4158] NES Prince of Persia by Challenger in 16:16.06) from one of my TASing heroes, Challenger, who solved it in 16:16.06.
This is a bot-aided TAS that introduces a series of precise game breaking inputs that trigger level ending events or significant shortcuts. It also features polished execution of the existing route. The work for this movie involved creating a RAM map for the game, finding level-specific information and creating scripts for the bot to polish each of the level's routes, running the bot, and adapting the scripts to the new discoveries along the way. Overall it took me around 5 weeks.

Hardware & Software

  • Rom: Prince of Persia (U) [!]
  • Emulator: EmuHawk 2.7.0 (Core: QuickNES)
  • Routing Bot: MultiJaffar + QuickNES (Average Exploration Performance: 0.35M States/s)
  • Routing Platform: The Jaffanator (see picture). AMD Ryzen Threadripper 3990X Processor (64 cores, 128 threads) + 256Gb RAM + Clear Linux

Level Breakdown & Comparison

Here I explain what happened in each level and compare the number of frames with the previous TAS. It's important to note that I am using a different emulator and core, and therefore a few frames per level of uncertainty should be taken into account.
Level New TAS Frames Old TAS Frames Diff
01 2649 [00000 - 02649] 5794 [00000 - 05794] -3145
02 1563 [02649 - 04212] 4797 [05794 - 10591] -3234
03 3765 [04212 - 07977] 5030 [10591 - 15621] -1265
04 4183 [07977 - 12160] 4912 [15621 - 20533] -729
05 4916 [12160 - 17076] 4933 [20533 - 25466] -17
06 1281 [17076 - 18357] 1290 [25466 - 26756] -9
07 1310 [18357 - 19667] 4809 [26756 - 31565] -3499
08 5774 [19667 - 25441] 6593 [31565 - 38158] -819
09 6266 [25441 - 31707] 6298 [38158 - 44456] -32
10 2065 [31707 - 33772] 2320 [44456 - 46776] -255
11 2829 [33772 - 36601] 3867 [46776 - 50643] -1038
12 5431 [36601 - 42032] 5453 [50643 - 56096] -22
13 1760 [42032 - 43792] 1752 [56096 - 57848] +8
14 807 [43792 - 44599] 811 [57848 - 58659] -4

Level 1

My goodness, this level was the start of the discovery train. I almost lost it when I saw the bot producing these weird skips. However, not all of them were reproducible, as it seemed there were only artifacts of the emulator and bugs in the bot itself. Only after a good while debugging I was able to filter out bad solutions and found, to my surprise, that there indeed extisted actual skips in the game. This solution is extra nice because now only did it skip the level, but also gave the kid the sword! Had that not been the case, it would have had started level 2 without a sword, which it would have made it impossible to progress. Incredible.

Level 2

Absolute madness. This weird combination of inputs allow for the last full level break of the movie. I cannot explain exactly how this works, but never again was I able to find a working level skip. Nevertheless, the rest of the tricks are equally amazing.

Level 3

For the initial part of the level, nothing differs from the previous movie. However, after beating the skeleton (note: the skeleton is immortal in the original games, but due to technical limitations, this had to be stratched in the NES), the kid is able to REMOTE CONTROL the exit door to open and then enter it at a distance by quantum-manipulating spacetime itself.

Level 4

This level remains unbroken, with the only exception of a new door skip thanks to a newly discovered glitch. It seems that the game cannot support collision detection of multiple doors at the same time, and that gives us a frame where we can just go through it in a jump.

Level 5

No surprises here, just bot-refined execution of the existing route.

Level 6

No surprises here, just bot-refined execution of the existing route. Due to limitations of the NES cartdrige or simple laziness, the game designers did not implement a special sprite for the guard (in the original, this guard was of a greater girth).

Level 7

I MUST GO, MY PLANET NEEDS ME. This level never disappoints (see the DOS TAS). Here the double trick is to remote-activate the exit door AND vertically overflow the kid's position to allow a quick exit.

Level 8

The start is pretty much standard, except for an apparent delay at the beginning. The delay is necessary to trigger the trick at the end, where the kid remote-triggers the exit door, allowing him to go straight to the exit through the lower level. This route skips the mouse scene.

Level 9

No surprises here, just bot-refined execution of the existing route.

Level 10

his level comes already broken by limitations of the NES. One can simply go towards the end because there is no door there to stop you from doing so. Nevertheless, the bot finds a way to break it further by skipping the only door in sight. The rest of the level is just fine execution.

Level 11

Two big breaks here. The first is the remote-opening of the exit door, which skips the last two rooms (where one normally activates it). The second skip is making the guard disappear from this plane of existence. This is a pretty funny trick. All in all, this level ends up pretty much broken.

Level 12

No surprises here, just bot-refined execution of the existing route.

Level 13

No surprises here, just bot-refined execution of the existing route. Was unlucky with the guard RNG here and resulted in a time loss wrt the current TAS.

Level 14

No surprises here, just bot-refined execution of the existing route.

Q & A

  • How do you trigger these tricks (e.g., level skip, open exit door, vanishing guard, etc.) tricks?
Short answer: I am not 100% sure. Long answer: The movie uses bad pointer accesses to modify positions of memory that had otherwise no business modifying. The key discovery is the command Up+B. Button B triggers the 'careful step' action. This action can be accompanied by a direction (i.e., left or right). However, it seems like the programmer overlooked the possibility of running this command with Up. When executing this command, the game performs an action that is not specified. The resulting action is read from a position in memory that is dependent on the current circumtances of the game. A common pattern is that all tricks are performed when the Kid is on the top layer of the screen. On very specific conditions, the bad access patterns triggers things that are very convenient. In the vast majority of cases, it produces a soft lock or game reset. The benefit of using a bot was that it could filter out all bad outcomes, so I didn't have to fully reverse engineer the bug to understand it.
  • What is MultiJaffar?
MultiJaffar is a high performance breadth-first routing bot. This project started when I decided to extend my previous project, Jaffar to route games on other platforms. In particular, I wanted it to route NES games, by linking it to a NES emulator. I had started developing Jaffar a year ago to route Prince of Persia for DOS. The inspiration for the project was Crem's sdlpop-tricks project that demonstrated that this approach was very much feasible. In the last few months I have completely revamped the engine to improve multicore+memory performance and develop a generic emulator+game interface that allowed me to run any game on earth as long as there was a <<fast>> C++ emulator available for it.
  • Why did you use QuickNES, when NESHawk is more accurate?
Basically because QuickNES is a C++-based emulator, which allows me to interface it with MultiJaffar. NESHawk is C# based and therefore impossible for me to use efficiently. Another reason is that QuickNES is, as its name indicates, pretty fast compared to other emus, which allows for faster exploration. Unfortunately, due to slight desyncs, I cannot use solutions obtained with QuickNES on the NESHawk emulator (except for simpler games like Super Mario Bros).
Hope you all have fun watching this!

feos: Claiming for judging.
Truncated: eien86 has asked for the submission file to be replaced by https://tasvideos.org/UserFiles/Info/637854652701642007
feos: Verified and replaced.

despoa: Processing...


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15539
Location: 127.0.0.1
This topic is for the purpose of discussing #7422: eien86's NES Prince of Persia in 15:20.05
nymx
He/Him
Editor, Judge, Expert player (2228)
Joined: 11/14/2014
Posts: 927
Location: South Pole, True Land Down Under
I don't know what it is about this game, but I sure do like. Now we have another port! Always glad to see the work of another BOTer. I'm very intrigued at how these discoveries showed up. Some levels seem to have a weird memory corruption. I knew that when I saw another submission from you, it was going to be a good one. GG! Yes vote.
I recently discovered that if you haven't reached a level of frustration with TASing any game, then you haven't done your due diligence. ---- SOYZA: Are you playing a game? NYMX: I'm not playing a game, I'm TASing. SOYZA: Oh...so its not a game...Its for real? ---- Anybody got a Quantum computer I can borrow for 20 minutes? Nevermind...eien's 64 core machine will do. :) ---- BOTing will be the end of all games. --NYMX
GJTASer2018
He/Him
Joined: 1/24/2018
Posts: 299
Location: Stafford, NY
So basically the bot found that to break this port of the game is to "Press Up+B in certain places to get weird, unintended behavior to happen" and then you had to figure out the RIGHT "weird, unintended behavior" to generate that didn't softlock or crash the game...
c-square wrote:
Yes, standard runs are needed and very appreciated here too
Dylon Stejakoski wrote:
Me and the boys starting over our games of choice for the infinityieth time in a row because of just-found optimizations
^ Why I don't have any submissions despite being on the forums for years now...
GMP
He/Him
Editor, Reviewer, Active player (394)
Joined: 5/22/2020
Posts: 197
Location: Chennai, India
I don't understand anything, all I can see is that the movement is well optimised, and then the prince crouches in random places for no reason, and then the level just ends, lol. It's great you showcased this beautiful port that is extremely faithful to the original and has amazing music. Yes vote.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4042
All the Up+B glitches had me cackling. Very impressive that your bot organically found and exploited these with no prior knowledge.
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Editor, Expert player (2071)
Joined: 6/15/2005
Posts: 3282
Edit: The comparison encode in this post is for the previous inaccurate version. The updated accurate version is here: https://tasvideos.org/Forum/Posts/513631 ---- Comparison encode with previous TAS, all in 1080p60! I wasn't even intending to have 1080p60 as an option. How did that even happen. Link to video So normally I don't make comparison videos of TASes that have vastly different routes. But I was watching the encode in the submission, and after 2 or 3 minutes, I lost all sense of how this game was supposed to function and my brain started to melt. (See, I don't know this game except for the few DOS/NES/SNES TASes I watched a long time ago.) So I figured I would put the previous submission in as a frame of reference. Hopefully it helps at least a few others out there who don't know the game. P.S.: I made a slight change in one of the timing breakpoints (I think it was the first one) so that the music lined up better. The breakpoints listed in the submission text are just as correct as what I put down.
eien86
He/Him
Judge, Skilled player (1870)
Joined: 3/21/2021
Posts: 259
Location: Switzerland
nymx wrote:
GG! Yes vote.
Thanks Nymx :)
GJTASer2018 wrote:
So basically the bot found that to break this port of the game is to "Press Up+B in certain places to get weird, unintended behavior to happen" and then you had to figure out the RIGHT "weird, unintended behavior" to generate that didn't softlock or crash the game..
Exactly. Sometimes the bot used variants to UB, such as DUB and DUBA. Don't ask me why.
GMP wrote:
I don't understand anything, all I can see is that the movement is well optimised, and then the prince crouches in random places for no reason, and then the level just ends, lol. It's great you showcased this beautiful port that is extremely faithful to the original and has amazing music. Yes vote.
Hahaha I can sense the irony. Thanks for the vote :)
Patashu wrote:
All the Up+B glitches had me cackling. Very impressive that your bot organically found and exploited these with no prior knowledge.
I know, right? It's amazing.
FractalFusion wrote:
So normally I don't make comparison videos of TASes that have vastly different routes. But I was watching the encode in the submission, and after 2 or 3 minutes, I lost all sense of how this game was supposed to function and my brain started to melt. (See, I don't know this game except for the few DOS/NES/SNES TASes I watched a long time ago.) So I figured I would put the previous submission in as a frame of reference. Hopefully it helps at least a few others out there who don't know the game.
Wow!! Thanks so much for the comparison video, it really helps to see the difference the new tricks made to the route!
MESHUGGAH
Other
Skilled player (1916)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
We have a new Prince of Persia, called eien86! Jokes aside, good job on obsoleting yet another Prince of Persia game, as well as manipulating those "top level platform Up+B+occasional different buttons". Those Up+B+random were used to only "teleport to dimensions" of the exit doors after you unlocked them? I mean, it looks like you are tricking the game to use another level. I'm not sure, because I only watched up to level 7 both at the submission temporary encode and FractalFusions' great comparison video. Without any knowledge of this particular game, I wonder if this trick could be used: - at other level of platforms, mostly thinking about bottom level, - and using it for triggering the platforms to unlock the exits. edit: I also found this video on TCRF, showing history tidbits about this game's developers MovieTime next game for the NES, Dragon's Lair source code and development information like how they ported and the later called as Rare's PDS -> Personal Programmers Development System after NES Prince of Persia (this game) Link to video
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Challenger
He/Him
Skilled player (1686)
Joined: 2/23/2016
Posts: 1061
Thanks for the comparision encode, FractalFusion! I didn't analyze both runs on emulator yet. So I honestly have no idea how those crazy things were achieved with this major discovery - so many random places to glitch out this game - but it's surprising that such a major glitch was discovered by a bot. Nice job discovering new tricks too. Cancelling attack animation and being able to move immediately after each hit is neat. About door skip seen on level 4: I'm not sure if this glitch can be possible with some other locations, but this one was completetly unexpected and requires precise positioning too. Almost 4 minutes of improvement is pretty impressive. The corruption glitch has great potential, but... When I tested this run on NESHawk core, this glitch easily crashes the game when trying to glitch out of the first level :\ I don't know how to solve it because I'm not good with glitches that requires memory corruption. But I'm still impressed with this work, because this is the first time the NES version has major skips :)
My homepage --Currently not much motived for TASing as before...-- But I'm still working.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3806)
Joined: 11/30/2014
Posts: 2827
Location: US
Very impressive bot work, but I'm a bit skeptical of the accuracy/legitimacy of results. QuickNES isn't well suited for the type of glitches you describe, and as it desyncs on NESHawk I definitely think it needs a closer look. I did make a C++ version of NESHawk some time ago, but it still only has 1/10 - 1/20 the performance of QuickNES so probably not much help for botting. It's really a shame that there isn't a fast and accurate emulator for cool stuff like this.
eien86
He/Him
Judge, Skilled player (1870)
Joined: 3/21/2021
Posts: 259
Location: Switzerland
Thanks Challenger and Alyosha for your kind comments and feedback! You guys raise some valid points about reproducibility and accuracy. Unfortunately, I don't have a good answer for them, given the tools I've used. I tried the trick on FCEUX and it did produce the characteristic flicker you see in this movie (I assume PPU corruption) and didn't crash, but it didn't produce the skip either. I would have to try again with more accurate timing synchronization. On the other hand, I'm thinking of replacing QuickNES by Mesen (another C++-based emu) for the botbut then again, there are no guarantees of cross-compatibility and it might be painfully slow. Perhaps I can also use your C++ version of NesHawk since the routing is mostly done? Besides that, there are so many things I want to do with the bot like solving other simpler NES games I really like (cough cough Castlevania cough Ninja Gaiden) and even SNES and Genesis (Flashback), that I don't feel like spending too much more time on analyzing what exactly is going on with this movie. I'll be fine with whatever decision the judges make. Regardless, this is indeed a hairy topic, and perhaps this movie can serve as catalyst for a wider discussion.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11472
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
A similar concern was raised back when FinalFighter discovered a glitch in bank switching in Megaman but wasn't sure if it was legit. IIRC he created a simple ROM that contained the same conditions that would trigger the glitch and asked people with NES flash carts to run it, and that test ROM showed success. So the main question here is figuring out why the skip works on principle, and then testing that principle on other emulators or even flash carts.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3806)
Joined: 11/30/2014
Posts: 2827
Location: US
I checked trace logs at the first glitch. NESHawk and QuickNES agree in execution up to opcode $72, which QuickNES treats as NOP but NESHawk treats as JAM. Sources I look at all agree that $72 is JAM. EX: https://www.nesdev.com/undocumented_opcodes.txt Relevent Trace: NESHawk:
Language: asm6502

EAE7: 99 F0 FF STA $FFF0,Y A:06 X:03 Y:06 SP:EB P:25 nvTbdIzC Cy:78887518 PPU-Cy:0 EAEA: 60 RTS A:06 X:03 Y:06 SP:EB P:25 nvTbdIzC Cy:78887523 PPU-Cy:0 FFEA: 68 PLA A:06 X:03 Y:06 SP:ED P:25 nvTbdIzC Cy:78887529 PPU-Cy:0 FFEB: A8 TAY A:01 X:03 Y:06 SP:EE P:25 nvTbdIzC Cy:78887533 PPU-Cy:0 FFEC: 68 PLA A:01 X:03 Y:01 SP:EE P:25 nvTbdIzC Cy:78887535 PPU-Cy:0 FFED: AA TAX A:06 X:03 Y:01 SP:EF P:25 nvTbdIzC Cy:78887539 PPU-Cy:0 FFEE: 68 PLA A:06 X:06 Y:01 SP:EF P:25 nvTbdIzC Cy:78887541 PPU-Cy:0 FFEF: 40 RTI A:00 X:06 Y:01 SP:F0 P:27 nvTbdIZC Cy:78887545 PPU-Cy:0 A872: 9E ??? A:00 X:06 Y:01 SP:F3 P:26 nvTbdIZc Cy:78887551 PPU-Cy:0 A875: 1E 0F 15 ASL $150F,X A:00 X:06 Y:01 SP:F3 P:26 nvTbdIZc Cy:78887556 PPU-Cy:0 A878: 00 BRK A:00 X:06 Y:01 SP:F3 P:26 nvTbdIZc Cy:78887563 PPU-Cy:0 FFEF: 40 RTI A:00 X:06 Y:01 SP:F0 P:36 nvTBdIZc Cy:78887570 PPU-Cy:0 A87A: 18 CLC A:00 X:06 Y:01 SP:F3 P:36 nvTBdIZc Cy:78887576 PPU-Cy:0 A87B: 0F ??? A:00 X:06 Y:01 SP:F3 P:36 nvTBdIZc Cy:78887578 PPU-Cy:0 A87E: 03 ??? A:30 X:06 Y:01 SP:F3 P:34 nvTBdIzc Cy:78887584 PPU-Cy:0 A880: 00 BRK A:30 X:06 Y:01 SP:F3 P:34 nvTBdIzc Cy:78887592 PPU-Cy:0 FFEF: 40 RTI A:30 X:06 Y:01 SP:F0 P:34 nvTBdIzc Cy:78887599 PPU-Cy:0 A882: 00 BRK A:30 X:06 Y:01 SP:F3 P:34 nvTBdIzc Cy:78887605 PPU-Cy:0 FFEF: 40 RTI A:30 X:06 Y:01 SP:F0 P:34 nvTBdIzc Cy:78887612 PPU-Cy:0 A884: FE FE FC INC $FCFE,X A:30 X:06 Y:01 SP:F3 P:34 nvTBdIzc Cy:78887618 PPU-Cy:0 A887: 04 20 NOP $20 A:30 X:06 Y:01 SP:F3 P:B4 NvTBdIzc Cy:78887625 PPU-Cy:0 A889: 72 ??? A:30 X:06 Y:01 SP:F3 P:B4 NvTBdIzc Cy:78887628 PPU-Cy:0 6502: PC, machine code, mnemonic, operands, registers (A, X, Y, P, SP), flags (NVTBDIZCR) 6502: PC, machine code, mnemonic, operands, registers (A, X, Y, P, SP), flags (NVTBDIZCR) 6502: PC, machine code, mnemonic, operands, registers (A, X, Y, P, SP), flags (NVTBDIZCR) 6502: PC, machine code, mnemonic, operands, registers (A, X, Y, P, SP), flags (NVTBDIZCR) 6502: PC, machine code, mnemonic, operands, registers (A, X, Y, P, SP), flags (NVTBDIZCR)
QuickNES
Language: asm6502

EAE7: STA $FFF0,Y A:06 X:03 Y:06 P:04 SP:1EC EAEA: RTS A:06 X:03 Y:06 P:04 SP:1EC FFEA: PLA A:06 X:03 Y:06 P:04 SP:1EE FFEB: TAY A:01 X:03 Y:06 P:04 SP:1EF FFEC: PLA A:01 X:03 Y:01 P:04 SP:1EF FFED: TAX A:06 X:03 Y:01 P:04 SP:1F0 FFEE: PLA A:06 X:06 Y:01 P:04 SP:1F0 FFEF: RTI A:00 X:06 Y:01 P:04 SP:1F1 A872: ??? A:00 X:06 Y:01 P:04 SP:1F4 A875: ASL $150F,X A:00 X:06 Y:01 P:04 SP:1F4 A878: BRK A:00 X:06 Y:01 P:04 SP:1F4 FFEF: RTI A:00 X:06 Y:01 P:04 SP:1F1 A87A: CLC A:00 X:06 Y:01 P:04 SP:1F4 A87B: ??? A:00 X:06 Y:01 P:04 SP:1F4 A87E: ??? A:30 X:06 Y:01 P:04 SP:1F4 A880: BRK A:30 X:06 Y:01 P:04 SP:1F4 FFEF: RTI A:30 X:06 Y:01 P:04 SP:1F1 A882: BRK A:30 X:06 Y:01 P:04 SP:1F4 FFEF: RTI A:30 X:06 Y:01 P:04 SP:1F1 A884: INC $FCFE,X A:30 X:06 Y:01 P:04 SP:1F4 A887: NOP $20 A:30 X:06 Y:01 P:04 SP:1F4 A889: ??? A:30 X:06 Y:01 P:04 SP:1F4 A88A: CMP ($8D),Y * A:30 X:06 Y:01 P:04 SP:1F4 A88C: LDA ($04),Y * A:30 X:06 Y:01 P:04 SP:1F4 A88E: PLA A:00 X:06 Y:01 P:04 SP:1F4 A88F: CLC A:6E X:06 Y:01 P:04 SP:1F5
Edited by feos: Apparently we have 6502 highligher now!
eien86
He/Him
Judge, Skilled player (1870)
Joined: 3/21/2021
Posts: 259
Location: Switzerland
Great research. I feared that could have been the case, what a bummer :( I'll have to patch QuickNES to halt on this opcode and re-run the bot. The result won't be as spectacular, but hey, that's life. Can we delay this movie until then?
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11472
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
It's fresh enough to not require a delay. If you have no news in a month, I'll delay it.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3806)
Joined: 11/30/2014
Posts: 2827
Location: US
KIL (JAM) [HLT]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Stop program counter (processor lock up).
Status flags: -

Addressing  |Mnemonics  |Opc|Sz | n
------------|-----------|---|---|---
Implied     |KIL        |$02| 1 | -
Implied     |KIL        |$12| 1 | -
Implied     |KIL        |$22| 1 | -
Implied     |KIL        |$32| 1 | -
Implied     |KIL        |$42| 1 | -
Implied     |KIL        |$52| 1 | -
Implied     |KIL        |$62| 1 | -
Implied     |KIL        |$72| 1 | -
Implied     |KIL        |$92| 1 | -
Implied     |KIL        |$B2| 1 | -
Implied     |KIL        |$D2| 1 | -
Implied     |KIL        |$F2| 1 | -
These are also JAM. I imagine there will be no more glitch endings after these opcodes correctly halt execution, but I'm still looking forward to new results, good luck! I'm also interested what other games this can be applied to, haven't seen this level of bot work in a while, I hope it finds some other cool stuff.
Skilled player (1670)
Joined: 7/1/2013
Posts: 446
eien86 wrote:
Besides that, there are so many things I want to do with the bot like solving other simpler NES games I really like (cough cough Castlevania cough Ninja Gaiden) and even SNES and Genesis (Flashback)
Go get 'em, eien86! :)
eien86
He/Him
Judge, Skilled player (1870)
Joined: 3/21/2021
Posts: 259
Location: Switzerland
Ok guys, so I fixed QuickNES to halt on bad opcodes and disabled the Up+B bad inputs from the bot. So far I made some good progress. However today, just for the fun of it, I tried what would happen if I allow the bot to make glitchy inputs. And to my surprise, I have just observed the first 'glitch' that works in all emulators. See Frame 13685, where our hero glitches through the floor, saving a considerable amount of frames: User movie #637851337516198347 The bot has also detected other 'tricks' on the patched QuickNES that so far haven't worked in NesHawk. Which brings me to the following dilemma: A) Keep working on the 'glitchless' version + this glitch I just found. B) DO WHAT I MUST, and try to find all glitches that work on NesHawk. If I follow (A), then I'll be done with this damn game in 2-3 weeks. If I follow (B), it will be a rabbit hole: I will need to connect my bot to NesHawk or an emulator that behaves similarly. The question is: @Alyosha do you think we can use your C++ version of NesHawk for this task?
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3806)
Joined: 11/30/2014
Posts: 2827
Location: US
NESHawk would in theory work, but before going down that road, consider the amount of time you think this will take with QuickNES. and then multiple that by at least 10, and consider if that is an amount of time you want to spend on this one game. I won't even have time to shake the dust off the C++ version for another month, so additionally it would have to wait for then. To me it seems like a more feasible approach would be to run your bot in smaller sections and turn glitch inputs on or off depending on whether or not you get correct results when testing in NESHawk. It would be a hassle but at least you could still get correct results and glitch where possible. Going with option A also seems reasonable, I think the results from that would still be pretty cool.
Editor, Expert player (2071)
Joined: 6/15/2005
Posts: 3282
I only noticed today that there is an updated version on accurate emulation (that was fast!). Here's a 1080p60 comparison encode for the updated version of the TAS: Link to video By the way, in the submission's newest comparison table, the -1 in the second last row should be +1, and the 55329 in the last row should be 55293.
GMP
He/Him
Editor, Reviewer, Active player (394)
Joined: 5/22/2020
Posts: 197
Location: Chennai, India
FractalFusion wrote:
that was fast!
No you
eien86
He/Him
Judge, Skilled player (1870)
Joined: 3/21/2021
Posts: 259
Location: Switzerland
FractalFusion wrote:
I only noticed today that there is an updated version on accurate emulation (that was fast!). Here's a 1080p60 comparison encode for the updated version of the TAS: Link to video By the way, in the submission's newest comparison table, the -1 in the second last row should be +1, and the 55329 in the last row should be 55293.
Thank you again, these comparison videos are amazing!
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3806)
Joined: 11/30/2014
Posts: 2827
Location: US
I'm glad at least a couple major glitches survived into the final run, cool stuff. Really looking forward to seeing what your bot can do with other games as well.
Challenger
He/Him
Skilled player (1686)
Joined: 2/23/2016
Posts: 1061
Too bad about that glitch not being able to break even further this time, but at least you discovered another gate skip. Nice new level 7! And great work with the general optimization again.
My homepage --Currently not much motived for TASing as before...-- But I'm still working.
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15539
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [4651] NES Prince of Persia by eien86 in 15:20.05