Points of Required Attention™
Friendly reminder: Please don't respond to spammers! Their posts inevitably get memory-holed when staff get around to, leaving behind an inexplicable tableau of you shouting at nothing and (if they otherwise would have been alone in a thread) dangling posts and wrong postcounts.
Views: 46,862,109
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 03-19-18 02:18 AM
Guest: Register | Login

0 users currently in ROM Hacking | 1 guest | 2 bots

Main - ROM Hacking - General Megaman Hacking Thread New thread | New reply

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82

Posted on 03-02-18 01:08 AM Link | Quote | ID: 166253

Level: 2

Posts: 3/4
EXP: 33
Next: 13

Since: 03-01-18

Last post: 16 days
Last view: 12 days
Well I definitely appreciate your help so far. I have one theory but I'm not sure if it's the cause of the issues. In the MegaMan 5 ROM map (https://datacrystal.romhacking.net/wiki/Mega_Man_5:ROM_map), there's a section called "Main Banks" which has something called 1-byte relative pointers. If the palette data is 1-byte then it's not going to be the numbers I've looked for previously, correct?

Quick Curly
Posted on 03-02-18 01:55 AM Link | Quote | ID: 166254

Giant Red Paratroopa
Level: 72

Posts: 1413/1414
EXP: 3174031
Next: 149731

Since: 06-15-08
From: Earth

Last post: 8 days
Last view: 1 day
You're welcome.
That's interesting. There is an "initial sprite palette" at 0x3D4C2 that is lit up in blue (logged data bytes). I overwrote "2C 11" with "05 2A", but never saw those colours set as Mega Man spawned into Stone Man's stage. Instead, the values at 0x0255A were applied.
Sorry for any misinformation I may have provided. I was attempting to make educated guesses for potential approaches based on what I've seen before in some games, but different games use different methods to achieve similar things, so it might not be a line of code with the palette value(s) represented as code while logging instead of data appearing as a table with code loading the values one by one. Again, I'm not sure, but I'm interested in the experimental process.
Sorry in advance for what might seem like a wordy post that goes back and forth a lot. I was updating the post as I was trying things out, so my processes of thinking and acting are covered.

Here's what I've found so far. In FCEUXD, I tried setting write breakpoints to $3F12 and $3F13 (the part of the palette for Mega Man where 2C and 11 show up when viewing the PPU Viewer in the built in hex editor), but the debugger never froze to confirm the source of the palette changes.
So, I used the Code/Data Logger and ran it from the main menu while loading up Stone Man's stage to log the code and data used.

0x0254A-0x0254D (0x4) - 0F 0F 2C 11 - This palette is used while holding B to charge up (I tested this palette by changing "2C 11" to "05 06" to notice the reds flash at the beginning of the charge up).
0x0255A-0x0255D (0x4) - 0F 0F 2C 11 - When spawning into Stone Man's stage, this was the palette loaded for Mega Man (I changed "2C 11" to your "3C 02" and the colours were set correctly when spawning in, but reverted after shooting).

I suppose the similar "2C 11" palettes nearby could be involved with the multiple colours for the charging up animation, maybe.

I just searched for "0F 0F 2C 11" in NES Memory, and found the object and sprite palettes within $0600-$061F. I set a write breakpoint to $0612 (currently, your modified 3C).
When I tried shooting with Mega Man, the debugger froze on $9177 (0x37187 in ROM).

$916B:B9 47 8F  LDA $8F47,Y @ $8F47 = #$0F
$916E:8D 11 06 STA $0611 = #$0F
$9171:8D 31 06 STA $0631 = #$0F
$9174:B9 4F 8F LDA $8F4F,Y @ $8F4F = #$2C
$9177:8D 12 06 STA $0612 = #$3C
$917A:8D 32 06 STA $0632 = #$3C
$917D:B9 57 8F LDA $8F57,Y @ $8F57 = #$11
$9180:8D 13 06 STA $0613 = #$02
$9183:8D 33 06 STA $0633 = #$02
$9186:A9 FF LDA #$FF
$9188:85 18 STA $18 = #$00
$918A:60 RTS

$8F4F is 0x36F5F in ROM. The value is 2C. When I changed it to 3C and shot, Mega Man's colour didn't change back to the original.
$8F57 is 0x36F67 in ROM. The value is 11. When I changed it to 02 and shot, Mega Man's colour didn't change back to the original.

There are multiple values of 2C and 11 together within this area. Perhaps they all need to be changed? More testing might be required.
Just tried charging up. The original blues for Mega Man are displayed while charging; however, after changing the 6 "2C" bytes to "3C" and the 6 "11" bytes to "02", those colours are visible throughout the initial charging animation. However, original blues are still visible in full when fully charged. Not sure if it's how you want it to look or not. I tried changing all of the nearby "2C 11" strings back in the 0x0254A-0x02599 area in the ROM in the hex editor, but I can still see some blue (even though the new "3C 02" appearance shines through if you look carefully). Again, more testing might be required.

I'm not sure what the relative pointers might have been, but I believe that I was at least able to find the solution to your main issue. Please keep us updated.

Posted on 03-02-18 08:31 AM Link | Quote | ID: 166255

Level: 2

Posts: 4/4
EXP: 33
Next: 13

Since: 03-01-18

Last post: 16 days
Last view: 12 days
Eureka! That's it! Currently I'm messing around with different color combinations to see what works best. I may now move on to editing the color of his projectiles. Thanks again!

Posted on 03-09-18 08:21 PM Link | Quote | ID: 166263

Giant Red Koopa
ROM Hacking is life!
Level: 71

Posts: 1330/1330
EXP: 3085214
Next: 81900

Since: 02-19-07
From: Brooklyn, NY

Last post: 9 days
Last view: 9 days
Posted by Zieldak
Posted by Googie
Thanks for the help, man. I really appreciate it, but now I have another problem. I deleted all the blocks on Ice Man's stage, and now when mega Man is walking a few screens where the water is supposed to be, he falls through the floor, I have no idea on how to fix this, any tips?
You mean the disappearing blocks, right? I remember seeing similar glitches happening in your first hack and some others (redownloaded your hack's readme, yeah, you even pointed it out), which is probably (definitely actually) caused by the same thing.

That glitch happens because the game still tries to treat the first 18 special objects (you removed) as yoku blocks, however, there are only 4 special objects left in the whole level at the end, so the game goes derp.

Go to 1612A in the ROM and NOP 1612A-1612D.
I mean
1612A: EA EA EA EA

The game will no longer treat the first 18 special objects in Ice Man's level as disappearing blocks basically. The heavy lag will also be gone!

If you want to remove Elec Man's yoku blocks too then:

1612E: EA EA EA EA

If you however want to use those disappearing blocks elsewhere (revert those earlier changes if needed), you can easily change which level they're used in instead (and how many blocks there are.)

1612B: 01 (Ice Man)
1613C: 66 (There are 18 blocks in Ice Man's level, formula is (NumberOfBlocks-1)*6 in dec, convert to hex), 0 means there is 1 block?)

1612F: 04 (Elec Man)
16140: 2A (8 blocks in his stage, same formula)

Keep in mind that the game treats all special objects as disappearing blocks, regardless of their type (00-03). So you can't place a Guts block before a yoku block section and expect it to act as a guts block.

Not sure why it stops happening once you beat Fire Man though.

Thanks again, man. I changed the offsets and Mega Man doesn't fall through the floor. The Blocks on the other hand still pop up even if in the editor I deleted them but it doesn't affect the game play. Here's some screens.

I never realized how buggy MM1 is, I hope when I hack MM2 in the future I won't go through this, I'll finish the rest of Ice Man's level by today, and I'll tackle Fire Man's level this weekend. I really want this hack to be decent when I'm done with it, unlike my first MM1 hack, which I'll admit is bad and buggy...

Posted on 03-10-18 12:23 AM Link | Quote | ID: 166264

Level: 38

Posts: 373/373
EXP: 345442
Next: 25005

Since: 12-01-11
From: Hungary

Last post: 9 days
Last view: 9 days
Try removing the Disappearing Block Generator (Enemy ID 10) too in case you didn't.

I should look further into this Forget Special Objects stuff. *Checks vanilla game but edits that code* It's good to know the Yoku Blocks still work properly even if you NOP those bytes.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82

Main - ROM Hacking - General Megaman Hacking Thread New thread | New reply

Acmlmboard 2.1+3δ (2016-01-08)
© 2005-2016 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.153 seconds. (346KB of memory used)
MySQL - queries: 57, rows: 83/0, time: 0.139 seconds.