Jump to content

Rewriting Cryo's Dune 1 : it seems possible !!!


Recommended Posts

Posted

And? No reply? That guy's a ghost!

At this time (2 hours after having sent the mails) I only have 8 "mail delivery errors" out of 12 trials.

Still 4 chances =)

These could be other Roman Dolejsi throughout the worls, but... who knows?

Posted

You might want to look up the "Borg Number One" guy

Uh? Oh yes! You're right!

I read too fast what you wrote. I thought I wasn't interested in this guy because he had no link with HSQ, but I hadn't noticed he was in contact with Roman.

Do you know how to contact him?

Posted

maybe we should speak to Olav van der Spek as he has build a lot of extractors

Maybe... But i'm afraid it won't help us much, because HSQ isn't really a compressed sound format.

It was just a "normal" compression format used by Cryo only to store THEIR audio files.

So I doubt that Olav knows much about it.

Anyway, it's worth giving it a try. Would you be kind enough to do it ?

Posted

Yes, I can ask if he is able to help us out.

But Olafs answers are sometimes a bit too technical for me :P

but anyway, I'm not the guy that shall understand it.

Posted

Yes, I can ask if he is able to help us out.

But Olafs answers are sometimes a bit too technical for me :P

but anyway, I'm not the guy that shall understand it.

Did you send a mail? Can you give me the address?

Posted

Guys! Just read the mail I received from Borg Number One :  (!!!)

Hi.

(...)

...yes, it is true. I am in contact with Roman. ;)

Furthermore, ADPlug is currently in development (ver1.7) so that HSQ maybe

will be supported in future. :)

WOOOHOOOO !!!  ::) 8) :O :)

Be ready to help him whatever he asks... maybe he'll be our savior  8)

(read the following : do you have anything that could interest him?)

Another fact is, that I am collecting datashets, development kits,

documentations, example sources, etc... about "death" sound systems/formats.

All I collect will be send to ADPlug's author Simon Peter.

Here are some examples, of my collected stuff which some of them are already

part of ADPlug:

+ Loudness Sound System by Andras Molnar

+ Sound Images by Tony Williams

+ "HMI" by human machine interfaces

It would be a nice manner to thank him =)

Posted

Hi.

Wow... google is really fast.

The complete story:

After receiving Mathieu BERGOUNIOUX 's (Monsieur OUXX) first eMail, I answered the eMail and took google to look for RDOSPLAY.

I was really surprised that there are so many search results again.

I also could find " RacePRG " and " MegaRace " related stuff

(At the same time I informed Simon Peter and " Melcom " from chiptune.de about the new captured MegaRace RAW tunes...which were also captured from HSQ files)

After searching for "UNHSQ" I could find this current forum/thread ... and google' s preview is really up to date. :)

So I decided to register to this forum.

EDIT:

I received Monsieur OUXX 's email just right now. :)

1.)

Yes, my interests are:

+ modifying BIOS files (BIOS code) (http://bnobtc.pix-art.com)

+ finding (exotic) unpackers to...

+ ... disassemble compiled (and packed) binaries

+ hearing, finding and ripping Adlib tunes; talking about Adlib (http://winamp5.de.tt/misc/adlib)

-->many ripped Adlib tunes can be found here: http://chiptunes.back2roots.org/

+ ripping midi data (Tyrian, etc... other ripped MIDIs and detailed MIDI ripping instructions/methods can be found here: http://mirsoft.info or http://mirsoft.info/gmb/user_info.php?id_ele=MTY0OQ== )

+ working with pixel based stuff, icons, mini graphics/images etc... (I am a Pixel Painter. :)

+ finding/retreving "death" sound formats/sound systems (specs, SDKs, sources, datasheets etcs...)

2.)

Yes I am currently in contact with Roman Delejsi.

Disassembling RDOSPLAY and RAC RDOS Adlib Catcher will fail everytime you try to disassemble them. :)

If you are a smart/ an intelligent person, then try to pack the RDOSPLAY / RAC executables with WinZIP/WinRAR/WinACE.

You will see that the compression ratio is not really good.

That is an indicator for an already compressed executable. ;)

Another indicator is that you will hardly find decent strings in the executables.

--> As a programmer/ game developer, I expected that you already know the tricks about packed executables. :)

Well, because of respecting Roman Dolejsi 's great work, it is not honorable to publish more details about RDOSPLAY/RAC executables and their background information.

(For those, who already figured out/who will figure out the RDOSPLAY/RAC compression method or other details, please do not publish them.)

Monsieur OUXX, if you are interested in more details or disassembling RDOSPLAY 's built-in (HSQ unpacker/player) then, download UltraVNC (or compatible) and let me know when you installed it and when you configured your router/firewall (port 5900/5800 has to be reachable).

If you are ready with installing and configuring then let me know and you will be able to reach my UltraVNC-Server and my Desktop via:

http://borg-number-one.dyndns.org:5800 (Java Aplett for transfering the captured desktop data will be downloaded and instaled.)

or: borg-number-one.dyndns.org (via UltraVNC Viewer)

The password for the desktop sharing session can also be obtained via eMail. ;)

Posted

I also could find " RacePRG " and " MegaRace " related stuff ...which were also captured from HSQ files)

I'm glad about this! I totally forgot that Megarace had been made by Cryo (though I am a Stephane Picq's fan, and his tunes in Megarace are famous)

But I'm skeptical about the RAW files, because I often read on "sound formats" forums that RAW files were only a special technique to capture "commands" generated by the Adlib/sound card emulator, but not necessarily compressed with HSQ.

Anyway, you seem to have a better address book than us ;) Your research are much faster than ours. ;)

+ finding (exotic) unpackers to...

hehe, I think it's the proper word.

Disassembling RDOSPLAY and RAC RDOS Adlib Catcher will fail everytime you try to disassemble them. :)

If you try to pack the executables with WinZIP/WinRAR/WinACE you will see that the compression ratio is an indicator for an already compressed executable. ;)

I hadn't tried that but I knew there would probably be such tricks.

--> As a programmer/ game developer, I expected that you already know the tricks about packed executables. :)

I know they exist, but I don't know their exact nature ;) and I don't compare to you or Roman or any of the previously mentionned persons in the skills :)

Well, because of respecting Roman Dolejsi 's great work, it is not honorable to publish more details about RDOSPLAY/RAC executables and their background information.

I CERTAINLY didn't want to proceed in an intrusive way. I tried to uncompile at a time when I tought that I could never contact Roman. =)

My purpose was not to retrive the entire program, it was just to find an "algorithmic shaped" part of code that could correspond to a compression method --> never mind the variables names. (YES, I know, I was a little bit surestimating my capacities ;) )

I also thought that the documentation was a little more "open" ... Hey! I realize just right now that we don't even know who created this format!

Monsieur OUXX, if you are interested in more details or disassembling RDOSPLAY 's built-in (HSQ unpacker/player) then, download UltraVNC (or compatible) and let me know when you installed it and when you configured your router/firewall (port 5900/5800 has to be reachable).

I have very important exams at this time. I will be able to do that i a few days.

anyway, thanks again for your help (and your long post, people are not always willing to reveal their projects) !!!

Posted

Hello guys,

  I don't really want to disturb your nice conversation about me and what's been my history about 10 years ago, but ... :-))

There are some things I'd like to clarify (after reading the whole thread)..

- RDOS is really a ®oman (DO)lejsi (S)oftware and has nothing to do with any OS of any kind or age :-)

- I don't known anyone from the ZDoom team and if they used parts of RdosPlay (as I've understood from your discussion), they've done so without my knowledge and/or permission :-(

- RdosPlay sources are lost forever in some old harddrive crash - this was the primary reason for stopping the development of RdosPlay at the time of 1997

- UnHSQ has never really been released apart from its inclusion in various other programs (RdosPlay, etc.)

- And here is the HSQ depacker in 286 assembly (if you really need it, it's really not that heavyweight :-)):

decomprime_hsq  proc  near

                push  cx

                push  di

                push  ds

                push  es

                pop    ds

                mov    dx, di

                add    dx, cx

                mov    cx, 6

                mov    si, di

                xor    ax, ax

@@1:            lodsb

                add    ah, al

                loop  @@1

                cmp    ah, 0abh

                jne    @@2

                mov    si, di

                lodsw

                mov    di, ax

                lodsb

                or    al, al

                je    @@3

@@2:            stc

                pop    ds

                pop    di

                pop    cx

                ret

                push  cx

                push  di

                push  ds

                add    si, 6

                xor    bp, bp

                jmp    @@4

@@3:            lodsw

                mov    cx, ax

                sub    si, 5

                mov    bp, si

                add    di, si

                add    di, 20h

                add    si, cx

                dec    si

                dec    di

                sub    cx, 6

                std

                shr    cx, 1

                jnb    @@5

                movsb

@@5:            dec    si

                dec    di

                rep movsw

                cld

                mov    si, di

                add    si, 2

                mov    di, bp

                xor    bp, bp

@@4:            shr    bp, 1

                je    @@6

                jnb    @@7

@@8:            movsb

                jmp    @@4

@@6:            lodsw

                mov    bp, ax

                stc

                rcr    bp, 1

                jb    @@8

@@7:            xor    cx, cx

                shr    bp, 1

                jne    @@9

                lodsw

                mov    bp, ax

                stc

                rcr    bp, 1

@@9:            jb    @@12

                shr    bp, 1

                jne    @@10

                lodsw

                mov    bp, ax

                stc

                rcr    bp, 1

@@10:          rcl    cx, 1

                shr    bp, 1

                jne    @@11

                lodsw

                mov    bp, ax

                stc

                rcr    bp, 1

@@11:          rcl    cx, 1

                lodsb

                mov    ah, 0ffh

@@13:          add    ax, di

                xchg  si, ax

                mov    bx, ds

                mov    dx, es

                mov    ds, dx

                inc    cx

                inc    cx

                rep movsb

                mov    ds, bx

                mov    si, ax

                jmp    @@4

@@12:          lodsw

                mov    cl, al

                shr    ax, 1

                shr    ax, 1

                shr    ax, 1

                or    ah, 0e0h

                and    cl, 7

                jne    @@13

                mov    bx, ax

                lodsb

                mov    cl, al

                mov    ax, bx

                or    cl, cl

                jne    @@13

                pop    ds

                pop    di

                pop    cx

                mov    di, si

                sub    di, 20h

                ret

decomprime_hsq  endp

I'm really not that suprised you were unlucky finding it - it's quite short, isn't it? ;-)

Feel free to ask me about anything you like ;-)

l8r,

Roman Dolejsi

Posted

Hello guys,

  I don't really want to disturb your nice conversation about me and what's been my history about 10 years ago, but ... :-))

Haha, after that I will be able to say that I've seen a miracle once in my life =)

Sorry for the mistakes but in fact we managed to know the truth about most points after short investigations...but we were too lazy to correct (RDOS == OS, for example  ;D... When you read the thread you notice that I begin to doubt after a few posts  :-[)

- UnHSQ has never really been released apart from its inclusion in various other programs (RdosPlay, etc.)

Ah, that's interesting !

And here is the HSQ depacker

YOU ROCK !

MERCI (thanks!)

Posted

After some more thorough scan of my harddrive I've found an ancient private version of the UnHSQ utility..

Here we go, source code and the binary compiled 5 minutes ago ;D

Feel free to try it :-)

Compilation:

tasm unhsq.asm

tlink /t unhsq

l8r,

Roman

[attachment deleted by Gobalopper]

Posted

Hi.

To unpack all .hsq files within the Dune directory in a fast and decent way, just do following:

a)

build a .bat batch file (un-hsq.bat) with following content:

for %%i in (*.hsq) do unhsq %%i

...and store it into the Dune directory.

b)

copy unhsq.com into the Dune directoy.

c)

run the un-hsq.bat file.

PS:

all packed .hsq files will be unpacked to the same file names but with ".___" extension.

If you do not like the extension, then you can add following line to the batch file:

ren *.___ *.xyz

(.xyz is your favorite extension.)

If you would like to automatically unpack all files to a certain sub directory (e.g. "unpacked"), then just add following line to the batch file:

md unpacked
move *.___ unpacked

Example for a user friendly un-hsq.bat batch file:

@ECHO OFF
ECHO Unpacking .hsq files...
ECHO.
ECHO.
for %%i in (*.hsq) do unhsq.com %%i >NUL
ren *.___ *.unp
md unpacked
move *.unp unpacked >NUL
ECHO Moving files with music data to "music" directory...
ECHO.
md unpackedmusic
md unpackedmusichsq
md unpackedmusicagd
md unpackedmusicm32
ren *.hsq *.tmp
ren *.agd *.hsq
for %%i in (*.hsq) do unhsq.com %%i >NUL
ren *.___ *.unp
move *.unp unpackedmusicagd >NUL
ren *.hsq *.agd
ren *.m32 *.hsq
for %%i in (*.hsq) do unhsq.com %%i >NUL
ren *.___ *.unp
move *.unp unpackedmusicm32 >NUL
ren *.hsq *.m32
ren *.tmp *.hsq
cd unpacked
if exist arrakis.unp move arrakis.unp musichsq >NUL
if exist bagdad.unp move bagdad.unp musichsq >NUL
if exist kursk.unp move kursk.unp musichsq >NUL
if exist morning.unp move morning.unp musichsq >NUL
if exist sekence.unp move sekence.unp musichsq >NUL
if exist sietchm.unp move sietchm.unp musichsq >NUL
if exist warsong.unp move warsong.unp musichsq >NUL
if exist water.unp move water.unp musichsq >NUL
if exist wormsuit.unp move wormsuit.unp musichsq >NUL
if exist wormintr.unp move wormintr.unp musichsq >NUL
ECHO Renaming files with sound data to .voc files...
ECHO Moving .voc files to "sounds" directory...
ECHO.
ECHO.
md sounds
ren sd*.* sd*.voc
move *.voc sounds >NUL
ECHO Unpacking all .hsq files to the directory "unpacked" was successfully.
ECHO Press any key to continue
pause >NUL

-->

The un-hsq.bat batch file also automatically:

a)

...renames the sd*.* files to sd*.voc (Creative Voice files).

To listen to the .voc files you can take Winamp, GoldWave or any other program which is able to read/play "Creative Voice files".

b)

... moves all unpacked (.hsq , .m32 , .agd) MIDI like music files into:

unpackedmusicagd

unpackedmusichsq

unpackedmusicm32

Because, unhsq.com expects .hsq files

(even if you enter filenames without a .hsq file extension), it is currently impossible to use unhsq with file that do not have a .hsq extension.

So, the batch file contains some code which automatically temporary renames all .hsq files into .tmp files, so that .agd/.m32 files can be automatically renamed to .hsq files and extacted by unhsq.com

After the whole unpacking, renaming and moving process, all source files will be renamed to their original file names.

Posted

Hi.

Inside the (unpacked) DUNEPRG.EXE executable file there is one more music file related string than existing music files.

Following music file related strings can be found:

arrakis.hsq

bagdad.hsq

kursk.hsq

morning.hsq

sekence.hsq

sietchm.hsq

warsong.hsq

water.hsq

wormsuit.hsq

wormintr.hsq

But within my original Dune CD/Diskette versions, there is no "kursk.hsq"???

With the help of Google, I tried to find other DUNE packages, but there are also no "kursk.hsq" files in them.

Posted

Hi.

Now, it is time to figure the meaning of the different files

(and their file specifications).

All file names will be described in their original compressed state and original filename extension.

(Compressed HSQ/M32/AGD files can be unpacked with UNHSQ . )

Sounds:

SD1.HSQ -

SD2.HSQ - the turn over the page(s) sound from the Dune in-game book

SD3.HSQ - war sounds

SD4.HSQ - the water of life drop sound in the cave(s) where you can drink the water of life

SD5.HSQ -

SD6.HSQ -

SD7.HSQ -

SD8.HSQ -

SD9.HSQ -

SDA.HSQ - a nice low frequency sound from ... ???

SDB.HSQ - Paul - Usul Muadib- Atreides: "Father! The sleeper has awakened!" ( http://www.the-ocean.com/dune/sounds/awaken.wav )

The sound files in DUNE are stored in the "Creative Voice File" format.

The sounds will only be played if you chose: "Sound Blaster (music + sounds)" in the DUNE installation program before.

Music:

ARRAKIS.HSQ - default/standard background music in many Dune scenes

BAGDAD.HSQ

KURSK.HSQ

MORNING.HSQ

SEKENCE.HSQ

SIETCHM.HSQ

WARSONG.HSQ - TAKE AN ORNITHOPTER

WATER.HSQ - Scene: The Water of life cave inside a Sietch

WORMSUIT.HSQ - DUNE intro (with text/introduction/history)

WORMINTR.HSQ - DUNE intro (without text/introduction/history)

The mentioned HSQ files will be played if you chosed: "Adlib music card" or "Sound Blaster (music + sounds)" in in DUNE's Installation (hardware configuration/GAME CONFIGURATION).

After this, the dune.bat file calls/starts the DUNE ("DUNEPRG.exe") executable with on of the following switches:

+ ADL

+ SDB2207

(depending on the music/sound device which was set before.)

*.AGD - DUNE music with Adlib Gold instrumentation and for Adlib Gold compatible devices

If you chose "Adlib Gold music card" in DUNE's Installation(hardware configuration/GAME CONFIGURATION), then the dune.bat file starts the DUNE executable with the parameter "AGD388".

Then DUNE loads "DUNEAGD.hsq" at the beginning and before playing any kind of music.

The unpacked "DUNEAGD.hsq" seems to be a kind of DUNE music format file reader and player for the *.AGD files.

*.M32 - DUNE music with MT-32 instrumentation and for MT-32/LAPC1 compatible devices

If you chose "Roland MT-32 (LAPC1 midi card)" in DUNE's Installation(hardware configuration/GAME CONFIGURATION), then the dune.bat file starts the DUNE executable with the parameter "MID330".

Then DUNE loads "DUNEMID.HSQ" at the beginning and before playing any kind of music.

The unpacked "DUNEAGD.HSQ" seems to be a kind of DUNE music format file reader and player for the *.M32 files.

...should be continued. :)

Posted

Borg, you are making an enormous work, and we are very gratefull to you.

I've never heard of that kursk.hsq file... And it doesn't sound like the name of one of Spice Opera's tracks either.

Maybe a song Picq projected to write but he had no time for it.

Posted

Kursk is from KGB game, not from Dune. All tunes from KGB are:

Burokrat.sqx

Gorbi2.sqx

Goulag.sqx

Kursk.sqx (mentioned)

Machine.sqx

Paradise.sqx

... Actually, I don't really have the game with me now, but the list is here on my HD :-)

sincerelly,

Roman

Posted

A quick note: AGD files are named after Adlib Gold, but they really are only OPL-3 chip music files.

Adlib Gold card offered as the first card an OPL-3 chip. I don't really remember the location of the secondary port set and if it was located just after the first two Adlib port set (ie. 0x388, 0x389, 0x38A and 0x38B). I do remember, though, that Dune and its player used an interrupt handing routine within the player initialization, which extensively used Adlib Gold interrupt scheme. It was because of this initialization that other sound cards with OPL-3 chip did not work with the AGD player and had to stick with plain OPL-2 based SDB player.

However, I remember having another card in those ancient times - the Sound Blaster Pro. This card offered OPL-3 chip as well. I've made sure RdosPlay initializes OPL-3 without using any strange (irq-based) techniques and thus worked well for SBPro as well as Adlib Gold card friend of mine had.

Thus, when digitally emulating and/or directly playing music from Dune, I strongly encourage you to stick to AGD files - it's worth the added burden! SDB musics sound much worse sometimes (especially the intro music is much better in the OPL-3 version than the OPL-2 version)..

Posted

I do believe you ;)

However, I think the reference to kursk.hsq is actually something which accidentally slipped out of Dune production and has nothing to do with Dune per say. It may be a remnant of the KGB game Cryo or music-producing team left there...

btw. KGB uses other type of compression - SQX. I've yet to find the unpacker for them (RdosPlay contains it as well :-)).

Posted

Hi.

1.)

...yes, this could be.

The programming team maybe was lazy and forgot to remove code. :)

Inside the duneprg.exe there are further filenames which do not exist in the Dune directory. ;)

2.)

Cool... SQX unpacker :)

Well, .sqx/.sdb/.agd/.hsq/.m32 files seem to have all the same "basic/base/fundamental MIDI like format" which is just different in compression method and instrumentation.

Does this "fundamental MIDI like format" has a name or is it similar to another already existing format?

3.)

Do you still remember the "special DOSBOX release" with RAW-Adlib grabbing feature you built for me? :)

I took this to grab the Adlib port data to a RAW file while setting "Adlib Gold" in DUNE's Sound setup.:)

This is the result:

HEX content of outputfile.raw:

5241574144415441000004600480042104600480FFFF

TEXT:

RAWADATA...`...!.`....

You can see that following was sent to the (emulated) Adlib Register/Value Port 388/389

Register Value
04      60
04      80
04      21
04      60
04      80
(FF      FF)

Are these the "Adlib Gold"-checking commands? :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.