Fun fact: You can split the Konami code across two controllers alternating as often as you like, and the code will be accepted. Furthermore, 1P mode allows you to press down on one controller and up on the other to fire a standing shot while ducking.
@@KopperNeoman Perhaps with a 3rd party controller or a broken one that allows both inputs simultaneously. Having a 2nd controller just makes it more universally compatible with stock controllers, though just for 1P mode.
4 minutes into the video: Explaining what a byte and a nibble is. 6 minutes into the video: Manipulating RAM and assembly registers. This escalated quickly
I really appreciate these Assembly Language breakdowns and I hope people realize that despite the explanations being focused on the 6502 CPU and NES hardware, the conventions and gaming logic largely works the exact same way whether it be on other contemporary 8-bit systems of the time or all the way up to the more complicated modern systems of today. The important thing is it shows you how clever the programmers were back then with cramming these same, fundamental ideas with such limited memory and space to work with.
As someone who understands binary and hexadecimal but has struggled to wrap their head around assembly this was a really through and easy to understand explanation! Even Retro Game Mechanics Explained goes over my head sometimes. Excellent video and I can't wait to see more deep dives into the code!
Retro Game Mechanics Explained is often hard to follow even for a programmer very familiar with Asm and code hacking like me. This video is very detailed and nicely explained, but it's laser-focused on a single very basic routine, while Retro Game Mechanics Explained tackles SNES in all of its complexity, so it's understandable that it ends up complicated.
You should check out Pico8 it’s a tiny fantasy console built with a lot of limitations. Celeste was first made on Pico8 before the devs upgraded to a modern engine. I love Pico8 it has a lot of charm and the limitations breed a lot of creativity.
Looking at this executable data from a modern programmer's perspective and I'm thinking "wait a second shouldn't that be in a different segment?" and then I realize this was released in 1987 :D This is a lovely deep dive, certainly some of the most technical stuff I've seen on the platform. More, please!
Chris oh! Looking at things through an x86 lens for sure. The only processor family that uses the segmented model as far as I’m aware. I actually find the 64k address space and ROM banking somewhat refreshing in contrast to the confusing segmentation of x86 :)
I was at the halfway point of making this video when Summoning Salt's video hit. I couldn't believe it! My first thought was, "I need to finish this Contra - BtC video NOW!" Love Salt's videos, btw.
Now if we could only get a decent update to the series that includes all the old 2D versions as a bonus. Hell, even if they were unlockables that'd be fine. I just want a good platforming shooter that doesn't involve anthropomorphic characters lol
Not that it means two craps to anyone, but coincidentally I'm going to upload my review for the original Contra on the NES later this evening. I do rapid 60 second reviews. I plan on releasing 2 reviews every week; 1 on Monday and 1 on Friday. Contra will be my 4th such review. Keep on gaming, gamer dudes!
I was not aware of the extra content in the Famicom version, so thanks for pointing that out! Also, I have to say I really appreciate the quality and depth of these dives into the inner workings of the game. As a computer science major, it was fun to learn more about how they program old games like these. Kudos to your excellent work here!
Right video at the right time. I'm working on a game where the player can balance points between different weapon properties, including rate of fire, to design the kind of gun they want. Especially when it comes to maintaining accurate, or at least good enough, collision detection, it's a challenge. I'm starting to appreciate why game developers (engineers, really) impose certain limitations as well as why it's so important when they're able to push past those limitations to achieve something no one else has.
I've come across this inherent limitation as well. The fastest permitted movement can not exceed the smallest possible hitbox width/height, otherwise things can potentially pass through eachother. That is, unless your CPU is fast enough for you to check collision at every pixel, instead of adding the offset directly.
Im 38 years old and have too much time on my hands today, so i thought id watch a contra video, a game i played when i was like 6 and learn complicated stuff about a 30 lives code today. YOu have helped me complete my mission. That was all i needed to do today.
Yeah, these things that track sequences are much easier for people than computers, and I was also curious how exactly they did it. Glad to have that itch scratched!
I'm taking EE at school (in the states), and these videos are actually really great! Not only do they illustrate things from class, they are a great motivator when I get into a "What am I going to USE this for?" funk. Thanks for taking the time!!
As an 6502 assembly enthusiast i've found this explanation entertaining and comprehensive, yet understandable for non-6502 folks. I really appreciate effort and thourougness that was put into this material, it's like kind of deep diving without actually drowning ;d
Very interesting video series on something I've never given much thought to. I would love to see a video on how our modern ability to watch code in real time compares to whatever programmers had to do in the 80s when designing it. What amount of documentation did they create, what resources did they have for debugging, etc..
What amazes me, is this is how NES games were made, via assembler. Isn't that just amazing? None of us knew this as kids, it would be difficult to make games like that today.
I know it's been said way too many times but for my generation it's so deeply imbeded in our mental and muscle memories that even when we're old and senile, forgetting our own children and spouses we will remember this code. Lol
Props to UA-cam's algorithm for learning my latest uber niche interest and recommending this channel to me, seeing as I follow Coding Secrets and a few others as well. Plus I'm teaching myself 6502 assembly so this is a godsend.
I'm trying to learn it too. I still don't quite understand how the code worked. I get that the Konami Code inputs are like a table and Y is used to load each item in the table during the loop but I still don't understand how the table is created in the first place
Thanks, ballandpaddle. Starting with the Mario 2 video, I thought it would be fun to try to create a new code in each "Behind the Code" video I make. I'll try to keep the tradition alive as best I can.
Konami always had these codes in all the games they made.I would put random stuff in passwords and controllers or names in Metal gear and find super cool strange weapons. I didn't understand tho cause I was a kid.Great video here.
I like how the modified spread turned its damage potential up. It lost its vertical spread, but concentrated the damage in line with where it was aimed. Also I'm always fascinated by assembly. Its a language we use to get machines to function in a way we want them to.
In a similar fashion speedruners with high button press per second and a right rithm to it can transform spread to almost a single line and do impressive fast kills of the bosses.
What a great video and great explaination! I don’t understand why you do not have more subscribers and this other Vintage Gaming Dude who does not explain anything is rocking UA-cam. You seriously explained the code line by line - so interesting, so nice. Thanks a lot!
Work like this is one of my favorite things to do in the universe. I like to reverse damage equations and stat upgrades when the game isn't forthcoming about them. That's typically less involved with dynamics like this, but it's a very similar process. Figure out where the game is storing HP with a few simple searches of ram. Set a breakpoint for writing it. Get hit to trigger the breakpoint. Step out at the RTS or RTL to get the address of the JSR or JSL, look at the operand to find the address of the function that was running. Breakpoint that for execution, wait for it, log and fill in the blanks with a disassembler I wrote, and dig through the code to figure out what's going on, where it's stored, set more breakpoints to investigate what data is where... So much fun! The moment when all the seemingly random and meaningless addresses and calculations finally look like a cohesive, sensible system that performs a meaningful function, that "a-ha!", is like a drug. Very satisfying. I imagine this is what archaeologists and anthropologists feel as they sort through a heap of refuse and broken artifacts to reconstruct a story of what real people did with their lives in the past. I'm a lot better at figuring out what coders are doing than people, but it's a similar task.
I absolutely love these. I used to be part of the rom hacking scene during the early days, but never got much further beyond dumping and inserting scripts for potential translations, changing fonts, writing a few documents on pointers, and using brute force to help me figure out much of Ninja Gaiden 2’s level data to code a potential level level editor. Learning assembly was always beyond my capabilities but I no less find these videos interesting and enjoy seeing how you dissect everything. One game I would love to see you tackle is Dragon Warrior 3 and the fun you could have with it. I once made a game genie code (which I can no longer find) that allowed us to push any of NPCs in the game as you would the moveable boulder object. I remember it was a lot of fun because in the town that slowly builds up later in the game there is an NPC that blocks an entrance to a room that has a staircase in it and there were no events in the game that would cause them to move so that we could access the stairs to see where it went. Well, with the game genie code I was able to push them out of the way and finally access those stairs. It just went to a generic room with nothing in it but it was still cool to do. The funniest thing I did was push an NPC into the town’s pond and it simply disappears into it and does not walk back out. I can imagine this would be fun to use early in the access areas in a different order or cause general shenanigans. It might be asking a lot but I would love it if you could figure out how to do this in the game via modification of the memory or rom and have a useable game genie code so everyone can experience the fun I had with it. Thanks!
This is absolutely fantastic content. Thank you so much! It would be incredibly interesting to look behind the code of game bugs that speedrunners use!
I really enjoy watching the speedrunning community. There are so many fun people to watch. As a side note, I was near the halfway point of creating this video when Summoning Salt released his Contra World Records video. I couldn't believe it! So I pushed a bit to try to get this one out sooner. I may look into some of those bugs/exploits of speedrunners in the future. Best case - I stumble upon something they can use.
This is cool. We're kind of spoiled these days and rarely have to dive into code this low-level but it's a really fun thought exercise if nothing else.
If someone watches enough of your videos, they're going to be able to make the best NES game ever in Assembly. 😁 Man, Nintendo developers would have been watching your videos back in the day as tutorials.
I love this style of video, so few youtubers are willing to dive into assembly code and explain how it works. I subbed from this video alone and hope to see more like it! Keep up the good work!
this was amazing I'm really glad you made this video. I loved learning assembly in my university, it's really cool seeing someone talking about the code in games and accumulators and such
I love this series! Even though I know next to nothing about programming (especially assembly) I love seeing how games work and what’s going on under the hood, so to speak.
THANK YOU for not considering Start a part of the Code! I saw this video in the list and I just *knew* the Code would come up. Even Konami themselves messed it up so it is *very* good to see the record put straight by someone else besides me.
I understood more of the programming segment than I thought I would. Seems my programming experience - though admittedly not in assembly - is helping me a bit.
I remember thinking it odd that if I paused the game with bullets onscreen, they disappeared - but only sometimes. And now I know why. I spent 30 years wondering if I was crazy.
I speedrun this game and I'm pretty tight with the contra community. This was a very well done video and your explanations were done very simple and very easy to understand. I dropped this to the community so they can also check this out. Looking forward to more videos 👍🏻👊🏻💪🏻
I've always been curious about the code behind the Konami Code. Thank you so much. It's probably much easier to do it this way when you only have the 8 inputs, vs a computer game with 102+ inputs...
I just came across your content about behind the code yesterday. I watched a few episodes, and I really like them. I was happily surprised to see a new video today. Thank you and keep up the good work, and don't worry if it gets a little too technical, we'll eventually figure it out.
Amazing video. Thank you! I'd suggest Batman: Return for the Joker on NES to study for this channel. Or Recca, Summer Carnival' 92, not really sure which one is the real name.
I know nothing about coding yet I really enjoy your videos as explains what's going on in the code though sometimes it half goes over my head like the Zelda 2 one which I had to rewatch and I then understood it more
@@clutchkman "Akshually," the cheat flag in memory is set immediately after pressing A, and Select is ignored by the ROM when checking if the code is entered correctly. You can literally press select in between every part of the code and the code will still work. See 5:51 and 9:36 if you are confused or need additional clarification. (thanks for volunteering to be my first aKshUaLlY lol)
Thank you for another great video! You tackle so many interesting topics. I always look forward to your next video, so please keep up the awesome work!
These are great, please keep making these videos they're very interesting. If you're taking requests mike tyson's punch out is said to have secrets that have still yet to be discovered by players including the recent easter egg of the guy in the crowd.
Love that guy in the crowd. I watched a good deal of Sinister1 and Summoning Salt on Twitch, so MTPO has been on my "list." The question is how much time do I want to devote to it. Hmm
I've been making my own codes for NES and SNES games for a decade and I still don't know what other memory registers apply to Funny, I've always just poked the memory location that applies to quantity of lives. Now I know where to poke in order to make the Konami code automatically activate 💪🏽💪🏽
Super thanks for this video. All my life i thought my memory was wrong, as the contra in my head usually different compared to other people i know. The roms i played also feel different from my memory. Turned out i played the japanese version!
Three only thing I would recommend next time for the assembly sections is to mention that branch instructions and whatnot check the processor state. I was confused as to how it knew the previous value was equal and had to look it up. Assembly walkthroughs like this though are helpful as I'm not experienced with it but I hopefully plan on trying to program in assembly for something at some point.
Now, there's also nothing stopping you from including impossible button presses, like up-down or left-right simultaneously. This is merely a physical limitation of an NES controller D-pad. The circuit has no problem representing this in binary. But many games were not meant to handle these inputs, so funky things can happen. Just check out the TAS run of Mega Man 1 for reference.
Nice video. I was ten years old when I first used LDA, LDX, LDY, CMP, BEQ, RTS... that was in 1981... great memories. THX for the nice video. All computer science students should start learning programming on a good old eight bit machine to understand that computer science is not computer science but rather the science of information processing... and some tech... As nowadays the young people have a ridiculous amount of wasted code and burned bits and bytes. As we all know. EVERY SINGLE BIT COUNTS.
This is some good stuff. I’m working on my CS degree and am taking an assembly language class that covers a lot of what you talked about. Awesome job on all your vids.
Woooowwww! This is an amazing video, and let me tell you man, don't apologize for excessive use of technical language here ! Every piece of information on this video was very interesting and thought I understood half of it, it still was very interesting!
Using this video as a reference I hacked my version of the Japan Contra to active the 30 lives code by simply pressing B once. Though ironically I may never use the hacked version as it lacks the charm of inputting the Konami code. Was still a fun and quick little experiment.
BCC actually means Branch if Carry Clear (jump if Y < $0A). I believe you said it checks for equality for the purpose of cleanliness 😉 EDIT: this commented has been edited due to a mistake I made attempting to reference the behavior of the carry flag. The 6502 instead resets the carry flag on borrow, effectively making BCC the same as "branch if less than". Great video!
I originally scripted this to use a more structured/literal assembly presentation but then elected to streamline it by simplifying the flow a bit. Heh. Thanks for your comment, Leandro!
@@DisplacedGamers Hey, man! Thank you for answering! I've just edited my comment because my explanation of instruction BCC was inaccurate. It's still branch on carry clear, but the 6502 acts in much the same way as the PIC and will RESET the carry flag on borrow.
*6502 and Z80 based arcade machines from Golden age - Behind the code* series would break all video views records!! :-) For the very first 6502 hardware/code analysis I am voting for *Phoenix* and for the very first Z80 hardware based arcade machine to be analysed I am voting for *Scramble* arcade machine. Some true gems of m/c programming were used in many of early arcade machines to overcome the limitations of the hardware and many really interesting routines could be found in known arcade machines from early 80s (for example, Z80 routine for calculating the address of the mirrored position in Pac-Man's video RAM is brilliant and very interesting). Another interesting topic would be explaining why video RAM to screen position mapping in various systems was really strange. For example ZX Spectrum's video RAM was organised in a particular way in order to be able to "calculate" the next row address by doing just INC H (if HL was holding the address in video RAM). Pac-Man's video RAM organisation is quite interesting as well.
damn so bad this videos werent up when I was studying assembly at college (FPGA project), idk why but youtube recommeded this channel and cofirmed that im a freaking nerd
I love this. This appeals to my love for gaming and my programmer experience. You've got yourself a sub, and I look forward to seeing what you do next.
Awesome video! If you’re planning on doing more Contra, it’d be interested in knowing exactly what the game changes for the 2nd game loops and onward. I think the game throws more enemies at you, but I’d be curious to see exactly how that manifests in the code/variables and up to how many game loops those changes increment!
@@luisaazul After 10 years of programming I wouldn't consider Assembly being in any way easier to program in than C#, C++, Java, Python, etc. "Normal code" is a high level language, an entire level above Assembly, while Assembly would be easier only compared to Machine code, which is literally 1s and 0s.
This is so good! Also, I found a nit :) @4:07 the d-pad value shifts from up+right (1001 = 9) to down+right (0101 = 5) but the decimal 9 is still shown.
Fun fact: You can split the Konami code across two controllers alternating as often as you like, and the code will be accepted. Furthermore, 1P mode allows you to press down on one controller and up on the other to fire a standing shot while ducking.
What!!! Wow.
LOL
The more you know!
Can you press Up and Down on the same controller for that effect?
@@KopperNeoman Perhaps with a 3rd party controller or a broken one that allows both inputs simultaneously. Having a 2nd controller just makes it more universally compatible with stock controllers, though just for 1P mode.
4 minutes into the video: Explaining what a byte and a nibble is.
6 minutes into the video: Manipulating RAM and assembly registers.
This escalated quickly
lol
@@DisplacedGamers lol
@@starleaf-luna lol
@@fzxfzxfzx lol
@@alloounou6900 lol
I really appreciate these Assembly Language breakdowns and I hope people realize that despite the explanations being focused on the 6502 CPU and NES hardware, the conventions and gaming logic largely works the exact same way whether it be on other contemporary 8-bit systems of the time or all the way up to the more complicated modern systems of today. The important thing is it shows you how clever the programmers were back then with cramming these same, fundamental ideas with such limited memory and space to work with.
As someone who understands binary and hexadecimal but has struggled to wrap their head around assembly this was a really through and easy to understand explanation! Even Retro Game Mechanics Explained goes over my head sometimes. Excellent video and I can't wait to see more deep dives into the code!
Thanks, NanoDrive!
try this for 6502 ASM: ua-cam.com/video/fWqBmmPQP40/v-deo.html
Retro Game Mechanics Explained is often hard to follow even for a programmer very familiar with Asm and code hacking like me. This video is very detailed and nicely explained, but it's laser-focused on a single very basic routine, while Retro Game Mechanics Explained tackles SNES in all of its complexity, so it's understandable that it ends up complicated.
You should check out Pico8 it’s a tiny fantasy console built with a lot of limitations. Celeste was first made on Pico8 before the devs upgraded to a modern engine. I love Pico8 it has a lot of charm and the limitations breed a lot of creativity.
Looking at this executable data from a modern programmer's perspective and I'm thinking "wait a second shouldn't that be in a different segment?" and then I realize this was released in 1987 :D
This is a lovely deep dive, certainly some of the most technical stuff I've seen on the platform. More, please!
Chris oh! Looking at things through an x86 lens for sure. The only processor family that uses the segmented model as far as I’m aware.
I actually find the 64k address space and ROM banking somewhat refreshing in contrast to the confusing segmentation of x86 :)
That hacked Rapid Spread shot is a thing of alien mulching beauty.
Aw hell yeah, it seems after Summoning Salt's video on Contra, this game is going to be a hot topic on UA-cam for a while. Nice!
I was at the halfway point of making this video when Summoning Salt's video hit. I couldn't believe it! My first thought was, "I need to finish this Contra - BtC video NOW!"
Love Salt's videos, btw.
Nah, confirmation bias. Two videos != everyone will now be taking about contra.
Add the big 20 race next weekend and this is an exciting time for Contra for sure.
Now if we could only get a decent update to the series that includes all the old 2D versions as a bonus. Hell, even if they were unlockables that'd be fine. I just want a good platforming shooter that doesn't involve anthropomorphic characters lol
Not that it means two craps to anyone, but coincidentally I'm going to upload my review for the original Contra on the NES later this evening. I do rapid 60 second reviews. I plan on releasing 2 reviews every week; 1 on Monday and 1 on Friday. Contra will be my 4th such review. Keep on gaming, gamer dudes!
I was not aware of the extra content in the Famicom version, so thanks for pointing that out! Also, I have to say I really appreciate the quality and depth of these dives into the inner workings of the game. As a computer science major, it was fun to learn more about how they program old games like these. Kudos to your excellent work here!
Thanks, Aaron!
Right video at the right time. I'm working on a game where the player can balance points between different weapon properties, including rate of fire, to design the kind of gun they want. Especially when it comes to maintaining accurate, or at least good enough, collision detection, it's a challenge. I'm starting to appreciate why game developers (engineers, really) impose certain limitations as well as why it's so important when they're able to push past those limitations to achieve something no one else has.
Lol
I've come across this inherent limitation as well. The fastest permitted movement can not exceed the smallest possible hitbox width/height, otherwise things can potentially pass through eachother. That is, unless your CPU is fast enough for you to check collision at every pixel, instead of adding the offset directly.
did anything come of that? it sounds interesting.
UA-cam needs way more creators with this level of skill and knowledge.
Im 38 years old and have too much time on my hands today, so i thought id watch a contra video, a game i played when i was like 6 and learn complicated stuff about a 30 lives code today. YOu have helped me complete my mission. That was all i needed to do today.
I love this series. I'm one of those sickos who prefers assembly over OOP, and I grew up on these games. Still play em!
Anyone who disliked this extremely well produced and informational video is not even capable of entering the Konami code.
Man. I haven't had to parse assembly code since college. This was a good quick refresher.
GODDAMN man that was really interesting, please do more!!
Neat way to do a looping switch statement. I like how you highlight the little bits of ingenuity we'd otherwise never notice.
I've wanted to know exactly how cheats like the Konami Code worked under the hood since I was 13. Totally adding you to my Patreon pledges.
Yeah, these things that track sequences are much easier for people than computers, and I was also curious how exactly they did it. Glad to have that itch scratched!
I'm taking EE at school (in the states), and these videos are actually really great! Not only do they illustrate things from class, they are a great motivator when I get into a "What am I going to USE this for?" funk. Thanks for taking the time!!
As an 6502 assembly enthusiast i've found this explanation entertaining and comprehensive, yet understandable for non-6502 folks.
I really appreciate effort and thourougness that was put into this material, it's like kind of deep diving without actually drowning ;d
Very interesting video series on something I've never given much thought to. I would love to see a video on how our modern ability to watch code in real time compares to whatever programmers had to do in the 80s when designing it. What amount of documentation did they create, what resources did they have for debugging, etc..
What amazes me, is this is how NES games were made, via assembler. Isn't that just amazing? None of us knew this as kids, it would be difficult to make games like that today.
Well done. I played this one a bunch decades ago...one of the best NES titles IMHO.
I know it's been said way too many times but for my generation it's so deeply imbeded in our mental and muscle memories that even when we're old and senile, forgetting our own children and spouses we will remember this code. Lol
Props to UA-cam's algorithm for learning my latest uber niche interest and recommending this channel to me, seeing as I follow Coding Secrets and a few others as well. Plus I'm teaching myself 6502 assembly so this is a godsend.
I'm trying to learn it too. I still don't quite understand how the code worked. I get that the Konami Code inputs are like a table and Y is used to load each item in the table during the loop but I still don't understand how the table is created in the first place
It's 6am, I didn't sleep yet and I'm watching this wonderful piece of retro tech curiosity.
I lost control of my life.
Awesome video! I didn't expect you to show us how to *program our own NES codes,* but thank you!! One of the reasons why this channel is so awesome.
Thanks, ballandpaddle. Starting with the Mario 2 video, I thought it would be fun to try to create a new code in each "Behind the Code" video I make. I'll try to keep the tradition alive as best I can.
Great video! Definitely falls into the category of never have thought about how it works, but once you see the video, you must watch immediately :)
The first game I ever remember playing... Still holds a soft spot in my heart. Thanks for diving into some of the code!
Konami always had these codes in all the games they made.I would put random stuff in passwords and controllers or names in Metal gear and find super cool strange weapons.
I didn't understand tho cause I was a kid.Great video here.
I like how the modified spread turned its damage potential up. It lost its vertical spread, but concentrated the damage in line with where it was aimed.
Also I'm always fascinated by assembly. Its a language we use to get machines to function in a way we want them to.
In a similar fashion speedruners with high button press per second and a right rithm to it can transform spread to almost a single line and do impressive fast kills of the bosses.
I'm a contra noob but I love this series.
Studying game programming code, this video is pretty helpful getting me to understand how code works.
What a great video and great explaination! I don’t understand why you do not have more subscribers and this other Vintage Gaming Dude who does not explain anything is rocking UA-cam. You seriously explained the code line by line - so interesting, so nice. Thanks a lot!
The assembly for the konami code is amazingly compact considering how simplistic the 6502 instruction set is (compared to, say, the Z80).
A really wonderful channel. Even though you're speaking some alien language to my ears, I'm fascinated with it and wanted to say thanks.
Work like this is one of my favorite things to do in the universe. I like to reverse damage equations and stat upgrades when the game isn't forthcoming about them. That's typically less involved with dynamics like this, but it's a very similar process. Figure out where the game is storing HP with a few simple searches of ram. Set a breakpoint for writing it. Get hit to trigger the breakpoint. Step out at the RTS or RTL to get the address of the JSR or JSL, look at the operand to find the address of the function that was running. Breakpoint that for execution, wait for it, log and fill in the blanks with a disassembler I wrote, and dig through the code to figure out what's going on, where it's stored, set more breakpoints to investigate what data is where... So much fun! The moment when all the seemingly random and meaningless addresses and calculations finally look like a cohesive, sensible system that performs a meaningful function, that "a-ha!", is like a drug. Very satisfying.
I imagine this is what archaeologists and anthropologists feel as they sort through a heap of refuse and broken artifacts to reconstruct a story of what real people did with their lives in the past. I'm a lot better at figuring out what coders are doing than people, but it's a similar task.
PLEASE BRING MORE VIDEOS LIKE THESE!!! I TRULY LOVE THEM ALL
I just love how a single Java object requires as much memory space as a (super optimized) whole NES game.
I absolutely love these. I used to be part of the rom hacking scene during the early days, but never got much further beyond dumping and inserting scripts for potential translations, changing fonts, writing a few documents on pointers, and using brute force to help me figure out much of Ninja Gaiden 2’s level data to code a potential level level editor. Learning assembly was always beyond my capabilities but I no less find these videos interesting and enjoy seeing how you dissect everything.
One game I would love to see you tackle is Dragon Warrior 3 and the fun you could have with it. I once made a game genie code (which I can no longer find) that allowed us to push any of NPCs in the game as you would the moveable boulder object. I remember it was a lot of fun because in the town that slowly builds up later in the game there is an NPC that blocks an entrance to a room that has a staircase in it and there were no events in the game that would cause them to move so that we could access the stairs to see where it went. Well, with the game genie code I was able to push them out of the way and finally access those stairs. It just went to a generic room with nothing in it but it was still cool to do. The funniest thing I did was push an NPC into the town’s pond and it simply disappears into it and does not walk back out. I can imagine this would be fun to use early in the access areas in a different order or cause general shenanigans.
It might be asking a lot but I would love it if you could figure out how to do this in the game via modification of the memory or rom and have a useable game genie code so everyone can experience the fun I had with it.
Thanks!
Dang my Contra video didnt do well at ALL! Im glad you had more success with yours
I have a hacked multi cart with 100 lives from the start! Love it!
This is absolutely fantastic content. Thank you so much!
It would be incredibly interesting to look behind the code of game bugs that speedrunners use!
I really enjoy watching the speedrunning community. There are so many fun people to watch. As a side note, I was near the halfway point of creating this video when Summoning Salt released his Contra World Records video. I couldn't believe it! So I pushed a bit to try to get this one out sooner.
I may look into some of those bugs/exploits of speedrunners in the future. Best case - I stumble upon something they can use.
This is cool. We're kind of spoiled these days and rarely have to dive into code this low-level but it's a really fun thought exercise if nothing else.
If someone watches enough of your videos, they're going to be able to make the best NES game ever in Assembly. 😁
Man, Nintendo developers would have been watching your videos back in the day as tutorials.
I love this style of video, so few youtubers are willing to dive into assembly code and explain how it works. I subbed from this video alone and hope to see more like it! Keep up the good work!
even though i didn't understand the technical stuff i still enjoyed the video thouroughly
My cousin LOVED this game. I used to watch him play this on his NES. I still remember that big ass C in Contra lolmao
Wanted my first attempt to be a side-shooter. Glad to see projectile movement is easier than expected.
this was amazing I'm really glad you made this video. I loved learning assembly in my university, it's really cool seeing someone talking about the code in games and accumulators and such
I love this series! Even though I know next to nothing about programming (especially assembly) I love seeing how games work and what’s going on under the hood, so to speak.
I'm interested in learning more assembly. Thanks for sharing!
THANK YOU for not considering Start a part of the Code! I saw this video in the list and I just *knew* the Code would come up. Even Konami themselves messed it up so it is *very* good to see the record put straight by someone else besides me.
Good luck having access to what code unlocks without start..
@@jessejennings3828 lol burned 🔥😂!
Didn't know it was possible to disassemble the code in a catridge ROM. Very interesting thank you.
I understood more of the programming segment than I thought I would. Seems my programming experience - though admittedly not in assembly - is helping me a bit.
I remember thinking it odd that if I paused the game with bullets onscreen, they disappeared - but only sometimes. And now I know why. I spent 30 years wondering if I was crazy.
I speedrun this game and I'm pretty tight with the contra community. This was a very well done video and your explanations were done very simple and very easy to understand. I dropped this to the community so they can also check this out. Looking forward to more videos 👍🏻👊🏻💪🏻
Did you guys know i was speedrunning this in kindergarten in '88 to the applause of no one?
I've always been curious about the code behind the Konami Code. Thank you so much.
It's probably much easier to do it this way when you only have the 8 inputs, vs a computer game with 102+ inputs...
I just came across your content about behind the code yesterday. I watched a few episodes, and I really like them. I was happily surprised to see a new video today. Thank you and keep up the good work, and don't worry if it gets a little too technical, we'll eventually figure it out.
Thanks, George. Your comment means a lot.
Amazing video. Thank you!
I'd suggest Batman: Return for the Joker on NES to study for this channel. Or Recca, Summer Carnival' 92, not really sure which one is the real name.
As someone trying to learn 6502 this is incredibly helpful
I need more of this behind the code series! These have been fascinating!
I know nothing about coding yet I really enjoy your videos as explains what's going on in the code though sometimes it half goes over my head like the Zelda 2 one which I had to rewatch and I then understood it more
I now can't wait to "akshually..." someone when they try to include select or start in the konami code
“Akshually” you need to press select to apply the code to a 2-player game.
Mister Guy I didn’t say that it was part of the code, just necessary to apply it to a 2-player game.
ClutchKman That's why the song "30 Lives" adds Select:
"I want to spend another 30 lives *with you* "
@@clutchkman "Akshually," the cheat flag in memory is set immediately after pressing A, and Select is ignored by the ROM when checking if the code is entered correctly. You can literally press select in between every part of the code and the code will still work. See 5:51 and 9:36 if you are confused or need additional clarification.
(thanks for volunteering to be my first aKshUaLlY lol)
@@B3Band You completely missed the point. Good luck with your next "actually."
Thank you for another great video! You tackle so many interesting topics. I always look forward to your next video, so please keep up the awesome work!
Crazy underrated channel! You just earned a sub!
More! More! More! Loved assembly back in college (long time ago) and these videos certainly reel in a lot of nostalgia.
Awesome work. You cover a lot of great MCU basics here for new programmers as well as providing some interesting bits for the more experienced.
These are great, please keep making these videos they're very interesting. If you're taking requests mike tyson's punch out is said to have secrets that have still yet to be discovered by players including the recent easter egg of the guy in the crowd.
Love that guy in the crowd. I watched a good deal of Sinister1 and Summoning Salt on Twitch, so MTPO has been on my "list." The question is how much time do I want to devote to it. Hmm
I've been making my own codes for NES and SNES games for a decade and I still don't know what other memory registers apply to
Funny, I've always just poked the memory location that applies to quantity of lives. Now I know where to poke in order to make the Konami code automatically activate 💪🏽💪🏽
Super thanks for this video. All my life i thought my memory was wrong, as the contra in my head usually different compared to other people i know. The roms i played also feel different from my memory. Turned out i played the japanese version!
You broke it down barney style. Excellent presentation on the code trace.
Looking at ASM code gives me some inner peace and I don't know why.
Same with soldering, could do this all day, like vacation for my brain :D
Three only thing I would recommend next time for the assembly sections is to mention that branch instructions and whatnot check the processor state. I was confused as to how it knew the previous value was equal and had to look it up. Assembly walkthroughs like this though are helpful as I'm not experienced with it but I hopefully plan on trying to program in assembly for something at some point.
Now, there's also nothing stopping you from including impossible button presses, like up-down or left-right simultaneously. This is merely a physical limitation of an NES controller D-pad. The circuit has no problem representing this in binary. But many games were not meant to handle these inputs, so funky things can happen. Just check out the TAS run of Mega Man 1 for reference.
Nice video. I was ten years old when I first used LDA, LDX, LDY, CMP, BEQ, RTS... that was in 1981... great memories. THX for the nice video. All computer science students should start learning programming on a good old eight bit machine to understand that computer science is not computer science but rather the science of information processing... and some tech... As nowadays the young people have a ridiculous amount of wasted code and burned bits and bytes. As we all know. EVERY SINGLE BIT COUNTS.
This Channel was an awesome Discovery. I'm learning a lot.
If my university coursework for learning assembly was creating a contra mod, I'd be so good with assembly right now
This is some good stuff. I’m working on my CS degree and am taking an assembly language class that covers a lot of what you talked about. Awesome job on all your vids.
referral madness Thanks. I’m learning x86 Assembly.
Thank you for taking the time to do this video! I am learning NES style 6502 asm with your videos :)
Nice video. I did noticed a few of Anders Enger Jensen's tracks on the background. Nice touch. :)
Woooowwww! This is an amazing video, and let me tell you man, don't apologize for excessive use of technical language here ! Every piece of information on this video was very interesting and thought I understood half of it, it still was very interesting!
Using this video as a reference I hacked my version of the Japan Contra to active the 30 lives code by simply pressing B once. Though ironically I may never use the hacked version as it lacks the charm of inputting the Konami code. Was still a fun and quick little experiment.
Remembering grade school when we used to argue with our parents that we would never need math for anything this is why
BCC actually means Branch if Carry Clear (jump if Y < $0A). I believe you said it checks for equality for the purpose of cleanliness 😉
EDIT: this commented has been edited due to a mistake I made attempting to reference the behavior of the carry flag. The 6502 instead resets the carry flag on borrow, effectively making BCC the same as "branch if less than".
Great video!
I originally scripted this to use a more structured/literal assembly presentation but then elected to streamline it by simplifying the flow a bit. Heh.
Thanks for your comment, Leandro!
that would be the intel equivalent of JNC
Olha só... um brasileiro perdido por aqui. :D
@@cesarkopp2 Resposta atrasada é melhor que nunca responder 😁😁
Estamos na área 😎
@@DisplacedGamers Hey, man! Thank you for answering! I've just edited my comment because my explanation of instruction BCC was inaccurate. It's still branch on carry clear, but the 6502 acts in much the same way as the PIC and will RESET the carry flag on borrow.
*6502 and Z80 based arcade machines from Golden age - Behind the code* series would break all video views records!! :-) For the very first 6502 hardware/code analysis I am voting for *Phoenix* and for the very first Z80 hardware based arcade machine to be analysed I am voting for *Scramble* arcade machine. Some true gems of m/c programming were used in many of early arcade machines to overcome the limitations of the hardware and many really interesting routines could be found in known arcade machines from early 80s (for example, Z80 routine for calculating the address of the mirrored position in Pac-Man's video RAM is brilliant and very interesting). Another interesting topic would be explaining why video RAM to screen position mapping in various systems was really strange. For example ZX Spectrum's video RAM was organised in a particular way in order to be able to "calculate" the next row address by doing just INC H (if HL was holding the address in video RAM). Pac-Man's video RAM organisation is quite interesting as well.
damn so bad this videos werent up when I was studying assembly at college (FPGA project), idk why but youtube recommeded this channel and cofirmed that im a freaking nerd
I love your voice and videos. Keep up the great work! PS your MSX vid was probably my favorite.
Awesome vid! Always good to see what's going on in the NES's brain while a game is running.
Awesome video! I love hearing all those technical details!
Nice knowing something wonderful like the Konami Code.
Today I learned that half a byte is a nibble and honestly that makes everything just a little better in my life
Top quality content and we'll explained for multiple levels of familiarity with assembly! thanks!
One of the best gaming channels on here. Love this stuff!
I love this. This appeals to my love for gaming and my programmer experience. You've got yourself a sub, and I look forward to seeing what you do next.
Awesome video! If you’re planning on doing more Contra, it’d be interested in knowing exactly what the game changes for the 2nd game loops and onward. I think the game throws more enemies at you, but I’d be curious to see exactly how that manifests in the code/variables and up to how many game loops those changes increment!
WOW! Man, this was a great video! Loved this game when I was a kid. Thank YOU!
All this and many more NEW games were implemented in 6502 assembly? Insane
I once hit a random input that booted up a menu allowing access to all audio samples. One of those things no one believes when you're 7 years old.
now imagine programming almost all of rollercoaster tycoon in this code...
It's way easier then you think, it's very basic and simple to understand compared to normal code
@@luisaazul After 10 years of programming I wouldn't consider Assembly being in any way easier to program in than C#, C++, Java, Python, etc. "Normal code" is a high level language, an entire level above Assembly, while Assembly would be easier only compared to Machine code, which is literally 1s and 0s.
This is so good! Also, I found a nit :) @4:07 the d-pad value shifts from up+right (1001 = 9) to down+right (0101 = 5) but the decimal 9 is still shown.
Man this was a great video. Thank you for these insights and please keep making great content like this!