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.

Hugo: The Evil Mirror "Hugo5.cd" archive with "MDIC" markers inside

Featured Replies

  • Author
  • Localization

NTxC, posted Thu Nov 10, 2022 3:55 am (74180)


Hello,

Hugo: The Evil Mirror has its data stored in a file called Hugo5.cd.
Multiple "MDIC" markers are found inside and data seems to be padded with 0xDEADBEEF.
It doesn't seem to be compressed, as many RIFF headers are found easily inside.

I'd like to extract the files from this type of archive but I haven't found a BMS script for that yet.

I'm attaching the archives in question:

Hugo5.cd from the PC version (39 MB):
https://www26.zippyshare.com/v/5Q8IGQiX/file.html

Hugo5.cd from the PSX version (24.9 MB):
https://www26.zippyshare.com/v/4nHRyP7y/file.html

Could someone help out with this type of archive?

Regards,
NT
  • Author
  • Localization

BloodRaynare, posted Thu Nov 10, 2022 4:14 am (74182)


Is there an header file other than the CD file? Something like "Hugo5.idx" or something. But if there's no such files exist, maybe the table of contents was hardcoded in the game's executable. For that I need the EXE file for the PC and SLUS/SLES file for the PSX version.
  • Author
  • Localization

BloodRaynare, posted Thu Nov 10, 2022 11:35 pm (74191)


I've checked the executable and I haven't found the TOCs in there as well unfortunately. Or maybe the TOCs was actually in those individual MDIC chunks, so I made the BMS script like this:

Code:
get CD_SIZE asize

for i = 0
   savepos CHUNK_POS
   if CHUNK_POS >= CD_SIZE
      break
   endif
   get MAGIC long  # MDIC
   get OFF_ABS long
   get SIZE long
   get FILE_TYPE long
   get TYPE_INFO1 long
   get TYPE_INFO2 long
   string NAME p "d." i
   savepos OFFSET
   if SIZE == 0
      log NAME OFFSET 0
      math CHUNK_POS 0x800
   else
      log NAME OFFSET SIZE
      math CHUNK_POS OFF_ABS
      math CHUNK_POS SIZE
      math CHUNK_POS x 0x800
   endif
   goto CHUNK_POS
next i


So, from what you've seen from the script, there's a basic info of the file type defined in the offset 0x0c in the each chunks (ex: 0x02 for textures/images, contains info for dimensions/WxH and possibly bits per pixel). However, my script doesn't handle those infos yet so most, if not all file types are extracted as a headerless raw data and you have to use a tool to view it as such (like TiledGGD or Kuriimu2 for the graphics). The audios are extracted as a normal WAV files though (For PC at least. PSX version however, didn't have any headers so you'll need to use something like PSound or MFAudio since they are using PSX ADPCM codec).

Also, no filename records either, so don't expect any proper ones.
  • Author
  • Localization

NTxC, posted Fri Nov 11, 2022 2:07 pm (74197)


Thanks for the script, BloodRaynare. The script works and the largest files are the WAV sound effects. It's odd that there are no music files, though.
  • Author
  • Localization

BloodRaynare, posted Fri Nov 11, 2022 2:36 pm (74198)


NTxC wrote:
Thanks for the script, BloodRaynare. The script works and the largest files are the WAV sound effects. It's odd that there are no music files, though.


Music files are likely XA ADPCM (for PSX) or Audio CD tracks (for PC) and were stored outside the Hugo5.CD archive. For PSX, you can try scan the disc image with jPSXDec. As for PC version, you can try to rip the CD audio tracks with supported media players (like foobar) by mounting the CUE files with Virtual Drive tools or drag the CUE files directly or even access the disc directly if you have the drive and the game's disc as well.
  • Author
  • Localization

NTxC, posted Fri Nov 11, 2022 3:26 pm (74199)


You were right, the music tracks were stored as Audio CD. Crazy how I didn't even think of that in the first place! Thanks for the help, appreciate it very much.
Guest
This topic is now closed to further replies.

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.