Post subject: Console verifications - NES
Joined: 10/18/2011
Posts: 64
I'm halfway to putting together my own NESBot-equivalent (inspired by, obviously, but not a copy of his code/schematic) and I was wondering if there's any sort of catalog of NES-verified runs. Should I just give myself a satisfied nod when I get it working then disassemble it, or should I take some vids and confirm on the site somewhere that runs verify? I didn't go through all 17 pages of the original NESbot thread but it looks like they discussed some sort of 'console-verified' tag without actually doing anything. It's also possible that I'm blind and have completely tuned out big flashing "Console verified!!!" banners on every run I've seen.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
http://tasvideos.org/Movies-Verified-NES.html Notice you can add -verified to any movie listing to filter it. Also, on any movie list page you may notice a Filter link at the top that when clicked expands and gives you lots of options, including this filter.
It's hard to look this good. My TAS projects
MESHUGGAH
Other
Skilled player (1918)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 10/18/2011
Posts: 64
Thanks guys.
Joined: 10/18/2011
Posts: 64
I've been reading a bit more and have been wondering, is there any way for an emulator to tell how often the controls are read? Obviously I can just try feeding every game the current movie file and assume it gets read once per frame, adjusting from there, but do any of the emulators support "per poll" inputs instead of "per frame"? It would probably be best to try running a movie file against a "per poll" emulator to see if it syncs before attempting it on real hardware, and all the extra variables there.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
It requires the use of lua scripting, which provides some way to attach an event to actual input polls the game does. That's how the few-second-long smb3 run was made. Feed a different button pressing every time it polls and you're set.
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.
Joined: 10/18/2011
Posts: 64
This is well outside the scope of the "General" forum, but while I have your attention feos, since I often see your name involved in the more technical discussions I figured I'd ask... Is the shift register necessary for an Arduino to communicate as a NES controller? I have far more time to think about these projects than actually work on them, though I will eventually find out for myself, but the timing seems lenient enough for it to process and respond directly to the latch/clock pulses. 12 microsecond latch signal from the NES to signal preparing the data, then another 12 microseconds (6 hi/6 low) per clock pulse to actually send the data. Assuming I'm getting 193 instructions worth of time to process each bit (12,000 / 62 nanoseconds per Arduino instruction), that should be plenty, and then I should have a relative eternity between controller polls in order to read the next set of inputs and buffer it. I'll need to do the timing-sensitive stuff in ASM instead of C to be sure it's accurate, but that should be enough timing for even an amateur attempt to make it work, right? Or am I glossing over any major obstacles? This might be wishful thinking, but it should even be possible to use serial communication to feed it the inputs from PC instead of having to preload it somehow. But that's all stuff that I'll figure out as I go. Do any premade scripts exist that would play through a movie file and output the state of the buttons at each latch instead of each frame?
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Heh, this particular aspect isn't my sphere of competence.
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.
Joined: 10/18/2011
Posts: 64
Fair enough, thanks.
MESHUGGAH
Other
Skilled player (1918)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
I suggest you to go through the 17 pages of the console verification thread as these questions has the answers (starting from page 2). http://tasvideos.org/forum/viewtopic.php?t=9580&postdays=0&postorder=asc&start=25 I'm not an expert of hardwares, but let's see 1. shift register: the NES controller uses shift register to communicate, don't know if it's neccessary as in possible other ways. check the above thread or take a look at https://www.allaboutcircuits.com/projects/nes-controller-interface-with-an-arduino-uno/ or the http://wiki.nesdev.com/w/index.php/Nesdev_Wiki 2. 193 instructions = input speed * 1000 / smallest delay Of course don't plan on handling 193 instructions in each second. 3. The problem is still that input process is game dependent. I think while the majority of NES games does 2 input polls per 1 frame, you will probably get into issues if you literally want only the latch part.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 10/18/2011
Posts: 64
I'll try and make that my weekend reading project before making another post on the topic so I don't rehash a bunch of stuff. The shift register isn't a complicated piece of hardware to add, I'm just thinking that from a purely conceptual point of view it should be unnecessary. If that theory holds up, this project is no longer a "breadboard and mess of wires" project, and it becomes a "connect 5 wires to NES controller port" project. If serial communication can be processed fast enough to feed it the inputs, then somebody setting up their own NESBot only needs to get an Arduino, plug it in via USB, and hook into the controller port. I could probably walk a dedicated newbie through that in under an hour. Anyway, this is all theory until I get into it all. It's possible that the smarter people that did this first did it the way they did for a good reason, or maybe they just did it that way because it's easier to use a hardware shift register than to code one up in software. I'll try to get SMB1 syncing before posting again since that seems to be the easiest, and then I'll make a new post in the Lab forum when I need to get people's input on the details. Thanks all, and I hope to check back in with something soon. Ish.
Site Admin, Skilled player (1254)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Meanwhile also try #tasbot at freenode.
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.
Editor, Player (69)
Joined: 1/18/2008
Posts: 663
Yes, the IRC channel is best. We've been doing this for a while. Most is institutional knowledge though. NESBot is not a recommended place to start. Many people have built all sorts of variants of bots on Arduino, but I wouldn't recommend that either. Doing so seems an exercise of dealing with limitations of a platform than learning how to control an NES.
true on twitch - lsnes windows builds 20230425 - the date this site is buried