Slashdot Mirror


NESBot: Tool Assisted Speedrun On Real Hardware

Xistic writes "For many years tool assisted speedruns were purely theoretical and the domain of emulators. No longer! Using an Arduino Duemilanove microcontroller to drive an actual Nintendo console, pjgat09 plays back prerecorded input to beat Super Mario Bros. in record time. The selection of possible games is limited: 'If the game relies on any uninitialized memory for randomness, or if it is heavily based on console timing, it may not work. In the case of Super Mario Bros however, as long as the button presses start play back at the right time, the movie will play back correctly.' The author includes complete instructions on how to setup the device."

20 of 101 comments (clear)

  1. Welcome Slashdotters by Anonymous Coward · · Score: 5, Informative

    Welcome Slashdotters.

    An introduction might be in order. Please note we have many other movies for other consoles. We also have a list of recommended movies for first-time viewers.

    Please don't beat up our poor server too badly.

    1. Re:Welcome Slashdotters by damn_registrars · · Score: 5, Funny

      Please don't beat up our poor server too badly.

      Worry not. After the latest "upgrade" here traffic at slashdot is down enough that we couldn't take your server down even mid-day during the week when geeks are avoiding work. On the weekend when former slashdot readers are reading other websites hoping for relevant news, you have nothing to worry about.

      --
      Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
  2. Holy bug exploitation by damn_registrars · · Score: 4, Interesting

    That run exploits bugs from SMB that I didn't even know where there. I counted at least 4 times that he ran through walls in one way or another; to say nothing of the way that he would jump on the edge of a pipe while the flower was out and not take a hit.

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
    1. Re:Holy bug exploitation by Soilworker · · Score: 5, Informative
    2. Re:Holy bug exploitation by PRMan · · Score: 2

      My Youth Pastor loved Mega Man (the original NES version) and would routinely do about half the glitches you see in the TAS. He used to solve the game in like 12 minutes with all the cheats.

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
    3. Re:Holy bug exploitation by izomiac · · Score: 2

      If you're fine with exploiting glitches in a game, just enter debug mode to jump to the end "You Win" sequence for a 2 second speedrun for games with such a feature. The entire point, IMHO, is to demonstrate the skill of the player, not the ability to cheat. That's like receiving a trophy by physically stealing it rather than winning an event, it's missing the point of the accomplishment.

  3. Re:Not all that impressive, really. by IorDMUX · · Score: 2

    As a long-time fan of tasvideos.org, I have to say that I, at least, am quite impressed by the very first transition of a movie to real, physical hardware... even if they had to get the controller out of the way.

    It is not so much a seminal technical achievement, as a true landmark for TAS fans and aficionados.

    --
    >> Standing on head makes smile of frown, but rest of face also upside down.
  4. This won't work with all games by Dwedit · · Score: 5, Interesting

    This won't work with all games. Many games made by Konami use aggressive random number generators which depend on the number of clock cycles consumed while the game waits for the next frame.

    Then the game also plays digital samples through the DMC channel, and the DMC channel does not have a known consistent power-on state. Because the DMC channel periodically interrupts the CPU to fetch bytes, that will affect the number of cycles it takes while it waits for the next frame.

    So we have two issues coming together, number of leftover cycles from power-on state, and initial DMC state, so when you play one of these games, the game's own demo mode isn't even consistent between multiple power-ons.

    You can try it with Blades of Steel or Double Dribble, and see that their demo modes aren't always identical between different power-ons, even when you are aren't touching the joypad.

    No chance of those games being TASed on hardware.

    Other games are far more friendly, and don't rely on exact timing for their random number generator behavior.

  5. Re:Sprite collision modified? by Pawnn · · Score: 2

    Actually, the game's accurate enough that if you pay very close attention, he's just BARELY dodging those things. Within pixels.

  6. Re:Ok, what? by DeHackEd · · Score: 2

    Not officially, but collision detection can be abused to trick the game into believing a solid wall is ground beneath Mario's feet, allowing him to jump. Frame-precision is needed, hence the tool-assisted aspect of it.

    The tasvideos.org page has more info in their wiki.

  7. Hitboxes by tepples · · Score: 3, Insightful

    Sure looks like he's going through the flesh-eating flowers and the rotating balls to me

    Hitboxes for most enemies in SMB1 are only half as tall as small Mario.

  8. Re:Not all that impressive, really. by petermgreen · · Score: 3, Informative

    One of the key things that makes this work is that on the nes the game controls polling of the controller and the controller polling process involves controlling a shift register in in the controller. Afaict his board locks to one of the signals that controls the shift register and uses it to stay in sync with the game. This allows it to play through an entire game with frame accurate timing. Something that would be MUCH harder to do by mechanically actuating a real controller even if you took a sync source from the console.

    And doing it without a sync source would be basically impossible.

    was not an easy task because of the way lag is handled

    Lag probablly isn't a particaully good term for the issue. AIUI the issue is that there is not a 1:1 mapping between controller input cycles and frames out output. Since his device is locked to controller input signals rather than dispaly frames he needs to strip out the frames that don't have a corresponding input cycles.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  9. Next up: HFT! by martin-boundary · · Score: 3, Funny

    Next up, High Frequency Tetris on sub millisecond collocated hardware!!

  10. Re:Sprite collision modified? by JonySuede · · Score: 2
    --
    Jehovah be praised, Oracle was not selected
  11. Human players by Anonymous Coward · · Score: 4, Informative

    Though I am impressed that someone got an Arduino to do something like this, I still think that it's impressive that it only barely squeaked by the "real" record. Here's a human player (not Tool-assisted):
    http://www.youtube.com/watch?v=bRyhpxR3l_g

    By my count (seconds are "game-seconds"):
    1-1 Tie
    2-1 Arduino up 1
    4-1 Tie
    4-2 Arduino up 3
    8-1 Tie
    8-2 Human up 4
    8-3 Arduino up 2
    8-4 Arduino up 2

    So if my reckoning is correct, the Arduino, with all its glitches, only beats a human player by 4 in-game seconds. Though SDA counts time from when the games starts to finishes, including loading times between stages, in which case it looks like the Arduino may have won by 5 real seconds. Still, the human players have done incredibly well on this game to fine-tune it to the point they have. Yes, I am a geek.

  12. Re:Sprite collision modified? by noidentity · · Score: 2

    It's all legit. The device behaves like nothing more than a human who can press and release the controller buttons in arbitrary patterns every frame. The kind of abuse of glitches is a whole other world with tool-assistance.

  13. Re:Some kind of cheats... by QuantumBeep · · Score: 2

    Yeah, I do have a problem with someone calling bullshit out of stupid animal reflex. Thirty seconds of reading the articles or the above and below comments would have explained that no, hitboxes are actually pretty forgiving in SMB if you exploit them just right.

  14. That's nothing... by Anonymous Coward · · Score: 2, Interesting

    You should see how many updated movies on TASVideos (which I've been visiting for a long time now) beat each other by a few *frames* (i.e. 1/60ths of a second).

    It's not uncommon to have a movie obsoleted in favor of a 2-3 frame improvement, especially in the Mega Man games, which are very, very, very competitively TASed.

  15. Uninitialized memory for randomness by Anonymous Coward · · Score: 3, Insightful
    Uninitialized memory is not random, and relying on it to produce randomness is very bad.
    Interestingly I once saw this in some C code:

    static int c; /* leave uninitialized to make as random as possible */

  16. Re:TAS? by LambdaWolf · · Score: 2

    I agree that the videos themselves are rather boring to watch, except in some instances when they're paired with fun music or interesting commentary, and that people need to make it clear that they're tool-assisted. (As long as I'm griping, I also hate the totally unnecessary neologism "speedrun" when the phrase "speed run" would have sufficed, and even that is annoyingly redundant. [End semantics Nazi rant.])

    But I think it's weird to suggest that they're somehow illegitimate, just because they run on different rules of a fan community's invention. It's irrelevant to observe that it's like cheating at the game, since when you're creating a TAS, you're not playing the game, you're creating a TAS. They're two different activities, so of course the rules are different. Complaining about a TAS in comparison to a human-performed speedrun^Wspeed run is like saying it's stupid for an engineer to sit around all day designing a race car because you'd rather watch a real person doing a 100-meter dash.

    Let's look at your golf example. Imagine someone practiced the same golf shot thousands of times, until they could unambiguously describe, down to the slightest twitch of muscle fiber, how the most perfect possible swing would be executed by the human body. Don't you think that would be a technically impressive feat, if not entertaining in the same way as a sport, even if no human being could actually execute those instructions? I would think on Slashdot that kind of high-precision, insanely specialized, and ultimately purposeless problem-solving would get a little more geeky respect. (And incidentally, I've never done or even wanted to do a TAS in my life. It sounds infuriatingly tedious. But as I explained, I geekily respect the activity.)

    I'm not sure how much that relates your intended point, so I'll close by reiterating that, yes, despite the above, the videos are indeed pretty damned boring to watch. But at least this sort of thing can be pretty funny. :)

    --
    "This algorithm runs in constant time. Come on, 2,147,483,648 is a constant..."