Using a CD audio track emulator to remove final MGE CD reliance hurdle

Blake00

CFC Mod Archivist & Social Media Helper
Moderator
Supporter
Joined
Sep 24, 2016
Messages
2,571
Location
Australia
As we all know @FoxAhead 's excellent Civ2UIA patch tool allows us to play Civ2 on modern 64bit operating systems and removes the CD check. Civ2's video folders on the CD (KINGS and VIDEO) can also be copied over to the Civ2 install folder almost totally removing the need for the CD. However as discussed over in the getting Civ2 back into digital stores voting thread one issue remains stopping MGE from becoming truly portable and CD free, the music! TheNameLess one was able to build a mp3 player replacement system into ToTPP for Test of Time so we know it's possible and plenty of us hold out hope that maybe FoxAhead will add the same functionality to his Civ2UIA tool for MGE. However in the meantime I might have an interesting alternative...

A helpful fellow over on the Civ2 Discord has informed me of a opensource github hosted program called ogg-winmm CD Audio Emulator that allows people to play ogg files instead of cd tracks with old games without having to hack the games themselves (other than if there's a DRM CD check with in Civ2's case Fox's tool already removes) and apparently even GoG have been using it!
https://github.com/bangstk/ogg-winmm

So perhaps if this is paired Civ2UIA then maybe we can finally have a truly portable version of MGE! And we (moreso me haha) don't have to keep pestering poor FoxAhead about adding this feature haha. Also in theory it could be used for scenario modding purposes since once you have MGE's soundtrack all in ogg files you can swap out the tracks for other music songs (similar to what we've seen in recently ToTPP mods).

I'm a bit busy atm but I'll try to run some tests on this soon. :)
.
 
Last edited:
Hmm livinginaz just tried it with Civ2 over in my Civ1 version of this thread and it didn't go well! Hopefully I can have a go myself later in the week...

Was it confirmed that this worked for Civ2? I am having no luck at all. I am using Win2k but I assume XP and 7 will do the same. You will have to open the images to read, my screen is 1440p.

View attachment 663327
By simply dragging the files as they are, the game will not work anymore. It throws this error, and no matter how many times you click OK it still fails.

View attachment 663328
I renamed the winmm.dll file to win32.dll as mentioned in the readme. Now I can play the game. Interestingly it didn't tell me that it couldn't find the CD when I first opened the game, it went straight to the menu. But to no avail.

View attachment 663330
I also noticed that there is no winmm.dll or win32.dll file in the game folder (or any subfolder) to begin with. Perhaps this is why it is not working... I tried it with some other programs that aren't games and it simply did nothing. Any tips as to what to do to rectify this, or whether it is in fact even possible?
EDIT: Although I noticed from those screenshots you're not using MGE, meaning you're running one of the old 16bit versions of Civ2. Does that mean you're running it with WineVDM? Lord_Hill was wondering over in the Civ1 thread if these two programs might interfere with each other. Oh wait no you said Win2K.. hmm I wonder if this program was designed for a more modern OS.
.
 
Last edited:
So I got the chance to try it with the MGE version and Windows 7, using the original Civ2 songs. My findings were very surprising. I tried it first without installing Civ2UIA, and it worked. However, you cannot pick the music you want to listen to and there are very long periods of silence between the tracks (maybe it was always like that, I never played with my CD in).

half working.PNG
Just throws this error. Otherwise it does work and you even get the extended intro music on the menu. When I tried it with Civ2UIA, it does not work at all. However I notice that in the corner there is a track listing for a song called track 0 which does not exist.

Track stated in corner.PNG
Very weird. As a side note, with winmm.dll you must start with track02.ogg as track 1 is the data track on the CD. Even when the Civ 2 CD came up in my iTunes, it had "2" appended to the first song and so on, recognizing the fact that it's the 2nd track on the disc. I imagine that if you put this in a CD player you'd get the same result.

Also to address the earlier post in the thread, winmm.dll doesn't work with 16-bit apps therefore the original Civ2 is a no go. I did try the MGE with Win2k and got the same results as with Windows 7, it works but only partially. No big surprise, 2k and XP are basically the same, which this was supposed to work with.

Someone else may have better mileage than me though.
 
Interesting that you had some success, but not quite what I was hoping sadly. Oh well thanks heaps for testing this as it was gonna be a few days before I could!

The fellow on the Civ Discord that told me about it said he had to make a few tweaks to the civ2 exe around the cd detection algorithm back when he was using it. However I'm guessing the moment we start playing around with the Civ2 exe then FoxAhead's Civ2UIA patcher tool will stop working as the civ2 exe will be different.
.
 
Created his own modification of the game with various changes and, in particular, added the ability to listen to music tracks
This executive file contains the ability to listen to tracks from the MUSIC folder. Playable format WAV 44100/22050khz 8/16bit stereo/mono. Tracks are checked for a name in the form TRACK**, so it is advisable to start the initial track with 01 with the possibility of increasing to 99 pieces. Sound playback uses the standard game procedure sndPlaySoundA in asynchronous mode. A new track is played when the previous one ends, provided that a new player turn begins or any left mouse click on the map occurs.
The number of played tracks is specified in the rules.txt file using the @Cosmic parameter. Therefore, at the end of the list you need to create a line with a value from 1 to 99. A value of 0 disables playback, as does changing the checkbox in the Music settings. In addition, you can select an arbitrary track from the Game-Select Music menu. New added tracks are preferably, but not necessarily, add to the game.txt file in the PICKMUSICGOLD sub-item, for example like this
Spoiler :

rules.txt
@Cosmic
...
75 ; Mass/Thrust paradigm (increasing slows spaceship time)
5 ; Max effective science rate in fundamentalism (x10, so 5 = 50%)
14 ; Determines how many tracks in WAV format from the MUSIC folder can be played. A value of 0 completely disables playback of these tracks (added parameter) (min 0 max 99)

game.txt
@PICKMUSICGOLD
@width=480
@title=Music selection
@Options
@columns=2
"Funeral March"
"Ode to Joy"
"The Crusades"
"Alien Invasion"
"Mongol Horde"
"Apocolypse"
"Primeval World"
"New World"
"Fantasy"
"Mars Expedition"
"World of Jules Verne"
"X-Com (They're Here)"
"The Dome"
"Japanese Drum" *



In addition, I increased the number of autosaves to 5 (I saw that someone asked for this) and changed the font to Arial Narrow
There will most likely be no problems with the patch Civ2UIA, since its influence should not affect the procedures that were changed
archive with music at the link
 
Last edited:
Woah.. so this modified Civ2.exe in that zip file will allow us to play music from WAV files instead of CD and still work with @FoxAhead 's CivUIA? I thought any modified exe would not work with his patch tool, but if I'm wrong then that's great!!! I'll have to do some tests! However...
Created his own modification of the game with various changes and, in particular, added the ability to listen to music tracks
Who created this modified Civ2.exe ? What are those various changes to the game it makes? Does the creator have a website, blog or forum post somewhere that we can look at for more info?
.
 
Woah.. so this modified Civ2.exe in that zip file will allow us to play music from WAV files instead of CD and still work with @FoxAhead 's CivUIA? I thought any modified exe would not work with his patch tool, but if I'm wrong then that's great!!! I'll have to do some tests! However...

Who created this modified Civ2.exe ? What are those various changes to the game it makes? Does the creator have a website, blog or forum post somewhere that we can look at for more info?
The modification was created by me, it affects many aspects of the game and is designed for the Russian version of the game with translated dialogues and added variables, so I'm not posting it here
The presented file has no changes from the modifications, except for a small part: this is added support for playing WAV files from the MUSIC folder, changed font, support for up to five auto-saves, initialized variable for relations, and the last fix is when deleting the ship stack. These changes are not so global and should not affect the procedures that the CivUIA patch of the current version changes
 
Last edited:
The modification was created by me, it affects many aspects of the game and is designed for the Russian version of the game with translated dialogues and added variables, so I'm not posting it here
The presented file has no changes from the modifications, except for a small part: this is added support for playing WAV files from the MUSIC folder, changed font, support for up to five auto-saves, initialized variable for relations, and the last fix is when deleting the ship stack. These changes are not so global and should not affect the procedures that the CivUIA patch of the current version changes

Have you made your own translation of Civ2 into Russian? In the Russian VK group for civ2 people are often asked about a workable Russian version of the game. I think many group members would be grateful if you shared your translation (for example, through Yandex disk).
 
Have you made your own translation of Civ2 into Russian? In the Russian VK group for civ2 people are often asked about a workable Russian version of the game. I think many group members would be grateful if you shared your translation (for example, through Yandex disk).
The fact is that there are many changes in the modification and the translation was adjusted to suit it. For the original game there will be inaccuracies in the description of units, territories, resources, etc., so such a translation is unlikely to be useful to anyone. In essence, this game is a large scenario for which the game was adjusted.The modification itself has long been available on the rutracker resource
 
The fact is that there are many changes in the modification and the translation was adjusted to suit it. For the original game there will be inaccuracies in the description of units, territories, resources, etc., so such a translation is unlikely to be useful to anyone. In essence, this game is a large scenario for which the game was adjusted.The modification itself has long been available on the rutracker resource

What is the name of your scenario (or Civ2 version) on this site?

In general, there is a clear shortage of scenarios and modifications of the game in Russian. So, I think your version will be of interest to members of the VK group.


Edit: You can also post your version directly on this site, in the Civ2 downloads section. Then your link can be directly posted, including on VK (where, of course, direct links to Rutreker are prohibited). However, you should first consult with the moderators of this site to see if your version violates local laws. For example, Blake00, I think, is quite competent in this matter, it’s worth asking his opinion.
 
Last edited:
The fact is that there are many changes in the modification and the translation was adjusted to suit it. For the original game there will be inaccuracies in the description of units, territories, resources, etc., so such a translation is unlikely to be useful to anyone. In essence, this game is a large scenario for which the game was adjusted.The modification itself has long been available on the rutracker resource

I think I found your mod. Is this a November 19, 2023 upload? You clearly downplayed your merits. This is not a mod at all, and not a scenario. This is a full-fledged new version of Civ2, judging by the quantity and quality of changes. Some of the changes are amazing, I've never seen anything like this on the Civ2 platform! How did you manage to change the game code?!...
 
The modification was created by me, it affects many aspects of the game and is designed for the Russian version of the game with translated dialogues and added variables, so I'm not posting it here
The presented file has no changes from the modifications, except for a small part: this is added support for playing WAV files from the MUSIC folder, changed font, support for up to five auto-saves, initialized variable for relations, and the last fix is when deleting the ship stack. These changes are not so global and should not affect the procedures that the CivUIA patch of the current version changes
Just tried it and yup.. wow.. it worked with Civ2UIA and sure enough I was playing music without the CD. Even the good old music selection menu is working without the CD. Can see the modified fonts too. This is brilliant work! Thank you! :)

Image1.png

What is the name of your scenario (or Civ2 version) on this site?

In general, there is a clear shortage of scenarios and modifications of the game in Russian. So, I think your version will be of interest to members of the VK group.

Edit: You can also post your version directly on this site, in the Civ2 downloads section. Then your link can be directly posted, including on VK (where, of course, direct links to Rutreker are prohibited). However, you should first consult with the moderators of this site to see if your version violates local laws. For example, @Blake00, I think, is quite competent in this matter, it’s worth asking his opinion.
Hmm yeah if it's a full copy of Civ2 with modifications then it can't be shared or linked to on this site sadly, even a modified exe is pushing the limits and may get removed :( (hence why only patch programs that still require an exe are hosted on this site). If that is the case then perhaps the Civ2 discord might be the better place for you guys to have a chat.

I think I found your mod. Is this a November 19, 2023 upload? You clearly downplayed your merits. This is not a mod at all, and not a scenario. This is a full-fledged new version of Civ2, judging by the quantity and quality of changes. Some of the changes are amazing, I've never seen anything like this on the Civ2 platform! How did you manage to change the game code?!...
Sounds like you've already found it though and won't need a link from duplj anyway. I'm very curious to hear about it's improvements and features though? What kind of cool stuff are you seeing?
 
What kind of cool stuff are you seeing?

I did a very quick review of the mod (at least I made sure it works fine on my PC).

The most amazing innovations: you can process sea tiles (build irrigation, mines and roads); build cities on ocean tiles; there is an aviation unit capable of transporting land units, similar to sea transport; the limit on the number of city specialists (36) was lifted; units of different civilizations can now be on the same tile at the same time (if they are in an alliance); 2 resources have been added to the “grassland” terrain type (in the original game this terrain type does not have its own resources); and so on. In total, there are currently 101 points of gameplay changes.

This is truly amazing work, comparable in terms of code editing volume to the launcher from FoxAhead, Millennium mod from Knighttime, and other big changes to Civ2 gameplay. I think the author of this mod should move the discussion to a separate thread and make a full author's presentation. In any case, the scale of the work is impressive...
 
Last edited:
I think I found your mod. Is this a November 19, 2023 upload? You clearly downplayed your merits. This is not a mod at all, and not a scenario. This is a full-fledged new version of Civ2, judging by the quantity and quality of changes. Some of the changes are amazing, I've never seen anything like this on the Civ2 platform! How did you manage to change the game code?!...
Yes, a lot of work has been done. At first, I was helped by open variables from FoxAhead and his advice in finding various places in the code. After I figured it out enough, I continued myself and that's what happened in the end. There is a lot of free space inside this game, so it's not difficult to insert your additions when you figure it out and understand what you want to add
I am not sure that the presentation of the russian version here would be a good idea, rather it would cause resentment from the lack of translation. But in VK or on other russian-language resources to post a link to the distribution is a good idea
 
I did a very quick review of the mod (at least I made sure it works fine on my PC).

The most amazing innovations: you can process sea tiles (build irrigation, mines and roads); build cities on ocean tiles; there is an aviation unit capable of transporting land units, similar to sea transport; the limit on the number of city specialists (36) was lifted; units of different civilizations can now be on the same tile at the same time (if they are in an alliance); 2 resources have been added to the “grassland” terrain type (in the original game this terrain type does not have its own resources); and so on. In total, there are currently 101 points of gameplay changes.

This is truly amazing work, comparable in terms of code editing volume to the launcher from FoxAhead, Millennium mod from Knighttime, and other big changes to Civ2 gameplay. I think the author of this mod should move the discussion to a separate thread and make a full author's presentation. In any case, the scale of the work is impressive...
Wow.. that's a lot of big changes, sounds pretty freaky. Reminds me of over in the Heroes of Might & Magic community no one normally gives the original HoMM1 any love these days, but then I discovered there was a special modded Russian version with all sorts cool fixes and changes that no one else around the world seemed to know about. Thankfully they'd ported it to English too so I was able to play it.

Anyway if it's just a mod without the whole game packaged in it then that could probably be posted here however as Duplj says there's probably not much point as most people here won't be able to play it sadly.

Other than the VK groups the Russian CivFanatics forum has a Civ2 section that might be another good place to post it, although it's pretty dead and only has posts from me (about my Civ2 mods and preservation projects) and even that has come to a stop as I got mysteriously banned in early 2022. No idea why as my last post there was completely harmless boring Civ2 stuff and I hadn't visited the place in weeks when it happened lol! The last person to view my profile when it happened was an admin named 'Guest' so I guess he was the one who decided he didn't want me around anymore for whatever reason lol.
.
 
I am not sure that the presentation of the russian version here would be a good idea, rather it would cause resentment from the lack of translation. But in VK or on other russian-language resources to post a link to the distribution is a good idea
By presentation I mean a short story about the capabilities of your mod.

You managed to achieve impressive innovations. You managed to implement several absolutely unique mechanics that have no analogues in the most advanced modern Civ2 platform - TOTPP. I think it will be at least interesting for programmers, designers, and players to know that these mechanics are practically implementable on the Civ2 platform. I have already listed above the absolutely unique mechanics of your mod, which are still not in TOTPP. Perhaps using Lua code can achieve some semblance of some of them. However, for example, building a city on a sea tile is not available in TOTPP in any way (without replacing the sea tile with a land tile). For example, I've read a lot on this forum about designers' desire to have land transport (similar to sea transport). Your air transport is a giant step in this direction. Personally, I really appreciated your reworked mechanics for bribing a city with a diplomat, with a dynamic (and much higher) cost per bribe. This was one of the more problematic mechanics of the base game.

This site is the resource with the maximum reach of the Civ2 audience. Including, there are a sufficient number of Russian-speaking players here. In addition to direct residents of Russia, on this site I at different times communicated with at least 3-4 players from different countries of Eastern Europe (Poland and others) who spoke Russian sufficiently to play your mod. Among the people who simply read this forum, but have never written anything here, there may be significantly more people who know Russian. I think if you tell them in general terms where they can find your mod, they can handle the search on their own. The main subforum is best suited for the story: https://forums.civfanatics.com/forums/civ2-general-discussions.11/
Other than the VK groups the Russian CivFanatics forum has a Civ2 section that might be another good place to post it, although it's pretty dead and only has posts from me (about my Civ2 mods and preservation projects) and even that has come to a stop as I got mysteriously banned in early 2022. No idea why as my last post there was completely harmless boring Civ2 stuff and I hadn't visited the place in weeks when it happened lol! The last person to view my profile when it happened was an admin named 'Guest' so I guess he was the one who decided he didn't want me around anymore for whatever reason lol.
Strange, I see that your account on this forum was last active today. What do you mean by "I was banned"? Your last message is dated April 10, 2022. I rarely visit this forum, since it has been practically dead for the last 10 years. I go there once every six months or a year. Several years ago, my account on this forum was blocked (I could only send private messages, but could not write anything directly to the forum itself). I sent a request to technical support, but was ignored. Since this forum was never of particular interest to me, I simply registered a new account as a reserve. There were no problems with the new account.
A possible reason for your blocking (if we are talking about blocking similar to my case) is the unsuccessful and titanic struggle of the administration of this forum with the total daily attack of advertising spam bots. I remember that some time ago (maybe just a year and a half or two ago) the entire forum was flooded with spam. Since then, the administration seems to have managed to cope with most of the bots, however, when I logged into my account today, I saw a dozen and a half spam advertisements in my mailbox. Perhaps, if you want to restore access to this forum, you should write a letter directly to the Guest administrator. Or simply register a new account. Or (which is the most reasonable in my opinion) - do nothing at all, since you don’t really have anything to lose. This forum has a negligible audience. The overwhelming number of players many years ago switched to social networks or instant messengers (Telegram, Discord, and so on). I assume that our group only for Civ2 players on VK has an audience larger than the audience of this site for players of all versions of Civ from one to six.
 
Strange, I see that your account on this forum was last active today. What do you mean by "I was banned"? Your last message is dated April 10, 2022. I rarely visit this forum, since it has been practically dead for the last 10 years. I go there once every six months or a year. Several years ago, my account on this forum was blocked (I could only send private messages, but could not write anything directly to the forum itself). I sent a request to technical support, but was ignored. Since this forum was never of particular interest to me, I simply registered a new account as a reserve. There were no problems with the new account.
A possible reason for your blocking (if we are talking about blocking similar to my case) is the unsuccessful and titanic struggle of the administration of this forum with the total daily attack of advertising spam bots. I remember that some time ago (maybe just a year and a half or two ago) the entire forum was flooded with spam. Since then, the administration seems to have managed to cope with most of the bots, however, when I logged into my account today, I saw a dozen and a half spam advertisements in my mailbox. Perhaps, if you want to restore access to this forum, you should write a letter directly to the Guest administrator. Or simply register a new account. Or (which is the most reasonable in my opinion) - do nothing at all, since you don’t really have anything to lose. This forum has a negligible audience. The overwhelming number of players many years ago switched to social networks or instant messengers (Telegram, Discord, and so on). I assume that our group only for Civ2 players on VK has an audience larger than the audience of this site for players of all versions of Civ from one to six.
Yeah I logged in there yesterday to see if I was still banned. I say banned because that's the wording they use.. here's a screenshot.

1700547032021.png

My experience sounds similar to yours though as I can still send private messages but cannot access anything else anymore and just get the above 'you have been banned' message. Yeah I sent a message using the "site feedback" button link but was ignored, perhaps I'll try again and use the private message system instead. I thought about making a new account but as you pointed out the Civ2 area is so dead it probably doesn't matter. Plus I would not be able to edit my existing mod preservation project posts which would be annoying lol.
 
Last edited:
Hello. New user here. I'm trying to catch up with both this thread and CIV2UIA. It's been a very long time since I was investigating how to get Civ 2 music working correctly. Does using both this patched version of the exe and wav files alongside the CIV2UIA wrapper mean that the game will operate as it originally did in Windows 95 with music and all or just that it works like a jukebox?
 
Top Bottom