2 ms·
If anyone has weeks or months to kill on a totally awesome but utterly useless side project, someone should try to use an emulator to see if it's possible to ac
by csense 14y ago
If anyone has weeks or months to kill on a totally awesome but utterly useless side project, someone should try to use an emulator to see if it's possible to actually exploit the PRNG on the NES version. I.e., using the fact that you can control the low bits of button press timestamps (or whatever entropy source the game's random number generator uses), see if there's some input pattern (together with cycle-precise input timings to get the PRNG to deterministically do what we want) that creates a fully eliminable set of pieces while also returning the PRNG to its initial state, allowing the sequence to be repeated indefinitely.
You could do this on any version, but the solution would probably be hardware- and implementation-specific; I just mention the NES version because AFAIK it's regarded as the most "authoritative" version.
- Daiz 14y agoThere's a whole bunch of Tetris TASes (tool-assisted speedruns) available on TASvideos[1], including console-verified plays of the NES version. No infinite plays, though, but luck manipulation is already used in the existing runs. [1] http://tasvideos.org/Search.html?key=tetris http://tasvideos.org/Search.html?key=tetris
- Kitaru 14y agoNES might not be a good version for such a project, as most of the time would likely be devoted to working around bugs that start cropping up as you play far beyond the Level 29 "kill-screen." NES was never intended to be humanly playable beyond that point, so weird things start cropping up as you progress that can cause strange behavior or lock up the game. It could still be possible, but you'd have one more thing to reverse engineer beside just the randomizer. The game does eventually loop back to Level 0 if you get through all the bugs in "the outlands," so I guess as long as you start your game there and are able to manipulate the RNG properly then it may be feasible. The RNG is a LFSR with 32,767 positions, and the selection method is also dependent on the previous piece dealt (starts empty) and number of pieces dealt since power-on (stored in a byte). (EDIT: There are also ways to indefinitely prolong entry delay via pause cycling. Actually, scratch that, you could even just pause a bit at the end and wait for the proper frame, assuming the other variables are properly aligned. That almost seems a bit unfair though, heh.) The 1988 Sega arcade version might also be good for such a project. What NES was to North America in terms of being an authoritative "classic" version, Sega Tetris was to Japan. It fills an array with 1000 pieces at the start of each game, so creating some sort of looping pattern would be very possible there.