Crashing Tetris! The Logic Behind the Madness - Behind the Code Leveled Up

  Рет қаралды 26,690

Displaced Gamers

Displaced Gamers

3 ай бұрын

Technical pursuit of the code that leads to a crash on the NES for Tetris.
If you would like to support this channel, here is a link to the Displaced Gamers Patreon page - / displacedgamers
Twitter: / displacedgamers
Facebook: / displacedgamers
Instagram: / displacedgamers
Music by:
/ hariboosx
/ @wolfandraven
#NES #Programming #Tetris

Пікірлер: 191
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Hope you enjoyed this one! It took longer to make than the others. Tetris is really enjoying a boom in popularity right now, and I find this particular quirk to be fascinating. Correction: I made an error in Photoshop layers at the 16:50 mark. The logic beginning at address $8045 should be PLA, TAY, PLA, TAX, PLA. The code in the ROM is correct. Some resources: mass:werk's article about 6502 opcodes - www.masswerk.at/nowgobang/2021/6502-illegal-opcodes Meatfigher's Tetris a.i. script - meatfighter.com/nintendotetrisai/#Try_It_Yourself Note the a.i. script I used is an older version. It was revisited here - meatfighter.com/tetrisairevisited/ You may need to modify the scripts to run them in Mesen. The original was designed for FCEUX.
@makeshiftsavant
@makeshiftsavant 2 ай бұрын
"Have you ever given much thought to how we count? Probably not." Programmers screaming right now
@RGMechEx
@RGMechEx 3 ай бұрын
Somehow we release videos about the same topic within 24 hours of each other, and they complement each other wonderfully! Awesome work!
@TheNoXbeta
@TheNoXbeta 3 ай бұрын
both of you do amazing videos!
@creepercraftytT99
@creepercraftytT99 3 ай бұрын
OMG, RGME!
@smartperson1
@smartperson1 3 ай бұрын
I enjoyed your video yesterday and was thinking to myself "gee, Displaced Gamers should also do a video on this." And lo and behold!!
@michaelcalvin42
@michaelcalvin42 3 ай бұрын
It's a rather nice coincidence, to be sure. Both are great videos!
@B3Band
@B3Band 3 ай бұрын
I actually thought it was Displaced Gamers because forgot that I hit the bell on RGME as well
@YF501
@YF501 3 ай бұрын
RGME and Displaced Gamers covering Tetris a day apart? Hell ya.
@ranibro
@ranibro 3 ай бұрын
Yep
@RobertoVillegas-vincent404
@RobertoVillegas-vincent404 3 ай бұрын
Thought the same thing. Is there like a Tetris thing in March that I’m not aware of? Just sort of a weird crossover that isn’t a crossover.
@stevep9177
@stevep9177 3 ай бұрын
​@@RobertoVillegas-vincent404A world record for the NES version was broken recently
@arciks11
@arciks11 3 ай бұрын
@@RobertoVillegas-vincent404 Recently a tetris kill screen was hit by a human.
@InsaneFirebat
@InsaneFirebat 3 ай бұрын
Unfortunate timing but I'll do it again.
@rmyers99
@rmyers99 3 ай бұрын
As a non-programmer I always appreciate how you visually depict what's happening in game code.
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Thanks!
@Bobbias
@Bobbias 3 ай бұрын
​@@DisplacedGamershell, as a programmer I also appreciate the wonderful visualizations. They're brilliantly done.
@clarafedde8674
@clarafedde8674 3 ай бұрын
"I'M a programmer, not a Tetris master." Best line ever!!!!
@tolstoj_
@tolstoj_ 3 ай бұрын
I checked explanations by: Meetfighter, Agamescout, Hydrant Dude, Fractal, Eric, Wiirambo, RGME, Kirjava and others... and I think I slowly start to understand the topic.
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
It is a fascinating and fun topic.
@lis6502
@lis6502 3 ай бұрын
just read about stack smashing because that's what happening in the core :P But indeed, Displaced does amazing job with his disassemblies and visual explanations. Till this day i knew that stack's getting damaged but never knew actually why.
@drgabi18
@drgabi18 3 ай бұрын
20:37 glad you managed to catch some things RGE didn't in their videos, like RAM storing tacos
@fractal161
@fractal161 3 ай бұрын
Displaced Gamers nestris video ayooo?? Loved this video. The explanation of why BCD is needed was the best I've seen, just so clear and direct. And the event viewer visualization of the scoring loop taking over was so good. Looking forward to the next one. Just for fun, here's a few bits of trivia (might update this later): - There's actually a second BCD lookup table inside the game code that actually goes all the way up to like 50, which is used on the level select screen. As a result, it's possible to temporarily fix the bugged level indicator with just a couple of game genie codes. - It may seem counterintuitive that singles are the first line clear to crash the game, since adding smaller numbers seems like it would take less work. However, what this means is that the number of carries increases, which is really what matters for measuring runtime. You can try this yourself: using the standard elementary-school right-to-left method of adding numbers, try computing 999999 + 40 on paper, and then try 999999 + 1200; you probably do more "work" for the first one! - It's actually (somewhat) possible to control the value of the corrupted address in the dynamic jump routine that causes the crash. In NMI, the last values written to $00 and $01 are the inputs of the player 3/player 4 joypads through the "famicom expansion port" (so since people don't really use these controllers, the values are typically 0). Thus, if we hold down certain button combinations, we can essentially cause the jump routine to go wherever we want (with subtle restrictions ofc). This means that, to some extent, the crash can be fixed by forcing the corrupted address to be correct!
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Thanks! I cut maybe 2500 words from this script during development because it was getting WAY too long (and the video still ended up being super long versus my typical target), but I did think that arbitrary code execution would be a fun topic. I assume using the Famicom expansion port to direct a jump after having "written code" inside the high score table is a possibility. I think some people are already working on attempting something like this.
@Kirby703
@Kirby703 3 ай бұрын
surprisingly, it's barely possible to achieve ACE without the expansion ports! that said, humans with access to this additional hardware could use it to make it easier to rollover the level counter (or maaaaaybe even do ACE without a TAS, but that seems very unlikely at the moment)
@MrCheeze
@MrCheeze 3 ай бұрын
Is there any plan to use controller 3 and 4 for level 255 attempts?
@Kirby703
@Kirby703 2 ай бұрын
@@MrCheeze I think only fractal has the hardware for it, and he's a little bit interested, but afaik not planning on it anytime soon
@jefflavenz7285
@jefflavenz7285 3 ай бұрын
I was thinking it was a coincidence that both Retro Game Mechanics Explained and Displaced Gamers made videos related to Tetris. Guess with the popularity jump that's not the case, lol.
@OrangeShellGaming
@OrangeShellGaming 3 ай бұрын
The $x2 opcodes (except $82, $A2, $C2, $E2) on 6502 do stop the CPU and it gets stuck until a RESET - a write-up called "How MOS 6502 Illegal Opcodes really work" explains why this happens, although it requires you to understand quite a bit about how the 6502 works internally.
@vytah
@vytah 3 ай бұрын
The short version is that the CPU decodes each instruction into smaller operations and the last operation is "load the next instruction". Invalid x2 instructions, when decoded, do not contain that operation, so the CPU never stops executing them.
@Blutzen
@Blutzen 3 ай бұрын
Behind the Code day is always a good day! I love that the NEStris community finally reaching the "true kill screen" has shined more light on the classic game and its fun little quirks. It was very cool getting to see the different ways you and Retro Games Mechanics Explained tackled the same topic, and a very fun coincidence that you both finished your videos so close to each other. I especially appreciated the way you visualized the infinite loop logic.
@antivanti
@antivanti 3 ай бұрын
Illegal opcodes is the bread and butter of C64 demoscene coders =P
@docwhogr
@docwhogr 3 ай бұрын
that's why most of them got arrested at some point.... for executing illegal ... opcodes...
@Alibaba-id4dw
@Alibaba-id4dw 2 ай бұрын
maybe undocumented or unintended opcodes is a better word.
@antivanti
@antivanti 2 ай бұрын
@@Alibaba-id4dw Yeah but that doesn't sound as sexy and exciting. And "Illegal" has an established meaning in computer science context
@Alibaba-id4dw
@Alibaba-id4dw 2 ай бұрын
@@antivanti Hm. Actually I almost never hear "illegal", but I hear "undefined behavior" all the time.
@antivanti
@antivanti 2 ай бұрын
@@Alibaba-id4dw You have "Illegal characters" and "Illegal request" etc. It's a thing.
@questionlp
@questionlp 3 ай бұрын
I think I found my new favorite phrase, "An absolutely amazing cataclysm of unfortunate events." 😅
@ZipplyZane
@ZipplyZane 3 ай бұрын
I recently learned that the NES's CPU is an exact clone of another chip just with part of it cut out to avoid copyright infringement. The part that got cut out? It would do native binary coded decimal, which would let them just add 0x09 + 0x01 = 0x10 directly. So this video suggests that this issue is indirectly caused by the NES using a cheaper clone chip.
@interruptingPreempt
@interruptingPreempt 3 ай бұрын
I love that this brings so much more detail to the recent news event of Willis Gibson beating Tetris. Bravo to him-- he had to progress in the game past a point that the designers didn't prepare for anyone reaching. Thank you so much for this video. It was great to watch! ETA: And yes, I was laughing once I caught on to the impending code disaster.
@AmaroqStarwind
@AmaroqStarwind 2 ай бұрын
I kinda want to see some of these old games with messy code get rebuilt under the hood.
@DisplacedGamers
@DisplacedGamers 2 ай бұрын
I believe some in the ROM hacking community have put together a tuned-up version of Tetris that allows for better calculation of scoring, a proper level/line display, and more.
@whtiequillBj
@whtiequillBj 3 ай бұрын
@5:15, a great video that covers this already is, Bugs & Glitches of High-Level NES Tetris, by Retro Game Mechanics Explained. Though he skims over the code and a more in depth look would be a wonderful addition to Behind the Code Leveled Up. Possibly a collaboration?
@datag
@datag 3 ай бұрын
I always admire your dedication to the small quirks and details in this historic pieces. Well done, again!
@xlrfernando
@xlrfernando 3 ай бұрын
It always make my day watching a new video of the series, thanks!
@briankarcher8338
@briankarcher8338 2 ай бұрын
Your production quality is top notch, as is your way of making extremely complex things simple(r). Great job!
@misterkite
@misterkite 3 ай бұрын
@3:44 interesting fact: storing 0x12 to equal "12" is called BCD (binary coded decimal).. the 6502 actually has built-in support for it.. but the NES doesn't include the full 6502 so they have to do those corrections by hand.
@kri249
@kri249 3 ай бұрын
Initially I've been studying C++ for amateur programming but recently decided to study assembly code, specifically 6502 assembly, to get a better direct understanding of what goes on "under the hood" as it were. Now I'm understanding the code you present in your videos. Even though I could understand the concepts to an abstract degree they're all starting make sense now. These BTC videos really are such a treat, cheers.
@Coburn64
@Coburn64 2 ай бұрын
Awesome video. I'd love to see a continuation of the Tetris stuff - that outro felt like a teaser of what is yet to come!
@DisplacedGamers
@DisplacedGamers 2 ай бұрын
Working on a follow-up right now that uses the tools built in this first episode.
@stevenschiro1838
@stevenschiro1838 3 ай бұрын
You and RGME are so damn good, i watched both videos. Great presentation
@AboveEmAllProduction
@AboveEmAllProduction 2 ай бұрын
What's rgme
@stevenschiro1838
@stevenschiro1838 2 ай бұрын
@@AboveEmAllProduction retro game mechanics explained
@DeadCatX2
@DeadCatX2 3 ай бұрын
Impressive, as always. Though I am familiar with all the topics you cover, it is still a pleasure to watch you cover them
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Thank you!
@ArtemioUrbina
@ArtemioUrbina 3 ай бұрын
Thank you, fascinating and entertaining as always
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Thanks, my friend!
@Omnituens
@Omnituens 3 ай бұрын
Star Trek and Star Wars reference spotted. Very nice. Great video as always!
@ericsbuds
@ericsbuds 2 ай бұрын
thanks for the upload!
@MrRahovart
@MrRahovart 3 ай бұрын
Hello Chris! Subscribed
@adamengelhart5159
@adamengelhart5159 3 ай бұрын
@20:37: wait, you just said the NES only has 2 kB of RAM! "Tacos" has to be a two-terabit asset at least. 😄 Great video! It got me thinking about how people (including me) talk about how software was so much more lightweight in elder days, and while there's an argument to be made there, a lot of the savings was down to using this kind of hack. It works, and on a sufficiently primitive platform it may be the only option, but it'll catch up with you down the road. (See also: Y2K problem, interlaced video, all the character-set disasters . . .)
@lpfan4491
@lpfan4491 3 ай бұрын
"Some would consider crashing a victory" Me as a teen when I delete update data in Hyrule Warriors Legends(Legal behavior on the 3DS system btw) and hunt for odd behavior when putting an updated savefile into 1.0:
@lis6502
@lis6502 3 ай бұрын
17:29 ackchually, it's PHA for PusH Accumulator to the stack, and PLA for PulL Accumulator :) and TXAand TYA are exchanged fotr TAX and TAY, but rest is accurate. Yes, i don't have much friends
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Alright then! Just for that - next video I am going to mix 68k and x86 assembly terminology into the explanation. Ha!
@notexactlysiev
@notexactlysiev 3 ай бұрын
​@@DisplacedGamers horrifying. reminds me of how the no$ emulators use x86 style assembly for every type of cpu architecture
@uriituw
@uriituw 3 ай бұрын
These videos are awesome.
@alexk.4195
@alexk.4195 3 ай бұрын
RGME's and your video have fullfilled my gestalt.
@stephensteele2844
@stephensteele2844 3 ай бұрын
I love knowing way more than I comprehend about things I barely understand thanks!
@ThickCutOhio
@ThickCutOhio 3 ай бұрын
Love this
@Xaymar
@Xaymar 3 ай бұрын
Huh, two separate retro game channels covering the same topic within 24 hours.
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Yep. Tetris is super popular right now.
@Xaymar
@Xaymar 3 ай бұрын
I'm pretty sure there's an error at 16:45, the return code does not do what is described. As shown in the video, the return code is "Push A to Stack", "Transfer X to A", "Push A to Stack", "Transfer Y to A", "Push A to Stack", "Push A to Stack", "Return from Interrupt". The correct instructions here should be PLA, TAY, PLA, TAX, PLA, RTI: "Pull A from Stack", "Transfer A to Y", "Pull A from Stack", "Transfer A to X", "Pull A from Stack", "Return from Interrupt".
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
@@Xaymar Sorry. That is a photoshop error on my part. I wish I could correct it, but it is too late now.
@colio138
@colio138 Ай бұрын
These videos are so interesting and well made! Have you ever considered looking into “Gimmick!”?
@dopy8418
@dopy8418 Ай бұрын
Ok !! Ready for a new video now !!!
@chaosmiles07
@chaosmiles07 3 ай бұрын
18:20 I find it interesting that the earliest signs of trouble are... "music routine", "music logic", "sound routine". Audio glitches.
@mypkamax
@mypkamax 3 ай бұрын
Ever since a 13-year-old player has crashed _Tetris_ (Nintendo R&D1) on NES, the videos on RGME and Displaced Gamers were released about dissecting the game's code and studying the cause of that crash and this really makes _Tetris_ seem like the least competently coded first-party developed NES game.
@lpfan4491
@lpfan4491 3 ай бұрын
The moment when the game's programmers only accounted for 31 levels of 256 possible levelvalues...and only made sure 29 of these actually display the correct levelnumber. And even ducked up behavior beyond that.(That is why levelselects exist btw, so people can test levels that no one at the playtesting can naturally get to)
@crtinkering7323
@crtinkering7323 3 ай бұрын
Displaced Gamers in the HOuse!!🔥🔥🔥
@snowgoer540
@snowgoer540 3 ай бұрын
I’ve been playing Tetris lately!
@MattHughson
@MattHughson 3 ай бұрын
"BOOM... the number 10 is born..." 😂
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Heh
@dialest
@dialest 2 ай бұрын
Thank you for your work! This is a much better explanation of this phenomenon than I had seen other places. The one thing I don't understand, though, is why does scoring a double at that point require so much less processing time than adding the score for a single?
@DisplacedGamers
@DisplacedGamers 2 ай бұрын
All scoring above a single (a double, triple, or Tetris) does not have a value in the tens place. Because of this, the logic for converting the tens place from hexadecimal to decimal never needs to execute. This saves cycles and shortens scoring time.
@moth.monster
@moth.monster 3 ай бұрын
I'd like to thank you for adding properly formatted subtitles. Just want you to know that people notice!
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
Always appreciate words of affirmation for this.
@jonah1976
@jonah1976 3 ай бұрын
Love this channel! Hope you can touch on some Z80 stuff one day with a few Sega Master System games.
@vuurniacsquarewave5091
@vuurniacsquarewave5091 3 ай бұрын
My philosophy has always been to provide internal variables to all "threads" of an NES program, so Main, NMI and IRQ all have locations they can use to talk to each other but other than that NMI and IRQ have their own internal variables including this "temporary workbench" / "register extension" area of zero page so that no such clobbering can occur as in the video. Also it might be helpful if you are trying to make your interrupt handlers faster to not use the stack and just save the A, X, Y registers to designated per-interrupt zero page locations instead that do nothing else but store your registers during the interrupt. It is a few cycles faster than using the stack.
@Ails1234
@Ails1234 3 ай бұрын
Looks like we got an Antz/Bug's Life situation in our hands xD
@wiirambo7437
@wiirambo7437 2 ай бұрын
@DisplacedGamers 1. Great Video 2. What did you modify to play the game with an AI script? It does movements which are impossible on the unmodded ROM.
@DisplacedGamers
@DisplacedGamers Ай бұрын
I used an earlier version of the meatfighter script. There is a later script that uses moves that are more realistic. I thought about moving to the revision at one point, but it would have required additional work to make it compatible with Mesen - the emulator that I use.
@ejmc6378
@ejmc6378 3 ай бұрын
I am totally here for Absolutely Amazing Cataclysms of Unfortunate Events.
@michaelturner2806
@michaelturner2806 3 ай бұрын
Two cakes!
@TakuikaNinja
@TakuikaNinja 2 ай бұрын
A better approach to managing the score would have been to use base 100 encoding, where bytes are confined between 0~99 ($00~$63) when doing arithmetic. Then, a 100-byte lookup table can be used to do the BCD conversion. From what I looked at in the disassembly for Tetris, there are more than enough bytes in RAM to keep track of an internal score and a displayed score up to 999999 (even for 2 players). I may try implementing this along with other bugfixes for this game.
@commentidelloziopera
@commentidelloziopera 3 ай бұрын
13:03 you might say, unforeseen consequences...
@SomeGuy712x
@SomeGuy712x 2 ай бұрын
I'm guessing this is also why Dr. Mario can do weird things and/or crash completely if you perform a very large combo that clears a lot of viruses. The game probably ends up taking too long to add up all of the points that the player scores, and then the code gets interrupted at a critical point.
@possible-realities
@possible-realities 3 ай бұрын
21:41 How did the 6502 get past all the brk instructions to get to ISC?
@WhoIsRyanFox
@WhoIsRyanFox 3 ай бұрын
Does the 6502 processor have native taco handling instructions?
@GiuseppeGaetanoSabatelli
@GiuseppeGaetanoSabatelli 2 ай бұрын
Headlines: "A 13-year-old is the first human to *_officially_* 'beat' Tetris, by crashing it." Displaced Gamers: "It's possible to roll over to level 0."
@pcachu
@pcachu 3 ай бұрын
I also crash violently when someone foolishly attempts to execute the contents of my taco storage.
@nintendoloverin9567
@nintendoloverin9567 3 ай бұрын
13:04 That's my desktop wallpaper now.
@technomicah
@technomicah 3 ай бұрын
I love it when Tetris stores tacos in RAM 🌮
@Jupiter_Rsabbit
@Jupiter_Rsabbit 3 ай бұрын
OMG MASS WERK I REMEMBER PLAYING THEIR HTML GAMES ON MY 3DS WHEN I WAS YOUNGER OMG LOL
@catholiccontriversy
@catholiccontriversy 3 ай бұрын
Ok, I'm happy to see Displaced Gamer talking about this, but I'm still waiting for Thor "I'm the NWC and the first person to document getting past level 29" to comment on where competitive tetris is now.
@brandonkellner2920
@brandonkellner2920 3 ай бұрын
You're describing packed decimal in the beginning, which is funny because the 6502 normally supports it natively, but the NES disabled those instructions. edit: might be technically called binary coded decimal. When I was an assembly programmer, we just called it packed decimal, but there's apparently something else called densely packed decimal which is different. 2nd edit: IBM calls it packed decimal
@sillymel
@sillymel 3 ай бұрын
(3:11) I believe you're missing an "INC Score_Mid_Byte_54" instruction at the bottom of the left column here.
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
I'm sorry. Sadly, it isn't the only Photoshop error in this video.
@kargaroc386
@kargaroc386 3 ай бұрын
speedrunners: "what's a race condition?"
@johneygd
@johneygd 3 ай бұрын
I was actually also expecting some moddification of the code to prevent certain crash,but maybe next time😁
@vaendryl
@vaendryl 3 ай бұрын
Wooooaaahhh dejavu!
@aaronamaphone5865
@aaronamaphone5865 3 ай бұрын
Tacos!
@intel386DX
@intel386DX 2 ай бұрын
what about the 2 other Tetras versions ? Are they programed that poorly like this one ?
@k-berry8771
@k-berry8771 3 ай бұрын
0:28 is this the setup for a Kool Aid ad?
@DisplacedGamers
@DisplacedGamers 3 ай бұрын
It sure is! I only thought about Kool-Aid Man as art for that screen a bit too late.
@Patashu
@Patashu 3 ай бұрын
Tetris fans eating good tonight
@OptimusNiaa
@OptimusNiaa 2 ай бұрын
15:55: Nice reference, you made. Yes. Hm.
@DisplacedGamers
@DisplacedGamers 2 ай бұрын
I think you are the first person that got this. Restored, my faith is.
@whamer100
@whamer100 Ай бұрын
Rewatching this video, I really wonder why the developers didn't just like store a lookup table to make the multiplication process faster lol
@IpfxTwin
@IpfxTwin 3 ай бұрын
The NES never ceases to amaze me. Sure modern computers are orders of magnitude more complex and powerful to the point where wasteful poor programming can still be executed reasonably fast, but the NES for what it was had some neat tricks and a generation of programmers who were on a whole different level.
@scotchnichols
@scotchnichols 3 ай бұрын
3:26 Yay!
@SidewaysCytlan
@SidewaysCytlan 3 ай бұрын
And to think, all of this could've been avoided if they just spent 18 more cycles (or less, if they set a flag somewhere) at the beginning of the scoring loop to check if it was maxed out
@whtiequillBj
@whtiequillBj 3 ай бұрын
how would the NES change if it used a Harvard architecture vs a von Neumann architecture? and could and emulator be made to fake a Harvard architecture for the 6507?
@OvercookedOctopusFeet
@OvercookedOctopusFeet 3 ай бұрын
Tacos etc.
@akapype
@akapype 3 ай бұрын
Am I the first to realize that they just had to add score[lines] with base_score[lines] when changing level and they'd have the right score to apply without having to emulate multiplication with multiple adds when some line is cleared ?
@youBrakeIHonk
@youBrakeIHonk 2 ай бұрын
Can you please stop a video on why double dragon 3 won't execute the spin kick so often??
@flashbacks7892
@flashbacks7892 2 ай бұрын
Explains why, about that supposed kid broke the world record by crash.
@DragonslayerProd
@DragonslayerProd 2 ай бұрын
Tacos
@mwk1
@mwk1 3 ай бұрын
Szanuję jak poyebany! 😎🍻
@3rdalbum
@3rdalbum 3 ай бұрын
I'm halfway through and you didn't mention WHY the Tetris developers didn't think anyone would get to a high enough level for this to be a problem. Simply put, the game speeds up so much after 20-something levels that regular play is impossible. Using normal controller posture you can't push the d-pad rapidly enough to move a piece over to the side wall before it lands, so you'll never be able to progress any further in the game and you'll quickly get Game Over. High-level Tetris players eventually figured out a technique called Hypertapping, and another one called Rolling, that allows extremely rapid button pushes to overcome this barrier. The Tetris developers couldn't have foreseen how long it would become possible to play Tetris, so it's frankly amazing that the game doesn't crash until 100 levels *past* their theorised maximum level.
@WelshProgrammer
@WelshProgrammer 3 ай бұрын
I too like to store my tacos in RAM
@user-ow2im7os8k
@user-ow2im7os8k 3 ай бұрын
Time to make some tacos
@pablor2658
@pablor2658 3 ай бұрын
So well programed, better resets to 0 instead of breaks the game.
@movax20h
@movax20h 3 ай бұрын
Same story on same topic in two days. Nice.
@minirop
@minirop 3 ай бұрын
who put tacos in my NES ram? bring me to your manager!!
@Vansbaseball
@Vansbaseball 3 ай бұрын
Nintendo: No one will ever get past level 29 so our work here is done Pro Tetris players: Bruh we can get into the 150s and up what are you talking about?1 Fun fact: Because of the fact that tournament matches were taking a long time to finish (due to a technique called "Rolling") the organizers of the CTWC (Classic Tetris World Championship) implemented something into the game so that the Tournament carts would speed up again at level 39 because otherwise the games would just go...and go...and go. Originally the idea of a "Line Cap" was brought up but the speed mod is what they settled on It's definitely gonna be interesting to see what part of Tetris gets covered next because while I know about WHAT happens with some of the things that will eventually get covered its the actual HOW in the rom that actually fascinates me more so I'll be ready and waiting for the next one of these
@creepercraftytT99
@creepercraftytT99 3 ай бұрын
the player crashes: the game won the game crashes: the player won
@anon_y_mousse
@anon_y_mousse 2 ай бұрын
Whoever told me that I could hide my subs really destroyed my free time. I watch more from my subs feed than the recommendation panel, but with nearly 600 subs now, I'm always behind. Oh well, I am still working on my two biggest projects, but it may be a while yet before I release either.
@SeeThatHuman
@SeeThatHuman 3 ай бұрын
Nice
@thecunninlynguist
@thecunninlynguist 3 ай бұрын
nice, just watched a similar vid yesterday...been curious about this ever since that kid "beat" the game....always thought the NES verison = Famicom version, interesting to see that isn't the case...so we essentially had 3 versions of the game
@gizaha
@gizaha 2 ай бұрын
17:01 typo in pulls, you wrote pushes instead.
@DarkMoe
@DarkMoe 3 ай бұрын
Hope you can cover one of these days, how the Last Ninja on C64 manages to load the screens with that incredible effect. Great research as always
@arciks11
@arciks11 3 ай бұрын
So while it would be irrelevant for most normal tetris players... Is it possible to optimize/rework the scoring code to consume less resources?
@Sixfortyfive
@Sixfortyfive 3 ай бұрын
Just off the top of my head, it should be possible to put a check for a 999999 maxout before any other scoring logic happens, then instruct the CPU to just skip the whole loop if that's the case. The CPU then never has to stress itself with recalculating anything for the remainder of the game. If you wanted to do a more proper fix, you'd probably have to hard code the game so that the level and score multipliers never advance beyond level 29, among other things.
@lpfan4491
@lpfan4491 3 ай бұрын
@@Sixfortyfive Skipping at max out is a completely reasonable skipcondition and I don't see how it is less of a "proper fix" than just assuming a certain level. I also think the skip should exist in addition to a redesign and possible safeguards, since even tho I don't actually know coding, I cannot imagine the singular additional instruction checked for makes the game much worse performing on average.
@arciks11
@arciks11 3 ай бұрын
@@lpfan4491 I think Tetris players rely on game internally continuing to track their score in their custom cartridges or score keeping programs...
@lpfan4491
@lpfan4491 3 ай бұрын
@@arciks11 A game shouldn't really need to accomedate for stuff like that. Fact is that it most likely saves some sort of CPU cost when in effect for very little actual cost. Besides, one could argue that one could just reimplement the score function *into the external program* by pulling all the relevant values from Ram and then doing the math itself.
@Sixfortyfive
@Sixfortyfive 3 ай бұрын
@@lpfan4491 A proper fix would also increase the score cap beyond 1 million, as high-level players would care about that.
@trevise684
@trevise684 3 ай бұрын
oi oi oi now hold just a sec i just saw this same video by retro game mechanics what the hell
@TheSektorz
@TheSektorz 3 ай бұрын
what a massive coincidence
The Garbage Sprites in Strider (NES) - Behind the Code
15:00
Displaced Gamers
Рет қаралды 75 М.
Reprogramming Mega Man 4's Charged Shot - Behind the Code
19:37
Displaced Gamers
Рет қаралды 74 М.
Они убрались очень быстро!
00:40
Аришнев
Рет қаралды 1,3 МЛН
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 26 МЛН
Каха инструкция по шашлыку
01:00
К-Media
Рет қаралды 4,9 МЛН
The Arcade Game that Crashes Itself for Anti-Piracy Reasons
29:57
Retro Game Mechanics Explained
Рет қаралды 333 М.
What a Perfect Game of Tetris Looks Like
7:31
okCobalt
Рет қаралды 245 М.
How NES Games Are STILL Made in 40KB
14:33
Inkbox
Рет қаралды 94 М.
Arbitrary Code Execution in Animal Crossing
24:22
Hunter R.
Рет қаралды 234 М.
Doom didn't kill the Amiga...Wolfenstein 3D did
16:58
Modern Vintage Gamer
Рет қаралды 556 М.
The Absurd History of Level 8-2
34:44
Kosmic
Рет қаралды 403 М.
Reprogramming Dr. Jekyll and Mr. Hyde (NES) - Behind the Code
18:52
Displaced Gamers
Рет қаралды 70 М.
NES Sound: The DMC - Behind the Code
33:48
Displaced Gamers
Рет қаралды 124 М.
The Complex Code of Mega Man 2 and How Zipping Works - Behind the Code
16:15
Lp. Последняя Реальность #83 ПОСЛЕДНИЙ ВЗДОХ • Майнкрафт
33:01
MrLololoshka (Роман Фильченков)
Рет қаралды 1 МЛН