Register - Login
Views: 99794443
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 05:14:31 AM
Jul - General Game/ROM Hacking - Mega Man 2 Time Attack Mod New poll - New thread - New reply
Next newer thread | Next older thread
GuyPerfect
Catgirl
Level: 68


Posts: 681/1096
EXP: 2665653
For next: 63147

Since: 07-23-07


Since last post: 1.7 years
Last activity: 219 days

Posted on 06-03-11 12:56:54 AM Link | Quote
It's been quite a while since I hacked a ROM, I do say (and I certainly do value my opinion). I've been off doing/hacking other things, you see, and just got the idea to hack something in particular just a couple days ago.

The particular something in question is Mega Man 2, best known not only for addressing all the terrible design considerations of its predecessor, but for paving the way for practically all Mega Men to follow: 8 bosses, good weapons, letting Dr. Wily escape from the final battle, etc. etc. Mega Man-y things.

I was poking around in my Wii channels and found a small collection of Mega Man titles: 2, 3 and 4 for Virtual Console, and 9 and 10 WiiWare. They were all subsequently beaten. Then I downloaded Special Stages 2 and 3 in Mega Man 10 (I already had Special Stage 1) and tried my hand at some speedrunnage. And it was smooth and enjoyable; something no other Mega Man game can match!

For you see, Mega Man 10 allows you to switch weapons on the fly without opening the pause menu. Speed runs in other games wind up looking a lot like this:



You know how it is.

I figured modifying one of the ancient NES titles to grant similar functionality couldn't be too difficult, so I got to looking into it and (as the existence of this thread I assume indicates) found that the idea is the very opposite of farfetched. It is... nearfetched...

Unfortunately for me, it wasn't a simple matter of changing the variable that indicates which weapon you're using. That's most of it, but it doesn't update the graphics data at all. This includes the palette and tile pixels. The palette was easy enough to adjust thanks to a subprogram that Capcom wrote, but the tile graphics were tricky indeed...

See, the NES only has room for 512 tiles in video memory. When you select a weapon in the pause menu, its graphics are loaded into a shared region of video memory that changes depending on the weapon selected. So you're basically looking at only the tiles needed for the current weapon, and all the other tiles aren't loaded. But that's just scratching the surface of the tip of the iceberg...

Funny thing about NES tiles, you have to transfer them one byte at a time because the PPU has its own memory separate from the CPU memory space. Not surprisingly, you can only do this during VBlank, which gives you time for, like, two tiles' worth of data. Per frame. Every time you change your weapon. Compound this with the fact that the tile data in question is stored in a different memory bank within the ROM (accessed via our good friend MMC1's switching mechanism), and you get an ordeal just waiting to be overcome.

Fortunately (ever so fortunately), the game was within its data size budget and the end of the ROM is padded with dummy data, which just so happens to be in the memory bank that's selected into CPU space during gameplay. There was room enough to copy the tile pixel data from elsewhere in the ROM, as well as a few bytes extra to insert some custom-made program code... And you totally know that's exactly what I did!

I don't get to work in Assembly very often, so this was really fun (I like to have total control over computers, and this is certainly that). Let's take a look at the modifications I made:
  • All weapons and transportation items are unlocked from the outset in such a way as to not affect the program control system that drives the game. Ordinarily, the game equates "weapon owned" with "boss defeated," which wasn't quite what I was going for. This mod allows the two to remain separate, and thusly allows you to enter a Robot Master's stage while already owning the weapon they give you.

  • Time Stopper can now be canceled. Usually, casting this weapon will force it to remain active until its weapon energy is depleted. You can't even pause the game while it's running... usually. But this mod lets you pause while the Time Stopper or any projectile is on the screen, which will cancel the Time Stopper and its remaining weapon energy can be used at a later time.

  • The pause menu handler was reprogrammed to allow cycling through weapons with the Start and Select buttons in the same manner as Mega Man 10. Start cycles forwards, while Select cycles backwards. Pressing both buttons at the same time will bring up the pause menu you've come to know and love, which you'll still want to have handy for those times when you need an E-Tank.

When it was all said and done, I had maybe a dozen bytes of space leftover in that padding area. But that's fine, since I did everything I needed to do.

It's not a perfect hack, since screwing with program code in unintended ways is far from guaranteed success, but the cases where it matters are few and far between and can easily be worked around with a little planning. Namely, some not-well-understood graphics code for things like those death beams in Quick Man's stage interferes with the code I wrote to copy weapon tiles to the PPU. But as long as you don't cycle weapons on those screens, you won't see any ill effects. There's nothing here that can cause the game to crash.

So how does it work out in practice? Wonderfully. Here's a sample Time Attack run I made for demonstration purposes:

<object width="425" height="349"><embed src="http://www.youtube.com/v/yvW8Lx6JXVc?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>

I know what you're thinking: where's the download link?

Well, that's where I'd like some input. I've got an IPS file ready, but I'm curious as to where would be the best place to host it. I have my own server, but I'm not likely to keep something like this up there forever. What kinds of hacking resource sites are keen on this kind of thing?
AlexAR
Member
Level: 39


Posts: 173/306
EXP: 388513
For next: 16258

Since: 11-30-07


Since last post: 9.0 years
Last activity: 9.0 years

Posted on 06-04-11 08:38:30 PM Link | Quote
For starters, that was a hell of a good idea and hell of a good implementation. An actual useful hack that contributes to more fun, kudos to you.

As for a host, if you make an account you can add it to the Romhacking.net database. Seems to be the most obvious place where it will get some exposure, you can even make a news article about it that gets posted to front page. Been awhile since I've uploaded anything, but the stuff I did got noticed and is still available some 5 years later..Shameless Plug :p

____________________
Visit Digital Space for my game news.
GuyPerfect
Catgirl
Level: 68


Posts: 682/1096
EXP: 2665653
For next: 63147

Since: 07-23-07


Since last post: 1.7 years
Last activity: 219 days

Posted on 06-05-11 06:39:07 AM Link | Quote
Hey, thanks for the feedback. It's been so long since I posted here that I was beginning to wonder if anyone was left.

... although I see that upside-down smiley they made in my honor certainly hasn't left.

Thanks for the heads-up with Romhacking.net. I'll definitely be looking into it.

I've had a chance to do some more research into NES operations and was able to address the glitchy graphics issue. Now you can switch weapons anywhere with no ill effects. I know, 'cause I played through the whole game just to make sure.

Still curious as to why they used a totally different program in the stage where you re-fight the Robot Masters... You get the normal start = pause behavior there, and Wily takes longer than usual to load, but everything else is smooth as expected.

Know what else I did today (I guess it's yesterday by now) just for kicks? Take a look at how not-Mega-Man-2 this bad boy is:

<object width="425" height="349"><embed src="http://www.youtube.com/v/AZUChh6Q9mc?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>
GuyPerfect
Catgirl
Level: 68


Posts: 683/1096
EXP: 2665653
For next: 63147

Since: 07-23-07


Since last post: 1.7 years
Last activity: 219 days

Posted on 06-06-11 03:05:01 AM Link | Quote
Oh dear lordy I need a life and an intervention.

<object width="425" height="349"><embed src="http://www.youtube.com/v/syRSYc9Vcj0?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>

That makes three such hacks in one week!
GuyPerfect
Catgirl
Level: 68


Posts: 684/1096
EXP: 2665653
For next: 63147

Since: 07-23-07


Since last post: 1.7 years
Last activity: 219 days

Posted on 06-07-11 01:42:19 AM Link | Quote
I'm not surprised. Are you surprised? I hope nobody's surprised.

<object width="425" height="349"><embed src="http://www.youtube.com/v/VNMNjlGMfLQ?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>

So that's four games with this hack in it. I haven't played Mega Man 6 yet, so don't expect its hack to show up tomorrow.

Hopefully I'll have these ready for download before long. But I have been tweaking them to tighten 'em up over the past few days.
Rena
I had one (1) message in Discord deleted and proceeded to make a huge, huge mess about how it was a violation of free speech and how moderators are supposed to be spam janitors and nobody should have the right to tell me not to talk about school shootings
Level: 135


Posts: 4172/5390
EXP: 29075351
For next: 259654

Since: 07-22-07

Pronouns: he/him/whatever
From: RSP Segment 6

Since last post: 342 days
Last activity: 342 days

Posted on 06-07-11 06:46:34 AM Link | Quote
Post #4172 ยท 06-07-11 01:46:34 AM
Next do it for Ocarina of Time. (Press D-pad to switch equipment for that godforsaken Water Temple...)

____________________
kuja killer
Random nobody
Level: 5


Posts: 1/4
EXP: 504
For next: 25

Since: 06-08-11


Since last post: 1.7 years
Last activity: 21 days

Posted on 06-08-11 12:54:56 PM (last edited by kuja killer at 06-08-11 10:12 AM) Link | Quote
I really like it alot. You did a great job making these time attack hacks.

Have you ever seen that i did that for my megaman odyssey rom hack too? I created a whole time attack system myself a couple years ago. And i tried to make it much more appealing by adding a whole gold-silver-bronze medals awards system where if you complete the stage within [xxxx] time, you'll get a shiny animated medal on the main time attack stage select screen. Each medal has it's own seperate target time.

but still cool that you made some hacks
-----------------

and in japanese
GuyPerfect
Catgirl
Level: 68


Posts: 685/1096
EXP: 2665653
For next: 63147

Since: 07-23-07


Since last post: 1.7 years
Last activity: 219 days

Posted on 11-15-11 04:38:30 AM Link | Quote
Dang, this should be a much bigger necropost than it is. ROM hacking's not so hip these days I take it?

I finally got around to hacking the first Mega Man game for this particular mod. I still need to look into getting patches posted.

<object width="960" height="720"><embed src="http://www.youtube.com/v/HkTnmAd9tf0?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>
kuja killer
Random nobody
Level: 5


Posts: 3/4
EXP: 504
For next: 25

Since: 06-08-11


Since last post: 1.7 years
Last activity: 21 days

Posted on 11-15-11 07:04:03 PM Link | Quote
how do ya know what your time even is ? it shouldn't be too hard to put in a timer display. You should be able to easily fit in the 0-9 number tiles in any of the 6 NES games, especially mm1 because of the points counter already there.
Kenshi
Member
Level: 21


Posts: 56/75
EXP: 47478
For next: 2465

Since: 09-15-07

From: NY

Since last post: 6.9 years
Last activity: 6.3 years

Posted on 01-08-12 06:14:37 PM Link | Quote
Amazing job. Not only did you come up with a great idea, but you implemented it perfectly. I'm really hoping you batch release the IPS files on your website at least temporarily. I'm gonna permanently store them on my dropbox account as I'm collecting all the best Rom Hacks I can find on there.
Bisqwit
90
Level: 22


Posts: 18/94
EXP: 55462
For next: 2888

Since: 03-12-12

From: Finland

Since last post: 8.5 years
Last activity: 6.6 years

Posted on 07-13-12 10:37:13 AM (last edited by Bisqwit at 07-13-12 10:38:16 AM) Link | Quote
I have to say, knowing exactly what is involved in creating a hack like this (at least for Rockman 1 and 2, which I am quite familiar with), makes this twice as impressive. There's hardly any lag in it, either.
And the fact that you created it for all the six games five games, if I understood correctly.

I see you solved the problem of limited CHR-RAM space by vanquishing the shots of the previous weapon the instant the weapon is switched. That is probably the only other option to waiting until the shots disappear.
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - Mega Man 2 Time Attack Mod New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

31 database queries, 5 query cache hits.
Query execution time: 0.089429 seconds
Script execution time: 0.023124 seconds
Total render time: 0.112553 seconds