Post subject: Blades of steel proves that TASs are impossible on hardware
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 690
Location: Chicago
Every time you turn on the game, you get a different demo, despite exactly the same input. Therefore, TASs are impossible on NES hardware. Granted, this game especially exploits some things about the NES: * It uses the DMC channel during the title screen. The DMC channel's counters start out in an unknown state. * The DMC channel works by stealing CPU cycles away from the NES, and can also corrupt controller input if the DMC channel steals the bus right when it's reading joystick input. * It uses a RNG which is basically a CPU cycle counter.
Experienced Forum User, Experienced player (853)
Joined: 11/18/2006
Posts: 2426
Location: Back where I belong
GBx TAS of 2008
Correction: TASes of that game are impossible on real hardware, but that doesn't mean *all* games would be. Don't just assume that because a penguin can't fly that all birds can't.
Living Well Is The Best Revenge My Personal Page
Post subject: Re: Blades of steel proves that TASs are impossible on hardware
Experienced Forum User, Skilled player (1649)
Joined: 11/15/2004
Posts: 2200
Location: Killjoy
Arcade TASer of 2010PCE TASer of 2010Arcade TAS of 2010Lucky TAS of 2009Lucky TAS of 2007
* It uses the DMC channel during the title screen. The DMC channel's counters start out in an unknown state. This could be fixed, by essentially 'flooring' the values... somehow. * The DMC channel works by stealing CPU cycles away from the NES, and can also corrupt controller input if the DMC channel steals the bus right when it's reading joystick input. Is this not emulated properly? Also, that would suggest that there are frames of errant input in this game. * It uses a RNG which is basically a CPU cycle counter. This is the least issue, given perfect emulation. The frame tick should be at the same place for both emulation and the real system, and therefore have the same number of CPU cycles. Also, sorry I hit edit instead of quote, earlier. Doh!
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 690
Location: Chicago
There is never any actual corrupted input, because Blades of Steel read the joysticks twice each frame, and if the joystick input does not agree, it reads it one more time. Most other games which use the DMC channel also do the same. The thing about the DMC channel is that its counters are always running no matter what. It's always ticking down so it knows when to fetch the next byte, even when it's turned off. When you turn it on, you never have any idea how many cycles will elapse before the DMC reads a byte. Also, its counters are not in a known initial state. So anything that uses the DMC channel will not behave predictably down to the cycle. Konami Games use a remaining CPU cycle counting algorithm for their random number generator. Those would not be TASable on hardware. Konami isn't the only developer that did that either. Other games use different RNG methods, so as long as there is not unexpected lag, they should work fine.
Experienced Forum User, Experienced player (572)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
I beleive the input is generated such that it would work on the console straight from the factory, and turned on as soon as it is plugged in. As far as I know, the NES at least has no non volatile memory. Which would mean that if it is turned on as soon as it is plugged in, then the same demo would be played. Of course I could be wrong. Who knows?
Measure once. Cut twice.
Experienced Forum User, Player (198)
Joined: 7/7/2006
Posts: 797
Location: US
andymac wrote:
As far as I know, the NES at least has no non volatile memory. Which would mean that if it is turned on as soon as it is plugged in, then the same demo would be played.
Would unplugging the NES have the same effect?
Dwedit wrote:
The thing about the DMC channel is that its counters are always running no matter what. It's always ticking down so it knows when to fetch the next byte, even when it's turned off.
You say this runs even when the game is off. Are you assuming that or is it known? It could just be left in the state it was in when the game is turned off for when it is next turned on. Essentially, if we unplugged the NES every time, would the same demo play upon turning on the game's first play?
Experienced Forum User, Experienced player (572)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
In a lot of hardware, (such as old computers) there is a clock battery which maintains small amounts of memory. If you were to wait long enough, this battery would die. There is probably no non-volatile rewritable memory inside a NES, except for maybe a clock. so if this is the case, then the first time you turn the NES on (assuming that there is only one stable state for a powerless situation after a given amount of time) it will always run the same way (unless the NES has slight hardware differences between consoles, or has randomness based on outside interference, such as a Geiger-Muller tube and a radioactive sample)
Measure once. Cut twice.
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 690
Location: Chicago
Kirkq wrote:
andymac wrote:
As far as I know, the NES at least has no non volatile memory. Which would mean that if it is turned on as soon as it is plugged in, then the same demo would be played.
Would unplugging the NES have the same effect?
Dwedit wrote:
The thing about the DMC channel is that its counters are always running no matter what. It's always ticking down so it knows when to fetch the next byte, even when it's turned off.
You say this runs even when the game is off. Are you assuming that or is it known? It could just be left in the state it was in when the game is turned off for when it is next turned on. Essentially, if we unplugged the NES every time, would the same demo play upon turning on the game's first play?
No, when the game turns the DMC Channel off, not when the game is off. It's just that the channel starts out with an unknown period before the DMC fetch would happen, and the channel runs continuously whether the game is using it or not. If the game does not use it, then it never steals any cycles, and everything is nice and predictable. If the game does use it though, then you never know exactly how many times the RNG will iterate every frame.
Experienced Forum User, Experienced player (572)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
Describe to me exactly how, if the NES has absolutely no memory of any previous state, and no outside influence up to the point at which it is turned on, it can start with an unknown period, and not a known determined one. I'm currently looking at some DMC documentation to try to figure this out. EDIT: I get it now.
Measure once. Cut twice.
Patashu
He/Him
Experienced Forum User
Joined: 10/2/2005
Posts: 3879
Is it possible to make a TAS work SOME of the time, though, or are there too many different possibilities to make waiting for the right one feasible?
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
Dwedit
He/Him
Experienced Forum User
Joined: 3/24/2006
Posts: 690
Location: Chicago
I'm just saying that if you want to TAS any Megaman game, it will probably work fine. But if you want to TAS any Konami game which uses the DMC channel, don't be surprised by a desync.
Post subject: JXQ am not understanding what wes says
JXQ
Experienced Forum User, Experienced player (736)
Joined: 5/6/2005
Posts: 3132
NES TAS of 2008Speedy TAS of 2008SNES TASer of 2007TAS of 2007SNES TAS of 2007Funny TAS of 2007
Dwedit wrote:
I'm just saying that if you want to TAS any Megaman game, it will probably work fine. But if you want to TAS any Konami game which uses the DMC channel, don't be surprised by a desync.
If this is your intent, then I think you should edit the name of this thread, because it is sensationalizing your intended message.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
Experienced Forum User
Joined: 1/13/2007
Posts: 325
The theory of a TAS is that it should be possible to play back on real hardware. The fact that the DMCs registers are effectively random to start off with means the cpu stolen when it is first activated is unpredictable. This makes it a source of entropy NOT CONTROLLED BY THE PLAYER. Since the game has a source of entropy not depend on input from the player in any way, this INVALIDATES ANY TAS of said game. Any NES emulator that was truly accurate would emulate this behavior after all, and thus any attempted TAS of a game that does this would desynch. The fact that it doesn't means that the emulator is not accurate The state of memory after power loss is RANDOM. Also a game could conceivably uses uninitialized RAM to get the first seed. This would cause the same problem again. In fact, games for certain other 8 bit systems count of the fact that the state of RAM is random when the system is powered on, and will not work al all if it's not!
nesrocks
He/Him
Experienced Forum User, Player (227)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
Conclusion, a TAS of blades of steel is still possible on real hardware, you just need to reset a few times until it works.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
zaphod77 wrote:
Since the game has a source of entropy not depend on input from the player in any way, this INVALIDATES ANY TAS of said game.
TASes simulate what would happen if a perfect, god-like entity would play the game. Such perfect entity would also know when to start playing so that any possible random states will be exactly as they should. A TAS simply simulates starting off at the perfect moment. It's still in theory possible to replicate the TAS in the real hardware if we assumed infinite knowledge (even if this is not possible in practice).
Experienced Forum User
Joined: 7/2/2007
Posts: 3960
Put another way, there's a finite number of starting states for the game. As long as at least one of them syncs, the TAS is valid.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Experienced Forum User
Joined: 6/15/2005
Posts: 1711
JXQ, A+ post title, F
Zoey Ridin' High <Fabian_> I prett much never drunk
Post subject: extra hemlig skoj
JXQ
Experienced Forum User, Experienced player (736)
Joined: 5/6/2005
Posts: 3132
NES TAS of 2008Speedy TAS of 2008SNES TASer of 2007TAS of 2007SNES TAS of 2007Funny TAS of 2007
Thanks, I'm trying to utilize that more.
<Swordless> Go hug a tree, you vegetarian (I bet you really are one)
Editor, Experienced Forum User
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
I will say this before the site goes down. Nothing is ever perfect in programming. This is why there are bugs in games that are seemingly perfect like Super Mario 64. I like programming and when I look at the abuse these games get, I think to myself, "How do I prevent that from happening in my game?" Thank you to everyone who has been apart of this. I realize this is my first post here, and probably my only one, but I have watched runs on this site for a little while. I enjoy the stuff here. More fun then SDA runs. I will miss this site.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Experienced Forum User
Joined: 10/20/2006
Posts: 1248
It's a bad idea trying to prevent glitches of that particular kind. It's almost impossible to come across them even after playing through the games a number of times. If thousands of freaks play your game for years though, they'll always find strange ways to abuse your engine. But does it do any harm if they find those glitches? On the contrary, it adds immense amounts replay value for geeks/nerds. And it doesn't take away from the fun for casuals either. So the bottom line is, trying to prevent these glitches would not only take loads of time and effort, but it would actually make your game worse. You shouldn't be concerned about glitches which don't have any negative influence on the gaming experience.
Experienced Forum User
Joined: 11/9/2008
Posts: 108
Location: New Orleans, LA U.S.A.
hegyak wrote:
I will say this before the site goes down. Nothing is ever perfect in programming. This is why there are bugs in games that are seemingly perfect like Super Mario 64. I like programming and when I look at the abuse these games get, I think to myself, "How do I prevent that from happening in my game?" Thank you to everyone who has been apart of this. I realize this is my first post here, and probably my only one, but I have watched runs on this site for a little while. I enjoy the stuff here. More fun then SDA runs. I will miss this site.
why does this lurker make like the site is going down or something?
__--N0ISE
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
See the front page or the announcement in General.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Experienced Forum User, Skilled player (1594)
Joined: 9/17/2009
Posts: 4886
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
GBA TASer of 2010
Noxxa
They/Them
Experienced Forum User, Expert player, Moderator (3838)
Joined: 8/14/2009
Posts: 4038
Location: The Netherlands
Exotic platforms TASer of 2018Exotic platforms TAS of 2018Exotic platforms TASer of 2017Exotic platforms TAS of 2017Exotic platforms TAS of 2017Exotic platforms TASer of 2016Exotic platforms TAS of 2016Gameboy TASer of 2013
jlun2 wrote:
Dwedit, you killed the site...
This thread is four months old and nobody had any qualms about it before.
http://www.youtube.com/Noxxa <dwangoAC> This is a TAS (...). Not suitable for all audiences. May cause undesirable side-effects. May contain emulator abuse. Emulator may be abusive. This product contains glitches known to the state of California to cause egg defects. <Masterjun> I'm just a guy arranging bits in a sequence which could potentially amuse other people looking at these bits <adelikat> In Oregon Trail, I sacrificed my own family to save time. In Star trek, I killed helpless comrades in escape pods to save time. Here, I kill my allies to save time. I think I need help.
Emulator Coder, Experienced Forum User
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Not everyone sees everything the first time around. This thread was resurrected here: http://tasvideos.org/forum/viewtopic.php?p=230104#230104 on March 24th, which brought it to our attention.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.