How to Reprogram Tetris By Playing It - Behind the Code Leveled Up

  Рет қаралды 52,575

Displaced Gamers

Displaced Gamers

Күн бұрын

Let's exploit the logic that crashes Tetris and write code by using the High Score Tables! All you need are a few extra controllers...
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
0:00 Here, hold my tacos and watch this.
1:38 The Crash Theory Spreadsheet of Awesomeness
4:26 Our Target
7:14 Controllers, ports, and code explained
9:52 Has anyone seen D1 on the Controller Port?
10:43 240p Test Suite Cameo!
11:12 Two controllers for Each Player, huh?
12:08 Previously on "Behind the Code..."
12:35 We need to know what Temp_0 and Temp1 are
13:37 Original, Orange, and Yellow Interrupt Scenarios
17:54 Built my own controller. With switches.
19:27 What part of the High Score Table(s) will we use?
20:38 The Setup Work for Redirection
21:58 Opcodes explained
24:06 Programmin' Time!
29:25 Testing on the Emulator
30:43 Testing on Real Hardware
31:33 Outro
#NES #Programming #Tetris

Пікірлер: 199
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
This one took a very long time to produce, and I am super happy with it. I hope you enjoyed it. If you know someone that you think would like it, please share it with them. I'd really appreciate it!
@joebeezy9471
@joebeezy9471 14 күн бұрын
This video was wild! That controller you made…I was not expecting that lol. Probably the best breakdown of how ACE actually works on YT.
@snowgoer540
@snowgoer540 14 күн бұрын
This is fantastic! I would also love to see how you would fix these bugs programmatically (and other game issues you find in future/past series). It would be neat to see what the patch looks like to prevent all of the glitching that was never intended.
@Darxide23
@Darxide23 14 күн бұрын
This is easily my favorite episode of Behind the Code.
@ethanfranzen8684
@ethanfranzen8684 13 күн бұрын
I think of holding left and right at the same time as a small form of hacking. This is why I prefer the yellow crash. Actually, there is also the reason that safeguarding against the orange crash uses another controller. It would be preferable to avoid this as much as possible, while maintaining the ability to achieve ACE.
@ethanfranzen8684
@ethanfranzen8684 13 күн бұрын
Yeah, this is amazing!
@B3Band
@B3Band 14 күн бұрын
24 hours until a pro Tetris player pulls this off on stream
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
I would love to see it!
@tolstoj_
@tolstoj_ 14 күн бұрын
Well, Fractal has been mentionioning the use of the Famicom ports a while back on stream. I don't know if anyone else of the crashers or crash-candidates has access to a Famicom and the required hardware. I would love to see it, though.
@Dinnye01
@Dinnye01 14 күн бұрын
It's a legit chance!​@@DisplacedGamers
@moth.monster
@moth.monster 13 күн бұрын
!remindme 12 hours
@Dwedit
@Dwedit 13 күн бұрын
SethBling was famous for pulling off Arbitrary Code execution in Super Mario World, so it's not out of the question. He managed to get a SNES port of Flappy Bird injected into console RAM and start the game.
@ejmc6378
@ejmc6378 12 күн бұрын
"I built my own controller. With switches. Because... computer science." - Displaced Gamers, 2024
@minirop
@minirop 14 күн бұрын
- Stop playing your silly video games - But mum, I doing my programming classes.
@hydrantdude504
@hydrantdude504 14 күн бұрын
Wow, incredible video! Very cool to see someone else independently engineer an ACE setup, with a different idea - I never thought of resetting the score to prevent the crash. Inside the community, we've made our own setups; to prevent the crash, you can block blue and green crashes by just holding P3/P4 such that the code just goes where it was supposed to anyway, no ACE involved. Blue/green are the highest priority to fix because they're the ones that come into play at 255 for placing pieces- nobody's been able to play with flashing the nextbox to dodge it. For general purpose, we have a fully-built bootstrapper in the highscore table, but to get to it, we allowed the PC to jump to the beginning of ram and used the next piece plus the current rng value to have it jump to the names and such. Building code around the name/score limitations is a fascinating challenge; we used a couple invalid opcodes to get around it. A constraint you didn't touch on is that the scores have to be in order; your code fit neatly into single scores, but for us that was a big roadblock, as we used all 6 names, highscores, and levels. The code we write is used to build another bootstrapper which builds another bootstrapper that grants full control over all of RAM. The TAS has kinda just been sitting around for 2 years because none of us know what to do with total control over the game lol.
@Kirby703
@Kirby703 14 күн бұрын
as proud as I am of total control without the famicom expansion port (or L+R, iirc?), it's super cool to have any custom code execution in nestris see the light of day, and this strategy is really neat. it's got me thinking again about what's human viable to execute. like, what if we could use P3+P4+something like this to copy P2's inputs somewhere, increment that address, and safely return? it's back to the opcode drawing board to see if you can cram that into the high score table! it's really nice to have a problem be so constrained but not intractable.
@Fritzafella
@Fritzafella 14 күн бұрын
Damn, so y'all can basically do the equivaoent of Ocarina of Time's Triforce% run in Tetris now.
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
Awesome. I knew that this was an endeavor in the Tetris community, but I didn't research anything that the community had done yet so I would use my own approach. That was one of the reasons why I asked people to pause the video and come up with their own ideas. There are so many possibilities! The one I included here was maybe the 8th version I did. I wanted to try and maximize impact but minimize complexity since I had to explain it in a video.
@MrCheeze
@MrCheeze 14 күн бұрын
Suppose someone actually used ACE in this way to achieve a tetris record (e.g. using this crash prevention to reach level 256). Would it be considered to count? (I assume it wouldn't, since they could have just used ACE to skip to level 255 instead).
@electra_
@electra_ 13 күн бұрын
@@Kirby703 In my comment on this vid I mapped out a total control exploit that fits into the high score table, using p3 and p4 controllers to write anywhere in memory. I think the memory writing is human viable to execute as long as you just follow a careful sequence of steps to write everything, it's not time-dependent or anything. Though it does require very specific scores in the 200ks. don't actually know if it works for sure since i haven't tested it, i just paused the vid as instructed and solved it myself, and i just kind of assumed what we were going for was total control because... that's what ACE is for lmao
@policychanges
@policychanges 14 күн бұрын
I've done a lot of tetris modding and it still amazes me how people have broken this game down to its molecules.
@PETTAERRA
@PETTAERRA 13 күн бұрын
Or Neutrinos, just like Tetrominos
@KIFulgore
@KIFulgore 14 күн бұрын
The precision here is insane, awesome work. I miss working with simple hardware without dozens of abstraction layers over the metal.
@matthewbmilton
@matthewbmilton 14 күн бұрын
Next steps: "I didn't like Tetris, so I reprogrammed it to run Doom."
@mischiefthedegenerateratto7464
@mischiefthedegenerateratto7464 9 күн бұрын
"I didn't like doom in Tetris so I programmed it back into Tetris again"
@fractal161
@fractal161 14 күн бұрын
Brilliant video. Love how you reasoned about the ACE setup. It was totally different from anything we came up with and your explained your thought process brilliantly. You've inspired me to attempt unmodified human ACE sometime in the future... if so, my current idea is to enable the 2-player mode. It's tough to program more intricate things using our current knowledge, but maybe in the future we will overcome this obstacle as well.
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
Look forward to your results!
@wiirambo7437
@wiirambo7437 5 күн бұрын
Or play the B-Type ending if you "crash" the game; as some sort of celebration because you "beat" the game
@TakuikaNinja
@TakuikaNinja 14 күн бұрын
FYI, this is is exactly how ACE TASes are engineered. It's really cool to see the code injection process and its limitations explained in this manner.
@chaosahoyhoy
@chaosahoyhoy 14 күн бұрын
Did... did you just patch a calculation that crashed the game due to taking too long by gaslighting the program into thinking it was actually a way smaller number mid-cycle? Amazing.
@softpaw6234
@softpaw6234 9 күн бұрын
"Gaslighting the program" is the most hilarious description of ACE I've heard
@magikman79
@magikman79 14 күн бұрын
He blinded me! With... computer science...
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
Ha!
@Chad_Thundercock
@Chad_Thundercock 13 күн бұрын
It really is poetry in motion.
@kri249
@kri249 14 күн бұрын
As a kid I always thought Tetris was such a boring game. As an adult you found a way to change that. Great video mate.
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
Thanks!
@raafmaat
@raafmaat 13 күн бұрын
as a kid i often saw my mom reach the rocket ship cutscenes in tetris! i could never reproduce it! later i was even convinced i must have dreamt those rocketship cutscenes! so yeah even though i did not really enjoy the game much as a kid, i do have very fond memories of it :)
@InsaneFirebat
@InsaneFirebat 11 күн бұрын
@@raafmaat Can relate. My mom always whooped me at Tetris.
@raafmaat
@raafmaat 10 күн бұрын
@@InsaneFirebat ugh, why are moms so good at tetris??? she was always borrowing our gameboys and then like an hour later she would call us down to come check out the rocket cutscenes xD
@MoustiluigiRandom
@MoustiluigiRandom 13 күн бұрын
Amazing how you can explain such complex topics in a graphically coherent and understandable way
@Sixfortyfive
@Sixfortyfive 14 күн бұрын
How timely. Turns out that tacos are up today in my meal kit box.
@WammyGiveaway
@WammyGiveaway 14 күн бұрын
Coding via high score table is something brand new. You want to know what else does high scores? Arcade games. I would love to see if there are any coin-op arcade games that can be "reprogrammed" via manipulating the high score tables a la Tetris. This is a very great find, Chris.
@aezlack7254
@aezlack7254 14 күн бұрын
The custom controller got me. Amazing video as always, man
@ProximitySound
@ProximitySound 10 күн бұрын
"Honey, have you seen my large plastic storage container?"
@DisplacedGamers
@DisplacedGamers 10 күн бұрын
"Errr.... no I haven't, dear!"
@electra_
@electra_ 13 күн бұрын
23:25 Okay I tried to solve this. I have a solution, not 100% sure if it would work but I think it would. The general idea is that you put yourself in a loop where now you are using controller inputs to write arbitrary data to arbitrary memory locations. By doing this, you can write a much larger payload without restriction*, and then overwrite the end of the loop in order to jump there. The controller input scheme will work by checking whether the high byte ($01) is positive or negative. If positive, then we are in "data" mode, and the low byte $00 will be stored as the next byte to write. If negative, then we are in "address" mode, and the stored value will be written. You'll set up your controllers, probably with toggleable switches as was shown earlier. Start by flipping bit 7 of $01 to be on to be in data mode, and set $00 to be whatever you want. Now, flip bit 7 back off. The one thing you have to be careful of here is that you'll start writing that value to whatever you have your controllers set to. I think this is probably fine, as the code only exists in a tiny portion of memory and so you can just set $01 to some memory region far away from anything you're currently updating, set $00 to be what you want, then change $01 to be in the memory region you're looking to edit. * Unfortunately, due to the allowed jump instructions, there is a restriction that we must only use positive data values. But given that we can access a much larger portion of memory with this, this is overall a much less restrictive setup than the initial one. If needed, we could create a very similar piece of code in that area which did the same thing but without this restriction. There's also probably a way to avoid it - I would only need to save two bytes to do so, due to two PLA instructions being required to remove stuff on the stack. And also, if stack overflow wasn't a concern (It might just wrap around instead of crashing, I'm not sure) then all you need to do is replace 720-722 with a JSR instead of a BPL. Here's the code: NAMES 706: PLP // Previously, we had to jump into this as a subroutine to allow a jump backwards. 707: PLP // This pops the two pushed bytes off so we don't cause a stack overflow. 708: AND zpg // Clear the A register. 709: $ZZ // This can be any spot on the zero page that has a 0 at the time, I will just assume some such location exists. 70A: ORA zpg // Load $01 into the A register to check the sign bit. 70B: $00 70C: BPL rel // Branch to positive or negative locations. 70D: +21 // $723 70E: AND zpg // Continuing if negative (data mode), clear the A register again. 70F: $ZZ 710: BPL rel // Jump past the zeroed out parts. This always triggers since we just wrote 0 which is positive. 711: +12 // $71E 712-71D: A-type Name 4 (zeroed) and B-type Name 1 (containing $27 $07) 71E: ORA zpg // Continuing the negative path (data mode), load the data. 71F: $00 720: BPL rel // Jump to the score section. Of note: Because this must be a BPL instruction, all data must be positive. 721: +18 // $734 722: * // Unused. 723: AND zpg // Continuing if positive (address mode), clear the A register again. 724: $ZZ 725: BPL zpg // Jump to the score section. This always triggers since we just wrote 0 which is positive. 726: +9 // $730 727: JSR abs // Jump to the start of the loop. This uses JSR to go back, since we don't have access to small neg offsets. 728: $06 729: $07 72A-72F: B-type Name 4 (zeroed) 730: ORA zpg // Load the saved data. 731: $02 732: STA ind,Y // Store the data at the address specified by the controller inputs. Note that Y is added... we'll likely need to know what this is to play around it, but this should be fine. 733: $00 734: STA zpg // Store the data. This is executed on both address and data mode, since in address mode we just loaded the data so saving it back is fine. 735: $02 736: JSR // Jump back to the start of the loop. This uses JSR to go back, since we don't have access to small neg offsets. 737: $06 738: $07 Okay with that done I'll finish watching the video. I'm sure there's a better solution than this, you'd just need to save a few bytes to improve things and remove some restrictions, but at the very least I *think* it should work. Was a fun puzzle to figure out. I think the biggest challenge was there were effectively no ways to interact with X and Y, so I couldn't really find a method to use these at all. And of course, there are only limited means of branching.
@electra_
@electra_ 13 күн бұрын
Realizing now... this won't work because the scores need to go from highest to lowest. Will see if I can find a fix.
@electra_
@electra_ 13 күн бұрын
Here's the new version. I fixed the scores going from highest to lowest, and also made it so that it takes in any bytes, not just positive ones. I did this by using PLP right before the branch rather than at the start - this will load a low value into the status flags, clearing the negative bit and guaranteeing the branch is successful. This uses A-Type name 1, but since you already need all 3 scores this is not a problem. Assembly 700:AND $00 ; Start of loop ORA $01 ; Load controller 4 to A register BPL ~71E ; Branch based on value being negative or positive 706:AND $00 ; Negative path (data mode) ORA $00 ; Load controller 3 to A register PLP ; Get low byte of return addr off the stack BPL ~731 ; Always branches since PLP sets negative flag to 0 71E:AND $00 ; Positive path (address mode) ORA $02 ; Load stored value to A register PLP ; Get low byte of return addr off the stack BPL ~733 ; Always branches since PLP sets negative flag to 0 727:JSR $700 ; Jump to the start of loop 731:STA ($00),Y ; Only in address mode, store the saved value to the address 733:PLP ; Get high byte of return addr off the stack STA $02 ; Store the saved value JSR $700 ; Jump back to the start of the loop Hex dump A TYPE NAMES 700: 29 00 05 01 10 18 29 00 05 00 28 10 26 -- -- -- -- -- 00 00 00 00 00 00 B TYPE NAMES 718: -- 27 07 -- -- -- 29 00 05 02 28 10 0C -- -- 20 00 07 00 00 00 00 00 00 SCORES 730: -- 91 00 28 85 02 20 00 07 00 00 00 -- -- -- -- -- -- -- -- -- 00 00 00
@Snatcher_Catcher
@Snatcher_Catcher 4 күн бұрын
Wow bro, I wish I had coding skills like you guys. I've tried, but can't seem to grasp it fully.
@ragzard
@ragzard 14 күн бұрын
I´m not a programmer, therefore have a hard time getting some concepts fast enough, but oh good gods I love your videos. It´s EXTREMELLY fascinating to me and I have a lot of fun trying to understand.
@bkbyler
@bkbyler 7 күн бұрын
If you keep watching these types of videos (and especially if you enjoy them!), you're not far off from becoming a programmer. 😉
@theveninrdm6238
@theveninrdm6238 14 күн бұрын
Always a great day when DG posts a new video. I appreciate all of your work putting these explanations together. Thanks!
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
Thank you!
@Operational117
@Operational117 12 күн бұрын
I decided to patch the ROM by changing the scratch memory used by the Dynamic Jump routine to a pair not used too much by the game. Wasn't hard at all... the two zero-page RAM locations, $02 and $03, next to $00 and $01 clearly looked like they weren't being used, so I incremented these system bus values by two: AC87, AC8A, AC8C, AC90, AC92, AC94, AC96 A direct ROM patch would change these locations instead: 2C97, 2C9A, 2C9C, 2CA0, 2CA2, 2CA4, 2CA6 (headered ROM; the header is 16 bytes long, so the hex offset is 0x10) 2C87, 2C8A, 2C8C, 2C90, 2C92, 2C94, 2C96 (headerless ROM; no header, no hex offset) The reason for this massive location discrepancy is because the PRG ROM (which is located before the CHR ROM) is mapped with a hex offset of 0x8000 in system bus. Tetris uses the MMC1, but doesn't have more than 32KB of PRG ROM so all of it is mapped at once with no bank switching. The Game Genie Codes to patch the Dynamic Jump routine (there are unfortunately seven, so they can't be used on a physical Game Genie): ZEEZNGAA LEEXXGPA ZEEXKGAA ZEOZEGAA LEOZXGPA ZEOZKGAA ZEOZVGAA I managed to find a proper "Fastest Crash%" TAS (tried to get StackRabbit to work, but failed) and verified that: 1. The TAS indeed crashes Tetris. 2. The patch successfully prevents* the crash. 3. The patched ROM plays identically to the original version (RNG is identical; the exact same tetriminos dropped in the exact same order during the TAS between the original and the patched versions). 4. The Game Genie codes also successfully prevent* the crash. The TAS in question: tasvideos.org/8254S (it was rejected due to poor optimization, but good enough for my needs). To be honest, the solution to this crash looks so simple that there is NO WAY that no one has thought of it! Surely there's a patch out there that does this, it's only seven ROM values!! * The patch prevented the first possible crash. Due to not being able to get StackRabbit to work properly, I am only able to verify as far as the TAS is capable of. EDIT: Added an asterisk-disclaimer. EDIT2: Expanded bulletpoint 3 to reduce confusion.
@IncredibleMD
@IncredibleMD 14 күн бұрын
And I thought it was impressive when I saw some dude modify Mario's model in Super Mario 64 in a hex editor. Forget 3d modelling in hex, programming 6502 assembly in tetris is something else.
@ITR
@ITR 9 күн бұрын
You should look up all the stuff that's been done in Super Mario World, it's pretty epic!
@Marionette_Doll
@Marionette_Doll 13 күн бұрын
This was absolutely fascinating! It's impressive to see what a bit of poking and ingenuity can do with some of these old games.
@magicman1995
@magicman1995 14 күн бұрын
Loving these recent deep dives! Very interesting to understand these edge cases and their effects. And now, taking it a step further and exploiting them too. It really scratches that low-level itch.
@eilonlipton9640
@eilonlipton9640 14 күн бұрын
Fantastically cool that you thought to pull this off, and then actually pulled it off! I also just joined your Patreon because this is just too cool!
@null_state
@null_state 12 күн бұрын
I've been following your channel for many years now, alongside competitive classic tetris. I get a big grin when the two merge together. Anyway, your videos are spectacular. Thanks as always.
@breakpack
@breakpack 9 күн бұрын
Half of this video went straight over my head, but I trust you enough to know this is cool stuff!!
@ethanfranzen8684
@ethanfranzen8684 13 күн бұрын
The real challenge is to make the code corrupt some parts of memory and do this crash save multiple times to mangle memory somewhere into code that does this more efficiently and then do a different setup to jump there. That, or just crash the game, change the scores in some normal, low-level gameplay so that it fixes the stack, maybe does some extra stuff, and then jumps to that RAM you corrupted. Then, use crash saves to corrupt even more RAM into code that allows you to completely hijack the game, like a hex editor. Doing ACE in NES Tetris is an extreme challenge to see if a TAS could be made to do it with as few add-ons as required. This is what I would love to see!
@iankeith
@iankeith 14 күн бұрын
I had to pause the video just to point out that the song playing around 8:30-some I only know because of Synth Riders, and it is an awwwwwesome song. Also, hooray more Tetris stuff!
@jameslangridge8849
@jameslangridge8849 14 күн бұрын
I knew i recognised it but couldn't place it until you said this, its galaxy joyride by wolf and raven. 🤘
@iankeith
@iankeith 14 күн бұрын
@@jameslangridge8849 And it's such a fun song, both to play and listen to!
@kyoobqa
@kyoobqa 13 күн бұрын
Top-tier nerding, top-tier presentation, top-tier voice, top-tier content all around. Not that I understand much (well, anything, really) about assembly, but you always make it so interesting! I'm always fascinated by deep dives into the intricacies of old tech. I hope you blow up someday. 🙏
@whamer100
@whamer100 11 күн бұрын
these leveled up videos are quickly becoming my favorite kind of tech videos now, absolutely great video!
@hugovangalen
@hugovangalen 12 күн бұрын
I loved watching this and I appreciate all the research you must have done to accomplish this. Thank you for yet another interesting deep dive into a classic game!
@alexthach276
@alexthach276 13 күн бұрын
Wonderful informative guiding video! What seems to be a simple game is actually branched out with a lot of input of coding!
@sskar9390
@sskar9390 11 күн бұрын
The legend himself
@greatfox99
@greatfox99 14 күн бұрын
This is amazing. I love your videos. The explanations are very easy to follow! Thank you for taking the time to make this wonderful content!
@sirflimflam
@sirflimflam 14 күн бұрын
Incredible. I love you videos, man.
@jessebillson
@jessebillson 13 күн бұрын
This is the best DG video by far. Very impressive! Lots of fun, even though I didn't understand much. Thanks for making this
@ArtemioUrbina
@ArtemioUrbina 14 күн бұрын
Awesome stuff as always, loved it running on real hw and the cameo. Take care my friend
@alexander_mejia
@alexander_mejia 13 күн бұрын
Cannot get enough of these videos. Great job!
@jansenart0
@jansenart0 14 күн бұрын
This is insane and amazing.
@Coburn64
@Coburn64 12 күн бұрын
Excellent video. Clear explanations and after watching RGMEX's video on why Tetris crashes, it perfectly complements it. Keep up the great video work, I really enjoy the videos on the technical aspect with splashes of humor into the mix while keeping it easy to understand. 😄
@__august__
@__august__ 8 күн бұрын
the seven-minute cold open goes crazy
@BrunoValads
@BrunoValads 13 күн бұрын
Absolutely amazing video! I hope it inspires others to tackle Tetris ACE so we can see more applications and fun projects
@taltal1122
@taltal1122 14 күн бұрын
This very much reminds me of the final fantasy credits skip using the player names, although I would say, this is much more interesting.
@briankarcher8338
@briankarcher8338 13 күн бұрын
Wow. Now THIS is dedication. Great video!
@AndrewDasilvaPLT
@AndrewDasilvaPLT 14 күн бұрын
Thank you for your work.
@Sonicgott
@Sonicgott 13 күн бұрын
I love this channel so much. ❤
@MrMegaManFan
@MrMegaManFan 13 күн бұрын
This really is taking ACE to the next level. Well done!
@VinsCool
@VinsCool 14 күн бұрын
I love this deep analysis, it takes a lot of creativity to do this kind of stuff!
@hallrules
@hallrules 14 күн бұрын
bro is a furry
@GregStrike
@GregStrike 7 күн бұрын
Hey! So I haven't watched the full video yet but will finish it this weekend. This looks really well presented man! I was thinking I'd try this using my NES Automatica. I have everything I need but I just moved and am still getting everything setup. If you think you'd use it, I'd be happy to send you a fully assembled one if you want to try automating the vulnerability. Good work man!
@mwk1
@mwk1 12 күн бұрын
PRZEKOZAK! 🍻
@KaldekBoch
@KaldekBoch 11 күн бұрын
I did not expect to wake up today and watch a video on Return Oriented Programming for NES Tetris.
@420.........
@420......... 10 күн бұрын
I just got out of the hospital after 2 weeks, this video makes me very happy, this is the sort of video I live for.
@ricogoins
@ricogoins 13 күн бұрын
you are SO UNDERRATED this is a great video ^_^
@joebeezy9471
@joebeezy9471 14 күн бұрын
I love this channel.
@michaelpiper8198
@michaelpiper8198 14 күн бұрын
Oh hey I was looking into this a few months ago cause I wanted to make a game that takes advantage of this… great job!
@Meganarb
@Meganarb 14 күн бұрын
Hell yeah, time to get comfy.
@slot9
@slot9 13 күн бұрын
That was in-tense! Lots of it went over my head but it was very cool. Loved that you made your own 'tupperware' controller with simple toggle switches - loll!!
@DisplacedGamers
@DisplacedGamers 13 күн бұрын
"I need a cheap project box for... AHH haaaaa!"
@x9__
@x9__ 14 күн бұрын
Oh I'm in for a treat. Let's go.
@ItsHyomoto
@ItsHyomoto 14 күн бұрын
This was incredible, amazing, awesome and I will always find arbitrary code execution to be one of the coolest parts of gaming. Not just the what, but as this video demonstrates, the where and how. Very cool video, very cool demonstration. Edit: and afterwards I realize I missed the premise was already explained and the assignment given 😅
@StRoRo
@StRoRo 11 күн бұрын
Just amazing.
@Smaxx
@Smaxx 12 күн бұрын
Here's a fun little idea I had immediately, even before learning what you wanted to do with the changes: Instead of fixing bugs in Tetris, how about using one of the multi-game cartridges with Tetris and simply launch one of the other games. Didn't bother checking whether instructions for doing so would be within reach, though.
@kevparkin4846
@kevparkin4846 Күн бұрын
I love nerds. Such an interesting use of a popular game. Well done, great video and very, very clever!
@sunsetiisms
@sunsetiisms 14 күн бұрын
YEAH NEW VIDEO!!!!! LETS GOOOO DAY SAVED
@hallrules
@hallrules 14 күн бұрын
New ACE just dropped lets go
@mrburns366
@mrburns366 14 күн бұрын
I wish I understood code even half as well as DG!
@_notch
@_notch 12 күн бұрын
I love this
@peasedustin
@peasedustin 14 күн бұрын
hell yeah that is awesome!
@user-fw8ry1tq4y
@user-fw8ry1tq4y 3 күн бұрын
Damn, patches in old days was insane!
@DarkMoe
@DarkMoe 12 күн бұрын
wow this is amazing, now you should do a play of SMB with the tupperware with switches controller !
@Kuikkamies
@Kuikkamies 13 күн бұрын
Note that the pictured controller ports are, in fact, the same controller port.
@Chester200100
@Chester200100 14 күн бұрын
oh boy tetris ace lets go
@onetouchtwo
@onetouchtwo 12 күн бұрын
1:35 Is that an X-Men reference, I see? To me, my X-Men! 🥰
@Deluxe23
@Deluxe23 6 күн бұрын
Insane
@bunnybreaker
@bunnybreaker 14 күн бұрын
You broke out of the Tetrix 😎
@narayanbandodker5482
@narayanbandodker5482 14 күн бұрын
Can you make a Controller Breakdown video on the Genesis controller next? Since it is backwards compatible with the Master System, and how it multiplexes the data lines
@d_valroth
@d_valroth 14 күн бұрын
That would be interesting. They use the same standard jacks as the C64/128 and Atari 400/800 as well.
@michaelturner2806
@michaelturner2806 13 күн бұрын
For some reason I expected showing off some really fancy community-made code injections, like the things where Super Mario World is programmed to play Pong, Snake, or Flappy Bird. I guess this is too newly-discovered for that? Or is there not enough accessible ram and inputtable op codes for something that impressive, even given years of creative ingenuity by the world?
@markykid8760
@markykid8760 10 күн бұрын
I would write a fully functional flappy bird clone in there. But I’m just too busy
@nin10doadict
@nin10doadict 14 күн бұрын
Ooh, the pros seeking the rebirth screen are gonna like this tech
@Chad_Thundercock
@Chad_Thundercock 13 күн бұрын
I'm pretty sure at this point, Displaced Gamers is just easing us in to the inevitable awakening of an AGI on the NES.
@NeoGames2
@NeoGames2 11 күн бұрын
Hey DG! Are you ever gonna cover Super Pitfall from the NES? It's such a broken, unstable game I feel like you'd like to give it a look
@marklowenstein6995
@marklowenstein6995 10 күн бұрын
Imagine someone writes the code to Mario and then has it played on tetris
@KeithPhillips
@KeithPhillips 14 күн бұрын
I forsee some pretty amazing TASBot stuff coming in the not too distant future...
@WelshProgrammer
@WelshProgrammer 14 күн бұрын
This is ACE!
@Vinchenz
@Vinchenz 14 күн бұрын
Always love Arbitrary Code Execution done on real hardware.
@raffimolero64
@raffimolero64 10 күн бұрын
all i can say is, we better bootstrap this so hard that we can play flappy bird.
@dorukdogauysal8299
@dorukdogauysal8299 11 күн бұрын
Playing NES games with a switch contoller sounds fun
@JaggerG
@JaggerG 11 күн бұрын
Credits roll during invisible piece locks? Change music to Gaster's Theme/Your Reality mashup?
@thecunninlynguist
@thecunninlynguist 14 күн бұрын
color me intrigued. Being able to reprogram via high score name and then button inputs?
@PigeonHoledByYT
@PigeonHoledByYT 14 күн бұрын
It's a lot of fun, trust me....
@Bofner
@Bofner 11 күн бұрын
For holding Down, Left and Right, could you just open up the controller and put aluminum foil across the contacts to bridge the connection? Or just clamp down the silicon pads without the D-pad on the open pcb?
@DisplacedGamers
@DisplacedGamers 10 күн бұрын
True. Perhaps just using some electrical tape to hold down the silicon piece would do it. If this method is used, placing something between the tape and the pads to prevent any damage from occurring upon removal would be a good idea.
@chrisschumacher8553
@chrisschumacher8553 14 күн бұрын
I don't know the code of this game, but I'm assuming there's a scoring subroutine, wouldn't it just be easier to replace all jumps to it with noops? (or the subroutine itself, if that's fewer lines)
@yukimoe
@yukimoe 14 күн бұрын
17:55 not sure if I understood well, but if the inputs of controllers 2 and 4 are merged, can you hold left (or right) on one controller and down and right (or left of the other is holding right) on the other, so you don't have to build your own controller where you can hold both left and right?
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
The merge happens after the expansion port controller presses are read into addresses $00 and $01, and the merged presses are stored in the separate RAM location for player 1's input. The presses have to be from controllers 3 and 4 in order for them to be stored in #00 and $01 thanks to the D1 LSR/ROL logic.
@generalstripe2099
@generalstripe2099 14 күн бұрын
I'd manipulate the OAM to change the sprite used for figures. Like set it to $29 (heart).
@Fritzafella
@Fritzafella 14 күн бұрын
Ooooh. 6502 assembly w/ opcode restrictions. Gross. Cool video though!
@SmeddyTooBestChannel
@SmeddyTooBestChannel 12 күн бұрын
did you flip those close-up shots in reverse? the motion looks really weird lmao
@hngldr
@hngldr 10 күн бұрын
I've been wondering when this would come ever since Sethbling programmed Flappy Bird into Mario
@YaroKasear
@YaroKasear 14 күн бұрын
I think the BRK instruction should be clarified a bit more than it is in the video. That opcode isn't just a two-byte NOP like the video makes it sound. It's a software-triggered interrupt. It actually will call the standard IRQ. The interrupt handler probably actually causing the glitch is Tetris is likely the NMI (As the VBLANK of the NES/Famicom hardware is hardwired to the 6502's NMI line.), which has its own vector separate from IRQ/BRK. The reason this is important is that the BRK instruction and hardware IRQ (Not NMI.) use the same vector, and it's up to the software to make a distinction between these. There's a flag in the status register that allows the software to know if the interrupt is caused by the BRK instruction, which can be used to branch elsewhere in the interrupt handler to do things more relevant to a software-triggered interrupt. This could have consequences depending on how Tetris handles software-triggered interrupts.
@DisplacedGamers
@DisplacedGamers 14 күн бұрын
I didn't think I made it sound like it was just a two byte NOP. I left out the details about it on purpose for several reasons. The video was already pretty long, and the details behind BRK are trivial because all we needed to do was advance the program counter. Tetris has the interrupt vector set to the address for the RTI code at the end of NMI.
@RoysGamingGarret
@RoysGamingGarret 5 күн бұрын
Wouldn’t it make more sense to try and get as many tetrises as possible before level 169 so you can trigger the score jump reset closer to that level to avoid crashing? You’d think with the scoring multiplier that you could use the same call to the high score list and back to the game and once you get to level 169 start clearing as many singles as possible to avoid getting a very early max out and crashing the game.
@DouglasWalrath
@DouglasWalrath 11 күн бұрын
would you consider covering the famicom's microphone on the player 2 controller and how exactly that works?
@DisplacedGamers
@DisplacedGamers 10 күн бұрын
Hmm. Might be fun.
@DouglasWalrath
@DouglasWalrath 6 күн бұрын
@@DisplacedGamers oh yeah and the famicom keyboard too!
Super Mario Sunshine Glitches - Son of a Glitch
54:38
A+Start
Рет қаралды 250 М.
synthwave radio 🌌 - beats to chill/game to
Lofi Girl
Рет қаралды 2,5 М.
How did CatNap end up in Luca cartoon?🙀
00:16
LOL
Рет қаралды 7 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 3,3 МЛН
The Bad Jump Design and 30 FPS Gravity of TMNT (NES) - Behind the Code
13:38
Breaking Down the Greatest Comeback in NES Tetris History
13:47
aGameScout
Рет қаралды 2 МЛН
Why Stomping Wigglers Glitches Super Mario World
20:48
Retro Game Mechanics Explained
Рет қаралды 232 М.
New Discovery for Minus World in Super Mario Bros! - Behind the Code
15:32
Arbitrary Code Execution in Animal Crossing
24:22
Hunter R.
Рет қаралды 194 М.
MS-DOS has been Open-Sourced!  We Build and Run it!
15:01
Dave's Garage
Рет қаралды 282 М.
i cant stop thinking about this exploit
8:40
Low Level Learning
Рет қаралды 265 М.
skibidi toilet 73 (full episode)
9:41
DaFuq!?Boom!
Рет қаралды 25 МЛН
Frog Prince Rush With Herobrine and Entity
0:32
Realistic Craft
Рет қаралды 45 МЛН
Big Construction New Challenge Smiling Critters
0:12
5G Vision
Рет қаралды 11 МЛН