Ever since my last thread, I have been busy ripping sounds from The ClueFinders series to JumpStart 1st & 2nd Grade among other softwares I own. (Which they'll be sorted out in time).
However, I'm having trouble ripping resources from an .MHK file format. This type of file is found in Broderbund's line of products like Carmen Sandiego, Living Books and it is also been used for Myst or Riven.
If anyone who reads this thread has any advice, hints or tips on how to extract from an .MHK file, I will definitely appreciate your feedback very much.
(I will do all the dirty work, I just need a direction to follow).
endian big
idstring "MHWK"
get fileSize long
idstring "RSRC"
get version short
get compaction short
get filesize long
get abs_offset long
get file_table_offset short
get file_table_size short
goto abs_offset
get name_offset short
get resource_types short
for i = 0 < resource_types
getdstring tag 4
get resource_table_offset short
get name_table_offset short
savepos BACKUP_OFFSET
math resource_table_offset + abs_offset
goto resource_table_offset
get resTable_resources short
for j = 0 < resTable_resources
get id short
get index short
next j
math name_table_offset + abs_offset
goto name_table_offset
get nameTable_num short
for j = 0 < nameTable_num
get offset short
get index short
math offset + abs_offset
math offset + name_offset
savepos TMP
goto offset
get NAME string
goto TMP
math index - 1
string NAME p "%s/%s" tag NAME
putarray 0 index NAME
next j
goto BACKUP_OFFSET
next i
math file_table_offset + abs_offset
goto file_table_offset
get fileTableAmount long
for i = 0 < fileTableAmount
get offset long
get dataSize short
get dataSize2 byte
get flags byte
get unk short
xmath dataSize "dataSize + (dataSize2 << 16) + ((flags & 7) << 24)"
putarray 1 i offset
putarray 2 i dataSize
# all the tMOV sizes are wrong!
next i
get offset asize
putarray 1 i offset
putarray 0 fileTableAmount ""
for i = 0 < fileTableAmount
getarray NAME 0 i
getarray offset 1 i
getarray dataSize 2 i
math i + 1
getarray dataSize 1 i # next offset
math dataSize - offset
log NAME offset dataSize
next i
(08-19-2016, 05:38 PM)Anex Wrote: Run this through quickbms:
Code:
endian big
idstring "MHWK"
get fileSize long
idstring "RSRC"
get version short
get compaction short
get filesize long
get abs_offset long
get file_table_offset short
get file_table_size short
goto abs_offset
get name_offset short
get resource_types short
for i = 0 < resource_types
getdstring tag 4
get resource_table_offset short
get name_table_offset short
savepos BACKUP_OFFSET
math resource_table_offset + abs_offset
goto resource_table_offset
get resTable_resources short
for j = 0 < resTable_resources
get id short
get index short
next j
math name_table_offset + abs_offset
goto name_table_offset
get nameTable_num short
for j = 0 < nameTable_num
get offset short
get index short
math offset + abs_offset
math offset + name_offset
savepos TMP
goto offset
get NAME string
goto TMP
math index - 1
string NAME p "%s/%s" tag NAME
putarray 0 index NAME
next j
goto BACKUP_OFFSET
next i
math file_table_offset + abs_offset
goto file_table_offset
get fileTableAmount long
for i = 0 < fileTableAmount
get offset long
get dataSize short
get dataSize2 byte
get flags byte
get unk short
xmath dataSize "dataSize + (dataSize2 << 16) + ((flags & 7) << 24)"
putarray 1 i offset
putarray 2 i dataSize
# all the tMOV sizes are wrong!
next i
get offset asize
putarray 1 i offset
putarray 0 fileTableAmount ""
for i = 0 < fileTableAmount
getarray NAME 0 i
getarray offset 1 i
getarray dataSize 2 i
math i + 1
getarray dataSize 1 i # next offset
math dataSize - offset
log NAME offset dataSize
next i
It's the Mohawk engine code from aluigi
I will admit that I am an incompetent amateur when it comes to programs like QuickBMS that require more than the usual "Select a file then click on Extract button to extract." But like I said, I'll do all the dirty work. Even if it takes me months -if not weeks- of trial and error.
Thank you again, Anex. You have been great help to me.
Okay, so after some time looking around and researching, I used QuickBMS with the Mohawk script on the sample I attached here and extract it. But, it turned out to be a bust as the extracted files are in .DAT format (Most of them just 1kb and one 164kb), and hex editor didn't give me any leads on what the .DAT files really are originally.
However, I did test a different .MHK file in Hex Editor, and it said in header "MHWK..`˜WAVECue#" which means it is probably a .WAV audio file. (But just renaming it with .wav would just render the file unplayable and Mohawk script with QuickBMS didn't work either as the results says:
"- signature of 4 bytes at offset 0x00000008 doesn't match the one expected by the script:
this one: "WAVE"
57 41 56 45 WAVE
expected: "RSRC"
52 53 52 43 RSRC )"
Anyway, I thought should report my progress here. It may not be much, but at least I'm getting some leads -and information- with some of the .MHK files.
(08-31-2016, 11:20 PM)Gamer101 Wrote: Okay, so after some time looking around and researching, I used QuickBMS with the Mohawk script on the sample I attached here and extract it. But, it turned out to be a bust as the extracted files are in .DAT format (Most of them just 1kb and one 164kb), and hex editor didn't give me any leads on what the .DAT files really are originally.
However, I did test a different .MHK file in Hex Editor, and it said in header "MHWK..`˜WAVECue#" which means it is probably a .WAV audio file. (But just renaming it with .wav would just render the file unplayable and Mohawk script with QuickBMS didn't work either as the results says:
"- signature of 4 bytes at offset 0x00000008 doesn't match the one expected by the script:
this one: "WAVE"
57 41 56 45 WAVE
expected: "RSRC"
52 53 52 43 RSRC )"
Anyway, I thought should report my progress here. It may not be much, but at least I'm getting some leads -and information- with some of the .MHK files.
I'll report again once I get a breakthrough.
-Gamer101_123
I've been wanting to rip files from The Logical Journey of the Zoombinis for years but it's proven really difficult. Using the script posted in the thread I was able to uncover a load of .mhk files which I imported as raw data into Audacity and they came out as working audio files, though some were distorted.
There seemed to be a large number of missing files, namely the image files and about half of the MIDIs.
Anyway, I really hope you get further with this. I look forward to any updates.
Okay, so after some searching online and email exchanges, I had the chance to contact a person called SupperTails66 (Who is known to me as the creator of the HumongousRip A.K.A. Heerip), and he graciously helped me a lot with his Mohawkrip program.
Thanks to his program, I was able to rip 13.4 gigabytes of resources from "Where in Time is Carmen Sandiego?" which consist of sprites, sound effects, character dialogue and music. (Don't worry, the latter will not be uploaded onto this site).
While this is fantastic news, it isn't a program that is able to extract all of .MHK resources from various software programs as it was designed "for resource files in certain Mohawk engine titles,
namely the later Carmen Sandiego games." (I tried it on "Living Books" titles that have .MHK, and it wasn't successful. Same thing for "Dr. Seuss Kindergarten" and all it extracted was some discolored sprites and garbled sound files from a band folder).
Regardless, I am pleased with what I was able to extract, and I hope to upload those sounds sometime around late October or early November.
And for something interesting to read, I learned from SupperTails66 that an .AIC file is actually a standard .AIFF audio file. And If I change the file extension to .AIF, it becomes a playable audio file! (I was able convert all .AIC files from Carmen Sandiego Math Detective into playable audio thanks to his terrific wisdom).
I don't mean to resurrect an old thread, but I came across this thread while trying to figure out how to extract music from the MHK files in "Where in the World is Carmen Sandiego" (1996). If anyone is still interested, I ran the script provided by Pingu! on those files. What resulted was a bunch of DAT files and some additional MHK files. I ignored the DAT files and imported the newly formed MHK files into Audacity as raw data.
After importing, the sound was distorted but I could tell there was music there and not just static. After a little trial and error, I decided to slow the track down by 75% (0.75) and VOILA! I could hear the music tracks that I was looking for.
So if any of you are able to get some sort of sounds from the game you wanted to, try adjusting the play speed and that may get you what you want.
Thank you for this thread as I am a newbie when it comes to this sort of stuff.