Any script to pack/unpack data from this files? (images, text, maps...)
https://www.sendspace.com/file/thbepe
Game: Monaco
Thanks for your help!
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
MTC + MDF
- MiRiKan
- advanced
- Posts: 67
- Joined: Fri Jul 25, 2014 6:28 am
- Location: Korea
- Has thanked: 12 times
- Been thanked: 25 times
- Contact:
Re: MTC + MDF
Code: Select all
//--------------------------------------
//--- 010 Editor v6.0 Binary Template
//
// File: .mtc in monaco
// Author: MiRiKan
// Revision: 1.0
// Purpose: unpacking monaco files
//--------------------------------------
local uint i, pos0, pos1;
uint header;
uint count;
struct pointers{
for (i = 0; i < count; i++){
struct _POS{
uint pointer;
pos0 = FTell();
FSeek(pointer);
uint _pos;
uint _ID;
pos1 = FTell();
FSeek(_pos);
uint unk;
uint unk <hidden=true>;
uint realpointer; //pointer for .mdf
uint unk <hidden=true>;
uint unk;
uint64 realFileSize; // files in .mdf
FSeek(pos0);
}Data;
}
}data;
making tool now...
Team.SM, Make Koren Translations for Games.
Re: MTC + MDF
Just dump to keys when that happens?MiRiKan wrote:it looks nonencrypted files in .mdf. but i can not find any name of file, so that i can not make unpacking tool as easy.
---
Anyway, the reason I'm replying is I've been sitting on this for years now ... I fully intended to post this when I saw it last January, but things got out of hand and I forgot. Someone just reminded me I need to rebuild the safe code for release so here's the name list a bit early.
As I rewrote part of my old Monaco code in Go in 2014-2015 I have this in a Go file with it which should help you if you need it ... typically you'd build a lookup table, but since I usually write daemons for modding (tcp/ip connections for requests to save time/lookup nonsense for offsets on data I want cached) I keep JSON dumps
Here's the Go code snippet I kept with it in dropbox:
Code: Select all
import (
"hash/crc32"
"path/filepath"
)
// StringCRC32 does case sensitive CRC32 calculations for Monaco.
func StringCRC32(raw string) (crc int32) {
crc = 0
p := []byte(raw)
for _, v := range p {
crc = int32(crc32.IEEETable[uint8(crc^(int32(v)&0xFF))]) ^ (crc >> 8)
}
return
}
// StringICRC32 does case insensitive CRC32 calculations for Monaco.
func StringICRC32(raw string) (crc int32) {
crc = 0
p := []byte(raw)
for _, v := range p {
crc = int32(crc32.IEEETable[uint8(crc^(int32(v)&0xDF))]) ^ (crc >> 8)
}
return
}
// PlatformStringCRC32 is used for filename calculation (sensitive)
func PlatformStringCRC32(raw string) (crc int32) {
plat := filepath.Clean(raw)
crc = StringCRC32(plat)
return
}
// PlatformStringCRC32 is used for filename calculation (insensitive)
func PlatformStringICRC32(raw string) (crc int32) {
plat := filepath.Clean(raw)
crc = StringICRC32(plat)
return
}
Notably the CRC differs marginally, here it is without all of the casting hell to clarify the difference:
Code: Select all
// Monaco (0xDF mask instead of 0xFF for insensitive)
// crc ^ (byte & mask)
crc = crc32_tab[crc^(v & 0xFF))] ^ (crc >> 8)
// Normal
// (crc ^ byte) & mask
crc = crc32_tab[(crc ^ v) & 0xFF] ^ (crc >> 8)
You do not have the required permissions to view the files attached to this post.