News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: (MD/GEN) Editing the Proto Man sprite in Wily Wars  (Read 4980 times)

PresidentLeever

  • Hero Member
  • *****
  • Posts: 644
    • View Profile
    • Mini-Revver
(MD/GEN) Editing the Proto Man sprite in Wily Wars
« on: October 30, 2015, 08:55:36 am »
http://www.romhacking.net/reviews/1229/
http://www.sega-16.com/forum/showthread.php?16785-Tile-and-Sprite-editor-for-Genesis-Megadrive

Can either of these tools be used to replace sprites in Mega Man: Wily Wars or Kid Chameleon? Are there any other good tools for doing that?
I had a couple of things in mind; Replacing the protoman sprite in MM: WW, and turning Kid Chameleon into either an Alex Kidd or a Wario game.
I guess what I need to do is extract the tileset with the sprite I want to replace, edit it under the correct limitations, then replace the one in the game.

I know there's an editor for KC but haven't been able to acquire it yet. Don't think it has sprite editing though, only palettes.

Edit:
Another tool I'm curious about: http://gendev.spritesmind.net/forum/viewtopic.php?f=7&t=1392

Edit 2:
Found Tile Layer Pro, but it seems I need to decompress and recompress the graphics to be able to use that. Are there any general tools that can be used?
« Last Edit: November 01, 2015, 11:22:34 pm by PresidentLeever »
Mini-reviews, retro sound chip tribute, romhacks and general listage at my site: Mini-Revver.

SCD

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 627
  • SPOOOOON!
    • View Profile
Re: (MD/GEN) Sprite extraction, editing and replacement for existing games
« Reply #1 on: October 30, 2015, 10:20:34 pm »
Try using this tool to decompress and re-compress the ROM: http://www.romhacking.net/utilities/757/

Malias

  • Sr. Member
  • ****
  • Posts: 292
    • View Profile
Re: (MD/GEN) Sprite extraction, editing and replacement for existing games
« Reply #2 on: October 31, 2015, 12:05:28 am »
If all you want to do is edit the character sprites, I'm pretty sure they're uncompressed in rom.  You should be able to edit them with your favorite graphics editor.
The great achievement is to lose one's reason for no reason, and to let my lady know that if I can do this without cause, what should I do if there were cause?
     ~Don Quixote~

PresidentLeever

  • Hero Member
  • *****
  • Posts: 644
    • View Profile
    • Mini-Revver
Re: (MD/GEN) Sprite extraction, editing and replacement for existing games
« Reply #3 on: October 31, 2015, 09:32:35 am »
Try using this tool to decompress and re-compress the ROM: http://www.romhacking.net/utilities/757/

Thanks, I'm testing it now but I don't really understand it since there's no readme.
From the documentation of the Sonic rom displayed in the separate tools it seems I should use the Nemesis tool?
Do you know what I can put in the Destination file field? Like what file format to use if I want to decompress the character or an enemy sprite and edit it?

There's also a function to decompress graphics using KidTool but I don't know which format it ends up as or how much you can dump at a time. I've asked the Kid Chameleon Wikia board though and am waiting for a reply.
"-decompress XXXXXX
This is for more advanced users that wish to decompress specific areas of the
ROM. Nearly all the art used in the game is compressed, so this command can be
useful for decompressing this art (assuming you know exactly where it is).
Simply replace "XXXXXX" with the hexadecimal address pointing to the data in
the ROM you wish to decompress."


Apparently Saxman is going to update the K-E editor to include these features for easier graphics editing, so I'll probably use that, though it was about a year ago now that he last posted at the Kid Chameleon wikia board.

Edit:
http://kidchameleon.wikia.com/wiki/Thread:5709
"Graphics: That's definitely coming. I have a complete set of addresses for every art asset in the game, I just need to make my export/import functionality work specifically for that. It will all be dumped along with maps and themes into a single project file. So look forward to have more flexibility with modifying the game."



October 31, 2015, 10:07:08 am - (Auto Merged - Double Posts are not allowed before 7 days.)
If all you want to do is edit the character sprites, I'm pretty sure they're uncompressed in rom.  You should be able to edit them with your favorite graphics editor.

For Wily Wars I was able to find Protoman in Tile Layer Pro now, after switching between pre-set palettes in the editor, but none of the palettes are like in the actual game for some reason. It's a shame I can't see addresses in TLP so I can map things out with it.

KC looks heavily compressed in Tile Layer Pro, I can only make out the diamonds.

Does anyone now what happens if I edit a palette in TLP to make Protoman look like in the game?

« Last Edit: October 31, 2015, 10:11:55 am by PresidentLeever »
Mini-reviews, retro sound chip tribute, romhacks and general listage at my site: Mini-Revver.

Malias

  • Sr. Member
  • ****
  • Posts: 292
    • View Profile
Re: (MD/GEN) Sprite extraction, editing and replacement for existing games
« Reply #4 on: November 01, 2015, 02:01:42 am »
For Wily Wars I was able to find Protoman in Tile Layer Pro now, after switching between pre-set palettes in the editor, but none of the palettes are like in the actual game for some reason. It's a shame I can't see addresses in TLP so I can map things out with it.
If you're using TLP, it gives you the offset address at the bottom of the screen in the status bar.  And, the reason it doesn't show the in-game palette is because it has no idea what the actual palette is.  You can adjust the colors in TLP to be more like the game if it makes editing easier.  But ultimately, it doesn't matter what colors the editor shows because the actual colors are determined by the palette the game uses.

Quote
KC looks heavily compressed in Tile Layer Pro, I can only make out the diamonds.
The sprites are there, they're just hard to discern;  Starting a little before $A2400, you can see the tiles for various player sprites.
The great achievement is to lose one's reason for no reason, and to let my lady know that if I can do this without cause, what should I do if there were cause?
     ~Don Quixote~

PresidentLeever

  • Hero Member
  • *****
  • Posts: 644
    • View Profile
    • Mini-Revver
Re: (MD/GEN) Sprite extraction, editing and replacement for existing games
« Reply #5 on: November 01, 2015, 09:21:31 am »
Thanks for the info Malias, however, I tried editing a tile from Proto Man's sprite in TLP yesterday just to see how it would look and after saving and booting up the game I just get a red screen, even after using checksumfixer. Do you know what the issue is? I used the european Wily Wars ROM.

Edit:
What's odd is that I can edit tiles in KC but not in Wily Wars. I've been able to realign a couple of tiles like the top of Proto Man's helmet.. and the foot (though nothing happens in-game when I do that), but realigning the first shield tile from top to bottom causes the red screen again.


As you can see the sprite doesn't align as you think it would but instead wraps around in a strange way making the pixels you see outside the sprite align with the other side of it. If I could test it and see what happens in-game I could probably make this work within the original tile limitations (the bottom of his feet doesn't look weird in-game because of a black line on the floor). Already did a color reduction and minor size edit to the custom sprite I'm trying to use as replacement.


Edited danmanx5792 sprite.

Edit 2:
Some notes:
« Last Edit: November 02, 2015, 08:41:02 am by PresidentLeever »
Mini-reviews, retro sound chip tribute, romhacks and general listage at my site: Mini-Revver.

Nazeji

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: (MD/GEN) Editing the Proto Man sprite in Wily Wars
« Reply #6 on: December 16, 2015, 01:19:26 am »
Hey, this is the author of Mega Robot Laboratory. Sorry I didn't respond sooner (check your PMs on board2, although some of it's redundant now with this post here).

The only Data in Wily Wars that's Compressed so far that I've seen (and I've looked through absolutely almost all of the data in the game), are some of the Level Art.
The Sprite Graphics therefore are all Uncompressed. The reason Protoman's Graphic Tiles look a bit messed up, and merged into other Tiles, is because the Data doesn't always start at an address ending in 0x******00, or multiples of 0x20 (each Genesis 8x8 Tile is 0x20 / 32 Bytes in size). To view/edit it properly in a Tile Editor, you'll need a program like YY-CHR, which can shift the starting address that it's viewing Tiles at by 1 Byte or whatever amount (since Tile Layer Pro can't do this, a lot of the Graphic Tiles you're seeing with that program are being viewed starting from somewhere in the middle of them, etc.).

To view the Graphic Tiles with the proper Palette (most Sprites have a different Palette, the ones that don't are mostly the ones that use Megaman's Palette, such as 1ups, ? Blocks, Energy Tanks, Plasma shot, Boss Doors, etc.), you'll need to edit the Palette in the Tile Editor to match the Palette of the Sprite you are Viewing. To see what the Sprite's Palette is, go to it in-game and while that Sprite is on-screen, and if using Gens, go to the Menu Option: CPU -> Debug -> Genesis VDP; if using Regen Debugger (an Emulator with extra Debugging options), go to Menu Option: Tools -> VDP Debugger. Once you create the Palette in the Tile Editor, be sure to save it so you don't have to recreate it the next time you use the program (I can't find an Import option of any kind, other than to load a Palette in some specific Palette format... a '.pal file').

If you need or want to make Protoman graphically larger than he is (add/remove Tiles to him), I can help you change his Sprite Mappings, plus his Collision / Hit Box size. I can also help you change his Palette as well if you want to do that for any reason.


Also when it comes to that Red Screen of Death stuff that you see when you try to modify the Game, it's due to a Security Checksum that the game has built into it to make it harder to modify the data. This is not the Checksum that each Genesis / Mega Drive game has in its header, it's a Checksum that this specific game has programmed into it. My Editor allow you to remove this. In my Editor, after opening your game, go into Edit -> Miscellaneous Data, and change the Region or whatever in there, and then hit apply, and then File -> Save Game of course. Right now I don't give the option to individually apply the SRAM patch or not (the game normally save in EEPROM format, which is not supported by Emulators, or most?), it will just auto apply with the Security Removal Patch (I haven't yet separated the programming of the Security Removal from the SRAM, as it's copied data from the below SRAM Patch; in other words I got a little lazy on that before, because it's pretty easy to separate them).

Here's also the SRAM IPS Patch (changes game save type from EEPROM to SRAM, removes the Security Checksum stuff, and changes the Region to USA).
Apply to a European .bin format Wily Wars game http://www.romhacking.net/hacks/514/
If you need a Program to convert SMD format ROMs to BIN, here's one: http://www.zophar.net/utilities/segautil/sbwin.html

Here's a link to my Editor also (it can only edit a little so far; it's mostly just for viewing Data as of right now, but I will update it / add features as I have time to):
http://acmlm.kafuka.org/uploader/get.php?id=4985

And let me know if you need help with anything else :).


------------- Here is a list of which Level Graphics are Uncompressed in the Game (all the other Levels have Compressed Gfx), just for your info if you care to know ---------------

~ Megaman 1 (All Compressed) ~
None! :(

~ Megaman 2 ~
Air Man
Wily Castle 2
Wily Castle 3
Wily Castle 4
Wily Castle 5

~ Megaman 3 ~
Hard Man
Gemini Man
Magnet Man
Shadow Man
Doc Gemini Man
Doc Shadow Man
Breakman
Wily Castle 5
Wily Castle 6

~ Wily Tower (All Uncompressed) ~
Buster Rod G
Mega Water S
Hyper Storm H
Wily Castle 1
Wily Castle 2
Wily Castle 3
Wily Castle 4
« Last Edit: December 16, 2015, 01:25:49 am by Nazeji »

PresidentLeever

  • Hero Member
  • *****
  • Posts: 644
    • View Profile
    • Mini-Revver
Re: (MD/GEN) Editing the Proto Man sprite in Wily Wars
« Reply #7 on: December 17, 2015, 06:54:45 am »
Hi Nazeji!
Man, now I feel bad about not updating this thread about the red screen and palette info, but I'm sure it'll be useful to someone.
Removing the red screen without changing the region (I used the patch on this site earlier) would definitely be useful though as recently there were some restoration style GG codes made to change mechanics to be more like on NES, by Tony Hedstrom and they were for the pal version.

That's great news about proto man's sprite mappings and hit box, that means I can probably pull this off properly. I'll get back to you soon about this, thanks a lot for the detailed post.

Regarding changing his palette, does that mean a larger one could be used so as to not have to reduce the original custom one's colors as much?
Mini-reviews, retro sound chip tribute, romhacks and general listage at my site: Mini-Revver.

Nazeji

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: (MD/GEN) Editing the Proto Man sprite in Wily Wars
« Reply #8 on: December 19, 2015, 04:00:41 pm »
Sure thing, I'm glad to help anyway I can!

As far as the region changing goes, that won't affect the GG Codes at all, because it's not changing the game in anyway other than telling the Emulator to run it at 50 or 60 FPS, and maybe a few other minor things. The Region is just an Ascii letter (1 Byte) in the Game's Header (at Address 0x1F0, and actually you can fill in regions from 0x1F0 - 0x1FF; U, E, J, or JUE if you add all 3 of the standard regions (JUE used in Sonic games), or other combinations; this has different effects, but I don't know what all. Some others include A, B, 4, F, 8 (not sure if these are official or not, but they've been used in some games apparently).

I also have hacked these things myself; I put my notes on this at the bottom of the post. I like my player mechanics more like the NES too (there's also a few cheats in there, like which games to allow Megaman's Slide in).

The Palette is interesting thing. The game auto loads a Sprite's Palette when that Sprite comes onto screen (for most Sprites). The way they have it arranged, Sprites use the first 8 colors of a Palette Line (including the clear color, so really 7). If I remember right, Protoman's Palette is loaded this way. Robot Masters however use the whole 4th Palette Line. I think to use more colors for Protoman you'd have to reprogram the Sprite Palette Loading System or Modify Protoman's Programming so he loads his Palette like the Robot Masters do (I don't think this would be hard to do, but I don't feel like tracing code right now to find where the in Sprites' Programming it calls different Palette Loading Sub Routines, to swap out the one Protoman's usees).


--------------------------------------------------------------
~ Mega Man related programming ~
2DE46: Enable Slide in certain games (2 bytes). Games whose ID Number is greater than or equal to the value at this Address have Slide Enabled.
2CFD2: Plasma shot speed - Right
2CFDA: Plasma shot speed - Left (Negative Value)
2D058: Plasma shoot delay - (2 Bytes)
809B5: 1 Pixel initial Step (begin walking) ~ Delay Time
2D93C: Megaman Step Speed / Amount (X Axis) - Left
2D952: Megaman Step Speed / Amount (X Axis) - Right
2E068: Megaman Walk Speed / Amount (X Axis) - Left - (2 Bytes) - If used in increments of anything but 0x80 (I think), Megaman can be on the same pixel graphically, but technically not quite in the same spot according to his X Axis and Collision detection; sometimes you'll be able to jump 1 pixel further, say over a 4 block wide pit, and sometimes 1 pixel less). Doesn't seem to ever happen with the Default value.
2E090: Megaman Walk Speed / Amount (X Axis) - Right - (2 Bytes)
6AB6C: Jump Power - (2 Bytes) - Jap 6B066 - If you want to make Megaman jump over 4 block-wide pits slightly easier, I would adjust this instead of the Walk Speed.

2E0BE: Jump in midair - (2 Bytes: Change 0x6742 to 0x4E71)
2E6CA: Water has effect or not
2E6E6: Can be in Water or not
2E706: Gravity - (2 Bytes: While in Air; Water has it's own Gravity value) - Jap 2E718
6E4C6: Programming that affects dying (Pointer at 2EF82 for 0 HP triggered death, 2EFF4 for Cliff triggered death; the point to the same Sub Routine at 6E4C6)
E04E: Change 67 to 68 to allow Player to Pause when Firing
118A7: Change 0x03 to 0x04 to always have Wily Tower unlocked
 
~ Simple Programming hacks ~
B647: Delay time before you can damage common enemies again (Default 0x08).
35E25: Delay time before you can damage Robot Masters again (Default 0x2D).
3D4F7: Delay time before you can damage MM1 Megaman Clone Boss again (Default 0x2D).
5B600: Delay time before you can damage MM3 Megaman Clone Boss again (Default 0x3C).
 
       
Default Controls (Addresses listed refere to opcodes, just look 2 - 4 Bytes ahead):
  Change both Values for each Button.
        Buttons - 10 = B, 20 = C, 40 = A
        D4FE & D516 : 10   (Values at: D500 & D519)
        D506 & D51E : 20   (Values at: D508 & D521)
        D50E & D526 : 40   (Values at: D510 & D529)
« Last Edit: December 19, 2015, 04:17:20 pm by Nazeji »

thainferno305

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Re: (MD/GEN) Editing the Proto Man sprite in Wily Wars
« Reply #9 on: April 29, 2016, 03:36:32 am »
When protoman is playable keep me updated