ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed May 22, 2019 8:49 am

All times are UTC




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Apr 07, 2019 5:20 pm 

Joined: Mon Apr 01, 2019 10:49 am
Posts: 70
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 !!


Last edited by Tgames on Sun Apr 07, 2019 5:31 pm, edited 2 times in total.

Top
   
PostPosted: Sun Apr 07, 2019 5:27 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10256
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


Top
   
PostPosted: Sun Apr 07, 2019 5:29 pm 

Joined: Mon Apr 01, 2019 10:49 am
Posts: 70
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.


Top
   
PostPosted: Sun Apr 07, 2019 5:35 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10256
I have seen you created another topic in the Code section, is it a duplicate? can I delete it?


Top
   
PostPosted: Sun Apr 07, 2019 5:36 pm 

Joined: Mon Apr 01, 2019 10:49 am
Posts: 70
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


Top
   
PostPosted: Sun Apr 07, 2019 5:55 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10256
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


Top
   
PostPosted: Sun Apr 07, 2019 6:18 pm 

Joined: Mon Apr 01, 2019 10:49 am
Posts: 70
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited