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

Author Topic: Please don't tell me Hex Editing is the only way...  (Read 22144 times)

Lin

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #40 on: January 22, 2012, 05:24:33 pm »
I have my project on hold right now cause I'm trying to figure out how to extract and edit the compressed graphics. I have all the tools and a good idea on extracting them, but I'm still a little unsure about re-applying them.
I submitted a document to this site a while back containing C# code to decompress Megaman Xtreme and Xtreme 2's graphics. It's quite a simple format and writing compression code shouldn't be too hard. I'm not sure how far you want to go in hacking those games (if you even want to), but a while back I wrote a level viewer for both but stopped due to the game managing tilesets through events. I took some notes for MMX2 but MMX is very similar.

Quote
0x32000 - Level 1 level data. One byte per on-screen view. Reference to other level data in the same bank. In chunks of 16x16 blocks.
0x30A60 - Top left start of level 1 region 1 level data
0x05640 - Start of level loading procedure
0x015FD - Start of level data to vram procedure
0x0164E - Start of tile-specific vram palette setting
0x008D5 - Start of region data loading procedure
0x008CC - Start of actual region data loading
0x0744D - Start of level start data loading
0x0748D - Clearing of 16 bytes...
0x0543E - Start of loading pointer to level data
0x3F:0x4EFF - Start of tileset level header loading

[MEM] 0xD35F - The current level. Level 1 appears to be level 9 (from 0)
0xBC000 - Level data pointers. 4 Bytes per level. 0xBC024 for level 1
   - 1st byte = bank (for complete level. this includes tileset formation and palette data)
   - 2nd byte = the 2nd byte in a pointer for region/region level data.
   - 3-4 byte = pointer to region

0x30400 - Start of level 1 tileset large palette indicies. 0x100 per corner. Top left, top right, bottom left, bottom right. 0x400 bytes total
0x30000 - Start of level 1 tileset formation. same format as palette
0x30800 - Start of level 1 collision data. unknown format

0x7F95D - Pointer to start information for level 1 (9)
   - Start x
   - Start region
   - Where you start teleporting down at (y)
   - Unknown. It seems to do with your death
   - The start face. FF for right, 00 for left
   - 2 bytes for a memory pointer indicating horizontal scroll value
   - Horizontal scroll value
   - Start region -- again?
   - 2 bytes for a memory pointer indicating next 2 values
   - Unknown. seems to be useless
   - Unknown. this and the top value seem to have something to do with where you start and the scrolling type
   - 2 bytes for a memory pointer indicating next 2 values
   - Unknown. seems to be useless
   - Unknown. seems to be useless
   - 2 bytes for a memory pointer indicating next 2 values
   - Unknown. seems to be useless
   - Unknown. seems to be useless
   - 2 bytes for a memory pointer indicating next 2 values
   - Unknown. seems to be useless
   - Unknown. seems to be useless
   - 2 bytes for a memory pointer indicating next 2 values
   - Unknown. seems to be useless
   - Unknown. seems to be useless
   -

[MEM] 0xD509 - The current region - 1.
[MEM] 0xCF8B - Bank of current level
[MEM] 0xD399 - The RTI (region tileset index)

And here's some poor memory documentation for Megaman Xtreme.
Quote
CAF4 - Current tileset factor

CC08 - Current background X LSB
CC09 - Current background X HSB

CC5C - Current map

CF29 - 00
CF2A - 08 or 50
CF2B - 00

D35F - Current level
D366 - Current region
D399 - Current special factor

D504/CC04 - Region respawn map
D505/CC05 - Data Pointer LSB
D506/CC06 - Unknown (byte in region after Data pointer LSB)

FF98 - (CC04) - (CF29)
FF99 - (CC05) - (CF2A)
FF9A - (CF2B)

Not sure if you'll even want them but they're not doing any good just sitting on my computer. Also level data is uncompressed in case you wanna edit it. Also I hope these are the games you're trying to hack or I'm going to feel dumb :P

Plint Michigan

  • Sr. Member
  • ****
  • Posts: 328
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #41 on: January 26, 2012, 02:54:21 pm »
Yes, those are the games I'm currently hacking. Thank you. I might check out this document, soon.

Edit: I cannot say I understand the document. What programs did you use?
« Last Edit: January 26, 2012, 06:34:40 pm by Plint Michigan »

Lin

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #42 on: January 27, 2012, 05:38:53 pm »
I used Visual C# 2008 Express Edition, although the code will run on any version of C#. "GB" is a variable of the type GBFile, which is part of my GBHL library. However, you don't need it to actually use the code. Just pretend GB stands for Gameboy.

Plint Michigan

  • Sr. Member
  • ****
  • Posts: 328
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #43 on: January 27, 2012, 05:50:08 pm »
I have the Lunar series compression and decompression tools.

Lin

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #44 on: January 27, 2012, 09:14:26 pm »
I have the Lunar series compression and decompression tools.
I don't know anything about those, but I gave you the document in hopes you'd be able to learn how the compression works. It isn't that bad and looks pretty irreversible.

Plint Michigan

  • Sr. Member
  • ****
  • Posts: 328
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #45 on: February 14, 2012, 06:05:46 pm »
Still unsure about it. Maybe I should try the program you used.




Also, more concept sprites. Also renamed Burn Gobi to Burning Gaki. (The original name was incorrect, as the base creature is called a Gaki, not Gobi. ...It's also called Preta, but that sounds pretty dumb.)

SteveMartin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #46 on: February 16, 2012, 10:05:51 pm »
You keep acting like he used some program that's out there that did all the work for him, when he's trying to say that he figured out how the game works and wrote code himself that cracks the compression scheme. I'm the last person that should be saying this with how helpless I've been in the past, but you probably should try to read more carefully and realize they're not trying to tell you what program to pull up that does all the work for you. There's actual programming involved here, and using the documents that guy made for this game will require further programming on your part if you're hoping to decompress and recompress the graphics of this game for a hack.

Currently working on Moon: Remix RPG Adventure translation

Plint Michigan

  • Sr. Member
  • ****
  • Posts: 328
    • View Profile
Re: Please don't tell me Hex Editing is the only way...
« Reply #47 on: February 17, 2012, 09:15:32 am »
You keep acting like he used some program that's out there that did all the work for him, when he's trying to say that he figured out how the game works and wrote code himself that cracks the compression scheme. I'm the last person that should be saying this with how helpless I've been in the past, but you probably should try to read more carefully and realize they're not trying to tell you what program to pull up that does all the work for you. There's actual programming involved here, and using the documents that guy made for this game will require further programming on your part if you're hoping to decompress and recompress the graphics of this game for a hack.

Just for the record, I'm not under that assumption. Basically, one of the things I look for isn't so much what will automatically do the task, but the will help me preform the task the easiest and most effectively. But I still know regardless that it will take work. Me, it's not decompressing the graphics that I'm confused about, it's recompressing them back.