aliens

Author Topic: opl emulation for music  (Read 10716 times)

Offline mewse

  • Sergeant
  • **
  • Posts: 10
    • View Profile
opl emulation for music
« on: April 07, 2011, 01:53:42 am »
I've been looking into whether we can get opl2/adlib music going, unfortunately I think I've hit my limit. I started with the information that fraggle provided about putting OPL emulation into chocolate doom:

https://www.chocolate-doom.org/wiki/index.php/Opl-branch

One of the main things he did was produce a DRO (Dosbox Raw OPL) file from dosbox to analyze how the original doom executable wrote to the OPL registers.

So I ran dosbox and captured some OPL from the intro music, and then compared what I was looking at in the hex editor to the files stored in AINTRO.CAT, and I am completely baffled by the file format inside AINTRO.CAT.

The DRO format is well documented:

https://www.shikadi.net/moddingwiki/DRO_Format

And the CAT format is understood, but it is the adlib data files stored inside the CAT that aren't making any sense right now.

The DRO:


The first file stored in AINTRO.CAT:


If I was way better at assembly language I would start tracing how the DOS program is interpreting aintro.cat but my skills are weak :(

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: opl emulation for music
« Reply #1 on: April 07, 2011, 12:33:14 pm »
You're looking in the wrong file, ADLIB.CAT is the file that contains the Adlib music:



The *INTRO.CAT files are just sound effects if I'm not mistaken. This might also be of use: https://www.shipbrook.com/jeff/sb.html

Offline mewse

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: opl emulation for music
« Reply #2 on: April 07, 2011, 08:43:23 pm »
The *INTRO.CAT files are just sound effects if I'm not mistaken.

Bleh. It's a 1.2 thing, from ufopaedia: "DOS 1.2 - for some reason music for intro is stored in separate file"

aintro.cat is adlib, rintro.cat is roland, intro.cat is sound data.

Anyway if your compare the section you highlighted with what I was looking at in aintro.cat, the format looks the same, both start with 5A 09, the data looks a bit different tho.

Offline mewse

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: opl emulation for music
« Reply #3 on: April 07, 2011, 09:19:57 pm »
I took that section you have highlighted (minus the name of course) and copied it to a bunch of different files with every file extension that adplug supports. Then I tried to load them into foobar2000 with adplug, and none of them would play. It seems that we're dealing with an unknown format.

Volutar

  • Guest
Re: opl emulation for music
« Reply #4 on: May 13, 2013, 07:32:29 pm »
It's not very difficult format. Something like cmf.