Posts for Alyosha


Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
feos wrote:
I mean DriarNROM(UE).nes used in the previous submission is newer judging by file metadata, it's mentioned in fm2 metadata, linked from the submission, and didn't require adding delay.
I'd be fine with using the version from the nesdev thread, but it seems like that version is not the author's original work. I guess it's recompiled with different settings? Should the author's version should be preferred?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
-removed superceded by movie below- If anyone is interested here is a run that implements the above route Morrison mentioned. It doesn't actually beat Kraid, but it at least gets there. Here is a link to the lua file as well to see what's happening: https://www.speedrun.com/resourceasset/p57a4 Anyone can feel free to use this file, I don't really plan to work through the rest of the resyncing.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I tested two more Super Mario All Stars runs, both desync: Lost Levels Luigi: Luigi gets hit by a fish in 3-2, seemingly deterministically (3/3 trials.) Mario 3: Mario gets hit by the second goomba in 1-1, seemingly deterministically (3/3 trials.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
ViGadeomes wrote:
This movie didn't console verified so I'll probably ask for a delay to change the inputs if needed whenever the problem is fixed. Thanks !
Always interesting to see which seemingly benign games end up desyncing. It looks like in TIKevin83's attempt it desynced at around 1:30, the girl moves differently on console then emulator. I'll look into it if it doesn't get resolved, but my guess would be that input timing just needs to be fiddled with.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
My opinion is to leave it as rejected, it's clear and to the point.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
MESHUGGAH wrote:
- Resync cost 5 frames: I only knew about + 2 frames I wrote in previous submission text and this post https://tasvideos.org/Forum/Topics/18797?CurrentPage=3&Highlight=507317#507317 What is the extra 3 frames? I mean I guess it's because of better emulation I'm just interested in details.
I'm not sure exactly, there were a couple spots with extra lag, and 2 stages desynced as I was progressing through the game, but I wasn't really keeping an exact log, 5 is just an approximate number.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Morilli was able to make a test build where I can change the clock speed of co-processor chips so I could test the impact on some of the desyncing runs. The behaviour of MMX3 definitely changes with different CX4 speed, so that's something, but I have no way of measuring what the clock rate of my cart is, so I can't really do too much else except note that it's an important variable. For SMK Star Cup run, I didn't see any change in behaviour. The default clock rate is 7.6 MHz, and I ran the run at both 7 and 8 MHz with no difference. I'm not sure what the variability of a ceramic oscillator is, but 5% seems like a lot, so I would think if it was the clock rate I would have seen some difference, but it's just a guess, maybe I'll try a wider range. EDIT: the run syncs in a range from 7-8.2 MHz. It desyncs at 7.95 and 8.3 MHz due to bad item RNG on the first level, so seems pretty unlikely this is a clock issue.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Interesting and novel submission, nice work. But that shaking makes it unwatchable to me. Is that in the emulator or just the encode?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Please add the console verified flag to this publication. (video link to verification in submission)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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!
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
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.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Very creative, and short enough to remain entertaining, yes vote from me.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I made a short test run of Ultimate Mortal Kombat 3, but it desyncs with seconds. The desync is random, so I'm guessing this is another SPC700 related desync given how many audio samples this game uses. Definitely not worth trying to resync the play around TAS.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I made a test run of Super Mario Kart that plays through all cups and unlocks 150cc, but when I played it back on console, it desynced on Vanilla Lake in Star Cup. It would be pretty unusual to get this far and then desync if a sound chip desync was to blame, so I suspected it might be an emulation issue. So I then made a TAS of just Star Cup, and indeed it desyncs on console at Vanilla lake 1, seemingly deterministically. https://tasvideos.org/UserFiles/Info/637838147769544788 Link to video I also made a time trial TAS of Vanilla Lake 1, but that synced, so my guess is that ice physics combined with all the CPU work of controlling cpu players and items etc is too much and exposes some DSP1b timing error. I opened an issue for this in Ares Emulator github. So, that's another dead end. Expansion chip timings seem to need some work in general.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
feos wrote:
Is cycle count now required for regular NESHawk movies too? When I replayed this movie in 2.8 I got a warning about missing cycle count.
No, I don't think so, I'm not sure what's making that warning pop up.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I did consider ending input early on the last level, but I tried by hand for a bit to to get the '9' to appear in the right place after getting the '8' without success. Basic Bot doesn't have a way to turn off input after a certain point while continuing to run, so I would need to make a custom LUA script for it, which I didn't feel like doing. NESHawk is pretty slow for that type of heavy luck manipulation across many frames, so such a script would probably have to run for a very long time. I'm not that interested, getting the '9' as quick as possible is good enough for me.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Well it turns out that game had an improvement, but I think that kind of scenario is still something that could plausibly happen and should be accounted for.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
EZGames69 wrote:
The current publication ends input on the name entry for the final score results, where as this movie just ends it on the final boss hit. Should this be changed to match ending input with the publication? Or should it be left as it is?
I prefer to leave it as is. I don't think it adds anything, and the game doesn't even have a battery or on board WRAM, so your score doesn't actually get saved.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Game: Mega Man X2 (USA) Emulator: BizHawk: 2.8 - BSNES 115 core Console Verification Device: TAStm32 V3 Movie: https://tasvideos.org/UserFiles/Info/637833290115102148 Description of Desync: Initially desyncs because it requires 2 blank frames to get past the title screen (other SNES games require 0.) Then desyncs due to not performing a dash after jumping down into the stage. On emulator X beats the intro stage. Also gets incorrect RNG, does not seem deterministic. Research: NES games also occasionally need extra blanks and I'm pretty sure there it's a bot issue, but what is triggering the polls? Shouldn't desync non-deterministically either way though. Possible Next Steps: Testing with a different bot might help. Status: Open
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
I did a short test with Super Mario Kart and got some good results: https://tasvideos.org/UserFiles/Info/637833028188202675 Link to video I learned a few things making this test. The first is that the 'no entropy' setting doesn't give correct results for this game, as it starts with 2P selected, but I tried many times on console and it always starts with 1P selected. So this movie uses 'low entropy.' The second is that leaving the SNES plugged in seems to preserve SRAM state on the cart even with the battery removed. When I run the movie multiple times, the selected character is saved from the previous run after power cycle. Maybe I'll make a test run that unlocks 150cc and see if it works on console. EDIT: made a movie that unlocks 150cc, but it desyncs in star cup on console, still checking if it's deterministic and what the cause might be.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
CasualPokePlayer wrote:
Going through this movie, it seems to be very well optimized, and a solid improvement. There is one minor odd thing however. You can clear the first screen of the title sequence 20 frames sooner. Doing this in the movie through causes it to desync from general RNG difference. This seems like a rather long wait for some sort of RNG manipulation, so I'm wondering what was exactly aimed here, or if this was actually just a mistake.
It's to control the spawn point of the third pearl in level 2 while still getting good mushroom RNG. You can't effect the spawn location of the pearl after the level starts, so you have to set everything up ahead of time. I did this by varying the start presses (which controls the pearl spawn), and then seeing if I could get good mushroom RNG by varying movement right at the start of level 2. The big delay at the start is the best I could get so that everything works.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3536)
Joined: 11/30/2014
Posts: 2733
Location: US
Game: Mega Man X3 (USA) Emulator: BizHawk: 2.8 - BSNES 115 core Console Verification Device: TAStm32 V3 Movie: https://tasvideos.org/UserFiles/Info/637831474705110410 Description of Desync: On emulator, Zero climbs 2 ladders moving towards a vertical climb section. On console, he instead hits an enemy at the base of the first ladder. This appears to be deterministic. Research: Most other desyncs I have encountered on SNES are non-deterministic, so it's unusual to find a deterministic one. Could be a emulation issue, possibly Cx4 chip. Possible Next Steps: There aren't any Cx4 specific tests. Eliminating this as a source of error would probably be the first step. Status: Open