Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,476,882
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-24-24 12:13 PM
Guest: Register | Login

0 users currently in ROM Hacking | 3 guests | 1 bot

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 83 84 85 86

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

Newcomer
Level: 5

Posts: 3/4
EXP: 379
Next: 150

Since: 03-01-18

Last post: 2245 days
Last view: 2240 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: 77

Posts: 1413/1443
EXP: 4171653
Next: 19476

Since: 06-15-08
From: Earth

Last post: 19 days
Last view: 19 days
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.

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

Newcomer
Level: 5

Posts: 4/4
EXP: 379
Next: 150

Since: 03-01-18

Last post: 2245 days
Last view: 2240 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!

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


Giant Red Paratroopa
Level: 77

Posts: 1330/1407
EXP: 4180449
Next: 10680

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

Last post: 7 days
Last view: 7 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...

____________________
My Linktree

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


Crow
Level: 42

Posts: 373/387
EXP: 512284
Next: 9078

Since: 12-01-11
From: Hungary

Last post: 1309 days
Last view: 1200 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.

Zynk
Posted on 03-20-18 01:49 PM Link | Quote | ID: 166275


Purple Leever
Level: 32

Posts: 177/209
EXP: 195930
Next: 10512

Since: 10-19-12

Last post: 78 days
Last view: 1 day
Anyone know how to adjust the cursor on Mega Man 6's title screen? I managed to hack-in the JP title into the US ROM, but the cursor is a tad lower positioned.



____________________

Quick Curly
Posted on 03-20-18 05:42 PM Link | Quote | ID: 166276


Giant Red Paratroopa
Level: 77

Posts: 1415/1443
EXP: 4171653
Next: 19476

Since: 06-15-08
From: Earth

Last post: 19 days
Last view: 19 days
0x7CEF8: "PRESS START"/"GAME START" vertical placement for the cursor after moving the cursor (AB).
0x7CEF9: "PASS WORD" vertical placement for the cursor after moving the cursor (BB).
0x7E4CE: Horizontal placement for the cursor (2C).
0x7E4D7: Initial vertical placement for the cursor when the title screen loads (AB).

Increase a value for the cursor to appear lower towards the bottom of the screen.
Decrease a value for the cursor to appear higher towards the top of the screen.

Relevant code with a write breakpoint for $04CD:

When loading the title screen ($E4A7 in RAM is 0x7E4B7 in the ROM):

$E4A7:A9 00     LDA #$00
$E4A9:9D B4 04 STA $04B4,X @ $04B6 = #$00
$E4AC:B9 B9 E4 LDA $E4B9,Y @ $E4BE = #$2C
$E4AF:9D 86 04 STA $0486,X @ $0488 = #$2C
$E4B2:B9 C2 E4 LDA $E4C2,Y @ $E4C7 = #$AB
$E4B5:9D CB 04 STA $04CB,X @ $04CD = #$00
$E4B8:60 RTS

After moving the cursor ($CED8 in RAM is 0x7CEE8 in the ROM):

$CED8:B9 E8 CE  LDA $CEE8,Y @ $CEE9 = #$BB
$CEDB:8D CD 04 STA $04CD = #$AB

Hopefully this helps. Best of luck!

Zynk
Posted on 03-22-18 08:37 AM Link | Quote | ID: 166282


Purple Leever
Level: 32

Posts: 178/209
EXP: 195930
Next: 10512

Since: 10-19-12

Last post: 78 days
Last view: 1 day
Yes! This did it! Thanks QC

____________________

Trinitronity
Posted on 04-13-18 12:57 PM (rev. 2 of 04-13-18 12:57 PM) Link | Quote | ID: 166306


Porcupo
Level: 38

Posts: 303/311
EXP: 351044
Next: 19403

Since: 02-04-13

Last post: 1936 days
Last view: 578 days
So...I assume there's still no progress in terms of music hacking in MM3?

DannyPlaysSomeGames
Posted on 09-16-18 03:27 AM (rev. 3 of 09-16-18 03:28 AM) Link | Quote | ID: 166524


Octorok
Level: 12

Posts: 1/29
EXP: 7066
Next: 855

Since: 09-16-18
From: Somewhere

Last post: 1703 days
Last view: 189 days
Hey there, I'm new here, although I've seen this thread a couple of times.

Now that I finally decided to get an account, I was wondering if I could get some help.

So I've had a couple of old trash Megaman ROM hacks of my own for a while now and I decided to actually make something decent with them. Right now, I'm trying to rework and redesign the sprites for a MM1 ROM hack. I was wondering if there's a way to change the x/y pos of some of the sprite tiles and if you can even swap them to take advantage.



The thing I wanna change specifically is Megaman's face's position. I know there's like a disassembly floating around there, but it's only partial, and I couldn't find any details on the sprite layouts.

Anyways, thanks!

____________________
Hey there

gazou
Posted on 09-17-18 01:10 PM Link | Quote | ID: 166526

Newcomer
Level: 6

Posts: 3/6
EXP: 665
Next: 242

Since: 09-12-18

Last post: 2030 days
Last view: 2051 days
your glasses are very 3d-y

DannyPlaysSomeGames
Posted on 09-17-18 09:57 PM Link | Quote | ID: 166527


Octorok
Level: 12

Posts: 2/29
EXP: 7066
Next: 855

Since: 09-16-18
From: Somewhere

Last post: 1703 days
Last view: 189 days
Posted by gazou
your glasses are very 3d-y


Yes, those are 3D glasses, cool.

____________________
Hey there

Googie
Posted on 09-25-18 10:42 PM Link | Quote | ID: 166537


Giant Red Paratroopa
Level: 77

Posts: 1354/1407
EXP: 4180449
Next: 10680

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

Last post: 7 days
Last view: 7 days
Posted by DannyPlaysSomeGames



I like how the character looks, hope to see more...

____________________
My Linktree

Insectduel
Posted on 09-25-18 10:48 PM Link | Quote | ID: 166538


Hammer Brother
Level: 68

Posts: 1051/1069
EXP: 2687326
Next: 41474

Since: 02-16-08
From: Insectduel's office

Last post: 1255 days
Last view: 1254 days
Posted by DannyPlaysSomeGames
Hey there, I'm new here, although I've seen this thread a couple of times.

Now that I finally decided to get an account, I was wondering if I could get some help.

So I've had a couple of old trash Megaman ROM hacks of my own for a while now and I decided to actually make something decent with them. Right now, I'm trying to rework and redesign the sprites for a MM1 ROM hack. I was wondering if there's a way to change the x/y pos of some of the sprite tiles and if you can even swap them to take advantage.



The thing I wanna change specifically is Megaman's face's position. I know there's like a disassembly floating around there, but it's only partial, and I couldn't find any details on the sprite layouts.

Anyways, thanks!


I did remember doing sprite layouts even to enemies, but I hardly touch this game in a while. Now I kinda forgot where the x/y sprites located but the palette quad is easy.

Honestly, Mega Man 1 functions assemble sprites differently than Mega Man 2 but the sprite assembler for Mega Man 1 would be useful if someone designed it.

DannyPlaysSomeGames
Posted on 09-27-18 02:10 AM Link | Quote | ID: 166541


Octorok
Level: 12

Posts: 6/29
EXP: 7066
Next: 855

Since: 09-16-18
From: Somewhere

Last post: 1703 days
Last view: 189 days
Posted by Googie
Posted by DannyPlaysSomeGames



I like how the character looks, hope to see more...


Thanks.

Posted by Insectduel
Posted by DannyPlaysSomeGames
I was wondering if there's a way to change the x/y pos of some of the sprite tiles and if you can even swap them to take advantage.


I did remember doing sprite layouts even to enemies, but I hardly touch this game in a while. Now I kinda forgot where the x/y sprites located but the palette quad is easy.

Honestly, Mega Man 1 functions assemble sprites differently than Mega Man 2 but the sprite assembler for Mega Man 1 would be useful if someone designed it.

You think a quick look at the disassembly or a keyword could help me find it?

____________________
Hey there

Thanatos-Zero
Posted on 09-28-18 05:41 PM Link | Quote | ID: 166545


Nipper Plant
Level: 45

Posts: 420/423
EXP: 652732
Next: 7432

Since: 11-25-08
From: Germany - Rheinlandpfalz - Wittlich - Zur Phillippsburg 25

Last post: 1089 days
Last view: 1051 days
Zieldak has extensive knowledge about Megaman 1.
If you ask someone about MM1 danny, it is him.


____________________
I was a prisoner enclosed in the void, were everything might end up just as myself.
There I was called the death in the void, but after a long sleep my drill was ready to pierce the void.
I came back... to guide those who are in doubt and to crush any corrupted mind.
"Just who in the hell do you think I am?!".

Zieldak
Posted on 09-28-18 08:17 PM (rev. 5 of 10-01-18 07:24 PM) Link | Quote | ID: 166546


Crow
Level: 42

Posts: 385/387
EXP: 512284
Next: 9078

Since: 12-01-11
From: Hungary

Last post: 1309 days
Last view: 1200 days
Or I actually pay attention and answer the question.

No. The disassembly doesn't have detailed data on this. But I do.

18010-18195: Sprite data pointers (First pointer is 0688 which points to 18816; 0688 -> 8806 -> 18806 +iNES header> 18816)
18196-182B9: Animation data pointers
182BA-18349: Tile position data

How to read sprite data:

For example let's see the data at 18816, which is the first pointer of the table:
0A 00 1A00 2900 2A00 2B00 0900 0A00 0B00 1900 1B00 2001

{0A} 00 1A00 2900 2A00 2B00 0900 0A00 0B00 1900 1B00 2001
The first byte determines how many tiles the sprite uses. In this case, 10 ($0A).

0A {00} 1A00 2900 2A00 2B00 0900 0A00 0B00 1900 1B00 2001
The second byte determines which sprite assembly data is assigned to the sprite.

0A 00 {1A00 2900 2A00 2B00 0900 0A00 0B00 1900 1B00 2001}
The rest is which tiles the game reads from the PPU, and which palette each tile uses. The first byte is the tile ID, the second is the palette.


How to read animation data:

For example let's see the data at 1A076:
A8 0101010101010101010100

Each animation data starts with a byte that determines how many frames the animation is made up of, and how fast the animation is.
In this case A8 means the animation has 11 frames ($0A=10 -> 10+1=11) and changes the animation frame every 9 frames.

In other words:
The first bit is the amount of animations, 0 means the animation has only 1 frame, and it can have a total of 16 frames.
And the second bit is the speed of the animation. The higher the number is, the slower the animation is. 0 means it changes the current sprite every 1 frame. The slowest an animation can get is 3.75 animation frames/second, in other words the animation swaps sprites every 16 frames.

A8 {0101010101010101010100}
The rest of the data means which sprites we wanna use in the animation.
In this case $01 is the idle sprite, and $00 is the blinking sprite.


How to read tile position data:

Probably the easiest data to read. This determines where each tile is drawn from the centre of the sprite. The order of the data is the same as the sprite data, so the first byte belongs to the first tile of the sprite. For example, $00 means it reads the first byte, $10 means it reads the 17th bytes from each of the following tables:

1834A-18449: Y position
1844A-18549: X position (facing left)
1854A-18649: X position (facing right)


Keep in mind there may be sprites that use the same tile positions, and there may be enemies that even use the exact same sprite! In which case uh... uhhhhhh... good luck.
Also, sorry if I got something wrong, I put this together in a hurry.

EDIT: fixed some stuff

kuja killer
Posted on 09-28-18 09:10 PM Link | Quote | ID: 166547


Level: 55

Posts: 588/628
EXP: 1243681
Next: 70508

Since: 03-20-07
From: Lake Havasu City, Arizona

Last post: 280 days
Last view: 5 days
cool yea just to note, this is all the same format for mm 2 to 5. only difference is, it uses 2 bytes for the "number of frames + animation speed"
like 02 08 (2 animation frames, 8 speed)

mm2+ isn't limited to 16 max frames in an animation like mm 1 was.

DannyPlaysSomeGames
Posted on 09-29-18 06:18 PM Link | Quote | ID: 166550


Octorok
Level: 12

Posts: 8/29
EXP: 7066
Next: 855

Since: 09-16-18
From: Somewhere

Last post: 1703 days
Last view: 189 days
Thanks, Zieldak, now I can properly finish my protag's sprites.

____________________
Hey there

Trinitronity
Posted on 09-30-18 04:30 PM Link | Quote | ID: 166551


Porcupo
Level: 38

Posts: 307/311
EXP: 351044
Next: 19403

Since: 02-04-13

Last post: 1936 days
Last view: 578 days
Currently in the process of making a disassembly of my own Mega Man 3 hack:

Though I have no idea where the RAM and ROM sections start and how large they are...whoops
Cannot find any info on that in the MM3 guides either, so...maybe anyone here knows the answer?
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 83 84 85 86


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

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.052 seconds. (346KB of memory used)
MySQL - queries: 131, rows: 171/175, time: 0.041 seconds.