Original TTD adlib music in openttd, is og possible?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Visape
Engineer
Engineer
Posts: 5
Joined: 18 Dec 2019 07:07

Original TTD adlib music in openttd, is og possible?

Post by Visape »

Hi

I finally started on openttd after playing ttdx dos version for many years.
I allways loved the original adlib music and want this in openttd.
I successfully imported the sound and graphics but I can only make the ost play in midi sounds :|
I want the adlib sound to play, is it possible??
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by orudge »

I would suggest downloading one of the archives on these pages:

OPL-2 recordings
OPL-3 FM recordings
ESS AudioDrive 1668 recordings

and using your favourite media player to play them while playing the game. While I did create a patch for OpenTTD years ago that allowed you to play MP3s, FLACs, etc in the game, it was never added to the game.

(I also rather like listening to the 'original' FM synth while playing - the way I did back in the late 90s when I had an ESS AudioDrive 1668 myself!)
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by kamnet »

And to directly answer the question, no OpenTTD doesn't support playing the music from the adlib.cat file, as they are in a proprietary format that has not yet been reversed engineered. The MP3 and FLAC recordings are made by capturing the playback from Transport Tycoon Deluxe via the sound card with appropriate drivers and sound fonts.
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by orudge »

kamnet wrote: 18 Dec 2019 09:32 And to directly answer the question, no OpenTTD doesn't support playing the music from the adlib.cat file, as they are in a proprietary format that has not yet been reversed engineered.
Hm, are you sure? I thought jfs had implemented support for being able to play the DOS MIDI .cat files in OpenTTD. But they will still play with whatever MIDI driver you have setup. Possibly you can get a patch set that emulates FM synth and use timidity/fluidsynth, of course...
Visape
Engineer
Engineer
Posts: 5
Joined: 18 Dec 2019 07:07

Re: Original TTD adlib music in openttd, is og possible?

Post by Visape »

orudge wrote: 18 Dec 2019 09:25 I would suggest downloading one of the archives on these pages:

OPL-2 recordings
OPL-3 FM recordings
ESS AudioDrive 1668 recordings

and using your favourite media player to play them while playing the game. While I did create a patch for OpenTTD years ago that allowed you to play MP3s, FLACs, etc in the game, it was never added to the game.

(I also rather like listening to the 'original' FM synth while playing - the way I did back in the late 90s when I had an ESS AudioDrive 1668 myself!)
Thanks, but it is not exactly what I am looking for.

This is the exact sound I'm looking for:

https://youtu.be/JTi6LG8aeK8
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by kamnet »

orudge wrote: 18 Dec 2019 09:40
kamnet wrote: 18 Dec 2019 09:32 And to directly answer the question, no OpenTTD doesn't support playing the music from the adlib.cat file, as they are in a proprietary format that has not yet been reversed engineered.
Hm, are you sure? I thought jfs had implemented support for being able to play the DOS MIDI .cat files in OpenTTD. But they will still play with whatever MIDI driver you have setup. Possibly you can get a patch set that emulates FM synth and use timidity/fluidsynth, of course...
The GM.CAT file had previously been decoded, and it contains General MIDI files. The ADLIB.CAT and ROLAND.CAT files had not been decoded, although reading back through some threads it looks like Cirdan had developed a script to decode GM.CAT and could possibly be modified to decode the other files. Still, the built-in player only has support for General MIDI and doesn't contain the drivers for Adlib or Roland MT32 support.
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by orudge »

Visape wrote: 18 Dec 2019 10:02 This is the exact sound I'm looking for:

https://youtu.be/JTi6LG8aeK8
To my ears, the AudioDrive recording sounds very close - perhaps not exactly identical, but almost exactly the same. The OPL-2 recordings also sound much the same to me.
Visape
Engineer
Engineer
Posts: 5
Joined: 18 Dec 2019 07:07

Re: Original TTD adlib music in openttd, is og possible?

Post by Visape »

orudge wrote: 18 Dec 2019 10:19
Visape wrote: 18 Dec 2019 10:02 This is the exact sound I'm looking for:

https://youtu.be/JTi6LG8aeK8
To my ears, the AudioDrive recording sounds very close - perhaps not exactly identical, but almost exactly the same. The OPL-2 recordings also sound much the same to me.
Although I agree with you it is not exactly the same and that is enough to keep playing the dos version or just play the YouTube in the background. Thanks for the help everyone :bow:
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by kamnet »

Visape wrote: 18 Dec 2019 10:39
Although I agree with you it is not exactly the same and that is enough to keep playing the dos version or just play the YouTube in the background. Thanks for the help everyone :bow:
Don't continue playing the DOS version, the TTD version is antiquated and the OpenTTD version is no longer being supported. Just play it in YouTube, or use a YouTube to MP3/MP4/FLAC converter and then play them on another local media player.
Visape
Engineer
Engineer
Posts: 5
Joined: 18 Dec 2019 07:07

Re: Original TTD adlib music in openttd, is og possible?

Post by Visape »

kamnet wrote: 18 Dec 2019 11:35
Visape wrote: 18 Dec 2019 10:39
Although I agree with you it is not exactly the same and that is enough to keep playing the dos version or just play the YouTube in the background. Thanks for the help everyone :bow:
Don't continue playing the DOS version, the TTD version is antiquated and the OpenTTD version is no longer being supported. Just play it in YouTube, or use a YouTube to MP3/MP4/FLAC converter and then play them on another local media player.
The openttd game is no longer supported?
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by kamnet »

Visape wrote: 18 Dec 2019 11:45 The openttd game is no longer supported?
OpenTTD 1.10 will drop support for DOS, AmigaOS, MorphOS, and BeOS because they lack drivers that OpenTTD needs to update in order to support current, modern OSes. There is also nobody to maintain support for those versions. In particular the DOS port used a completely different and outdated video driver and did not have support for networked multiplayer games.
Visape
Engineer
Engineer
Posts: 5
Joined: 18 Dec 2019 07:07

Re: Original TTD adlib music in openttd, is og possible?

Post by Visape »

kamnet wrote: 18 Dec 2019 12:11
Visape wrote: 18 Dec 2019 11:45 The openttd game is no longer supported?
OpenTTD 1.10 will drop support for DOS, AmigaOS, MorphOS, and BeOS because they lack drivers that OpenTTD needs to update in order to support current, modern OSes. There is also nobody to maintain support for those versions. In particular the DOS port used a completely different and outdated video driver and did not have support for networked multiplayer games.
What I meant was that I would continue playing the dos version of ttd in order to have the correct music at it is a huge part of my game joy 😊
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by kamnet »

VengefulChip has a wonderful YouTube video of the TTD soundtrack in AdLib: https://www.youtube.com/watch?v=ptBTGpFJGj4

As an aside, it's interesting to hear the updated "live" instrument rendition of the soundtrack from the Transport Tycoon 2013 release for iOS/Android.
https://www.youtube.com/watch?v=jSFsrmLhC00
User avatar
jfs
Tycoon
Tycoon
Posts: 1757
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Original TTD adlib music in openttd, is og possible?

Post by jfs »

I have actually implemented an experimental decoder for the DOS version AdLib soundtrack, played back via an OPL2 emulator imported from DOSBox. My branch is here https://github.com/nielsmh/OpenTTD/tree/adlib-music but I haven't maintained it for a while. This branch only supports playing through the emulator code, not to real hardware.
orudge wrote: 18 Dec 2019 10:19
Visape wrote: 18 Dec 2019 10:02 This is the exact sound I'm looking for:

https://youtu.be/JTi6LG8aeK8
To my ears, the AudioDrive recording sounds very close - perhaps not exactly identical, but almost exactly the same. The OPL-2 recordings also sound much the same to me.
ESS AudioDrive does not have a Yamaha OPL2 chip but instead ESS's own compatible synth, so it won't sound exactly the same as an AdLib or SoundBlaster.
kamnet wrote: 18 Dec 2019 10:05 The GM.CAT file had previously been decoded, and it contains General MIDI files. The ADLIB.CAT and ROLAND.CAT files had not been decoded, although reading back through some threads it looks like Cirdan had developed a script to decode GM.CAT and could possibly be modified to decode the other files. Still, the built-in player only has support for General MIDI and doesn't contain the drivers for Adlib or Roland MT32 support.
I have also looked at ROLAND.CAT, it's the MT-32 version of the sound track. It also depends on the LAPC1.PAT file that contains SysEx patches for the synth. I do happen to have an almost-MT-32-compatible hardware synth myself (Roland RA-50) and have mostly reverse engineered the patch loading and SysEx sending required for ROLAND.CAT + LAPC1.PAT music. It sounds quite nice, different from the SoundCanvas rendition of the GM soundtrack, I can post some recordings later.
Mr.Mouse
Engineer
Engineer
Posts: 7
Joined: 27 Jan 2021 22:00

Re: Original TTD adlib music in openttd, is og possible?

Post by Mr.Mouse »

Sorry to raise this from the dead, but I reverse engineered the adlib music player form x86 code and unraveled the music format, so I can create a new player for the Commodore 64.
As a side project, I created a player for windows, for debugging purposes of my findings.

If there is interest I can finish that up a bit and release it, along with a detailed description of the player and music format.

https://www.youtube.com/watch?v=vmdYBCCZwAM Here's a video of the player with 4 songs.
ttdplayer.png
(1.11 MiB) Not downloaded yet
User avatar
jfs
Tycoon
Tycoon
Posts: 1757
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Original TTD adlib music in openttd, is og possible?

Post by jfs »

Mr.Mouse wrote: 28 Jan 2021 07:38 Sorry to raise this from the dead, but I reverse engineered the adlib music player form x86 code and unraveled the music format, so I can create a new player for the Commodore 64.
As a side project, I created a player for windows, for debugging purposes of my findings.

If there is interest I can finish that up a bit and release it, along with a detailed description of the player and music format.
You don't need to describe the format or anything, I already did that since I did in fact (also) reverse-engineer the original player code and re-implement it in an OpenTTD patch. I have never submitted that as a PR to the project, however, since it seems mostly pointless at this time. Since OpenTTD doesn't have any kind of "dynamic music" (selecting music based on gameplay situation) you may as well play recorded files of the music in an external program.
See my post just above yours, it links my (by now old) branch with the code in.
Mr.Mouse
Engineer
Engineer
Posts: 7
Joined: 27 Jan 2021 22:00

Re: Original TTD adlib music in openttd, is og possible?

Post by Mr.Mouse »

jfs wrote: 28 Jan 2021 19:32
Mr.Mouse wrote: 28 Jan 2021 07:38 Sorry to raise this from the dead, but I reverse engineered the adlib music player form x86 code and unraveled the music format, so I can create a new player for the Commodore 64.
As a side project, I created a player for windows, for debugging purposes of my findings.

If there is interest I can finish that up a bit and release it, along with a detailed description of the player and music format.
You don't need to describe the format or anything, I already did that since I did in fact (also) reverse-engineer the original player code and re-implement it in an OpenTTD patch. I have never submitted that as a PR to the project, however, since it seems mostly pointless at this time. Since OpenTTD doesn't have any kind of "dynamic music" (selecting music based on gameplay situation) you may as well play recorded files of the music in an external program.
See my post just above yours, it links my (by now old) branch with the code in.
:) Looks good! Seems to confirm my code as wel, though I've been chatting with the original programmer and some bugs did slip in his assembly code. I can see for faithful representation one would keep that in, I am going to see if fixing them has any real effect on the sound. Personally, I do appreciate it when people come up with a detailed description of formats (check our community here for example https://forum.xentax.com ), instead of just code, since it could make a budding player builder understand better what is going on. Also, even though an exercise like this seems academic at this point, I prefer having an actual player (be it with OPL emulation or real hardware) over playing a WAV or MP3 recording of the music. And when creating a player for the C64 that is not an option anyway. :D
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: Original TTD adlib music in openttd, is og possible?

Post by orudge »

Mr.Mouse wrote: 29 Jan 2021 07:46 :) Looks good! Seems to confirm my code as wel, though I've been chatting with the original programmer and some bugs did slip in his assembly code.
Is that Andrew Parton?
Mr.Mouse
Engineer
Engineer
Posts: 7
Joined: 27 Jan 2021 22:00

Re: Original TTD adlib music in openttd, is og possible?

Post by Mr.Mouse »

orudge wrote: 29 Jan 2021 13:23 Is that Andrew Parton?
Correct
Mr.Mouse
Engineer
Engineer
Posts: 7
Joined: 27 Jan 2021 22:00

Re: Original TTD adlib music in openttd, is og possible?

Post by Mr.Mouse »

https://www.youtube.com/watch?v=P-5UoeBODeA

Got the first version of my Commodore 64 player of TTD Adlib music files, with an FM-YAM cartridge plugged in (I produced 300 of those cartridges, that have the YM3812 inside). :)
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 18 guests