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.

[ASK] Convert a C Extractor Code to BMS Script !

Featured Replies

  • Author
  • Localization

Tgames, posted Sun Apr 07, 2019 5:20 pm (46578)


Hi,

Here is the C code to extract sounds and TGA files from a HNM V1 archive file (used in Dune CD).

We only need the sound.voc part !!

Can someone just convert it to a BMS Script ?

C Code made by Vag :

https://we.tl/t-ZEGz73gGAA

Documentations here :

https://wiki.multimedia.cx/index.php/HNM_(1)

Thanks !!
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 5:27 pm (46582)


Why do you need a script if already exists a tool?

The tool is mainly a converter that takes the input data and save it as TGA, quickbms is good as extractor but not as converter
  • Author
  • Localization

Tgames, posted Sun Apr 07, 2019 5:29 pm (46584)


Hi Aluigi !
Thanks for your answer

I need to reinject a sound.voc into a HNM.
(Original is english voice, we have a new one with french voice).

This C code only extract the data :(

This tool extract TGA files and a single sound.voc.

We don't need the TGA files at all, only the sound.voc.

We already finished at 99% the entire translation of the game with french voices.
But the HNM file (opening cutscene) is the only one who got a english voice to replace. And we are not able to do that.
We hope that a BMS Script will allow to inject the sound.voc to replace an existant one.
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 5:35 pm (46585)


I have seen you created another topic in the Code section, is it a duplicate? can I delete it?
  • Author
  • Localization

Tgames, posted Sun Apr 07, 2019 5:36 pm (46587)


Yes please, i posted to the wrong section for the other topic !

This fan translation project is up since 2 years.

And another question, is a BMS Script able to cut in files the export we made of french voices from the Mega CD Version ?

https://we.tl/t-xccAS6Qcwa
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 5:55 pm (46588)


Try this:
Code:
get NAME basename
string NAME ".voc"
log NAME 0 0
append
math i = 0
get HNM_SIZE asize
for NEXT_OFF = 0 != HNM_SIZE
    get SIZE short
    math NEXT_OFF SIZE
    math SIZE - 2

    if i == 0
        # palette
    else
        do
            savepos CHK
            get TAG short
            get TAG_SIZE short
            math CHK TAG_SIZE
              if TAG u== 0x7470 #'tp'
            elif TAG u== 0x6c6b #'lk'
            elif TAG u== 0x6473 #'ds'
                math TAG_SIZE - 4
                savepos OFFSET
                log NAME OFFSET TAG_SIZE
            elif TAG u== 0x6c70 #'lp'
            else
                break
            endif
            goto CHK
        while CHK != NEXT_OFF
    endif

    goto NEXT_OFF
next i
append


Reimporting is limited by size
  • Author
  • Localization

Tgames, posted Sun Apr 07, 2019 6:18 pm (46590)


Thanks a lot aLuigi !

It's work !

I have just an issue now the cutscene is speedup a lot.
Maybe indeed the size issue, i have to compress more my .Voc file.
I will confirm if it's this in a few minutes.

Do you think there is a way to split theses voices from the export we made from the DUNE.DAT of the Mega CD ?
Or it's still better to search for the header to re-extract theses files from the Mega CD ISO ?

Here is the ISO :
https://we.tl/t-yFHrgOt2iU

Edit 1: Indeed you have right, i just have to import a less or equal .VOC file in size and it's work perfectly.
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.