Welcome Guest [Log In] [Register]
Sprite Editing Guide Part 2
Topic Started: May 14 2010, 05:09 PM (2,922 Views)
Dramz
No Avatar
Spastic Colon

Onto the next part.
Okay, so we have established that 08031CC4 has 10 offsets, that "organise" the sprite list.
08002724
Go there, and you'll find:
08031CC4.
You probably see why I've brought you here.
From here, you can, in the normal way, repoint the 10 pointers that point to the sprite list.
I call the pointer to the 10 offsets, the "Governing pointer"
There is another occurrence of this pointer through the ROM, but it seems to have absolutely no function.



Alright now, it's time for...Palette Hacking!!!
Okay, so now this is significantly easier if you have the sprite file separate to the ROM, so dump the sprite, in whichever way suite you best (I tend to copy it from a hex editor, from the sprite list pointer, till just before the next pointer, and paste it into a new file) I do reccommend using Greigamaster's sprite list viewer to dump them.
In any case, for the purposes of this guide, we will be working with good old Burnerman, so grab the Burnerman sprite dump again, and open it up in a hex editor.

Alright, now (goddam I say alright a lot)
In your sprite dump, lets take a look at the animation pointers.
We can see that the first animation pointer is "00000064" (64 00 00 00)
and the second one is "0000008C" (8C 00 00 00)
http://img299.imageshack.us/img299/6470/screenshot20100515at929.png
Posted Image

So, the palette data is pointed to near the end of each piece of animation data, so...
Let's follow the second pointer, and work backwards:
http://img249.imageshack.us/img249/9882/screenshot20100515at931.png
Posted Image
Now, the pointer we are interested in is 3 Pointers backwards from this.
http://img33.imageshack.us/img33/784/screenshot20100515at933.png
Posted Image

Before we follow this pointer,lets take a closer look.
http://img412.imageshack.us/img412/6351/screenshot20100515at934.png
Posted Image

What is common to all the animations?
The Palette of course.
Each of the boxes is the palette pointer for specific animations.

You are probably thinking that you can edit these pointers for individual animations, and have each animation use a different palette. You'd be right there, so this is getting VERY useful.

Now, lets go down, and follow the pointer.
http://img255.imageshack.us/img255/7190/screenshot20100515at940.png
Posted Image
So it'll take you here.
Palette data begins at 75B4.
http://img413.imageshack.us/img413/4436/screenshot20100515at942.png
Posted Image

Okay, now the RED is the data for Palette index #1
The BLUE is the data for Palette index #2
The PURPLE is the data for Palette index #3...etc

The palette data ends simply when the pattern ends, in the case of Burnerman, at 00007734

Now, editing these.
Palette data is in 16-bit. unless you wanna import the dump after finding the palette offset, and use the memory viewer to view it normally, we will have to work as is.

The first "00 00" that is common to all the palette indexes is the "clear colour", or at least thats how the game reads it. leave it, do not edit it.

Now, there is a relationship between RGB colour system and the 16-Color system used in the game. You will need a calculator that deals with Hex, decimal and binary, and a pen with some paper to speed up the process.

So, pick your RGB colour. I'm gonna go for
R: 18
G: 51
B: 154

Now, write these down in seperate columns on your piece of paper.
divide each of these by 8, individually, and write don the result underneath the existing colors. Ignore any decimal places.
Mine comes to

R: 2
G: 6
B: 19

Now, using the calculator convert these to Binary

R: 10
G: 110
B: 10011

From here, make each 5 digits long, by adding 0s in front

R: 00010
G: 00110
B: 10011

Now, arrange them in this order
BBBBBGGGGGRRRRR
100110011000010

Convert that number into Hexadecimal
4CC2

Now, this is the "memory viewer" value. We want to use it on a hex editor, so:
C2 4C.
lets throw that into burnerman's palette

http://img237.imageshack.us/img237/2922/screenshot20100515at100.png
Posted Image

Now, the best way to see which values of the palette affect what is to set each of them individually to "FF FF" and see which turn white. Editing that will change all that turned white.


This would be a lot quicker if you download a program that converts RGB colour into 16-color hex code.
GreigaMaster's Simple Palette Editor

That is as advanced as palette editing gets. This method applies to all sprites from EXE 1-6.


This works for any BN1-6 sprites, OSS Sprites, and Custom Sprites.
Custom Sprites though do not have their palettes starting with "00 00" so you'll have to fiddle around to find the beginning of the palette after following the pointers. It should be within 8 bytes.
Credit to Megarock, Spikeman, Greigamaster and Darkcross.



By popular demand:
Sprite Hacking other MMBN Games!!!!!!

MMBN2, 3, 4 and 5 are coded in identical ways to MMBN6, with the Sprite List, the 10 pointers to the sprite list, and the pointer to the 10 pointers (Governing Pointer). The provided offsets work for all versions of the games.

MMBN5:
Sprite List: 08032754
10 Offsets: 0803272C
Governing Pointer: 08002690
MMBN5 Sprite List Map



MMBN4:
Sprite List: 08027964
10 Offsets: 0802793C
Governing Pointer: 080028BC

MMBN3:
In MMBN3, there seem only to be 9 offsets, instead of 10.

Sprite List: 08024788
9 Offsets: 08024764
Governing Pointer: 08002704
Second occurrence at different position.
Governing Pointer 2: 08002A4C

MMBN2:
Sprite List: 0801E9FC
9 Offsets: 0801E9D8
Governing Pointer: Multiple Locations

MMBN1:
Now, MMBN1 is coded very differently to other MMBN games. The system is less efficient, and less organised. The sprite list seems not to point directly to any specific sprite file, but 4 bytes before the sprite. Also, there are no "10 pointers", and the equivalent of the "Governing Pointer" for BN1 points directly to the sprite list. The "BN1 Governing Pointer" will be called the "Sprite List Pointer"
Like the Governing Pointers for the other BN games, the Sprite List Pointer has 2 occurrences, the second of which has no known function.

Sprite List: 08012690
Sprite List Pointer: 08002498



White Dot Hacking revisited.
Grab your hex editor.
Alright, so now, you’ve learned most of the useful tricks of importing and editing sprites, but there is one slight imperfection in the whole system...the bloody white dot...in all of its “glory”, the symbol of an imperfect hack in itself...no longer. Lets replace it.
Alright, so now go to your sprite list map, and pick a “White Dot” value, from reasonably far down on the list. Use the formula to find its position in the sprite list.
Go there. Now, note the sprite it points to. If you try any other value, it will be the same. There many, many occurrences of this pointer in the sprite list.
Now, I dunno about HxD, but my hex editor has a “Replace” function, and a “Replace ALL” function. If your hex editor does not have that function, this could take awhile, but you need to use the find function and search for every occurrence, and change it to another sprite. I recommend a completely Blank sprite dump, or anything you want to replace it with
If you don’t want to replace all occurrences, give me a PM and I can organise a forum-illegal alternative for you (obviously outside of the forum).




Now, its time to add a little thing.
credits to Agro for being the first to post about this.
So, as you know from White Dot Sprite hacking, in the importing part of the guide, the boss data has the 2 bytes that control the sprite.
eg) the first 2 bytes 080FB8B4 control the sprite for the protoman boss.
Now, as of yet, this little trick has very little in the realm of practical use, but take your hex editor and 'search back' (control F, and search for the 8-bt values of the location of the cursor) 080FB8B4, so:
Control F
-set to Hex
-type in the text box B4 B8 0F 08
and search. (any time I say Search Back, I will be referring to this technique)

It will take you to a pointer, that points specifically to those 2 bytes.
So, we can point the 2 bytes to an expanded offset. point it to eg) 08800000. and at 08800000, type in 4 bytes, which you can edit as you would with a White Dot Sprite Hack.

Related:
http://s6.zetaboards.com/The_Rockman_EXE_Zone/topic/8646218/1/

note: Searching Back is a very useful technique in developing new hacking techniques, and making discoveries. I use it to find stuff like this, I use t to find the sprite lists, governing pointers and 10 offsets for each BN, and I use it to better understand how the rom works. I advise you to, if you ever want to take a closer look at the rom, use this useful technique. its not hard, and it allows you to do marvellous things.



PALETTE EXPANSION
So. If you've done more palette work than just what is in this guide, you'll have seen that some sprites have a lot more palettes than others. for example, a navi like Laserman would have no more than 10, but MMBN3 Megaman battle sprite has hundreds of palettes.

If you want to replace a navi that has a large number of palettes, with one that has a small number of them, the process is relatively simple.
Grab your dump, and put it in a Hex Editor. We will be using our good old Burnerman again, so grab him.
Since we have worked with him before, find the palette pointer, and follow it.


http://img412.imageshack.us/img412/6351/screenshot20100515at934.png
Posted Image


Go to 75B0, had copy from there, to the bottom of the dump's palette data:
http://img23.imageshack.us/img23/7349/screenshot20100623at901.png
Posted Image
You can tell where the bottom is by looking for where the pattern breaks. the 00 00 starts a new palette, and you can see the size of a palette. (the 00 00 starts a palette, as it is the colour of the transparent colour in the sprite)
Now, go down to the bottom of your dump, and paste in the palette data. You will need to expand the dump file. I always put a row of 00s underneath the base of the sprite, simply to help me see where I have imported the new data.

http://img709.imageshack.us/img709/4126/screenshot20100623at904.png
Posted Image
Now, copy the palette you want to add, usually the first, normal palette, and paste it directly underneath the existing palettes. You just created a new palette index.
But wait, theres more.

http://img412.imageshack.us/img412/6351/screenshot20100515at934.png
Posted Image

These are the palette pointers...we need to make them point to the now, expanded palette. So...
Find out where you reimported the old palette data
http://img15.imageshack.us/img15/1772/screenshot20100623at909.png
Posted Image
and now, you need to change the palette pointer for each animation to the new palette location. Simple.
I have been informed that Translhexition has a "Find and Replace All" function, so that will speed the process up dramatically.
Attached to this post:
burnerman.dmp (31.08 KB)
Mugshot_Dump_Folder__1.zip (6.1 KB)
Edited by Dramz, Jun 23 2010, 04:13 AM.
Profile
Quote
 
Xarizzar
Member Avatar
Computer Scientist(?)
We can't find the values easily that way :( But this is a way I needed to learn, thanks :D
Posted Image
Just saying, I almost never make my own avatars,
I always find them by searching with Google.

If you want to add me(3DS), please message me first.
Signature last updated: 11th October 2013
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

It's rather simple to find values this way, and it's significantly quicker and more acurate than doing a semi-random search in APE
Profile
Quote
 
Xarizzar
Member Avatar
Computer Scientist(?)
But how are we gonna find the values of each navi? In this guide you just highlighted the values, but what are we gonna do with others, you explain no method of finding them.
Posted Image
Just saying, I almost never make my own avatars,
I always find them by searching with Google.

If you want to add me(3DS), please message me first.
Signature last updated: 11th October 2013
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

I did, follow the second animation pointer, and move 3 pointers backwards.

Quote:
 
Now, the pointer we are interested in is 3 Pointers backwards from this.


A basic understanding of the format of a sprite dump is necessary for this. Read my sprite hacking guide, the bottom half deals with stuff like this.
Edited by Dramz, May 15 2010, 02:15 AM.
Profile
Quote
 
Xarizzar
Member Avatar
Computer Scientist(?)
Well, as an ace at finding offsets APE way, I prefer mine. That part I overlooked, I admit it. But are you certain it's this way for ALL sprites...?
Posted Image
Just saying, I almost never make my own avatars,
I always find them by searching with Google.

If you want to add me(3DS), please message me first.
Signature last updated: 11th October 2013
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

I am certain.
Profile
Quote
 
neozan7
No Avatar
TREZian
Which "program that converts RGB colour into 16-color hex code" do you know?
Posted Image

Force The World To Revolve Around You,It's More Fun To Think It That Way.

Credits To MegaRock.EXE For The Awsome Sig And Avatar




Profile
Quote
 
brianuuu
Member Avatar
SF Noise Spriter
neozan7
May 17 2010, 01:38 AM
Which "program that converts RGB colour into 16-color hex code" do you know?
APE
Posted ImagePosted ImagePosted Image
Posted Image
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

yes, I guess APE would probably do that.
Profile
Quote
 
RoCK
No Avatar
TREZian
Wow thanks alot Albon! It looks more reliable than APE! And I think I got a hang of editing Hex values!

Thanks Albon! =D
※※Follow me on these sites※※

Posted ImagePosted Image
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

Changed this topic into the second part of the Sprite Hacking Guide, partly because there was some confusion when users read this having not learned about the basic format of sprite files, and partly because I have more to add, and the first part of the guide has nearly exceeded the zetaboards character limit.

I've added:
-More Technical stuff about the format of the Sprite List
-BN5 Sprite Hacking.
-BN4 Sprite Hacking
-BN1 Sprite Hacking (is still being researched, but the basics are there)

For BN2 and 3 sprite hacking offsets to be posted, I need someone to rip me a sprite from the games. any sprite will do, just do not edit them in any way.

Stuff to add:
-Removing the White Dot (INCREDIBLY useful)
-MD Sprite Hacking (I'm gonna have to...even though I can't do it on my computer, I'll learn it)
-POSSIBLY, If I get help, Sprite List Maps for the other BN Games.
Edited by Dramz, May 20 2010, 05:47 AM.
Profile
Quote
 
Greiga Master
Member Avatar
Admin of the stars, owner of your soul...

Simple Palette Editor
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

I'll make a mention
EDIT:
provided a link to it, when mentioning about converting rgb to hex
Edited by Dramz, May 20 2010, 04:38 PM.
Profile
Quote
 
MegaRockEXE
Member Avatar
BN Guides Author

Yes, because realize that GM's program is better than APE in every way. It picks colors out much faster and has a sprite viewer to preview your changes.
The Rockman EXE Zone | YouTube
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

Honestly, I do not realise it, because I cannot use either.
I do believe it though.
Ezmariel taught me how to use APE, so I kinda know what to do, but I've never had the chance to really use the Simple Palette Viewer.

I would absolutely love it if others contribute to this guide, whether it be program tutorials, the
"6 Sprite List Maps", or MD Sprite Hacking, so I don't have to learn it without being able to do it.

Also, Megarock, GM, or whoever, I am very interested in the BN1 system. I've only spent about 20 minutes looking at it, and aside from the obvious lack of the "10 Offsets", the way it points to sprites is strange. I found the list by using a Skullman sprite that has been sitting on my comp some time, and following the pointers backwards on my hex editor. The thing is, the sprite list does not seem to point directly to the skullman sprite.
Is this the way GM's program rips the sprite, or is it an attribute of the sprite list?
I have no idea. I have some tests planned, with manual ripping, and import into other BN games, but I was wondering how much info anyone else has on the matter before I start.
Edited by Dramz, May 20 2010, 10:56 PM.
Profile
Quote
 
Dramz
No Avatar
Spastic Colon

New addition, tutorial on removing the white dot sprite from the game.
New addition, Repointing boss sprite data.
New addition, MMBN3 sprite list data added.

If someone rips me a MMBN2 sprite with GM's program, any MMBN2 sprite, I can get you the MMBN2 data immediately.
Edited by Dramz, Jun 10 2010, 04:35 AM.
Profile
Quote
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Guides & Research · Next Topic »