Skip to content

Commit

Permalink
GZDOOM: update to v4.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
glKarin committed Dec 24, 2024
1 parent f3bd868 commit b62e141
Show file tree
Hide file tree
Showing 820 changed files with 190,100 additions and 42,452 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.changelog
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console height
update gzdoom to 4.14.0
File renamed without changes.
File renamed without changes.
Binary file not shown.
106 changes: 106 additions & 0 deletions Q3E/src/main/assets/pak/gzdoom/4.14.0/fm_banks/GENMIDI-readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
DMXOPL3
==================================================================
https://github.com/sneakernets/DMXOPL
==================================================================

New and improved DMX GENMIDI for Doom and sourceports, taking full advantage of
the OPL3 waveforms. This takes things up a notch in terms of timbre.

# Summary
This is a GENMIDI patch for DMX for OPL3 FM synthesis. This patch aims to remedy
the "weak" default instruments to better match the Roland Sound Canvas, most
notably the SC-55 and SC-88. Recommended minimum setup for no note-cuts is
ZDoom 2.8.1 with DOSBOX OPL3 emulator core, with 6 chips emulated.

======FAQ======
# Why OPL3 only?
OPL3 has four additional waveforms - Alternating Sine, Camel Sine, Square, and
Logarithmic Square (Sawtooth). The most interesting of these is the Square wave,
for obvious reasons! This will benefit percussion instruments immensely.

# What did you use for this project?

Hex Editors, OPL3 Bank Editor, Fraggle's Python scripts, Adlib Tracker II,
Edlib, ADLMidi. I also used the following keyboards and devices:

- Yamaha PSR-3 for basic voice ideas
- Yamaha PSS-50 for layered voice ideas
- Yamaha DX-7
- Commodore 64 Music Module
- VRC7 and related chips
- Sound Blaster 16
- Yamaha PCI cards
- Sounds from various SEGA MegaDrive games

=======WOPL FAQ=======
# What's the difference between the WOPL version and the DMX version?
The main difference is with a few instruments that had to be tweaked to work
with DMX. Most of these changes are negligible for General MIDI stuff. To hear
what I intended DMXOPL to sound like in Doom, you'll have to wait for Eternity
Engine's ADLMIDI support to be finalized.

# Any plans for GS/XG support?
Yes. This will take considerable time, and voices will be added as I come across
them in my MIDI files. You can check the progress on those through the XG and GS
branches that I will make (or have already made). As I think the GM set is solid
enough now, save for just a handful of instruments, I can start work on the
other banks.

# Will the WOPL version be usable on any other FM chips?
Depends on the chip, but more than likely the answer is no. YMF262 (and the OPL*
family for that matter) operate differently than most of the other FM chips, and
wouldn't likely transfer over to DX-7 or other instruments without considerable
work, if they would work at all.


# Is the best way to listen to this really through an emulator?
Yes, unfortunately. Unless someone makes an FM chip that can handle 128+
channels, this is likely never to change. If you're using this in your music
projects and you still want to use the real thing, I recommend recording one
track at a time and throwing the result in your favorite DAW - just be sure to
put a highpass filter set to a really low value (I recommend 5 Hz) to get rid
of the offset garbage, lest your mix splatter like crazy.

======Credits======
* Wohlstand, for the OPL3BankEditor
* Bisqwuit, for ADLMidi
* Fraggle, for Chocolate Doom and GENMIDI research, as well as the Python scripts
* SubZ3ro, for AdLib Tracker II
* Esselfortium, for the encouragement and support
* Jimmy, who will include this in the next Adventures of Square release
* The Fat Man, who created the famous 2-op and 4-op patches everyone knows
* Diode Milliampere, who made FM synth popular again
* Patchouli, for keeping my spirits up
* Graf Zahl, for continuing ZDoom as GZDoom
* Randi, for implementing the OPL Emulation in ZDoom
* Fisk, for miscellaneous feedback and MIDIs to test
* Stewboy, for the Ancient Aliens MIDIs to test
* Xaser, who said this patch passes the "Angry Scientist test"
* Minigunner, just because
* Altazimuth, who claims it'll be in Eternity someday (this is now true)
* MTrop
* Quasar, for Eternity Engine
* Glaice, for patch advice
* BlastFrog, for patch advice
* Vogons Forums, for the OPL-3 Research and tools
* AtariAge, for C64 Sound module preset banks
* NintendoAge
* John Chowning, the father of FM synthesis. I hope he can hear this someday.

## Extra Thanks to:
* Doomworld Forums and the respective IRC/DISCORD channels
* The 4th Modulator DISCORD channels
* Giest118, who installed Doom again to listen to this
* Nuke.YKT, for testing this in Raptor, and for the Nuked OPL core
* kode54, who added this to Cog and FB2K, thank you!
* Patch93, who contributed various patches
* OlPainless, who contributed various patches
* Papiezak, who contributed various of patches
* Infurnus, for support
* Leileilol, for support
* MaliceX, for support
* Kuschelmonster, for support
* Anyone who makes music with this thing!

YMF262 forever.

Binary file not shown.
1 change: 1 addition & 0 deletions Q3E/src/main/assets/pak/gzdoom/4.14.0/fm_banks/LINKS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/Wohlstand/OPN2BankEditor
15 changes: 15 additions & 0 deletions Q3E/src/main/assets/pak/gzdoom/4.14.0/fm_banks/Tomsoft-readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Bank was imported by a hacky way from the Tomsoft's SegaMusic program
by TommyXie (Xie Rong Chun):
- the dummy MIDI file was created that contains all 128 instruments in GM order
- the Sega emulator playable BIN file was generated
- the GYM dump was generated from the playback of that dummy instrument
- OPN2 Bank Editor was used to scan GYM file for instruments and import all of
them.

The work woth done by Jean-Pierre Cimalando:
https://github.com/Wohlstand/OPN2BankEditor/issues/44

Then, the bank was tuned by Wohlstand:
- Corrected note offsets to align octaves of all instruments
- Merged with xg.wopn to provide the set of percussions.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
A bank, created from hardcoded instruments, extracted from "fmmidi" project

http://unhaut.x10host.com/fmmidi/

It's license:
This program is released under the "three clauses" BSD license

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This bank was created by Wohlstand from imported instruments from the standard
set of insruments pre-included with GEMS program which was a official Sega
music creation system. Original set was not GM. Therefore, imported instruments
are was organized to provide a proper GM set.

Some instruments was a bit modified, some melodic instruments and percussions
are was taken from Wohlstand's xg.wopn bank.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
=============
https://github.com/sneakernets/DMXOPN2
https://github.com/papiezak/DMXOPN2
=============

== DMXOPN2 ==

No-nonsense patches for YM2612.


== About ==

After much work on my DMXOPL project, I noticed that a lot of presets that
I created were not compatible with the YM2612, which was the chip I started
with, but quickly dropped. In response, I decided to rectify this by recreating
the best patches from DMXOPL to OPN2 format. Don't expect miracles, as this is
more of a learning experience so I can start working on expanding my FM synth
knowledge.

I chose the name "DMX" not because it works with DMX, but that it will
(hopefully) be of the same quality as the DMXOPL patch. Yeah, not very
descriptive, but names aren't everything.

Watch this space.

Binary file not shown.
14 changes: 14 additions & 0 deletions Q3E/src/main/assets/pak/gzdoom/4.14.0/fm_banks/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This bank (gm.wopn and xg.wopn) is made by me. I have imported some instruments from various
VGM files, ported from OPL3 banks, or remixed them.

This bank can be freely used, modified, shared with any purposes.

License for this bank - MIT

To edit this bank and other banks in WOPN format, you can use this editor
which I created for that: https://github.com/Wohlstand/OPN2BankEditor

==============================================================================

Vitaliy Novichkov "Wohlstand", 2017-2018

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Q3E/src/main/assets/pak/gzdoom/4.14.0/gzdoom.pk3
Binary file not shown.
Binary file added Q3E/src/main/assets/pak/gzdoom/4.14.0/lights.pk3
Binary file not shown.
Binary file not shown.
70 changes: 65 additions & 5 deletions Q3E/src/main/java/com/n0n3m4/q3e/Q3EGameHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ private boolean CheckExtractResourceOverwrite(String systemVersionPath, String a
version = version.trim();
if(!apkVersion.equalsIgnoreCase(version))
{
Log.i(Q3EGlobals.CONST_Q3E_LOG_TAG, String.format(name + " file version is mismatch: %s != %s.", version, Q3EGlobals.RBDOOM3BFG_HLSL_SHADER_VERSION));
Log.i(Q3EGlobals.CONST_Q3E_LOG_TAG, String.format(name + " file version is mismatch: %s != %s.", version, apkVersion));
overwrite = true;
}
}
Expand All @@ -409,6 +409,42 @@ private boolean CheckExtractResourceOverwrite(String systemVersionPath, String a
return overwrite;
}

private boolean CheckExtractResourceVersion(String systemVersionPath, String apkVersion, String name)
{
boolean change = false;

try
{
File versionFile = new File(systemVersionPath);
if(!versionFile.isFile() || !versionFile.canRead())
{
Log.i(Q3EGlobals.CONST_Q3E_LOG_TAG, name + " file engine version not exists.");
change = true;
}
else
{
String version = Q3EUtils.file_get_contents(versionFile);
if(null != version)
version = version.trim();
if(!apkVersion.equalsIgnoreCase(version))
{
Log.i(Q3EGlobals.CONST_Q3E_LOG_TAG, String.format(name + " file engine version is mismatch: %s != %s.", version, apkVersion));
change = true;
}
}
if(change)
Log.i(Q3EGlobals.CONST_Q3E_LOG_TAG, name + " engine file will be change.");
else
Log.i(Q3EGlobals.CONST_Q3E_LOG_TAG, name + " engine file will keep exists version.");
}
catch (Exception e)
{
e.printStackTrace();
Log.i(Q3EGlobals.CONST_Q3E_LOG_TAG, "Check " + name + "(" + systemVersionPath + ") engine version file error.");
}
return change;
}

private void DumpExtractResourceVersion(String systemVersionPath, String apkVersion, String name)
{
Q3EUtils.file_put_contents(systemVersionPath, apkVersion);
Expand Down Expand Up @@ -457,15 +493,39 @@ public void ExtractDOOM3BFGHLSLShaderSource()

public void ExtractGZDOOMResource()
{
String versionKey = Q3EUtils.q3ei.GetGameVersionPreferenceKey();
String gameVersion = PreferenceManager.getDefaultSharedPreferences(m_context).getString(versionKey, "");

Q3EGlobals.PatchResource gzdoomResource;
String versionCheckFile;
String versionName;
if("4.12.2".equals(gameVersion))
{
versionName = "4.12.2";
versionCheckFile = "idtech4amm.4.12.2.version";
gzdoomResource = Q3EGlobals.PatchResource.GZDOOM_RESOURCE_4_12_2;
}
else
{
versionName = "4.14.0";
versionCheckFile = "idtech4amm.version";
gzdoomResource = Q3EGlobals.PatchResource.GZDOOM_RESOURCE;
}

Q3EPatchResourceManager manager = new Q3EPatchResourceManager(m_context);
final String versionFile = KStr.AppendPath(Q3EUtils.q3ei.datadir, "gzdoom", "idtech4amm.version");
final String versionFile = KStr.AppendPath(Q3EUtils.q3ei.datadir, "gzdoom", versionCheckFile);
final String engineVersionFile = KStr.AppendPath(Q3EUtils.q3ei.datadir, "gzdoom", "idtech4amm.gzdoom.version");
final String version = Q3EGlobals.GZDOOM_VERSION;
final String name = "GZDOOM game resource";

boolean overwrite = CheckExtractResourceOverwrite(versionFile, version, name);

if(manager.Fetch(Q3EGlobals.PatchResource.GZDOOM_RESOURCE, overwrite) != null)
boolean change = CheckExtractResourceVersion(engineVersionFile, versionName, name);
boolean overwrite = change || CheckExtractResourceOverwrite(versionFile, version, name);
if(manager.Fetch(gzdoomResource, overwrite) != null)
{
if (change)
{
DumpExtractResourceVersion(engineVersionFile, versionName, name);
}
if (overwrite)
{
DumpExtractResourceVersion(versionFile, version, name);
Expand Down
9 changes: 8 additions & 1 deletion Q3E/src/main/java/com/n0n3m4/q3e/Q3EGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public enum PatchResource
DOOM3BFG_HLSL_SHADER,
TDM_GLSL_SHADER,
GZDOOM_RESOURCE,
GZDOOM_RESOURCE_4_12_2,
}

/*
Expand Down Expand Up @@ -350,7 +351,13 @@ public enum PatchResource
// extra internal game file version: <Game engine version>.<idTech4A++ patch version>
public static final String TDM_GLSL_SHADER_VERSION = "2.12.5"; // 5: change all shaders default precision from mediump to highp
public static final String RBDOOM3BFG_HLSL_SHADER_VERSION = "1.4.1";
public static final String GZDOOM_VERSION = "4.12.2.2";
public static final String GZDOOM_4_12_2_VERSION = "4.12.2.2";
public static final String GZDOOM_VERSION = "4.14.0.0";

public static final String[] GZDOOM_VERSION_NAMES = {
"4.14.0",
"4.12.2",
};

public static final String IDTECH4AMM_PAK_SUFFIX = ".zipak";

Expand Down
16 changes: 16 additions & 0 deletions Q3E/src/main/java/com/n0n3m4/q3e/Q3EInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,22 @@ else if(Q3EUtils.q3ei.isRealRTCW)
return Q3EPreference.pref_harm_command_record;
}

public String GetGameVersionPreferenceKey()
{
if(Q3EUtils.q3ei.isDOOM)
return Q3EPreference.pref_harm_gzdoom_version;
else
return null;
}

public String[] GetGameVersionNameList()
{
if(Q3EUtils.q3ei.isDOOM)
return Q3EGlobals.GZDOOM_VERSION_NAMES;
else
return null;
}

public String GetGameHomeDirectoryPath()
{
if(Q3EUtils.q3ei.isD3BFG)
Expand Down
14 changes: 11 additions & 3 deletions Q3E/src/main/java/com/n0n3m4/q3e/Q3EPatchResource.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.n0n3m4.q3e;

import android.app.Activity;
import android.content.Context;
import android.util.Log;

import com.n0n3m4.q3e.karin.KLog;
import com.n0n3m4.q3e.karin.KStr;
Expand All @@ -15,6 +13,7 @@ public class Q3EPatchResource
public static final int COPY_FILE_TO_DIR = 2; // copy assets/patch.pk4 -> dirname/
public static final int COPY_DIR_FILES_TO_DIR = 3; // copy assets/ :: patch.pk4, other/other.pk4, ... -> dirname/
public static final int EXTRACT_ZIP_TO_DIR = 4; // extract assets/patch.zip -> dirname/
public static final int COPY_DIR_TO_DIR = 5; // copy assets/ -> dirname/

public final Q3EGlobals.PatchResource type;
public final String name;
Expand Down Expand Up @@ -57,6 +56,8 @@ public String Fetch(Context context, boolean overwrite, String...fsgame)
return CopyDirFilesToDir(context, overwrite, fsgame);
case EXTRACT_ZIP_TO_DIR:
return ExtractZipToDir(context, overwrite, fsgame);
case COPY_DIR_TO_DIR:
return CopyDirToDir(context, overwrite, fsgame);
default:
throw new RuntimeException("Unexcept extract type:" + extract);
}
Expand Down Expand Up @@ -93,7 +94,7 @@ private String CopyDirFilesToDir(Context context, boolean overwrite, String...fs
{
String toPath = MakeOutPath(fsgame);
KLog.i(Q3EGlobals.CONST_Q3E_LOG_TAG, "Copying directory '%s' files '%s' to directory '%s/'", assetPath, Arrays.toString(assetFiles), toPath);
return Q3EUtils.ExtractCopyDir(context, assetPath, toPath, overwrite, assetFiles) ? toPath : null;
return Q3EUtils.ExtractCopyDirFiles(context, assetPath, toPath, overwrite, assetFiles) ? toPath : null;
}

private String ExtractZipToDir(Context context, boolean overwrite, String...fsgame)
Expand All @@ -102,4 +103,11 @@ private String ExtractZipToDir(Context context, boolean overwrite, String...fsga
KLog.i(Q3EGlobals.CONST_Q3E_LOG_TAG, "Extracting zip file '%s' to directory '%s/'", assetPath, toPath);
return Q3EUtils.ExtractZip(context, assetPath, toPath, overwrite) ? toPath : null;
}

private String CopyDirToDir(Context context, boolean overwrite, String...fsgame)
{
String toPath = MakeOutPath(fsgame);
KLog.i(Q3EGlobals.CONST_Q3E_LOG_TAG, "Copying directory '%s' to directory '%s/'", assetPath, toPath);
return Q3EUtils.ExtractCopyDir(context, assetPath, toPath, overwrite) ? toPath : null;
}
}
Loading

0 comments on commit b62e141

Please sign in to comment.