Reprogramming Mega Man 4's Charged Shot - Behind the Code
Вставка
- Опубліковано 16 тра 2021
- Cut the charge time in half? How about a damage boost? Focus on the process of reverse engineering code in this episode. Lots of code-hopping!
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
Featured Game Genie Codes:
(Take note that I have not tested all of these with a real cartridge)
Half Speed Charged Shot: GVEEGAZZ, ESEEIAAZ, LEEETEVL
Half Speed Broken sound: ZUOALAGT, POEEAAZU
Half speed, sound fixed, mid-level shot: ZUOALAGT, POEEAAZU, ZXOAYEGS
Start Buster at 1/2 Charge: ZUVEVGAA
Super Charged Shot (Extra Damage): OXNETZSX
Default to (Fully) Charged Shot: AXKESKAP, IUSAOGPX
Charged-Up Sound Fun (Use to replace charged up looping sound) -
Boss Door: GXOELAYX
Explosion: IXOELAYZ
"You Got" Music: GOOELAYZ
#MEGAMAN #HACKING #BEHINDTHECODE - Ігри
Fire man’s code can be described with two sentences. Run back and forth across the room. If mega man shoots or gets close, shoot. It’s hilarious, considering how tough he seems if you fight him as spammy as you fight everyone else
its a tad more than that
Run back and fourth, shoot when blue boy shoots or gets close.
It'd be kinda cool to see the code of the Magnet Missile from Mega Man 3 played around with. Those physics always intrigued me.
Ooh, I second this! Great idea!
@@TroyBlackford I third this.
I know how it works:
When the projectile is created, it will go in the direction where the player is, when the X position of the projectile and that of Megaman are the same, the projectile checks whether the Player is above him or below.
Yes TPM Yes UIFI
I would love to see the physics behind the Gemini Laser.
I love your "Behind the Code" series. It really inspires me to continue learning 6502 assembly language.
Dooo it! I'd love to see someone recreate Mega Man 9 and 10 as close as possible in 6502.
Stretch goal: recreate Shovel Knight in 6502
mega man 7 in 6502
I got one for you man. Can you make a code to slow down the speeder bike segment of Battletoads? I don't even know if it's possible, but that'd be real cool.
Whoa. That sounds super useful!
@@DisplacedGamers It makes me wonder how further would it break an already broken stage (should I say "game"?).
Now THAT'S a good a idea!
Excellent idea. It'd be so cool to finally be able to see what lies beyond that goddamned stage I could never beat.
And this is when I realize I was actually rather good at Battletoads when I was a kid. I was able to make it to the sewer stage easily without using continues. Damn those fan blades, though!
7:47 This is such a good reaction
Try breaking down the AI of Bright Man in Mega Man 4. The attack he uses is based on how much health he has remaining. You can exploit this by shooting him once with the default shot before hitting him with the Rain Flush will prevent him from using his Time Stop attack on you.
I would love to know how Quick Man's AI works. It seems like it is actually random if he'll run, jump, or jump and shoot but naturally that can't be. There has to be some logic behind it.
Quick Man's AI is bugged... at least in the initial boss arena before the boss rush.
Quick Man's boss arena in his stage isn't exactly designed for him; he gets stuck a lot messing up his AI. Though unfortunately there is some literal fuzziness to his AI just like Shadow Man.
@@dracmeister compared to Shadow Man, Quick Man is seriously bugged, older prototypes of MM2 had a plain square box for its boss room, since its only weakness would have been Time Stopper (that could drain all its life), however, since the fight was too easy that way, they decided to add more stuff to the stage so you could use the obstacles to plant Crash Bombs, its second weakness.
@@jironamos7650 thing is at least Shadow Man works eventhough THAT slide can be BS at times. Quick Man, after some digging, actually moves a bit too many pixels forward everytime he moves and since there isn't any algo in him that makes him stop in the correct amount of pixels if his speed in pixels is less pixels than he is towards a wall, he walks into it and only then the game stops him from clipping into the floor.
This series has made me curious about the tools Codemasters used to find and publish their original Game Genie codes. Did they just dump retail games to a dev kit and do the same kind of process you go through in a Behind the Code video?
I think they created a system that interrupts a game before starting and modifies RAM values on the cartridge
We are so spoiled by being able to watch RAM live on a high resolution display. Those poor devs...
I dont think they did really.... i remember almost all of the codes they published were simple things you could easily find by just inspecting RAM and looking what values change by doing something in-game etc! i barely ever came across codes that would have required analysis of the cartridges storage (ROM)
I always felt like MM4 was the first one that actually progressed the gameplay fully. I've personally loved the slide and charge shot, and the earlier games feel incomplete to me without them. I'm also that weirdo that likes the latter three entries on the NES the best! Great content as always.
"and a fully-charged blue streak"
Me: "...SPEEEEDS BYYYY! SONIC THE HEDGEHOG"
Too fast for the naked eye!
How about Crashman? He jumps when you shoot, or after a timer expires if you don't shoot. But if he's the first boss you visit, that timer *never expires.*
Hmm. That sounds familiar. I think I dove into Skull Man first for getting footage. I didn't look at his a.i. in code - only did a bit of commentary on it.
@@DisplacedGamers That whole thing with Skull Man not moving until you move was something I never noticed, but I have noticed it with Freeze Man from MM7.
Gemini Man's first faze doesn't shoot unless you do.
Toad Man jumps after being shot or when you get close.
Proto (Break) Man doesn't shoot unless he is close to you and facing you.
Gamma's second faze doesn't fire if you're on the edge of the screen.
Elec Man's shots can be interrupted if you shoot him when his arms are up.
Fire Man shoots when you do.
Bomb Man jumps over you when you get close in a similar fashion that Metal Man does.
I am probably forgetting a few. But the other robot master seem to fall into two categories. Ones that follow a strict pattern like Ring Man. And ones that have an RNG subroutine like Shadow Man. Not too many I can think of that change behavior directly to you other than the ones I listed.
I think you're really onto something with these Behind the Code videos. They are extremely entertaining. My request is Rampage on NES. Think about it. Punching a building down in one shot, super speed, giant leaps. I'm sure you could do it in 20 minutes! Again, thanks for the great content.
Dr. Light could learn something watching this video 😆
This is one of the best ones yet! I definitely loved this one! Maybe it would be cool to see how level design in these old NES titles works in terms of the programming: how boundaries like walls and ceilings work in the code, how ladders and doors are implemented. And how just the grid of backgrounds are 'imbued' with these properties, as well: is it on a tile by tile basis, or are the backgrounds simply stacked up in code and then separate code gives them their properties like "characters can't go through this pixel, they can climb up this pixel." Lots of great platformers this would work on.
Also, some info about Game Boy or SNES titles would be most welcome!
Man, your videos are always so good. I wish you nothing but the best
とても参考になりました。ありがとうございます。Thank you. It is helpful for learning debugging.
Mega Man 4 - the game the ruined the series by making you listen to that charging sound for the rest of your life.
Owwwwwwwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwerwer-PSQUEWWW!!!
Haha, so true. It is the worst part of the progression for this and future games.
If you are into patching ROMs, pick up "MM4 - Charge Shot Sound Fade Out" from MetHy.
The worst thing about it is how it eats sound channels so the music suffers in addition to the charge sound being so loud.
Even though 4 is critically a massive improvement over 1-3.
7:48 That chuckle is priceless haha, I wanna hear more of your evil grinning when you torture these games :-D
So cool! As a beginner I feel like I juuuust barely know enough about programming and the different base numeral systems to make it through the video, so your explanations were great
Really enjoyed this as always, and I liked that you let a little more humour show through in the voiceover! Really enjoying these, and I've been inspired to slowly work on my own tiny rom hack based on your methods.
That's awesome! Best of luck with your rom hack!
This is my favorite video so far. Thanks so much for doing these! :D
I'd love to see more about reprogramming boss patterns across the various games as well as special weapon behaviors for Megaman (and boss) weapons! :D
It's really cool seeing all the nuts and bolts of how this stuff works. Thank you for making these videos!
now sliding on mega man 1 and 2 would be a feat
seems rather hard to fit in even 5 game genie codes
I love your "Behind the Code" segments!
Keep up the good work!
I love the focus on debug in this episode. Very well made
I love the Mega Man series and I'm so glad to see this video! I don't know specifically what I would have you cover, but I would love to see more Mega Man.
Well this just made my morning. It's always a good day when a new Behind the code episode is released.
I didn't know Megaman bosses had AI. I'd definitely love to see delved into on a video.
It is not AI. It's just regular logic. You need a feedback mechanism to produce learning in AI. The author of the video is using the term wrong.
@@spocktacular1701e who gives a shit
Just discovered your channel, I still don't know assembly but your videos explain it in the most comprehensible way I've seen yet. Looking forward to watching more! 😄
They did some cool things with it in the Mega Man X series. The boss powers get charged, and in X3, had some pretty nice effects
Really loved this one. Getting a peek at your process for reverse engineering this games was very instructive.
Just watched the new Video Game Animation Study video on Mega Man and was hoping you'd tackle the series soon as well. Turns out I just had to wait 3 days and it was just as good as I'd hoped! Happy about a bit less focus on the code, too-I love the peek behind the curtain but so much of it is lost on me that it could get a bit much.
You make really cool stuff!
Been following for a while and you've given me a better appreciation for the more technical side of older games. Crazy how any of these worked haha, a lot of creative nonsense
Very good explanations. The editing really clarifies a lot of the intricate aspects!
Thank you!
Amazing as always, great videos. Please keep'em coming
This was a fantastic breakdown of your process! I learned a lot AND it was a fun exercise playing with Mega Man’s charge shots. Thanks!
Thanks, Jeff!
Gotta love that you can bother to translate them to game genie codes.
One thing I'd like to know how to do is fix the slide move for Mega Man 6. In that game, unlike in 4, 5 and 6, you can't jump out of a slide, and attempting to do so causes you to cancel your slide instead. This makes sliding much more rigid than in the previous games. There's also this slight stop at the end of a slide. Getting rid of these, however small they may be, would go a long way towards making playing Mega Man 6 a much more enjoyable experience.
Another smaller thing I'd like to know is the value for the charge shot release sound effect. Mega Man 6 uses the standard Mega Buster shot sound effect, which sounds kind of wimpy.
This video was absolutely fascinating, and I hope you make more for the Mega Man series, or whatever else. Keep up the great work!
I’d personally like a follow up on the Charge Shot as it functions in Mega Man 6! It has different properties than what’s found in 4.
"player action influences AI" That reminds me so much of the "weapon swap mod" for Dark Souls and how it confuses the enemies. In one case having a boss leave the arena because its AI go so confused by the fast weapon swaps.
I was binging your channel the other day so waking up to this is like a gift from teh g0dz. Great work!
Great!! Thank you for the excellent episode!
Thanks for watching!
The first game I ever saw a "charged shot" in was r-type (I think.. it was a real long time ago now). The most recent one is in Destiny 2.
As a programmer I eventually rewrote the system in javascript (my current preferred language) and added it into at least two of my games (a space shooter just as it happens) and an unreleased Red Dwarf game I was making. It just feels so nice. In my red dwarf game you can hold down the start or A button and itll fill a small bar, eventually skipping the "story". The space shooter is more in line with the "power up the beam" you fire.
This is honestly so enlightening and informative.
Why can't all of UA-cam be this intelligent and informative
All these years. I knew how a Game Genie worked, but now I understand. That alone deserved a sub lol
It would be interesting to see a breakdown of the Big Eye enemy from mega man 1. Urban legend has it that it will do a big jump (so you can run under it) if you jump at the right moment and others say it’s totally random whether it does the big hop or the little hop and has nothing to do with your input.
I spent a decent amount of time trying to workout a game genie code that would set the default time for the NWC game to the competition value. In the original NWC there are dip switches for setting the time with the competition time (of about 6.5 minutes) requiring a specific setting. But when you load the NWC rom on a flash cart there aren't dip switches to set so you only get just under 5 minutes. Watching this video gave me a bunch of ideas of how to tackle this :)
Damn it was really fun to see your process to find out stuff about the game code! More content that shows your experimentation could be cool!
Thanks, link! I have another one in the making at this moment...
Insane prowess!
Good video :)
In general, I loved that the Charged Shot took away the tedium of the weapon weaknesses. The damage levels of charges: I wish it was 1, 2, and then 4 or 5, because it takes so long to charge.
What the actual fuck... Excuse me WHAT?
Having watched your previous Behind the Code videos, I tried utilizing your method to figure out how the code worked and see how I could experiment with it, starting with Mega Man 1 (American and Japanese versions), but I wasn't completely sure of what I was doing. Now that this video covers a Mega Man game and employs the same emulator I normally use, I hope I can get a better understanding on how to identify those variables.
If you were to continue with the Mega Man series, I would like to see comparisons between each game's physics, similar to what you showed with the Ninja Gaiden games.
You made ASM wizardry feel more approachable here. The era when like all programming was done the same ways is so underappreciated. The tools today make things SOOOOO much easier!
A future series I would highly suggest doing involves the Zelda Classic quest system. The potential with it is already shown to be amazing!
Very rarely do I find a channel that immediately goes into "instant favorites" category. This is some truly fascinating stuff
Is it theoretically possible to eliminate the full charged up sound so we can hold that button all day long and still listen to those beautiful BGMs?
^^asking the real questions
You could probably NOP 808d and 809c, that way the JSR to the sound playback routine during the charge is never called.
@@twistedsoul I wish I understood what that means and could make my own game genie code
Possible codes
// Skip charging sound
XVAEIE
XVAETE
XVAEYE
// Skip Fully charged sound
XVPEGE
XVPEIE
XVPETE
Unfortunately it's not possible to skip both sounds in less than 3 GG codes.
Someone more clever than me can modify the Sound Effects 22 and 27 so that their first byte is $17, that will cause the sound engine to stop the sound effect immediately and that would only need two GG codes.
I was unable to locate which bank they live in though, possibly banks 1D, 1E or 1F.
But I don't know where those banks are mapped to during the game loop so patching them with a GG code might have some unintended side-effects since the banks are only switched in when a sound effect is needed according to these documents: www.romhacking.net/?page=documents&category=&platform=&game=1074&author=&perpage=20&level=&title=&desc=&docsearch=Go
@@twistedsoul wow thank you, I will have to try this out later!
the way you describe watching the hex code to figure out what's going on is basically the exact method I used to hack my bluetooth on my volcano vaporizer, though in reverse because i could only throw numbers at addresses. I eventually got full control of the thing at the hex level completely outside the official app[which had broken for me]
Great video, I love that kind of stuff
This is giving me flashbacks to the the navi customization from the battle network games
Seeing Skull Man's reactive behavior reminded me that Freeze Man from MM7 is essentially the same. He will stand there and just give you the "Come get some" hand wave until you move or shoot.
The "crash man dance" is a hilarious usage of the concept. You walk away at the start of the battle, he walks towards you, and as he turns around to walk away you turn around and follow him. Lather, rinse, repeat.
Awesome video as usual!. Can you do some videos about RPG damage formulas and how attack/defense works in the code, etc? Captain Tsubasa 2 is a great game with A LOT of stats, criticals, etc.
Awesome video. Debugging NES and reverse engineering games is remarkably similar to being an embedded software engineer. I'm going to have to give this a try.
Great watch, once again!
Amazing video yet again, all of these are really great.
Why you do think they went through all that code to make the damage 3 instead of just.... setting damage to 3?
Cut man has some cool instructions regarding your position and if you are jumping or not. Once you figure it out he is super easy.
That was clever. Nicely done.
Lol, this was fun, and a great exercise in how modifying things like what a character can do on screen in an action game can be quite a lot trickier than modifying static values such as currency or item quantities in a JRPG.
Skull man is actually very simple
if left/right is pressed: shoot three aimable shots, then start listening for inputs again
if B is pressed: jump twice, activate skull barrier, run forward, and then wait a moment before listening for inputs again
That's not exactly how he works
First of all, his response to pressing B is only jumping once, not twice (then using skull barrier etc.). Something else you forgot to mention is that skull man can't repeat the same action 3 times in a row. So, if you press left/right 3 times, on the third press he'll jump instead of shooting
This is great. Hope to see you fool with the charge shot in other Mega Man games as well
Thank you for this video, i happen to also have messen too and i was looking for a charge shot cheat, thank you!
I just found this channel, as "boring" as the information may seem i find it fascinating. Subscribed
First, I love Megaman 4, it's was the game that I played when I was a kid and I could never win against Dr. Willie. Second, you are amazing, and third, I understand nothing! But really, this was
good and entretaining!
Did some experiments with the game Genie codes you provide here it turns out the large damage code you give has a side effect of also giving that same large amount of damage to charge versions of the Pharaoh shot. And the always shoot charged Buster shots code if you use only the graphics half alongside the mega damage. It works as charged shots without even the sound portion and that always charged shots code also allows you to shoot charged shots with Bright flash, Rush Coil, Jet, marine and even Wire (when wired onto something)
I wish these videos would have been around when I was a teenager!
I love your channel.
This was very interesting to look into, especially since I just finished Mega Man 4 the other night, haha!
One thing in the Mega Man series I'm interested to know about is the damage hitbox of Wily Machine 2 in Mega Man 2, namely in the second phase. It'd be nice to know what exactly is the hitbox size/shape of the shots from that phase.
Big fan of mega man, no experience with this kind of coding but was still very interested. Well done.
There might be some interesting story telling looking through Mike Tyson's Punch Out. It's a beloved game by many, with deep speedgaming lore, and so many curiosities in its playthrough. Not sure what you might find in your code walking.
This is awesome, thank you. You almost made it look like I could attempt to dive into the code of games myself to figure these things out °-°.. Nice
Go for it!
You can! The best way to learn is by diving in and trying it yourself. Mesen's simple to set up.
Nice creative solution to use BNE to branch always because you loaded $#64 before it. I like those kind of solutions :)
Most people don't use the special weapon adds you gain from the bosses, and there for most people handicap them self till they actually have use of it.
Using a special weapon casual is something that people just didn't do most of the time.
There for I think it was a great thing to add in the charger to make the game play more interesting.
Thanks for the good tutorial.
Love Megaman!! Dude, love your content and attention to detail. How does MM4 Pharaoh Mans charge weapon work? Is the code different? Does it share with how the robot master uses it? Curious.
A fully charged mega buster sounding like a boss door? Yes please!
Man that really makes me wanna see more megaman espacially for the bosses! Do you think you could like switch their AIs around? That could be fun to see!!
Damn yo, this is a video near and dear to my heart. Never could figure out (nor beat) Megaman 4, and had Game genie (lucky you with the debugger, haha) and ALWAYS tried to make this code OR make an instant mega buster code. Only 30 years too late, where were you back in the day? lolz Thanks for the vids and subbed and gonna watch this series.
AURGH! You Found it!!!! Damn, i didn't finish this video before I commented, but you found the super damage boost code AND converted to Game genie.
One boss I'd really like to see an analysis of is Elec Man: it seems like he just jumps around randomly throwing shots everywhere, but that's apparently not the case, given he can be locked into a stun loop. Also, apparently he tends to jump and shoot a lot if you're on the left, so he'll often shoot over you if you stand at the spot where the Guts blocks used to be?
Very good video. It is very intersting to see the 2KB Ram evolving while playing.
Do you think it could be possible to convert the assembly code to a C code ? (I know variable would have a dummy name, also functions, but maybe it should be intersesting). I don't know the NES assembly, but I know the 8086 assembly, we could consider each "CALL" as a function call and RET as return to cut the whole program into several functions !
I've never watched your channel before but youtube suggested this video to me. Ooo definitely the algorithm knows me well, I'm loving this! ez sub from me!
This was epic!!!
With the help of Dall E 2, folks like you could make sweet Mega Man games practically solo!
Having lived in Yorkshire (well, Scarborough) for a long time whenever you mention the emulator "Mesen" it always confuses me for a hot second.
"Me'sen" in northern England is a slang term used for "myself".
So, "I went to the show by myself" translates to "I went t' show by Me'sen"
I love these videos man, keep them coming
WEN TUT SHHHOWWW
God I love this channel. My inner child and inner nerd are finally getting along.
0:00 the fact that you ordered them
"1 2 3
5 4 6"
Pains me greatly
I personally LOVE the charged shot in Megaman games! it's something that does indeed make them easier, but also a lot more fun at the same time. I find myself playing the later releases more that have the charged shot simply due to that mechanic vs playing the older releases that don't have it!
I dunno if you've ever abused the Metal Blade in MM2, but if you want to make that game easy in a hilariously broken way, that's the tool for the job.
Can your hacks/changes run on the legacy collection on Steam? Awesome videos, keep it up!
I always wanted to reverse the logic of the megabuster. Charge when you do nothing, release when you press b
After finding out how the charge works as an incrementing counter, my thought to half the charge time would have been to just find a way to increment twice instead of once. I suppose there's no easy replacement point to get that done cleanly in this case.
I wish there were people at your level doing things for the Saturn. I feel like that system never got the love it deserves.
I wish Mesen and Mesen-S were still in full development and not archived. They are great emulators with a rich set of tools!
They have really blown me away. In fact, I feel like they set the bar for debugging capabilities for emulators.
Nice videos you make , althought am a fresh noob ..lol
But coded in the late '80 my MSX 2 ..
Still working and in my living room as display ..lol
Grtz from the Netherlands
Johny geerts
The Charge Shot became a Mega Man mainstay for its basic versatility and no game in the series should've gone without it. Why? As mentioned in the video, the level layouts have to take into account. While not making the game harder per se, a properly implemented Charge Shot level design would put enemies into positions where a well-made blast could save the day, but at the same time, creative level design would make different stages take Special Weapon utility into notion. The Buster was always an underpowered weapon, and giving a charging capability made the player feel more powerful, more in-control. At the same time, it is a completely optional add-on. While a skilled player can negate the use of most Special Weapons during a run, to most people the Special Weapons still offer far more utility.
Much like Sliding, Dashing and the Triangle Jump, Charged Shot was ultimately a core addition to give the player more options in offence and mobility, but sadly, out of these Charge Shots went rather underutilized, par Mega Man (World) 5 on the GameBoy. In no game do the enemies react differently whether or not Mega Man has a charge or is shooting the Charged Shot, something that could've brought much-needed dynamics to the play decisions. It was a great addition that never had the fine-tuning outside it deserved (outside MM4 and 5 on the GB.)
That said, giving a look at the two aforementioned GB games might be of interest.
Thanks for another great video! The Behind the Code series is neat, but I really liked your videos on analog video. Would it be possible to do more of those? Or, better yet, if you're knowledgeable about line multiplying analog sources for fixed pixel displays, I'd be super interested in that!
Hey Andrew. Actually... I have a video-related video coming up next if things go according to plan.
@@DisplacedGamers Excellent, I look forward to it!
Reminds me of the kind of work I’ve had to do on the Pokémon TCG GB randomizer.