VOGONS

Common searches


Dune "HERAD" Ad Lib Music Hacking

Topic actions

Reply 20 of 167, by binarymaster

User metadata
Rank Newbie
Rank
Newbie
synamax wrote:

Would it be possible to implement the option of saving the music notation data in either HERAD version 1 or version 2?

MIDIPLEX uses special variables to distinguish between two versions of HERAD. I'm planning to add internal variable editor for it.

synamax wrote:

I also noticed that when converting a MIDI file to HERAD, the pitch bend events still have both the MSB and LSB bytes.

MIDI files doesn't contain HERAD instruments (which is obvious), so MIDIPLEX saves these HERAD files in M32 format (LA32 chip - MT-32, LAPC-I).

However you can workaround this:
1. Open your MIDI file, copy needed events to clipboard.
2. Open HERAD file and paste events to the needed track.
3. Save it to different file.

This should work. 😀

by Stas'M

Reply 21 of 167, by synamax

User metadata
Rank Newbie
Rank
Newbie

Excellent! Thanks to MIDIPLEX, I successfully converted a HERAD v1 song to HERAD v2. I attached both the SDB and compressed HSQ files for WORMSUIT from Dune, except this will only play in MegaRace. To get the song to play in MegaRace, copy the data in WORMRACE.HSQ, open up the MEGARACE.DAT file in your favorite hex editor and overwrite the data starting at 0x1F8D60. This will overwrite Newsan's music data and replace it with WORMSUIT.

If you don't wanna do that, here's a quick video showing that it works perfectly.

Thanks again so much, binarymaster!

Attachments

  • Filename
    WORMRACE.zip
    File size
    11.8 KiB
    Downloads
    124 downloads
    File license
    Fair use/fair dealing exception

Reply 22 of 167, by synamax

User metadata
Rank Newbie
Rank
Newbie

Just checking in to confirm that KGB music plays perfectly in MegaRace thanks to MIDIPLEX. Major props go to ripsaw for extracting the uncompressed KGB music files from the DOSBOX Debugger. I'll post a video of KGB's "Gorbachev" playing in MegaRace soon. I also got a MegaRace song to play in Dune (though it required quite a lot of editing to get it to play correctly). A video for that will posted as well.

While looking at the binary data for MegaRace's exe, there's a mention of a MIDI driver file (DFMID.HSQ - DF stands for "Drive Fractalus", MegaRace's working title). It looks like MIDI (presumably the Roland MT-32) was going to be supported just like Dune and KGB, but unfortunately, that was abandoned. Also abandoned are two test music files (SN1.HSQ and FREQ.HSQ); these are mentioned right alongside with the music files in the EXE but are not inside the MEGARACE.DAT archive.

Reply 25 of 167, by synamax

User metadata
Rank Newbie
Rank
Newbie

As promised, here's a video showing how to convert a song from HERAD 2 to HERAD 1. The conversion process requires a fair amount of trial and error, but it is very much possible.

YouTube - MegaRace Music in Dune

I'm wondering since MIDIPLEX is the first program to support HERAD 2 maybe it should be simpler to identify HERAD 2 files with a new file extention, like SDB2 or SB2 or even HR2. That way, it won't be as confusing when you have a library of songs to go inspect each file individually to see which version of HERAD it is.

Here's the HSQ-packed file of the HERAD 1 version of Skyholder. This will work in Dune or RDOSPlay. http://www.mediafire.com/file/6soq1vx4q31zcf4/pagadune.hsq

Reply 26 of 167, by Staticblast

User metadata
Rank Newbie
Rank
Newbie

Much of this is going over my head, sooo...

Question: Will this eventually enable us to play the games in DOSBox with an emulated Adlib Gold?

4-in-1 build (thanks Phil!): AMD K6-III+ 450 / SOYO 5EMA+ / 128MB SDRAM / 80GB Seagate HDD / Voodoo 3 3000 / Orchid Righteous 3D / Sound Blaster CT2960 / MPU-401 PCMIDI Clone / HxC Floppy Emulator / 15" CRT monitor

Reply 27 of 167, by DracoNihil

User metadata
Rank Oldbie
Rank
Oldbie
Staticblast wrote:

Much of this is going over my head, sooo...

Question: Will this eventually enable us to play the games in DOSBox with an emulated Adlib Gold?

No, it will let us play the music to MegaRace 1, Dune and KGB outside of the respective games, and possibly also allow us to make music for the format.

“I am the dragon without a name…”
― Κυνικός Δράκων

Reply 28 of 167, by synamax

User metadata
Rank Newbie
Rank
Newbie

Here's my first all-original song that I wrote for HERAD, that's not a test or experimental in nature. I call it NEWPAGA, in reference to Skyholder's music file name, "PAGA.HSQ".

NEWPAGA - Cryo HERAD (Ad Lib)

Hope you guys like it!

Reply 29 of 167, by binarymaster

User metadata
Rank Newbie
Rank
Newbie
DracoNihil wrote:

...and possibly also allow us to make music for the format.

synamax wrote:

Here's my first all-original song that I wrote for HERAD, that's not a test or experimental in nature.

So that's it! Really cool 😎

by Stas'M

Reply 30 of 167, by synamax

User metadata
Rank Newbie
Rank
Newbie
binarymaster wrote:
DracoNihil wrote:

...and possibly also allow us to make music for the format.

synamax wrote:

Here's my first all-original song that I wrote for HERAD, that's not a test or experimental in nature.

So that's it! Really cool 😎

Thanks so much! MIDIPLEX was a huge help in converting the MIDI data to HERAD. It definitely saved a lot of time, so thank you for programming MIDIPLEX to have HERAD support! 😁

Reply 31 of 167, by Staticblast

User metadata
Rank Newbie
Rank
Newbie
DracoNihil wrote:
Staticblast wrote:

Much of this is going over my head, sooo...

Question: Will this eventually enable us to play the games in DOSBox with an emulated Adlib Gold?

No, it will let us play the music to MegaRace 1, Dune and KGB outside of the respective games, and possibly also allow us to make music for the format.

Cool! Thanks for the clarification. On a sidenote, PCem added support for the Adlib Gold surround module recently. I got Dune up and running on it, and it sounds good. Still doing some comparatives to see, and I think I may have to adjust which CPU I emulate (started off with the 486, which may be a bit much), but sooo much better.

4-in-1 build (thanks Phil!): AMD K6-III+ 450 / SOYO 5EMA+ / 128MB SDRAM / 80GB Seagate HDD / Voodoo 3 3000 / Orchid Righteous 3D / Sound Blaster CT2960 / MPU-401 PCMIDI Clone / HxC Floppy Emulator / 15" CRT monitor

Reply 32 of 167, by binarymaster

User metadata
Rank Newbie
Rank
Newbie
Staticblast wrote:

On a sidenote, PCem added support for the Adlib Gold surround module recently. I got Dune up and running on it, and it sounds good.

DOSBox SVN also has been added AdLib Gold OPL3 mode:
Idea for Adlib Gold emulation?

by Stas'M

Reply 33 of 167, by Staticblast

User metadata
Rank Newbie
Rank
Newbie
binarymaster wrote:
Staticblast wrote:

On a sidenote, PCem added support for the Adlib Gold surround module recently. I got Dune up and running on it, and it sounds good.

DOSBox SVN also has been added AdLib Gold OPL3 mode:
Idea for Adlib Gold emulation?

Interesting. Does it also include the surround module effects?

4-in-1 build (thanks Phil!): AMD K6-III+ 450 / SOYO 5EMA+ / 128MB SDRAM / 80GB Seagate HDD / Voodoo 3 3000 / Orchid Righteous 3D / Sound Blaster CT2960 / MPU-401 PCMIDI Clone / HxC Floppy Emulator / 15" CRT monitor

Reply 34 of 167, by synamax

User metadata
Rank Newbie
Rank
Newbie
Staticblast wrote:
binarymaster wrote:
Staticblast wrote:

On a sidenote, PCem added support for the Adlib Gold surround module recently. I got Dune up and running on it, and it sounds good.

DOSBox SVN also has been added AdLib Gold OPL3 mode:
Idea for Adlib Gold emulation?

Interesting. Does it also include the surround module effects?

When I loaded Dune in DOSBox SVN, it sounds like standard OPL3, no reverb, delay or filtering. It did emulate the hard left and right panning on some of the instruments so it does work to an extent.

I want to try out PCem because we know which part of the AGD files in Dune control the surround module, so modifying those values should affect the module and then we can figure out what exactly those bytes do. Does anyone know how to set up PCem, it seems rather complex.

Reply 35 of 167, by Staticblast

User metadata
Rank Newbie
Rank
Newbie
synamax wrote:

I want to try out PCem because we know which part of the AGD files in Dune control the surround module, so modifying those values should affect the module and then we can figure out what exactly those bytes do. Does anyone know how to set up PCem, it seems rather complex.

I'll post my configs and the steps I followed for install when I get home from work later today.

That said, it just seems complex (mostly due to the intimidating UI). It's actually quite simple. You select the hardware configuration you want, making sure you have the correct CPU ROM, then it's like a VM. You create a virtual hard disk, and treat it like an empty computer. You install DOS/Windows/whatever and then the drivers, then you're set to use it like a normal DOS PC.

Of course, you do need a set of DOS install disk images.

4-in-1 build (thanks Phil!): AMD K6-III+ 450 / SOYO 5EMA+ / 128MB SDRAM / 80GB Seagate HDD / Voodoo 3 3000 / Orchid Righteous 3D / Sound Blaster CT2960 / MPU-401 PCMIDI Clone / HxC Floppy Emulator / 15" CRT monitor

Reply 36 of 167, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
synamax wrote:

I want to try out PCem because we know which part of the AGD files in Dune control the surround module, so modifying those values should affect the module and then we can figure out what exactly those bytes do. Does anyone know how to set up PCem, it seems rather complex.

The surround module has YM7128 surround processor chip, you can find register map from datasheet. Figuring out how the values affect the sound needs a bit of understanding about FIR filters and basic signal processing. But for experimenting, it should be easy to set it up for some simple reverb action, by disabling the feedback tap T0 and outputing non-delayed signal from some tap at unity volume and maximally delayed signal from another tap at unity volume. I could propably whip up some experimental register dumps for the surround chip if necessary.

Reply 37 of 167, by synamax

User metadata
Rank Newbie
Rank
Newbie
Jepael wrote:
synamax wrote:

I want to try out PCem because we know which part of the AGD files in Dune control the surround module, so modifying those values should affect the module and then we can figure out what exactly those bytes do. Does anyone know how to set up PCem, it seems rather complex.

The surround module has YM7128 surround processor chip, you can find register map from datasheet. Figuring out how the values affect the sound needs a bit of understanding about FIR filters and basic signal processing. But for experimenting, it should be easy to set it up for some simple reverb action, by disabling the feedback tap T0 and outputing non-delayed signal from some tap at unity volume and maximally delayed signal from another tap at unity volume. I could propably whip up some experimental register dumps for the surround chip if necessary.

That would be fantastic. I tried looking at the YM7128 datasheet a while back, but I couldn't understand most of it. Here's an example of values found in one of the AGD files from Dune that deal with the Surround Module.

DE 18 00 1A 00 1C 00 1E 00 00 19 00 1B 00 1D 00 1F 1B 1F 17 17 12 08 1F 07 0A 0D 10 13 16 19 1C

Those bytes are from WORMSUIT.AGD. They can be found at offset 0x34 (in between the header chunk and MIDI chunk). Considering how Ad Lib, Inc and Henri Chalifour were involved with helping Cryo develop HERAD, and how HERAD uses the almost exact same layout for instruments register values as Ad Lib's BNK format, it wouldn't surprise me if these values for the Surround Module would be in the same layout as another Ad Lib file structure.

Reply 38 of 167, by Staticblast

User metadata
Rank Newbie
Rank
Newbie

So, attached are the main settings I used. (You'll have to obtain/dump a BIOS & graphics ROM file, PCem doesn't come with them built in)

The Adlib Gold has the surround module enabled by default, but the setting to enable/disable it can be found in the Configure button next to the Sound Card dropdown when the Adlib Gold option is selected.

I created the hard drive with the default values PCem provides, which makes a ~251MB hard drive.

I then let it boot the first time. It prompted me with a message regarding the BIOS, but just entering the BIOS and save-and-exiting seemed to resolve that.

Then, I installed DOS, followed by the CuteMouse driver.

I installed the Adlib Gold drivers that can be found in VOGONS's driver library, and configured them (DMA 1, IRQ 5). The test built into the drivers gave me sound, but the left & right channels in the test utility seemed to be swapped.

I installed Dune, during setup it automatically picked up the Adlib Gold, and I was able to play it with the music. It does stutter a bit on full-screen, but as I mentioned earlier, I think that's because the CPU I selected is a bit too fast.

Attachments

  • PCem Settings.png
    Filename
    PCem Settings.png
    File size
    44.18 KiB
    Views
    2597 views
    File comment
    The settings for my PCem config
    File license
    Fair use/fair dealing exception

4-in-1 build (thanks Phil!): AMD K6-III+ 450 / SOYO 5EMA+ / 128MB SDRAM / 80GB Seagate HDD / Voodoo 3 3000 / Orchid Righteous 3D / Sound Blaster CT2960 / MPU-401 PCMIDI Clone / HxC Floppy Emulator / 15" CRT monitor

Reply 39 of 167, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
synamax wrote:
That would be fantastic. I tried looking at the YM7128 datasheet a while back, but I couldn't understand most of it. Here's an […]
Show full quote

That would be fantastic. I tried looking at the YM7128 datasheet a while back, but I couldn't understand most of it. Here's an example of values found in one of the AGD files from Dune that deal with the Surround Module.

DE 18 00 1A 00 1C 00 1E 00 00 19 00 1B 00 1D 00 1F 1B 1F 17 17 12 08 1F 07 0A 0D 10 13 16 19 1C

Those bytes are from WORMSUIT.AGD. They can be found at offset 0x34 (in between the header chunk and MIDI chunk). Considering how Ad Lib, Inc and Henri Chalifour were involved with helping Cryo develop HERAD, and how HERAD uses the almost exact same layout for instruments register values as Ad Lib's BNK format, it wouldn't surprise me if these values for the Surround Module would be in the same layout as another Ad Lib file structure.

Well that definitely looks approximately like a surround chip register dump.
Except the first byte, 0xDE, it is not for surround chip, there's no register that could hold such large value.
But the rest of the 31 bytes are for surround module, as it is only said to have 31 registers.
My guess is it can be directly dumped to chip. At least in there's a routine for loading 31 byte array to surround chip in the Gold SDK.
And based on the data (it's kind of like "I can see the Matrix"), it looks like a heavy pseudo-stereo phasing effect.

Do you have any idea what the first byte, 0xDE, could be or could you point me to a routine where it is read?