[PSP] Editing Downloaded "Mega Man Powered Up" Construction Stages

Started by Josephine Lithius, February 25, 2023, 04:23:59 PM

Previous topic - Next topic

Josephine Lithius

This is kind of a longshot, but I figured I'd try here because you guys frequently surprise me.
(Apologies if this doesn't belong in "Programming", incidentally.  This isn't exactly "ROM hacking" or a "help wanted" ad...)

A few days ago, every single level that was ever uploaded to Mega Man Web was compiled and released to the public.  This means that all 83,310 user-made stages from Mega Man Powered Up on the Sony PlayStation Portable – as well as all of the special / promo stages (and handful of submissions to GigaBoots) – are still available worldwide despite the fact that the servers are no longer active.

With this bundle comes some documentation for, among other things, understanding and decoding stage data.  I thought I'd give it a look-see and maybe figure out a way to make any stage editable. (I just wanted to tinker with my old, stinky stages, mostly...)  However, when I looked at the documentation, nothing matched up to anything.  I took a look at the EDIT.DAT of a "Construction Stage" (one that's been finalized but not uploaded), as well as a "Creation in Progress" stage (one that hasn't been finalized), and they were completely different.  The only thing they had in common is that they were both 32 KB in size.  The PARAM.SFO files were mostly similar aside, too.

I'm completely lost...  If anyone has any knowledge in the subject, I'd love to hear it.  I just want editable versions of my levels, again...

Thank you,
J

FAST6191

Assuming you read the documentation correctly (mistook what was supposed to be a pointer or a relative address being the usual suspect) and it is not incorrect (would not be the first time a surprise anonymous dump grabbed some kind of beta design documents and final data).

Something being totally different between revisions has three main causes.
1) Something changed within the level that shifted it so much and thus all the layers or coordinates (more on that shortly) changed. For the former then everything will almost be as though someone deleted or inserted a chunk. For the latter there will be a lot similar but every so many positions will be a different number.

2) Compression. Will probably look similar in a lot of places.

3) Encryption. Would not be the first but rare, and someone might have tried it under a misguided attempt at security. Any number of such things could be done for encryption so I can't say much here other than maybe look up XOR encryption as that is a popular choice in these scenarios.

You say in progress and finalised changes radically as well. It could be a thing that gets changed between beta and final for distribution (level beta unencrypted but protect final) as it were.

2d levels (despite being a 3d game this is at its heart a 2d game by the looks of things) have two approaches by which they encode data
i) Tile layer. A level is given so many blocks (or sometimes lines/columns) and every block that makes it up has a position within the file, usually get a lot of blank spaces in these. Multiple layers to handle background, items, enemies, hazards, maybe background animation... pretty much the standard.

ii) Coordinates. Item identifier, item direction, item X location, item Y location... various other things might be included depending upon the game (speed, maybe direction is instead a different item from the list -- why mess around when right facing enemy and left facing enemy is just another entry on the list?) but the idea is hopefully evident.

Mixing and matching for different elements is common enough to be unremarkable.


In your case I would ask if you can still create and export such things locally (some games with level editors would allow you to share locally between friends) as that could be an invaluable resource in this. Otherwise what happens if you tweak a couple of bytes in a file?

Josephine Lithius

The levels are encrypted upon save, and apparently encrypted differently depending on whether they're saved as WiP or saved as playable levels.

Regardless, I figured it out.  Or rather, I was able to find a way to do things using the raw save data and a little experimentation.  I've got my levels in editable format, now, thanks to these folks. (Had to use a pre-existing PARAM.SFO file instead of a blank one, but it worked.)