Posts for Alyosha
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
After a lot of head scratching, I finally managed to reproduce exact results for the count_errors tests. As it turns out, the way to actually get this correct is an undocumented behavior! When a DMC DMA happens, the address bus changes so that the DMC unit can read a sample value. The controller glitch occurs when the DMA happens on a controller read cycle. The controller shift register sees the address bus change to the DMA address and then back again, resulting in double clocking of the controller. However, if the DMA address happens to have the same bits set as the controller register (I think it is (DMA ADDR & 0x401F) == 0x4016 but am still narrowing it down) then there will not be an extra clock. I guess in hind sight this kind of makes sense, but still it's pretty neat to discover a new behavior on a system as well studied as the NES. Getting really close to correct DMC emulation now.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Thank you for the detailed report. I am in NES development mode for now, so my recommendation is to use Gambatte in the dev build for the time being until I can look further into this (which may not be for a month or so): https://ci.appveyor.com/project/zeromus/bizhawk-udexo/build/artifacts
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Making slow progress on DMC stuff, most of the pieces seem to be correct now, but timing is still off somewhere in some subtle way. It's hard to tell where exactly, might need some new more detailed tests. Some games are starting to work correctly though. I made some small tests of Ninja Turtles and Tiny Toons, and they now display the same behaviour as console. Another Interesting example is Time Lord, which uses the DMC channel as kind of a back up IRQ source. Here is a video demonstrating that you can get only one cycle of mushroom collecting with no backtracking, saving several seconds over the published run. As you can see in the video though, it desyncs before beating the second level, but it's still good to see some real prgoress. Link to video
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
GJTASer2018 wrote:
Alyosha wrote:
NESHawk currently does not match any of the 4 options, as expected since no DMC games work. But now I very clearly know what I'm looking for, should only be a matter of time.
So once the DMC games work would NESHawk be close to 100% emulation of an actual console?
Pretty much yes. It's the last major step. Although I should qualify that as saying it's only true for consoles similar to mine, which is pretty common but might not apply to top loaders. Currently though I'm only able to match about half of the behavior seen in that test ROM, so something still is not exactly right.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Finally got a dev board up and running with count_errors.nes running. The results are promising, with only 4 different start up states, so it seems to be deterministic (at least after a decently long power cycle.) I also determined that the TAStm32 responds correctly to the DMC glitched polling with the --overread option used. NESHawk currently does not match any of the 4 options, as expected since no DMC games work. But now I very clearly know what I'm looking for, should only be a matter of time. If anyone is interested here is a video where I turn the NES on and off for about 30 minutes with test ROm used: Link to video
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
No I didn't resync it, I just made a brief test run, just playing through the first level. Paperboy does use the DMC channel for certain sound effects, (glass breaking, car horn, etc.) and this does occasionally produce a controller glitch (doesn't really matter how many times per frame the controller is polled.) Once I get some dev boards working the first thing I'll check is if the bot responds the same as a real controller (and what options make that happen.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Link to video Nightshade does work currently. For Paperboy, I mean that when I run the bot script, I need to use --blank 3 instead of the usual --blank 1 to get the game to start. It has nothing to do with emulation differences. I always need 1 blank frame, I guess the first input gets eaten somewhere by the bot, or maybe just by the power on pulse or something, but I have no idea why I need 3 for Paperboy. It could be DMC related, and what I am really seeing is 2 inputs getting lost to DMC glitch, I just haven't investigated it much yet. The next MMC3 game I am looking at (not using DMC) is 8 Eyes, but converting it to BizHawk did not require any resyncing so probably it is not timing sensitive. I'll try it on console this week hopefully. I'm also trying to resync Bad Dudes but it desyncs pretty painfully in the second level, not sure I can fix it.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
theballaam96 wrote:
Alyosha wrote:
Well, the benefits you are getting from SRAM come from previously entered levels. To me this seems counter to the goal.
If necessary, I can provide a movie which generates the SRAM state but with the SRAM generated movie also complying with the NLE ruleset. If that is what you are getting at
No, it's just that you are restricting yourself to playing through the levels in order, while using the benefits you got from in fact already having been in all the levels previously (regardless of the order you did so.) It just seemed like an odd combination of things to me. But whatever, I suppose in a game this glitchy you have do something to get a 'middle of the road' style goal choice. I'll still give it a yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Well, the benefits you are getting from SRAM come from previously entered levels. To me this seems counter to the goal.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I look forward to you glitch compilation video.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
How much does it cost not being able to press start? I don't really like using SRAM here, seems to clash with the other stringent restrictions, but whatever.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Link to video Link to video Here are both versions of Solstice. They needed a little resyncing and don't work directly from FCEUX. Another timing sensitive game. Additionally here is Ironsword which does work directly: Link to video
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Cool find, what made you think to try that?
Post subject: Re: TASSS - Tool-Assisted Speedrunning and Superplay Science
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
This is just my opinion, you can of course do what you want, but after browsing your repo. this seems too broad to be useful. In particular:
MESHUGGAH wrote:
- I need to be sure every potential topic are under my radar, before I start expanding the currently started investigations
This isn't practical. I'm seeing more recently that TASing of any modern'ish game is more attached to that game's community then to here (just look at how dead most threads are.) This makes sense with the advent of discord and how complicated newer games are. These communities are pretty independent and can be highly technically competent, ex. Paper Mario Stop and Swap was just performed live at SGDQ 2021 a few days ago, a feat rivaling any TAS ACE run. I don't think you can realistically capture even a substantial part of the TAS works that's happening out there and all the unique tools and ideas people are using. Just focusing on TASvideos, our knowledge base is mostly there for common topics (ex how to use TAStudo etc.) just a bit scattered about. Could use some organizing, but honestly very little has changed over the last few years with the exception of LibTAS, so I'm not sure you'd be adding much. Again just my opinion, but maybe something useful/interesting that can be done would be to organize a science style journal where you ask for / help develop articles from people doing technical / sciencey TAS work? For example there is a run on the workbench right now #7162: Jigwally's GB Daedalian Opus in 10:30.63 where an article describing the techniques used with maybe some links to real journal articles about the topic would be a good read.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Bigbass wrote:
When you have time, could you please post in the Publication Maintenance thread, with all of your recent verification videos (whose publications haven't been updated yet), so we can get that stuff updated.
I did, directly above you, but note that I only included runs where the inputs actually play out the same. Donkey Kong, Roger Rabbit and Excite Bike aren't really the same so I didn't include them.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Doing a few more test runs as I gear up to do DMC work. Here is Excite bike: Link to video It needed some minor resyncing to account for different cpu rng, but all the times are the same. This game seems to have about the same sync probability as Donkey Kong (1/4). It would be pretty cool if all the starred NES runs could get console verifications. Excite Bike, Bionic Commando, and Battletoads are now doable, so this leaves: [2421] NES Battle City "2 players" by NhatNM in 13:00.35 [4323] NES Battletoads & Double Dragon: The Ultimate Team "2 players" by Lobsterzelda & feos in 16:27.56 [4342] NES Castlevania by Challenger in 10:18.91 [1546] NES Gimmick! "100%" by Aglar & Hotarubi in 07:44.45 [4131] NES Mega Man by Shinryuu, pirohiko, Maru & finalfighter in 09:45.35 [4410] NES Mega Man 2 by Shinryuu in 23:38.98 [3595] NES Rockman 4 Minus Infinity "all items" by Baddap1 in 34:43.72 [3726] NES Super C "2 players" by Soig in 11:25.49 I don't believe any of the mega man games use DMC channel, so they would probably work if re-synced in NESHawk. Battletoads and Double Dragon would probably work if resynced as well assuming it uses the same engine as batteltoads (no DMC channel.) Not sure about the others.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
A few updates / thoughts: NES: Power up timing and state is pretty much resolved now. It turns out NESDev folks had already worked out DMC state last year, so that was cool. I just need to do a couple hardware tests now to sort out the last couple details. I also tried matching up to Mesen, and it looks like Mesen state should be -1 cycle from NESHawk. When I use that state in NESHawk I do get runs that sync on console (with lower probability, about 50% less likely then the state I have now, but could be console dependent) but those same movies then do not sync in Mesen. Some memory access timings had speculatively been changed in 0.9.9, so they probably just need to be changed back. Anyway, there aren't many obstacles left for NES , probably by the end of the year most runs will be working on console. SNES: BSNES v115 was unexpectedly added to BizHawk recently, hopefully someone can try the 2 versions of the SOS submission, #7152: Samsara's SNES SOS in 04:34.08 . They may still both desync, but if v115 works where v78 doesn't, that might be a big deal for seeing more working SNES runs. GBA: I had run across this GBA emulator recently that seems to do things at a finer level of timing detail then mGBA: https://github.com/fleroviux/NanoBoyAdvance . A lot of necessary timing tests haven't even been written yet, so it probably doesn't matter much right now, but maybe worth keeping an eye on. I'm not sure what to focus on next once the remaining NES issues are sorted out. I'm open to suggestions, there's so much to do it's hard to decide where to start.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I have restored functionality to Basic Bot (a tool that can be used to random guess check small sections of a TAS) in dev builds. It's somewhat simpler to use then a lua script for simple tasks, and there was a video tutorial made for it by CoolHandMike: http://tasvideos.org/forum/viewtopic.php?t=21184
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
That super high jump is a really cool trick, I also liked the clock punching explanation, and nice detective work on the console crashing, yes vote.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Link to video I console verified the Battletoads game end glitch run. I also did the same for a resync ( http://tasvideos.org/userfiles/info/71811602852747684) of the one player warpless run, but that run needs an update so I won't bother making a video of it. So that's all the current Battletoads runs console verified.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Samsara wrote:
Uh, false alarm, I was able to resync the run near perfectly to standard BSNES while also improving the pipe room. I've updated the submission file and text to account for this. Judgement may continue.
Is there a desync in the v115 core? If so please report the details here: https://github.com/TASVideos/BizHawk/issues/2754
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I've made a lot of progress in understanding and emulating the DMC channel, but unfortunately DMC games still don't sync. I don't think I can make further progress without a dev. cart, I need to see the results of count_errors.nes in order to be able to tell what direction I need to shift things. In the mean time there are a few other loose ends I'll be trying to tie up. DMC games probably won't be syncing for 2.6.3, but hopefully for 2.6.4 I'll have them working, it's really close.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Bigbass wrote:
Alyosha wrote:
The streemerz runs now desync on dev build, which is promising, but I don't yet have a dev cart to try them on console, so moving on to DMC testing for now.
Where can I get this dev build? (nevermind, tikevin got me a link) I can try dumping and test on console.
http://tasvideos.org/userfiles/info/72428431403912808 Here is a movie file that syncs in dev build (slower then published run since it's just a rough resync.) I think probability of it working from a reset is low (like if you are using a power pak or similar) but it doesn't hurt to try.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
The streemerz runs now desync on dev build, which is promising, but I don't yet have a dev cart to try them on console, so moving on to DMC testing for now. Trying test runs with Ninja Turtles and Tiny Toon Adventures gives promising results, consistent desyncs indicating DMC start up state is consistent, I just need to find it and verify correctness of DMC channel emulation. This is also hindered by not having a dev cart, so progress may be slow. At least power up timing should be done now.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
TiKevin83 wrote:
I implemented 41 TAS verifications as a test suite for Gambatte Speedrun, the goal being to note any deficiencies outstanding in Gambatte Speedrun and to encourage TAS verification as part of an emulator's automated test procedures in general. https://tikevin83.github.io/gsr-automation-site/
That's pretty cool! Clever to feed back in the GBI inputs. I wonder what happened to Oddworld II though? Any idea where it started breaking? EDIT: looks like the movie still works in dev build (after adjusting for the new power up timing.)