Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

.MPN (Mophun) file format

Featured Replies

  • Localization

Hello!

 

I am trying to decrypt and extract Mophun games (.mpn). I do have emulator for them, so i can play/emulate them on Windows 11, but what i wanna do is extract assets, so far i have just extracted one of the game's MIDI file and that's it... I think it uses a combination of XOR and LZ77 encryption and compression (and maybe something else too).. 

The sample game that i'm trying to extract the assets from is Honey Cave 2, which i also attached here below

The only thing about MPN that i have found is here ➡️ https://github.com/modezair/MPN-Specification/blob/main/README.md

 

< attachment deleted by moderator - not allowed by the forum rules >

 

  • Supporter
11 hours ago, anderlli0053 said:

I do have emulator for them, so i can play/emulate them on Windows 11

Never seen this file format in my life, but if this emulator is open source, perhaps you could analyze emulator's source code on GitHub and see how it handles assets processing to make a working extractor.

  • Author
  • Localization
19 hours ago, ikskoks said:

Never seen this file format in my life, but if this emulator is open source, perhaps you could analyze emulator's source code on GitHub and see how it handles assets processing to make a working extractor.

Yeah, the emulator is not open source (This file format was present on older cell phones in around 2002-2003 on Sony Ericssons and Nokias afaik). The only thing i could find was that linked GitHub page, but it is far from being complete or anything. Now i tried with Java and Python to extract it, but the only thing that i have decoded from it (XOR encryption) was one of the game's MIDI file (which supposedly plays in the main menu of the game)

  • Supporter

I made some notes on the format on the wiki https://rewiki.miraheze.org/wiki/Mophun_MPN

To extract data from MPN, you need to decrypt and decompress MPN file first.
You can use these tools for that https://github.com/ptnnx/Mophun/tree/main/Decrypt tools


When you have decompressed and decrypted MPN file, you can analyze it in hex editor or use this command:

pip-objdump.exe -p Game.mpn

This executable is in available in official SDK http://tuxality.net/public/MophunSDK_2_5.zip

in "bin" directory.

Then you'll see a list of sections with offsets.


For example, there is an "Eel.mpn" file in official SDK in "tutorials\RuntimeModules" directory.

Resources section for this file starts at offset 4576 and metadata section at offset 5068. Knowing that, you can start looking for data at this area.
I've found this Eeel title image using ImageHeat:

obraz.thumb.png.bfd38f385ae4229e4db0fc57109e0a09.png

 

And it's the same image used for building the game. You can see it in "tutorials\Source\TheEel\data" directory:
obraz.png.3a572182105ecf128464742317653970.png

 

But that's a solution using manual work. If you want to create automated tool/extractor, then you'd probably need to understand "code section" first to be able to calculate proper offsets for each asset. That would be a fun little project, but could be almost as hard as making your own Mophun emulator. 🙂 

  • Author
  • Localization
2 hours ago, ikskoks said:

I made some notes on the format on the wiki https://rewiki.miraheze.org/wiki/Mophun_MPN

To extract data from MPN, you need to decrypt and decompress MPN file first.
You can use these tools for that https://github.com/ptnnx/Mophun/tree/main/Decrypt tools


When you have decompressed and decrypted MPN file, you can analyze it in hex editor or use this command:

pip-objdump.exe -p Game.mpn

This executable is in available in official SDK http://tuxality.net/public/MophunSDK_2_5.zip

in "bin" directory.

Then you'll see a list of sections with offsets.


For example, there is an "Eel.mpn" file in official SDK in "tutorials\RuntimeModules" directory.

Resources section for this file starts at offset 4576 and metadata section at offset 5068. Knowing that, you can start looking for data at this area.
I've found this Eeel title image using ImageHeat:

obraz.thumb.png.bfd38f385ae4229e4db0fc57109e0a09.png

 

And it's the same image used for building the game. You can see it in "tutorials\Source\TheEel\data" directory:
obraz.png.3a572182105ecf128464742317653970.png

 

But that's a solution using manual work. If you want to create automated tool/extractor, then you'd probably need to understand "code section" first to be able to calculate proper offsets for each asset. That would be a fun little project, but could be almost as hard as making your own Mophun emulator. 🙂 

Thank you, i will try to do something in the upcoming days!

  • Author
  • Localization

Hi again, well i was unsuccessful with the decryption oh the "Honey Cave 2.mpn" and Deep Abyss and so on.. , there is a key needed 🤷‍♂️ . Python script that is in the SDK "decomp.py" returns the message that none of the MPNs are compressed(i'm guessing that only encrypted?)

What i do not know is where to get the proper key or how to generate one or extract from the MPN file itself somehow. I'm only getting some raw data (encoded?). Now if it would be only compressed i could try various decompressions via Python and such, but since it is encrypted and i don't have the key (or at least don't know where to get one.. also the c++ source files reference some "key" files too, but i'm unable to find anything that would resemble a key..)

dec_sources.7z various_data.7z

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.