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

0 users currently in ROM Hacking | 4 guests

Main - ROM Hacking - [HELP]Megaman's color when using Beat in Megaman VI New thread | New reply


Zynk
Posted on 01-13-22 03:39 AM Link | Quote | ID: 167947


Purple Leever
Level: 32

Posts: 195/209
EXP: 195960
Next: 10482

Since: 10-19-12

Last post: 79 days
Last view: 3 hours
Happy New Year!

I was wondering if its possible to reassign Megaman's Beat color to another colors? For example, in my Roll-chan hack, Roll is red, and I want her Beat color to be blue which is her Wind Storm color.



____________________

Synthetekh
Posted on 01-16-22 03:03 AM Link | Quote | ID: 167963


Ninji
Level: 35

Posts: 218/239
EXP: 261327
Next: 18609

Since: 08-15-10
From: New Mexico, USA

Last post: 93 days
Last view: 5 days
I could try to do something about that... but I'm only familiar with 68k assembly (Sega Genesis) haha.. so I may need to study the NES hardware a little first (how memory management & referencing is done). I tend to work a bit slow, but I will give it an attempt.
I'd suspect maybe an address or palette ID needs to be changed; I found the colors themselves to start.

kuja killer
Posted on 01-18-22 10:36 PM (rev. 6 of 01-18-22 11:08 PM) Link | Quote | ID: 167968


Level: 55

Posts: 615/628
EXP: 1243811
Next: 70378

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

Last post: 281 days
Last view: 6 days
I could maybe try to help but since I have almost zero experience with megaman 6 compared to 3, 4 and 5.

I just do not understand at all exactly what you want to change.

Since your showing wind storm wep, and beat wep in different screenshots...it makes me very confused which one of these you want to edit.

Just flat out...which weapon are you editing ?? wind storm..or beat ??

edit: maybe i cant actually. im sorry i did want to...but mm6's formats are pure crap. They are SO much different compared to mm3-5. i'm trying to look and i found the base megaman palette at 6F247-48 ...but this small block of data is read on every single weapon reguardless if you un-pause from buster, beat or anything else...so i just dont know.

All i can think of is whatever these pointers are that are reading this block of data from 6F245 to 6F24B ...copy-paste these 7 bytes, at some free space at 6FFE0 (there is a few hundred bytes of space at the end of this 6E010-6FFFF bank)...and load "that" only when beat is selected when un-pausing the weapon menu -- where-ever that code is...and whatever RAM register keeps track of which weapon is currently selected

Zynk
Posted on 01-19-22 08:56 AM Link | Quote | ID: 167970


Purple Leever
Level: 32

Posts: 196/209
EXP: 195960
Next: 10482

Since: 10-19-12

Last post: 79 days
Last view: 3 hours
Posted by kuja killer

I just do not understand at all exactly what you want to change.




What I meant is, change Roll's Beat color to blue, Roll's default is red.

I was thinking if Beat shares the default color, maybe there is a control on sharing colors, that's why I pointed out that I placed blue on Wind Storm.

____________________

Synthetekh
Posted on 01-29-22 09:18 AM Link | Quote | ID: 167985


Ninji
Level: 35

Posts: 220/239
EXP: 261327
Next: 18609

Since: 08-15-10
From: New Mexico, USA

Last post: 93 days
Last view: 5 days
I figured out a simple solution!

Since Beat's palette doesn't have its own colors (shares with Plasma), nor its own Address (it may be possible to give it its own Address without too much trouble... need to investigate further), the simplest answer I've found is to change Beat's palette ID to the same value as Wind's ID, so that those two share the same color palette instead.

To do this change the value at 71648 from 0x09 to 0xB1 (71638 if Unheadered ROM as the iNES header is 0x10 Bytes at the beginning of ROM space).

There is a Weapon ID table for the Color Palettes from 7163F - 71648.
Plasma = 09
Yamato = B0
Wind = B1
Blizzard = B2
Flame = B3
Plant = B4
Knight = B5
Tomahawk = B6
Centaur = B7
Beat = 09

These values are not literally the ID themselves, but get added to a weird Address Table to determine the Table's Offset, and the values pulled from it determine what Address the Weapon's Palette is loaded from.


Further details on the Address Table:
The Weapon Palette Address is 2 Bytes (in NES CPU Address space). Because of Bank Swapping we'll have to calculate the final Address of the Weapon Palette that will refer to ROM space.

--- First though ---
Byte 2 (least significant Byte) of Weapon Palette is read from the weird Address Table at 9000 - 90FF (NES CPU memory / Address space); 6F010 - 6F10F in ROM:
Add: 9000 + B1 (Wind) = 90B1. Which has a value of 7A.

For Byte 1 (most significant Byte) of Weapon Palette, the weird Address Table is at 9100 - 91FF; 6F110 - 6F20F in ROM.
Add: 9100 + B1 (Wind) = 91B1. Which has a value of 96.


Put 96 & 7A together, and this (967A) is the Address for the Weapon Palette Data (in NES CPU memory).
- ROM Banks get loaded into CPU memory at 8000 - FFFF (but with MMC3 I think maybe just 8000 - 9FFF).
- Banks with the MMC3 mapper (which MM6 uses) are 0x2000 in size each.

So subtract 0x8000 from 967A, and we get 167A (the Address within the Bank).
Add 0x10 for the iNes Header that the ROM contains, 967A + 0x10 = 968A.

I don't know how to tell which Bank is currently loaded (in this case I already know it's 0x37), but we'd add 0x2000 * Bank # (0x37) to 168A, and that would get us our final result.
The Address of Wind's Palette Data is 6F68A.
You could also look at the data in NES CPU memory (so at 967A in this case), and search some of that data in the ROM to find it.


If there's room to include Beat's own Address values to this Address Table, and blank space for the Palette Data itself, then it could easily have its own Palette & Address, but I'll need to really investigate this further to be sure it doesn't overwrite something else.

Zynk
Posted on 01-30-22 04:51 AM Link | Quote | ID: 167987


Purple Leever
Level: 32

Posts: 197/209
EXP: 195960
Next: 10482

Since: 10-19-12

Last post: 79 days
Last view: 3 hours
Posted by Synthetekh
I figured out a simple solution!

Since Beat's palette doesn't have its own colors (shares with Plasma), nor its own Address (it may be possible to give it its own Address without too much trouble... need to investigate further), the simplest answer I've found is to change Beat's palette ID to the same value as Wind's ID, so that those two share the same color palette instead.

To do this change the value at 71648 from 0x09 to 0xB1 (71638 if Unheadered ROM as the iNES header is 0x10 Bytes at the beginning of ROM space).

There is a Weapon ID table for the Color Palettes from 7163F - 71648.
Plasma = 09
Yamato = B0
Wind = B1
Blizzard = B2
Flame = B3
Plant = B4
Knight = B5
Tomahawk = B6
Centaur = B7
Beat = 09

These values are not literally the ID themselves, but get added to a weird Address Table to determine the Table's Offset, and the values pulled from it determine what Address the Weapon's Palette is loaded from.


Further details on the Address Table:
The Weapon Palette Address is 2 Bytes (in NES CPU Address space). Because of Bank Swapping we'll have to calculate the final Address of the Weapon Palette that will refer to ROM space.

--- First though ---
Byte 2 (least significant Byte) of Weapon Palette is read from the weird Address Table at 9000 - 90FF (NES CPU memory / Address space); 6F010 - 6F10F in ROM:
Add: 9000 + B1 (Wind) = 90B1. Which has a value of 7A.

For Byte 1 (most significant Byte) of Weapon Palette, the weird Address Table is at 9100 - 91FF; 6F110 - 6F20F in ROM.
Add: 9100 + B1 (Wind) = 91B1. Which has a value of 96.


Put 96 & 7A together, and this (967A) is the Address for the Weapon Palette Data (in NES CPU memory).
- ROM Banks get loaded into CPU memory at 8000 - FFFF (but with MMC3 I think maybe just 8000 - 9FFF).
- Banks with the MMC3 mapper (which MM6 uses) are 0x2000 in size each.

So subtract 0x8000 from 967A, and we get 167A (the Address within the Bank).
Add 0x10 for the iNes Header that the ROM contains, 967A + 0x10 = 968A.

I don't know how to tell which Bank is currently loaded (in this case I already know it's 0x37), but we'd add 0x2000 * Bank # (0x37) to 168A, and that would get us our final result.
The Address of Wind's Palette Data is 6F68A.
You could also look at the data in NES CPU memory (so at 967A in this case), and search some of that data in the ROM to find it.


If there's room to include Beat's own Address values to this Address Table, and blank space for the Palette Data itself, then it could easily have its own Palette & Address, but I'll need to really investigate this further to be sure it doesn't overwrite something else.
THANK YOU SO MUCH!! I appreciate your help very much!! o7

Gonna update Roll-chan 6 with this and more sooner!

____________________

Synthetekh
Posted on 01-30-22 10:21 AM Link | Quote | ID: 167988


Ninji
Level: 35

Posts: 221/239
EXP: 261327
Next: 18609

Since: 08-15-10
From: New Mexico, USA

Last post: 93 days
Last view: 5 days
You're welcome!!
Glad to put this issue to rest!

And it was a great way for me to start getting familiar with NES programming, and Bank (memory) swapping!    (something I was dreading due to the additional complexities)

Main - ROM Hacking - [HELP]Megaman's color when using Beat in Megaman VI New thread | New reply

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

Page rendered in 0.054 seconds. (339KB of memory used)
MySQL - queries: 63, rows: 89/91, time: 0.043 seconds.