1 2
17 18
Post subject: Console Verification Thread
Emulator Coder, Player (68)
Joined: 10/4/2005
Posts: 197
Moderator edit 2020/04/20: The research and its practical applications from this thread have been compiled on the following pages: * List of console verified movies * Console verification guide * Console verification tests Please refer to them for up-to-date information. Original post below. -- As a school project I manged to play the current TAS record for SMB on the actual NES. I was also able to play the warpless run and the walkathon runs. I've been meaning to get my project info online for a while, but here are some quick details. I used the Arduino Duemilanove as the controller for the whole thing. To connect to the NES, I used circuits similar to the ones on the link DarkKobold posted. I hooked the pulse line from the NES to one of the interrupt pins on the Arduino, and had an interrupt occur every time a pulse happened. This was the only reliable method I found to know when the NES wanted buttons. I wrote a lua script to remove any frames that are marked as lag by FCEUX. Then by running my script when a movie is loaded, it will output only frames the NES would actually be interested in. I then stored this information to an SD card. Doing this with SMB proved to be very reliable. Even if the NES starts in a semi-random state, the worst I had to do every time was restart the console once or twice and it worked fine. And if it started fine, it worked until the game was beaten. I've seen it run about 20-30 times consistently. I tried a few other games including Marble Madness, and SMB3. Marble Madness seemed to desync quickly. SMB3 was a lot more interesting. Looking at it on an oscilloscope showed that for every frame, the controllers are pulsed twice. However, looking at the disassembler, I saw that even though the controllers are pulsed twice each frame, only one is read per pulse. If I remember correctly, the second controller is read first, then the first controller. Anyway, when I found the double pulsing, I just changed my code slightly to hold each button press for 2 pulses instead of one. It took quite a few console resets to get it to even get to the level select screen correctly. If it made it there, sometimes it would desync before even jumping over the pipe, causing him to die on the flower. Once or twice he did make it pretty far into the level, even jumping down through the block, but he got stuck. I'll try to get the full details of my project up soon (source code, circuit schematics, etc).
Emulator Coder, Player (68)
Joined: 10/4/2005
Posts: 197
I finally got my project online! I present to you, NESBot. It is hosted on Instructables as a part of a microcontroller contest. The contest ends on Sunday, and I'm hoping I could get some votes for me to win from the people who made it possible. Maybe? :) (Note, I have no idea how voting works yet, I just submitted my entry, but if you guys figure it out it would be greatly appreciated. Maybe by rating the guide it counts as a vote?) The guide describes how to build it, but not so much how it works. If you guys would like I could get a more detailed description on that up.
Editor, Player (68)
Joined: 1/18/2008
Posts: 663
Yeah, I never finished my project, which used a PIC micro. I was having a hard time using the pulse data for timing. However I didn't have my scope long and I was literally developing the thing laying on my blanket-on-the-floor-is-my-bed. I was also going through extreme stress so it was never really properly looked at... Re: pulses, as was written in a thread in 2006, the moviefile format really should be changed...it should record what the button status is on a pulse or on reads, not per frame. But perhaps an emulator can be patched to run through the game and convert this data into a per-pulse configuration... might improve reliability, so long as the start state works out?
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
micro500 wrote:
I finally got my project online! I present to you, NESBot.
I already hear the trolls crying that it's fake. "Clearly the video is coming from a PC running an emulator. The NES box there is just for show."
Skilled player (1882)
Joined: 4/20/2005
Posts: 2160
Location: Norrköping, Sweden
micro500 wrote:
I finally got my project online! I present to you, NESBot.
That was awesome, thank you for making it. I had my doubts that it was possible, but luckily you proved me wrong!
nesrocks
He/Him
Player (240)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
Dr. Frankenstein wrote:
"Look! It's moving. It's alive. It's alive... It's alive, it's moving, it's alive, it's alive, it's alive, it's alive, IT'S ALIVE!"
Awesome!
Player (120)
Joined: 2/11/2007
Posts: 1522
Very awesome indeed! Thanks for sharing! It looks like voting begins Monday so be sure to bump this topic so I remember to vote for you :)
I make a comic with no image files and you should read it. While there is a lower class, I am in it, and while there is a criminal element I am of it, and while there is a soul in prison, I am not free. -Eugene Debs
adelikat
He/Him
Emulator Coder, Expert player, Site Developer, Site Owner (3581)
Joined: 11/3/2004
Posts: 4736
Location: Tennessee
micro500 wrote:
I finally got my project online! I present to you, NESBot. It is hosted on Instructables as a part of a microcontroller contest. The contest ends on Sunday, and I'm hoping I could get some votes for me to win from the people who made it possible. Maybe? :) (Note, I have no idea how voting works yet, I just submitted my entry, but if you guys figure it out it would be greatly appreciated. Maybe by rating the guide it counts as a vote?) The guide describes how to build it, but not so much how it works. If you guys would like I could get a more detailed description on that up.
Holy crap awesome and thanks for making this! I've always wanted to see a TAS on the console. Mind if I link that video in one of our pages that explain TASing? (Also, what is the implications here for unassisted records? Someone could do a less obviously TASed movie that beats andrewg's time and submit it.)
It's hard to look this good. My TAS projects
Joined: 7/2/2007
Posts: 3960
So much for SDA's "verified no cheating", huh? :) Very nice work!
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Skilled player (1403)
Joined: 10/27/2004
Posts: 1976
Location: Making an escape
Oh. Oh my! I don't think my mind has been this blown within this hobby for the longest time! Wow, this is exciting! What are the chances of trying this out on other games?
A hundred years from now, they will gaze upon my work and marvel at my skills but never know my name. And that will be good enough for me.
Joined: 7/2/2007
Posts: 3960
He describes some of the limitations of this approach in the article: if the game has any dependence on uninitialized memory states (e.g. as a source of randomness) or on complex timing, then the TAS probably won't sync.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Emulator Coder, Player (68)
Joined: 10/4/2005
Posts: 197
Thanks for all the kind words everyone!
Warp wrote:
I already hear the trolls crying that it's fake. "Clearly the video is coming from a PC running an emulator. The NES box there is just for show."
Yeah, I was worried about that. Is there any way I can make it more obvious in the video that it's not?
adelikat wrote:
Mind if I link that video in one of our pages that explain TASing?
Not at all! That would be awesome! That video isn't the best quality, it was getting late and I wanted to get this posted ASAP. I can do more videos if you'd like, let me know what you want done.
Ferret Warlord wrote:
What are the chances of trying this out on other games?
Well, I did try Super Mario Bros 3. I discovered the console polls the controller twice a frame in that game, so I first had to adjust for that. I still had bad luck trying to get it to run. Sometimes it wouldn't even make it into the first level, sometimes it would make it halfway through the first level, and sometimes it failed somewhere in between. I'm not entirely sure what the problem is, I may give it a try again soon. I tried a few other games like Marble Madness, and didn't have too much luck with them either. Are there other games that are as well emulated or lacking a RNG like Super Mario Bros that I might have better luck with? I only went with SMB because people were talking about it being the most likely candidate for this to work.
Joined: 7/2/2007
Posts: 3960
micro500 wrote:
Thanks for all the kind words everyone!
Warp wrote:
I already hear the trolls crying that it's fake. "Clearly the video is coming from a PC running an emulator. The NES box there is just for show."
Yeah, I was worried about that. Is there any way I can make it more obvious in the video that it's not?
You'd need to do something like a full walkabout of the TV + console + device to make it clear that there are no other video inputs to the TV than the console. Even then you could be running a custom computer installed inside the NES itself (I've seen an NES case used as a small-form-factor computer case before) or just doing some post-processing trickery to make the game show up on the TV screen with appropriate visual effects. In short, haters gonna hate.
Well, I did try Super Mario Bros 3. I discovered the console polls the controller twice a frame in that game, so I first had to adjust for that. I still had bad luck trying to get it to run. Sometimes it wouldn't even make it into the first level, sometimes it would make it halfway through the first level, and sometimes it failed somewhere in between. I'm not entirely sure what the problem is, I may give it a try again soon. I tried a few other games like Marble Madness, and didn't have too much luck with them either. Are there other games that are as well emulated or lacking a RNG like Super Mario Bros that I might have better luck with? I only went with SMB because people were talking about it being the most likely candidate for this to work.
There's puzzle games like Adventures of Lolo, but the semi-turn-based nature of those games means that they're less visually impressive (being basically a highspeed walkthrough of the puzzles). EDIT: holy crud! Why's my text so big in the first section?
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Player (136)
Joined: 9/18/2007
Posts: 389
That was really cool!
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Derakon wrote:
Even then you could be running a custom computer installed inside the NES itself (I've seen an NES case used as a small-form-factor computer case before)
A friend of mine and I once entertained the idea of taking an old C64 (he had some broken ones for collecting spare parts), building a PC inside it using laptop hardware, constructing the necessary interface to make the C64 keyboard work, install Linux in the PC and run a C64 emulator to run C64 games... thus coming full circle.
AnS
Emulator Coder, Experienced player (723)
Joined: 2/23/2006
Posts: 682
Oh, finally someone made it! Awesome indeed. For another candidates, try Excitebike and Gradius.
Experienced player (616)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
Did you try the warpless SMB1? I've always wonderd whether a longer run would synch on real hardware.
Measure once. Cut twice.
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
I don't think there any NES game accuracy list. But I guess, you can still post your game list libary, so we can try to determine which other game would be a suitable candidate.
Experienced player (698)
Joined: 2/19/2006
Posts: 742
Location: Quincy, MA
So uh... Now if someone ever submits a run and beats my record, I'll have to wonder if it was tool assisted. :o
Super Mario Bros. console speedrunner - Andrew Gardikis
Player (208)
Joined: 7/7/2006
Posts: 797
Location: US
This need more publicity. Congrats on accomplishing this. It's quite awesome to see.
Mitjitsu
He/Him
Banned User, Experienced player (531)
Joined: 4/24/2006
Posts: 2997
Will this mean in future, we can playback the input on a console, capure it on DVD and then publish the .avi on the site?
Joined: 11/13/2005
Posts: 1587
Mitjitsu wrote:
Will this mean in future, we can playback the input on a console, capure it on DVD and then publish the .avi on the site?
It is possible right now, as SMB TAS is playable on the NES, but I don't see the point.
Emulator Coder, Player (68)
Joined: 10/4/2005
Posts: 197
Derakon wrote:
You'd need to do something like a full walkabout of the TV + console + device to make it clear that there are no other video inputs to the TV than the console. Even then you could be running a custom computer installed inside the NES itself (I've seen an NES case used as a small-form-factor computer case before) or just doing some post-processing trickery to make the game show up on the TV screen with appropriate visual effects. In short, haters gonna hate.
I could try doing something like that next time I shoot a video. But you're right, haters are gonna hate.
andymac wrote:
Did you try the warpless SMB1? I've always wonderd whether a longer run would synch on real hardware.
I did, and it works equally as well. I've also tried the walkathon and the 500 score run, all of which worked fine. Should I get videos of those too?
BadPotato wrote:
I don't think there any NES game accuracy list. But I guess, you can still post your game list libary, so we can try to determine which other game would be a suitable candidate.
Good idea. I'll get a list of my games together soon. Also, I've been featured on Hack a Day! http://hackaday.com/2011/02/11/nesbot-video-game-automation/ I've also made it to the homepage of Instructable today, under technology!
Experienced player (616)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
micro500 wrote:
I did, and it works equally as well. I've also tried the walkathon and the 500 score run, all of which worked fine. Should I get videos of those too?!
I would very much like to see videos of those if that's at all possible.
Measure once. Cut twice.
adelikat
He/Him
Emulator Coder, Expert player, Site Developer, Site Owner (3581)
Joined: 11/3/2004
Posts: 4736
Location: Tennessee
I think the general summary here is this: Please do more of these vids!!!
It's hard to look this good. My TAS projects
1 2
17 18