From 6a48b1299981145ffde9c1487f48023a065e4cde Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sun, 25 Mar 2018 03:25:04 +0300 Subject: [PATCH 1/7] Fixed typo in the error message: it's YM2612 is OPN2 which is not OPL --- src/sound/mididevices/music_opnmidi_mididevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/mididevices/music_opnmidi_mididevice.cpp b/src/sound/mididevices/music_opnmidi_mididevice.cpp index 84c3c4d26..0d47646cd 100644 --- a/src/sound/mididevices/music_opnmidi_mididevice.cpp +++ b/src/sound/mididevices/music_opnmidi_mididevice.cpp @@ -70,7 +70,7 @@ OPNMIDIDevice::OPNMIDIDevice(const char *args) int lump = Wads.CheckNumForFullName("xg.wopn"); if (lump < 0) { - I_Error("No OPL bank found"); + I_Error("No OPN bank found"); } FMemLump data = Wads.ReadLump(lump); opn2_openBankData(Renderer, data.GetMem(), data.GetSize()); From 892033931e5dd72476ac9815ba2eb618c6438d41 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sun, 25 Mar 2018 03:26:41 +0300 Subject: [PATCH 2/7] Fixed double-increment and use a safer way to fetch a bank names (in case of new bank will be added (or removed) on ADLMIDI side, no need to change the count of banks in "some deep place" of code) --- src/menu/menudef.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/menu/menudef.cpp b/src/menu/menudef.cpp index ea410f571..c0c538088 100644 --- a/src/menu/menudef.cpp +++ b/src/menu/menudef.cpp @@ -1381,7 +1381,11 @@ static void InitCrosshairsList() // Initialize the music configuration submenus // //============================================================================= -extern const char* const banknames[74]; +extern "C" +{ + extern int adl_getBanksCount(); + extern const char *const *adl_getBankNames(); +} static void InitMusicMenus() { @@ -1427,11 +1431,12 @@ static void InitMusicMenus() { if (soundfonts.Size() > 0) { - for(int i=0;i<74;i++) + int adl_banks_count = adl_getBanksCount(); + const char *const *adl_bank_names = adl_getBankNames(); + for(int i=0; i < adl_banks_count; i++) { - auto it = CreateOptionMenuItemCommand(banknames[i], FStringf("adl_bank %d", i), true); + auto it = CreateOptionMenuItemCommand(adl_bank_names[i], FStringf("adl_bank %d", i), true); static_cast(*menu)->mItems.Push(it); - i++; } } } From 5a7b53a865c2b0a1bb1cfc4f2c8b027ad47f0d81 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sun, 25 Mar 2018 04:14:39 +0300 Subject: [PATCH 3/7] ADL&OPN: More setup: Chips count and Volume model! Notes: * ADL: The DMX volume model was set as default to unify volumes on all bank. Otherwise, if you will use 'Generic' or 'Win9x', the sound will became too loud than wanted. Each bank has own default volume model which is used when 'Auto' is set. * ADL: 6 chips is optimal to work with default banks * OPN: 8 chips are set to provide 48 polyphony channels. (each OPN2 chip has 6 channels only) * Text files: junk spaces from end of lines are was auto-removed. --- .../mididevices/music_adlmidi_mididevice.cpp | 20 ++- .../mididevices/music_opnmidi_mididevice.cpp | 11 +- wadsrc/static/language.enu | 75 +++++---- wadsrc/static/menudef.txt | 149 ++++++++++-------- 4 files changed, 156 insertions(+), 99 deletions(-) diff --git a/src/sound/mididevices/music_adlmidi_mididevice.cpp b/src/sound/mididevices/music_adlmidi_mididevice.cpp index 21ae38f94..d878bfe1f 100644 --- a/src/sound/mididevices/music_adlmidi_mididevice.cpp +++ b/src/sound/mididevices/music_adlmidi_mididevice.cpp @@ -54,6 +54,14 @@ enum ME_PITCHWHEEL = 0xE0 }; +CUSTOM_CVAR(Int, adl_chips_count, 6, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) +{ + if (currSong != nullptr && currSong->GetDeviceType() == MDEV_ADL) + { + MIDIDeviceChanged(-1, true); + } +} + CUSTOM_CVAR(Int, adl_bank, 14, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) { if (currSong != nullptr && currSong->GetDeviceType() == MDEV_ADL) @@ -62,6 +70,14 @@ CUSTOM_CVAR(Int, adl_bank, 14, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) } } +CUSTOM_CVAR(Int, adl_volume_model, ADLMIDI_VolumeModel_DMX, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) +{ + if (currSong != nullptr && currSong->GetDeviceType() == MDEV_ADL) + { + MIDIDeviceChanged(-1, true); + } +} + //========================================================================== // // ADLMIDIDevice Constructor @@ -74,7 +90,9 @@ ADLMIDIDevice::ADLMIDIDevice(const char *args) Renderer = adl_init(44100); // todo: make it configurable if (Renderer != nullptr) { - adl_setBank(Renderer, 14); + adl_setBank(Renderer, (int)adl_bank); + adl_setNumChips(Renderer, (int)adl_chips_count); + adl_setVolumeRangeModel(Renderer, (int)adl_volume_model); } } diff --git a/src/sound/mididevices/music_opnmidi_mididevice.cpp b/src/sound/mididevices/music_opnmidi_mididevice.cpp index 0d47646cd..f083ff634 100644 --- a/src/sound/mididevices/music_opnmidi_mididevice.cpp +++ b/src/sound/mididevices/music_opnmidi_mididevice.cpp @@ -55,6 +55,14 @@ enum ME_PITCHWHEEL = 0xE0 }; +CUSTOM_CVAR(Int, opn_chips_count, 8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) +{ + if (currSong != nullptr && currSong->GetDeviceType() == MDEV_OPN) + { + MIDIDeviceChanged(-1, true); + } +} + //========================================================================== // // OPNMIDIDevice Constructor @@ -73,7 +81,8 @@ OPNMIDIDevice::OPNMIDIDevice(const char *args) I_Error("No OPN bank found"); } FMemLump data = Wads.ReadLump(lump); - opn2_openBankData(Renderer, data.GetMem(), data.GetSize()); + opn2_openBankData(Renderer, data.GetMem(), (long)data.GetSize()); + opn2_setNumChips(Renderer, opn_chips_count); } } diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 6feba6fa4..da16d83e4 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -792,31 +792,31 @@ OB_MPPSKULLROD = "%k poured %p hellstaff on %o."; OB_MPPPHOENIXROD = "%o was burned down by %k's phoenix staff."; OB_MPPMACE = "%o was squished by %k's giant mace sphere."; -OB_MPFWEAPFIST = "%o was beaten to a pulp by %k's bare fists."; -OB_MPFWEAPAXE = "%o got the axe from %k."; -OB_MPFWEAPHAMMERM = "%o had %p head caved in by %k's hammer."; -OB_MPFWEAPHAMMERR = "%o's soul was forged anew by %k's hammer."; -OB_MPFWEAPQUIETUS = "%o was silenced by %k's mighty Quietus."; -OB_MPCWEAPMACE = "%o got a mace to the face from %k."; -OB_MPCWEAPSTAFFM = "%o was bitten by %k's serpent staff."; -OB_MPCWEAPSTAFFR = "%o choked on %k's serpent staff."; -OB_MPCWEAPFLAME = "%o was lit up by %k's flames."; -OB_MPCWEAPWRAITHVERGE = "%o was cleansed by %k's Wraithverge."; -OB_MPMWEAPWAND = "%o took one too many sapphire beams from %k."; -OB_MPMWEAPFROST = "%o was turned into a frosty fellow by %k."; -OB_MPMWEAPLIGHTNING = "%o recieved a shocking revelation from %k."; +OB_MPFWEAPFIST = "%o was beaten to a pulp by %k's bare fists."; +OB_MPFWEAPAXE = "%o got the axe from %k."; +OB_MPFWEAPHAMMERM = "%o had %p head caved in by %k's hammer."; +OB_MPFWEAPHAMMERR = "%o's soul was forged anew by %k's hammer."; +OB_MPFWEAPQUIETUS = "%o was silenced by %k's mighty Quietus."; +OB_MPCWEAPMACE = "%o got a mace to the face from %k."; +OB_MPCWEAPSTAFFM = "%o was bitten by %k's serpent staff."; +OB_MPCWEAPSTAFFR = "%o choked on %k's serpent staff."; +OB_MPCWEAPFLAME = "%o was lit up by %k's flames."; +OB_MPCWEAPWRAITHVERGE = "%o was cleansed by %k's Wraithverge."; +OB_MPMWEAPWAND = "%o took one too many sapphire beams from %k."; +OB_MPMWEAPFROST = "%o was turned into a frosty fellow by %k."; +OB_MPMWEAPLIGHTNING = "%o recieved a shocking revelation from %k."; OB_MPMWEAPBLOODSCOURGE = "%o was wiped off the face of the universe by %k's Bloodscourge."; -OB_MPPUNCHDAGGER = "%o was unwittingly backstabbed by %k."; -OB_MPELECTRICBOLT = "%o got bolted to the wall by %k."; -OB_MPPOISONBOLT = "%o recieved a lethal dose of %k's wrath."; -OB_MPASSAULTGUN = "%o was drilled full of holes by %k's assault gun."; -OB_MPMINIMISSILELAUNCHER = "%o gulped down %k's missile."; -OB_MPSTRIFEGRENADE = "%o was inverted by %k's H-E grenade."; -OB_MPPHOSPHOROUSGRENADE = "%o took a flame bath in %k's phosphorous pyre."; -OB_MPFLAMETHROWER = "%o was barbecued by %k."; +OB_MPPUNCHDAGGER = "%o was unwittingly backstabbed by %k."; +OB_MPELECTRICBOLT = "%o got bolted to the wall by %k."; +OB_MPPOISONBOLT = "%o recieved a lethal dose of %k's wrath."; +OB_MPASSAULTGUN = "%o was drilled full of holes by %k's assault gun."; +OB_MPMINIMISSILELAUNCHER = "%o gulped down %k's missile."; +OB_MPSTRIFEGRENADE = "%o was inverted by %k's H-E grenade."; +OB_MPPHOSPHOROUSGRENADE = "%o took a flame bath in %k's phosphorous pyre."; +OB_MPFLAMETHROWER = "%o was barbecued by %k."; OB_MPMAULER1 = "%o was zapped by %k."; -OB_MPMAULER = "%o was viciously vaporized by %k."; +OB_MPMAULER = "%o was viciously vaporized by %k."; OB_MPSIGIL = "%o bowed down to the sheer power of %k's Sigil."; // Same as OB_MPTELEFRAG, but shown when a monster telefrags you @@ -1626,13 +1626,13 @@ MNU_KNIGHT = "KNIGHT"; MNU_WARRIOR = "WARRIOR"; MNU_BERSERKER = "BERSERKER"; MNU_TITAN = "TITAN"; - + MNU_ALTARBOY = "ALTAR BOY"; MNU_ACOLYTE = "ACOLYTE"; MNU_PRIEST = "PRIEST"; MNU_CARDINAL = "CARDINAL"; MNU_POPE = "POPE"; - + MNU_APPRENTICE = "APPRENTICE"; MNU_ENCHANTER = "ENCHANTER"; MNU_SORCERER = "SORCERER"; @@ -1968,13 +1968,13 @@ MAPCOLORMNU_TITLE = "CUSTOMIZE MAP COLORS"; MAPCOLORMNU_DEFAULTMAPCOLORS = "Restore default custom colors"; MAPCOLORMNU_BACKCOLOR = "Background"; MAPCOLORMNU_YOURCOLOR = "You"; -MAPCOLORMNU_WALLCOLOR = "1-sided walls"; -MAPCOLORMNU_FDWALLCOLOR = "2-sided walls with different floors"; +MAPCOLORMNU_WALLCOLOR = "1-sided walls"; +MAPCOLORMNU_FDWALLCOLOR = "2-sided walls with different floors"; MAPCOLORMNU_CDWALLCOLOR = "2-sided walls with different ceilings"; -MAPCOLORMNU_EFWALLCOLOR = "2-sided walls with 3D floors"; +MAPCOLORMNU_EFWALLCOLOR = "2-sided walls with 3D floors"; MAPCOLORMNU_GRIDCOLOR = "Map grid"; MAPCOLORMNU_XHAIRCOLOR = "Center point"; -MAPCOLORMNU_NOTSEENCOLOR = "Not-yet-seen walls"; +MAPCOLORMNU_NOTSEENCOLOR = "Not-yet-seen walls"; MAPCOLORMNU_LOCKEDCOLOR = "Locked doors"; MAPCOLORMNU_INTRALEVELCOLOR = "Teleporter to the same map"; MAPCOLORMNU_INTERLEVELCOLOR = "Teleporter to a different map"; @@ -1982,7 +1982,7 @@ MAPCOLORMNU_SECRETSECTORCOLOR = "Secret sector"; MAPCOLORMNU_UNEXPLOREDSECRETCOLOR = "Unexplored secret"; MAPCOLORMNU_SPECIALWALLCOLOR = "Special trigger lines"; MAPCOLORMNU_CHEATMODE = "Cheat Mode"; -MAPCOLORMNU_TSWALLCOLOR = "Invisible 2-sided walls"; +MAPCOLORMNU_TSWALLCOLOR = "Invisible 2-sided walls"; MAPCOLORMNU_SECRETWALLCOLOR = "Secret walls"; MAPCOLORMNU_THINGCOLOR = "Actors"; MAPCOLORMNU_MONSTERCOLOR = "Monsters"; @@ -2024,7 +2024,7 @@ SCRBRDMNU_TEAMDEATHMATCH = "Team Deathmatch Options"; // Gameplay Menu GMPLYMNU_TITLE = "GAMEPLAY OPTIONS"; -GMPLYMNU_TEAMPLAY = "Teamplay"; +GMPLYMNU_TEAMPLAY = "Teamplay"; GMPLYMNU_TEAMDAMAGE = "Team damage scalar"; GMPLYMNU_SMARTAUTOAIM = "Smart Autoaim"; GMPLYMNU_FALLINGDAMAGE = "Falling damage"; @@ -2184,6 +2184,17 @@ ADVSNDMNU_FREEVERB = "Freeverb"; ADVSNDMNU_GLOBAL_FREEVERB = "Global Freeverb"; ADVSNDMNU_ADVRESAMPLING = "Advanced Resampling"; ADVSNDMNU_OPLBANK = "OPL Bank"; +ADVSNDMNU_ADLNUMCHIPS = "Number of emulated OPL chips"; +ADVSNDMNU_VLMODEL = "Volume model"; +ADVSNDMNU_OPNNUMCHIPS = "Number of emulated OPN chips"; + +// ADLMIDI's volume models +ADLVLMODEL_AUTO = "Auto (Use setup of bank)"; +ADLVLMODEL_GENERIC = "Generic"; +ADLVLMODEL_NATIVE = "OPL Native"; +ADLVLMODEL_DMX = "DMX"; +ADLVLMODEL_APOGEE = "Apogee"; +ADLVLMODEL_WIN9X = "Win9X-like"; // Module Replayer Options MODMNU_TITLE = "MODULE REPLAYER OPTIONS"; @@ -2607,8 +2618,8 @@ OB_MPLAZ_BOOM = "%o fell prey to %k's LAZ device."; OB_MPLAZ_SPLASH = "%o was lazzed by %k."; // Music names for Doom. These are needed in the string table only so that they can -// be replaced by Dehacked. -// Note that these names are not prefixed with 'd_' because that's how Dehacked patches +// be replaced by Dehacked. +// Note that these names are not prefixed with 'd_' because that's how Dehacked patches // expect them. MUSIC_E1M1 = "e1m1"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 73ee39e84..a93a752bf 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -65,7 +65,7 @@ LISTMENU "MainMenu" StaticPatch 278, 80, "FBULA0" Position 110, 56 } - + IfGame(Doom, Strife, Chex) { PatchItem "M_NGAME", "n", "PlayerclassMenu" @@ -87,7 +87,7 @@ LISTMENU "MainMenu" } PatchItem "M_QUITG", "q", "QuitMenu" } - + IfGame(Heretic, Hexen) { TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu" @@ -399,7 +399,7 @@ ListMenu "PlayerMenu" MouseWindow 0, 220 PlayerDisplay 220, 80, "00 07 00", "40 53 40", 1, "PlayerDisplay" } - + ValueText "$PLYRMNU_TEAM", "Team" ValueText "$PLYRMNU_PLAYERCOLOR", "Color" Linespacing 10 @@ -581,7 +581,7 @@ OptionMenu "JoystickOptionsDefaults" protected StaticTextSwitchable "$JOYMNU_NOCON", "$JOYMNU_CONFIG", "ConfigureMessage" StaticTextSwitchable " ", "$JOYMNU_DISABLED1", "ConnectMessage1" StaticTextSwitchable " ", "$JOYMNU_DISABLED2", "ConnectMessage2" - + // The rest will be filled in by joystick code if devices get connected or disconnected } @@ -702,7 +702,7 @@ OptionValue GPUSwitch { 0.0, "$OPTVAL_DEFAULT" 1.0, "$OPTVAL_DEDICATED" - 2.0, "$OPTVAL_INTEGRATED" + 2.0, "$OPTVAL_INTEGRATED" } @@ -731,7 +731,7 @@ OptionMenu "SWROptions" protected OptionMenu "VideoOptions" protected { Title "$DSPLYMNU_TITLE" - + Submenu "$DSPLYMNU_GLOPT", "OpenGLOptions" Submenu "$DSPLYMNU_SWOPT", "SWROptions" Submenu "$GLMNU_DYNLIGHT", "GLLightOptions" @@ -758,7 +758,7 @@ OptionMenu "VideoOptions" protected { Option "$DSPLYMNU_SHOWENDOOM", "showendoom", "Endoom" } - + Option "$DSPLYMNU_DRAWFUZZ", "r_drawfuzz", "Fuzziness" Option "$DSPLYMNU_OLDTRANS", "r_vanillatrans", "VanillaTrans" Slider "$DSPLYMNU_TRANSSOUL", "transsouls", 0.25, 1.0, 0.05, 2 @@ -791,7 +791,7 @@ OptionMenu "VideoOptions" protected // //------------------------------------------------------------------------------------------- -OptionValue DisplayTagsTypes +OptionValue DisplayTagsTypes { 0.0, "$OPTVAL_NONE" 1.0, "$OPTVAL_ITEMS" @@ -1144,44 +1144,44 @@ OptionMenu MapColorMenu protected Title "$MAPCOLORMNU_TITLE" SafeCommand "$MAPCOLORMNU_DEFAULTMAPCOLORS", "am_restorecolors" StaticText " " - ColorPicker "$MAPCOLORMNU_BACKCOLOR", "am_backcolor" - ColorPicker "$MAPCOLORMNU_YOURCOLOR", "am_yourcolor" - ColorPicker "$MAPCOLORMNU_WALLCOLOR", "am_wallcolor" - ColorPicker "$MAPCOLORMNU_FDWALLCOLOR", "am_fdwallcolor" - ColorPicker "$MAPCOLORMNU_CDWALLCOLOR", "am_cdwallcolor" - ColorPicker "$MAPCOLORMNU_EFWALLCOLOR", "am_efwallcolor" - ColorPicker "$MAPCOLORMNU_GRIDCOLOR", "am_gridcolor" - ColorPicker "$MAPCOLORMNU_XHAIRCOLOR", "am_xhaircolor" - ColorPicker "$MAPCOLORMNU_NOTSEENCOLOR", "am_notseencolor" - ColorPicker "$MAPCOLORMNU_LOCKEDCOLOR", "am_lockedcolor" - ColorPicker "$MAPCOLORMNU_INTRALEVELCOLOR", "am_intralevelcolor" - ColorPicker "$MAPCOLORMNU_INTERLEVELCOLOR", "am_interlevelcolor" - ColorPicker "$MAPCOLORMNU_SECRETSECTORCOLOR", "am_secretsectorcolor" - ColorPicker "$MAPCOLORMNU_UNEXPLOREDSECRETCOLOR", "am_unexploredsecretcolor" + ColorPicker "$MAPCOLORMNU_BACKCOLOR", "am_backcolor" + ColorPicker "$MAPCOLORMNU_YOURCOLOR", "am_yourcolor" + ColorPicker "$MAPCOLORMNU_WALLCOLOR", "am_wallcolor" + ColorPicker "$MAPCOLORMNU_FDWALLCOLOR", "am_fdwallcolor" + ColorPicker "$MAPCOLORMNU_CDWALLCOLOR", "am_cdwallcolor" + ColorPicker "$MAPCOLORMNU_EFWALLCOLOR", "am_efwallcolor" + ColorPicker "$MAPCOLORMNU_GRIDCOLOR", "am_gridcolor" + ColorPicker "$MAPCOLORMNU_XHAIRCOLOR", "am_xhaircolor" + ColorPicker "$MAPCOLORMNU_NOTSEENCOLOR", "am_notseencolor" + ColorPicker "$MAPCOLORMNU_LOCKEDCOLOR", "am_lockedcolor" + ColorPicker "$MAPCOLORMNU_INTRALEVELCOLOR", "am_intralevelcolor" + ColorPicker "$MAPCOLORMNU_INTERLEVELCOLOR", "am_interlevelcolor" + ColorPicker "$MAPCOLORMNU_SECRETSECTORCOLOR", "am_secretsectorcolor" + ColorPicker "$MAPCOLORMNU_UNEXPLOREDSECRETCOLOR", "am_unexploredsecretcolor" ColorPicker "$MAPCOLORMNU_SPECIALWALLCOLOR", "am_specialwallcolor" ColorPicker "$MAPCOLORMNU_PORTAL", "am_portalcolor" StaticText " " StaticText "$MAPCOLORMNU_CHEATMODE", 1 - ColorPicker "$MAPCOLORMNU_TSWALLCOLOR", "am_tswallcolor" - ColorPicker "$MAPCOLORMNU_SECRETWALLCOLOR", "am_secretwallcolor" - ColorPicker "$MAPCOLORMNU_THINGCOLOR", "am_thingcolor" - ColorPicker "$MAPCOLORMNU_MONSTERCOLOR", "am_thingcolor_monster" - ColorPicker "$MAPCOLORMNU_NONCOUNTINGMONSTERCOLOR", "am_thingcolor_ncmonster" - ColorPicker "$MAPCOLORMNU_FRIENDCOLOR", "am_thingcolor_friend" - ColorPicker "$MAPCOLORMNU_ITEMCOLOR", "am_thingcolor_item" - ColorPicker "$MAPCOLORMNU_COUNTITEMCOLOR", "am_thingcolor_citem" + ColorPicker "$MAPCOLORMNU_TSWALLCOLOR", "am_tswallcolor" + ColorPicker "$MAPCOLORMNU_SECRETWALLCOLOR", "am_secretwallcolor" + ColorPicker "$MAPCOLORMNU_THINGCOLOR", "am_thingcolor" + ColorPicker "$MAPCOLORMNU_MONSTERCOLOR", "am_thingcolor_monster" + ColorPicker "$MAPCOLORMNU_NONCOUNTINGMONSTERCOLOR", "am_thingcolor_ncmonster" + ColorPicker "$MAPCOLORMNU_FRIENDCOLOR", "am_thingcolor_friend" + ColorPicker "$MAPCOLORMNU_ITEMCOLOR", "am_thingcolor_item" + ColorPicker "$MAPCOLORMNU_COUNTITEMCOLOR", "am_thingcolor_citem" StaticText " " StaticText "$MAPCOLORMNU_OVERLAY", 1 - ColorPicker "$MAPCOLORMNU_YOURCOLOR", "am_ovyourcolor" - ColorPicker "$MAPCOLORMNU_WALLCOLOR", "am_ovwallcolor" - ColorPicker "$MAPCOLORMNU_FDWALLCOLOR", "am_ovfdwallcolor" - ColorPicker "$MAPCOLORMNU_CDWALLCOLOR", "am_ovcdwallcolor" - ColorPicker "$MAPCOLORMNU_EFWALLCOLOR", "am_ovefwallcolor" - ColorPicker "$MAPCOLORMNU_NOTSEENCOLOR", "am_ovunseencolor" + ColorPicker "$MAPCOLORMNU_YOURCOLOR", "am_ovyourcolor" + ColorPicker "$MAPCOLORMNU_WALLCOLOR", "am_ovwallcolor" + ColorPicker "$MAPCOLORMNU_FDWALLCOLOR", "am_ovfdwallcolor" + ColorPicker "$MAPCOLORMNU_CDWALLCOLOR", "am_ovcdwallcolor" + ColorPicker "$MAPCOLORMNU_EFWALLCOLOR", "am_ovefwallcolor" + ColorPicker "$MAPCOLORMNU_NOTSEENCOLOR", "am_ovunseencolor" ColorPicker "$MAPCOLORMNU_LOCKEDCOLOR", "am_ovlockedcolor" - ColorPicker "$MAPCOLORMNU_INTRALEVELCOLOR", "am_ovtelecolor" - ColorPicker "$MAPCOLORMNU_INTERLEVELCOLOR", "am_ovinterlevelcolor" - ColorPicker "$MAPCOLORMNU_SECRETSECTORCOLOR", "am_ovsecretsectorcolor" + ColorPicker "$MAPCOLORMNU_INTRALEVELCOLOR", "am_ovtelecolor" + ColorPicker "$MAPCOLORMNU_INTERLEVELCOLOR", "am_ovinterlevelcolor" + ColorPicker "$MAPCOLORMNU_SECRETSECTORCOLOR", "am_ovsecretsectorcolor" ColorPicker "$MAPCOLORMNU_SPECIALWALLCOLOR", "am_ovspecialwallcolor" ColorPicker "$MAPCOLORMNU_PORTAL", "am_ovportalcolor" StaticText " " @@ -1190,10 +1190,10 @@ OptionMenu MapColorMenu protected ColorPicker "$MAPCOLORMNU_SECRETWALLCOLOR", "am_ovsecretwallcolor" ColorPicker "$MAPCOLORMNU_THINGCOLOR", "am_ovthingcolor" ColorPicker "$MAPCOLORMNU_MONSTERCOLOR", "am_ovthingcolor_monster" - ColorPicker "$MAPCOLORMNU_NONCOUNTINGMONSTERCOLOR", "am_ovthingcolor_ncmonster" + ColorPicker "$MAPCOLORMNU_NONCOUNTINGMONSTERCOLOR", "am_ovthingcolor_ncmonster" ColorPicker "$MAPCOLORMNU_FRIENDCOLOR", "am_ovthingcolor_friend" - ColorPicker "$MAPCOLORMNU_ITEMCOLOR", "am_ovthingcolor_item" - ColorPicker "$MAPCOLORMNU_COUNTITEMCOLOR", "am_ovthingcolor_citem" + ColorPicker "$MAPCOLORMNU_ITEMCOLOR", "am_ovthingcolor_item" + ColorPicker "$MAPCOLORMNU_COUNTITEMCOLOR", "am_ovthingcolor_citem" } //------------------------------------------------------------------------------------------- @@ -1290,7 +1290,7 @@ OptionMenu ScoreboardOptions protected * Gameplay Options (dmflags) Menu * *=======================================*/ - + OptionValue SmartAim { 0.0, "$OPTVAL_OFF" @@ -1404,10 +1404,10 @@ OptionMenu "CompatibilityOptions" protected { Title "$CMPTMNU_TITLE" Option "$CMPTMNU_MODE", "compatmode", "CompatModes", "", 1 - + StaticText " " StaticText "$CMPTMNU_ACTORBEHAVIOR",1 - Option "$CMPTMNU_CORPSEGIBS", "compat_CORPSEGIBS", "YesNo" + Option "$CMPTMNU_CORPSEGIBS", "compat_CORPSEGIBS", "YesNo" Option "$CMPTMNU_NOBLOCKFRIENDS", "compat_NOBLOCKFRIENDS", "YesNo" Option "$CMPTMNU_LIMITPAIN", "compat_LIMITPAIN", "YesNo" Option "$CMPTMNU_MBFMONSTERMOVE", "compat_MBFMONSTERMOVE", "YesNo" @@ -1416,12 +1416,12 @@ OptionMenu "CompatibilityOptions" protected Option "$CMPTMNU_INVISIBILITY", "compat_INVISIBILITY", "YesNo" Option "$CMPTMNU_MINOTAUR", "compat_MINOTAUR", "YesNo" Option "$CMPTMNU_NOTOSSDROPS", "compat_NOTOSSDROPS", "YesNo" - + StaticText " " StaticText "$CMPTMNU_DEHACKEDBEHAVIOR",1 Option "$CMPTMNU_DEHHEALTH", "compat_DEHHEALTH", "YesNo" Option "$CMPTMNU_MUSHROOM", "compat_MUSHROOM", "YesNo" - + StaticText " " StaticText "$CMPTMNU_MAPACTIONBEHAVIOR",1 Option "$CMPTMNU_USEBLOCKING", "compat_USEBLOCKING", "YesNo" @@ -1435,7 +1435,7 @@ OptionMenu "CompatibilityOptions" protected Option "$CMPTMNU_MULTIEXIT", "compat_multiexit", "YesNo" Option "$CMPTMNU_TELEPORT", "compat_teleport", "YesNo" Option "$CMPTMNU_PUSHWINDOW", "compat_pushwindow", "YesNo" - + StaticText " " StaticText "$CMPTMNU_PHYSICSBEHAVIOR",1 Option "$CMPTMNU_NOPASSOVER", "compat_nopassover", "YesNo" @@ -1447,13 +1447,13 @@ OptionMenu "CompatibilityOptions" protected Option "$CMPTMNU_HITSCAN", "compat_HITSCAN", "YesNo" Option "$CMPTMNU_MISSILECLIP", "compat_MISSILECLIP", "YesNo" - + StaticText " " StaticText "$CMPTMNU_RENDERINGBEHAVIOR",1 Option "$CMPTMNU_POLYOBJ", "compat_POLYOBJ", "YesNo" Option "$CMPTMNU_MASKEDMIDTEX", "compat_MASKEDMIDTEX", "YesNo" Option "$CMPTMNU_SPRITESORT", "compat_SPRITESORT", "YesNo" - + StaticText " " StaticText "$CMPTMNU_SOUNDBEHAVIOR",1 Option "$CMPTMNU_SOUNDSLOTS", "compat_soundslots", "YesNo" @@ -1462,7 +1462,7 @@ OptionMenu "CompatibilityOptions" protected Option "$CMPTMNU_SECTORSOUNDS", "compat_SECTORSOUNDS", "YesNo" Option "$CMPTMNU_SOUNDCUTOFF", "compat_soundcutoff", "YesNo" Option "$CMPTMNU_SOUNDTARGET", "compat_SOUNDTARGET", "YesNo" - + Class "CompatibilityMenu" } @@ -1471,7 +1471,7 @@ OptionMenu "CompatibilityOptions" protected * Sound Options Menu * *=======================================*/ - + OptionValue SampleRates { 0, "$OPTVAL_DEFAULT" @@ -1746,7 +1746,7 @@ OptionMenu ModReplayerOptions protected * MIDI player * *=======================================*/ - + OptionValue TimidityReverb { 0, "$OPTVAL_OFF" @@ -1755,7 +1755,7 @@ OptionMenu ModReplayerOptions protected 3, "$ADVSNDMNU_FREEVERB" 4, "$ADVSNDMNU_GLOBAL_FREEVERB" } - + OptionMenu MidiPlayerOptions protected { Title "$SNDMNU_MIDIPLAYER" @@ -1765,6 +1765,7 @@ OptionMenu ModReplayerOptions protected Submenu "$ADVSNDMNU_WILDMIDI", "WildMidiOptions", 0, 1 Submenu "$ADVSNDMNU_OPLSYNTHESIS", "OPLOptions", 0, 1 Submenu "$ADVSNDMNU_ADLMIDI", "ADLOptions", 0, 1 + Submenu "$ADVSNDMNU_OPNMIDI", "OPNOptions", 0, 1 } OptionMenu FluidsynthOptions protected @@ -1777,7 +1778,7 @@ OptionMenu ModReplayerOptions protected Slider "$ADVSNDMNU_MIDIVOICES", "fluid_voices", 16, 4096, 16, 0 // other CVARs need to be revieved for usefulness } - + OptionMenu TimidityOptions protected { Title "$ADVSNDMNU_TIMIDITY" @@ -1796,7 +1797,7 @@ OptionMenu ModReplayerOptions protected Option "$ADVSNDMNU_DMXGUS", "midi_dmxgus", "OnOff" Option "$ADVSNDMNU_GUSMEMSIZE", "gus_memsize", "GusMemory" } - + OptionMenu WildMidiOptions protected { Title "$ADVSNDMNU_WILDMIDI" @@ -1804,19 +1805,37 @@ OptionMenu ModReplayerOptions protected Option "$ADVSNDMNU_REVERB", "wildmidi_reverb", "OnOff" Option "$ADVSNDMNU_ADVRESAMPLING", "wildmidi_enhanced_resampling", "OnOff" } - + OptionMenu OPLOptions protected { Title "$ADVSNDMNU_OPLSYNTHESIS" Option "$ADVSNDMNU_OPLCORES", "opl_core", "OplCores" Slider "$ADVSNDMNU_OPLNUMCHIPS", "opl_numchips", 1, 8, 1, 0 Option "$ADVSNDMNU_OPLFULLPAN", "opl_fullpan", "OnOff" -} + } + + OptionValue AdlVolumeModels + { + 0, "$ADLVLMODEL_AUTO" + 1, "$ADLVLMODEL_GENERIC" + 2, "$ADLVLMODEL_NATIVE" + 3, "$ADLVLMODEL_DMX" + 4, "$ADLVLMODEL_APOGEE" + 5, "$ADLVLMODEL_WIN9X" + } OptionMenu ADLOptions protected { Title "$ADVSNDMNU_ADLMIDI" - LabeledSubmenu "$ADVSNDMNU_OPLBANK", "adl_bank", "ADLBankMenu" + LabeledSubmenu "$ADVSNDMNU_OPLBANK", "adl_bank", "ADLBankMenu" + Slider "$ADVSNDMNU_ADLNUMCHIPS", "adl_chips_count", 1, 32, 1, 0 + Option "$ADVSNDMNU_VLMODEL", "adl_volume_model", "AdlVolumeModels" + } + + OptionMenu OPNOptions protected + { + Title "$ADVSNDMNU_OPNMIDI" + Slider "$ADVSNDMNU_OPNNUMCHIPS", "opn_chips_count", 1, 32, 1, 0 } /*======================================= @@ -1918,19 +1937,19 @@ OptionValue CropAspect OptionMenu VideoModeMenu protected { Title "$VIDMNU_TITLE" - + Option "$VIDMNU_FULLSCREEN", "fullscreen", "YesNo" - + IfOption(Mac) { Option "$VIDMNU_HIDPI", "vid_hidpi", "YesNo" } - + IfOption(Windows) { Option "$VIDMNU_BRDLSS", "win_borderless", "YesNo" } - + Option "$VIDMNU_ASPECTRATIO", "menu_screenratios", "Ratios" Option "$VIDMNU_FORCEASPECT", "vid_aspect", "ForceRatios" Option "$VIDMNU_CROPASPECT", "vid_cropaspect", "CropAspect" @@ -1971,7 +1990,7 @@ OptionMenu NetworkOptions protected StaticText "$NETMNU_HOSTOPTIONS", 1 Option "$NETMNU_EXTRATICS", "net_extratic", "ExtraTicMode" Option "$NETMNU_TICBALANCE", "net_ticbalance", "OnOff" - + } OptionValue ExtraTicMode @@ -2347,4 +2366,4 @@ OptionMenu "ReverbSave" protected StaticText "" StaticText "Environments to save" // Rest is filled in by code. -} \ No newline at end of file +} From 934441f9a2840f572b62078f0467199082fcb65f Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Tue, 27 Mar 2018 03:21:32 +0300 Subject: [PATCH 4/7] ADL&OPL: Added a fallback for a blank instruments in GS/XG banks --- src/sound/adlmidi/adlmidi_load.cpp | 4 +- src/sound/adlmidi/adlmidi_midiplay.cpp | 55 +++++++++++++++++--------- src/sound/opnmidi/opnmidi_load.cpp | 5 ++- src/sound/opnmidi/opnmidi_midiplay.cpp | 49 ++++++++++++++++------- 4 files changed, 78 insertions(+), 35 deletions(-) diff --git a/src/sound/adlmidi/adlmidi_load.cpp b/src/sound/adlmidi/adlmidi_load.cpp index 03206bcd6..00a4ce3de 100644 --- a/src/sound/adlmidi/adlmidi_load.cpp +++ b/src/sound/adlmidi/adlmidi_load.cpp @@ -103,7 +103,8 @@ enum WOPL_InstrumentFlags { WOPL_Flags_NONE = 0, WOPL_Flag_Enable4OP = 0x01, - WOPL_Flag_Pseudo4OP = 0x02 + WOPL_Flag_Pseudo4OP = 0x02, + WOPL_Flag_NoSound = 0x04, }; struct WOPL_Inst @@ -151,6 +152,7 @@ static bool readInstrument(MIDIplay::fileReader &file, WOPL_Inst &ins, uint16_t uint8_t flags = idata[39]; ins.adlins.flags = (flags & WOPL_Flag_Enable4OP) && (flags & WOPL_Flag_Pseudo4OP) ? adlinsdata::Flag_Pseudo4op : 0; + ins.adlins.flags|= (flags & WOPL_Flag_NoSound) ? adlinsdata::Flag_NoSound : 0; ins.fourOps = (flags & WOPL_Flag_Enable4OP) || (flags & WOPL_Flag_Pseudo4OP); ins.op[0].feedconn = (idata[40]); diff --git a/src/sound/adlmidi/adlmidi_midiplay.cpp b/src/sound/adlmidi/adlmidi_midiplay.cpp index 65e7af5ef..91270abf9 100644 --- a/src/sound/adlmidi/adlmidi_midiplay.cpp +++ b/src/sound/adlmidi/adlmidi_midiplay.cpp @@ -319,7 +319,7 @@ bool MIDIplay::buildTrackData() evtPos.delay = ReadVarLenEx(&trackPtr, end, ok); if(!ok) { - int len = std::sprintf(error, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); + int len = std::snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -347,7 +347,7 @@ bool MIDIplay::buildTrackData() event = parseEvent(&trackPtr, end, status); if(!event.isValid) { - int len = std::sprintf(error, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); + int len = std::snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -1031,7 +1031,7 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity) { if(!caugh_missing_banks_melodic.count(bank)) { - hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing percussion bank %i (patch %i)", channel, bank, midiins); + hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing percussion MIDI bank %i (patch %i)", channel, bank, midiins); caugh_missing_banks_melodic.insert(bank); } } @@ -1046,7 +1046,7 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity) { if(!caugh_missing_banks_percussion.count(bank)) { - hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing melodic bank %i (patch %i)", channel, bank, midiins); + hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing melodic MIDI bank %i (patch %i)", channel, bank, midiins); caugh_missing_banks_percussion.insert(bank); } } @@ -1060,29 +1060,48 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity) if(midiins == 48 || midiins == 50) vol /= 4; // HACK */ //if(midiins == 56) vol = vol*6/10; // HACK - //int meta = banks[opl.AdlBank][midiins]; - const size_t meta = opl.GetAdlMetaNumber(midiins); - const adlinsdata &ains = opl.GetAdlMetaIns(meta); + + size_t meta = opl.GetAdlMetaNumber(midiins); + const adlinsdata *ains = &opl.GetAdlMetaIns(meta); int16_t tone = note; - if(ains.tone) + if(!isPercussion && !isXgPercussion && (bank > 0)) // For non-zero banks + { + if(ains->flags & adlinsdata::Flag_NoSound) + { + if(hooks.onDebugMessage) + { + if(!caugh_missing_instruments.count(static_cast(midiins))) + { + hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Caugh a blank instrument %i (offset %i) in the MIDI bank %u", channel, Ch[channel].patch, midiins, bank); + caugh_missing_instruments.insert(static_cast(midiins)); + } + } + bank = 0; + midiins = Ch[channel].patch; + meta = opl.GetAdlMetaNumber(midiins); + ains = &opl.GetAdlMetaIns(meta); + } + } + + if(ains->tone) { /*if(ains.tone < 20) tone += ains.tone; else*/ - if(ains.tone < 128) - tone = ains.tone; + if(ains->tone < 128) + tone = ains->tone; else - tone -= ains.tone - 128; + tone -= ains->tone - 128; } //uint16_t i[2] = { ains.adlno1, ains.adlno2 }; - bool pseudo_4op = ains.flags & adlinsdata::Flag_Pseudo4op; + bool pseudo_4op = ains->flags & adlinsdata::Flag_Pseudo4op; MIDIchannel::NoteInfo::Phys voices[2] = { - {ains.adlno1, false}, - {ains.adlno2, pseudo_4op} + {ains->adlno1, false}, + {ains->adlno2, pseudo_4op} }; if((opl.AdlPercussionMode == 1) && PercussionMap[midiins & 0xFF]) @@ -1090,7 +1109,7 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity) if(hooks.onDebugMessage) { - if(!caugh_missing_instruments.count(static_cast(midiins)) && (ains.flags & adlinsdata::Flag_NoSound)) + if(!caugh_missing_instruments.count(static_cast(midiins)) && (ains->flags & adlinsdata::Flag_NoSound)) { hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing instrument %i", channel, midiins); caugh_missing_instruments.insert(static_cast(midiins)); @@ -2624,12 +2643,12 @@ ADLMIDI_EXPORT void AdlInstrumentTester::NextAdl(int offset) if(ains.tone) { /*if(ains.tone < 20) - std::sprintf(ToneIndication, "+%-2d", ains.tone); + std::snprintf(ToneIndication, 8, "+%-2d", ains.tone); else*/ if(ains.tone < 128) - std::sprintf(ToneIndication, "=%-2d", ains.tone); + std::snprintf(ToneIndication, 8, "=%-2d", ains.tone); else - std::sprintf(ToneIndication, "-%-2d", ains.tone - 128); + std::snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); } std::printf("%s%s%s%u\t", ToneIndication, diff --git a/src/sound/opnmidi/opnmidi_load.cpp b/src/sound/opnmidi/opnmidi_load.cpp index 8e87cabc8..15d0a5d35 100644 --- a/src/sound/opnmidi/opnmidi_load.cpp +++ b/src/sound/opnmidi/opnmidi_load.cpp @@ -280,10 +280,14 @@ bool OPNMIDIplay::LoadBank(OPNMIDIplay::fileReader &fr) size_t off = 37 + op * 7; std::memcpy(data.OPS[op].data, idata + off, 7); } + + meta.flags = 0; if(version >= 2) { meta.ms_sound_kon = toUint16BE(idata + 65); meta.ms_sound_koff = toUint16BE(idata + 67); + if((meta.ms_sound_kon == 0) && (meta.ms_sound_koff == 0)) + meta.flags |= opnInstMeta::Flag_NoSound; } else { @@ -295,7 +299,6 @@ bool OPNMIDIplay::LoadBank(OPNMIDIplay::fileReader &fr) meta.opnno2 = uint16_t(opn.dynamic_instruments.size()); /* Junk, delete later */ - meta.flags = 0; meta.fine_tune = 0.0; /* Junk, delete later */ diff --git a/src/sound/opnmidi/opnmidi_midiplay.cpp b/src/sound/opnmidi/opnmidi_midiplay.cpp index 630df1c77..58c4c350a 100644 --- a/src/sound/opnmidi/opnmidi_midiplay.cpp +++ b/src/sound/opnmidi/opnmidi_midiplay.cpp @@ -280,7 +280,7 @@ bool OPNMIDIplay::buildTrackData() evtPos.delay = ReadVarLenEx(&trackPtr, end, ok); if(!ok) { - int len = std::sprintf(error, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); + int len = std::snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -308,7 +308,7 @@ bool OPNMIDIplay::buildTrackData() event = parseEvent(&trackPtr, end, status); if(!event.isValid) { - int len = std::sprintf(error, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); + int len = std::snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -981,7 +981,7 @@ bool OPNMIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocit { if(!caugh_missing_banks_melodic.count(bank)) { - hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing percussion bank %i (patch %i)", channel, bank, midiins); + hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing percussion MIDI bank %i (patch %i)", channel, bank, midiins); caugh_missing_banks_melodic.insert(bank); } } @@ -996,7 +996,7 @@ bool OPNMIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocit { if(!caugh_missing_banks_melodic.count(bank)) { - hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing melodic bank %i (patch %i)", channel, bank, midiins); + hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing melodic MIDI bank %i (patch %i)", channel, bank, midiins); caugh_missing_banks_melodic.insert(bank); } } @@ -1011,28 +1011,47 @@ bool OPNMIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocit */ //if(midiins == 56) vol = vol*6/10; // HACK - const size_t meta = opn.GetAdlMetaNumber(midiins); - const opnInstMeta &ains = opn.GetAdlMetaIns(meta); + size_t meta = opn.GetAdlMetaNumber(midiins); + const opnInstMeta *ains = &opn.GetAdlMetaIns(meta); int16_t tone = note; - if(ains.tone) + if(!isPercussion && !isXgPercussion && (bank > 0)) // For non-zero banks + { + if(ains->flags & opnInstMeta::Flag_NoSound) + { + if(hooks.onDebugMessage) + { + if(!caugh_missing_instruments.count(static_cast(midiins))) + { + hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Caugh a blank instrument %i (offset %i) in the MIDI bank %u", channel, Ch[channel].patch, midiins, bank); + caugh_missing_instruments.insert(static_cast(midiins)); + } + } + bank = 0; + midiins = Ch[channel].patch; + meta = opn.GetAdlMetaNumber(midiins); + ains = &opn.GetAdlMetaIns(meta); + } + } + + if(ains->tone) { /*if(ains.tone < 20) tone += ains.tone; else*/ - if(ains.tone < 128) - tone = ains.tone; + if(ains->tone < 128) + tone = ains->tone; else - tone -= ains.tone - 128; + tone -= ains->tone - 128; } - uint16_t i[2] = { ains.opnno1, ains.opnno2 }; + uint16_t i[2] = { ains->opnno1, ains->opnno2 }; //bool pseudo_4op = ains.flags & opnInstMeta::Flag_Pseudo8op; //if((opn.AdlPercussionMode == 1) && PercussionMap[midiins & 0xFF]) i[1] = i[0]; if(hooks.onDebugMessage) { - if(!caugh_missing_instruments.count(static_cast(midiins)) && (ains.flags & opnInstMeta::Flag_NoSound)) + if(!caugh_missing_instruments.count(static_cast(midiins)) && (ains->flags & opnInstMeta::Flag_NoSound)) { hooks.onDebugMessage(hooks.onDebugMessage_userData, "[%i] Playing missing instrument %i", channel, midiins); caugh_missing_instruments.insert(static_cast(midiins)); @@ -2548,12 +2567,12 @@ retry_arpeggio: // if(ains.tone) // { // /*if(ains.tone < 20) -// std::sprintf(ToneIndication, "+%-2d", ains.tone); +// std::snprintf(ToneIndication, 8, "+%-2d", ains.tone); // else*/ // if(ains.tone < 128) -// std::sprintf(ToneIndication, "=%-2d", ains.tone); +// std::snprintf(ToneIndication, 8, "=%-2d", ains.tone); // else -// std::sprintf(ToneIndication, "-%-2d", ains.tone - 128); +// std::snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); // } // std::printf("%s%s%s%u\t", // ToneIndication, From 99e24efc2c29aa41816ebda928132e4883f3eac2 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 28 Mar 2018 20:33:02 +0300 Subject: [PATCH 5/7] ADLMIDI: Remove std:: from all snprintf-s --- src/sound/adlmidi/adlmidi.cpp | 4 ++-- src/sound/adlmidi/adlmidi_midiplay.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sound/adlmidi/adlmidi.cpp b/src/sound/adlmidi/adlmidi.cpp index 586cb901e..db97447a2 100644 --- a/src/sound/adlmidi/adlmidi.cpp +++ b/src/sound/adlmidi/adlmidi.cpp @@ -108,7 +108,7 @@ ADLMIDI_EXPORT int adl_setBank(ADL_MIDIPlayer *device, int bank) if(static_cast(bankno) >= NumBanks) { char errBuf[150]; - std::snprintf(errBuf, 150, "Embedded bank number may only be 0..%u!\n", (NumBanks - 1)); + snprintf(errBuf, 150, "Embedded bank number may only be 0..%u!\n", (NumBanks - 1)); play->setErrorString(errBuf); return -1; } @@ -139,7 +139,7 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4) if((unsigned int)ops4 > 6 * play->m_setup.NumCards) { char errBuff[250]; - std::snprintf(errBuff, 250, "number of four-op channels may only be 0..%u when %u OPL3 cards are used.\n", (6 * (play->m_setup.NumCards)), play->m_setup.NumCards); + snprintf(errBuff, 250, "number of four-op channels may only be 0..%u when %u OPL3 cards are used.\n", (6 * (play->m_setup.NumCards)), play->m_setup.NumCards); play->setErrorString(errBuff); return -1; } diff --git a/src/sound/adlmidi/adlmidi_midiplay.cpp b/src/sound/adlmidi/adlmidi_midiplay.cpp index 91270abf9..13e1008c0 100644 --- a/src/sound/adlmidi/adlmidi_midiplay.cpp +++ b/src/sound/adlmidi/adlmidi_midiplay.cpp @@ -319,7 +319,7 @@ bool MIDIplay::buildTrackData() evtPos.delay = ReadVarLenEx(&trackPtr, end, ok); if(!ok) { - int len = std::snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); + int len = snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -347,7 +347,7 @@ bool MIDIplay::buildTrackData() event = parseEvent(&trackPtr, end, status); if(!event.isValid) { - int len = std::snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); + int len = snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -2643,12 +2643,12 @@ ADLMIDI_EXPORT void AdlInstrumentTester::NextAdl(int offset) if(ains.tone) { /*if(ains.tone < 20) - std::snprintf(ToneIndication, 8, "+%-2d", ains.tone); + snprintf(ToneIndication, 8, "+%-2d", ains.tone); else*/ if(ains.tone < 128) - std::snprintf(ToneIndication, 8, "=%-2d", ains.tone); + snprintf(ToneIndication, 8, "=%-2d", ains.tone); else - std::snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); + snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); } std::printf("%s%s%s%u\t", ToneIndication, From 6a497a0b92c6104f72ba229f9c4095bcf3c2a033 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 28 Mar 2018 20:34:28 +0300 Subject: [PATCH 6/7] ADLMIDI: Update latest update of DMXOPL3 bank by @sneakernets And a small polishing of bank names to keep the informative, but much shorter --- src/sound/adlmidi/adldata.cpp | 546 +++++++++++++++++----------------- 1 file changed, 273 insertions(+), 273 deletions(-) diff --git a/src/sound/adlmidi/adldata.cpp b/src/sound/adlmidi/adldata.cpp index f17d0c839..1556f4d9c 100644 --- a/src/sound/adlmidi/adldata.cpp +++ b/src/sound/adlmidi/adldata.cpp @@ -4,7 +4,7 @@ * FROM A NUMBER OF SOURCES, MOSTLY PC GAMES. * PREPROCESSED, CONVERTED, AND POSTPROCESSED OFF-SCREEN. */ -const adldata adl[4425] = +const adldata adl[4423] = { // ,---------+-------- Wave select settings // | ,-------ч-+------ Sustain/release rates // | | ,-----ч-ч-+---- Attack/decay rates @@ -4116,7 +4116,7 @@ const adldata adl[4425] = { 0x332F985,0x0A5D684, 0x05,0x40, 0xE, +0 }, { 0x0FFF00B,0x2FF220C, 0x00,0x00, 0xE, +0 }, { 0x223A133,0x4F4F131, 0xD6,0x09, 0x6, +0 }, - { 0x223B132,0x0F4F131, 0xD3,0x0A, 0x6, +0 }, + { 0x023B131,0x0F4F131, 0xD3,0x0A, 0x6, +0 }, { 0x433F133,0x0F4F131, 0xD6,0x09, 0x8, +0 }, { 0x2F3F132,0x4F6F131, 0xD3,0x0A, 0x6, +0 }, { 0x2A4A112,0x4B5F211, 0xD2,0x05, 0x4, +0 }, @@ -4135,10 +4135,10 @@ const adldata adl[4425] = { 0x587F617,0x0E4F231, 0x54,0x08, 0x9, +0 }, { 0x0A5F33F,0x0F2C312, 0xA1,0x06, 0xC, -12 }, { 0x0A5F43F,0x0F2F392, 0xD5,0x07, 0x0, -12 }, - { 0x461A417,0x0017C11, 0xAA,0x08, 0x7, +0 }, - { 0x061A416,0x0018911, 0xA7,0x07, 0x7, +0 }, - { 0x0F6F2B2,0x0F6F281, 0xE5,0x00, 0xF, +0 }, - { 0x0F6F2A4,0x007F08F, 0x40,0x00, 0x1, +0 }, + { 0x462A417,0x0027A11, 0x9C,0x08, 0x9, +0 }, + { 0x062A416,0x0028811, 0x99,0x07, 0x9, +0 }, + { 0x0F6F2B2,0x0F6F281, 0xE8,0x05, 0xF, +0 }, + { 0x0F6F2A4,0x007F08F, 0x45,0x05, 0x1, +0 }, { 0x0F6F618,0x0F7E500, 0x63,0x80, 0x6, +12 }, { 0x5A6F40E,0x007D804, 0x5B,0x80, 0x0, +0 }, { 0x2F6F71A,0x0F5F413, 0x1F,0x03, 0x4, -19 }, @@ -4162,8 +4162,8 @@ const adldata adl[4425] = { 0x105FF2C,0x01A6222, 0x9D,0x12, 0x8, +0 }, { 0x107F021,0x2055232, 0x92,0x07, 0x8, +0 }, { 0x107F021,0x2055232, 0x92,0x07, 0x0, +0 }, - { 0x274A613,0x4B8F401, 0xDD,0x05, 0x6, +0 }, - { 0x2249134,0x2B8D301, 0x5E,0x05, 0xA, -12 }, + { 0x574A613,0x4B8F401, 0x9D,0x0D, 0x6, +0 }, + { 0x2249134,0x2B8D301, 0x61,0x05, 0xA, -12 }, { 0x5E5F133,0x1E4F211, 0x99,0x07, 0x6, +0 }, { 0x1E5F133,0x5E4F211, 0x9E,0x0B, 0x0, +0 }, { 0x21FF021,0x088F211, 0xA5,0x80, 0xA, +12 }, @@ -4178,8 +4178,8 @@ const adldata adl[4425] = { 0x0F78140,0x3F7F040, 0x40,0x05, 0xC, +14 }, { 0x6F78AE8,0x649B1F4, 0x03,0x0A, 0xA, +0 }, { 0x6F78AE8,0x649B1F4, 0x43,0x4B, 0xA, +0 }, - { 0x0209221,0x0E6C131, 0x97,0x05, 0x0, +0 }, - { 0x0608521,0x0E6A131, 0xD4,0x05, 0x4, +0 }, + { 0x0609533,0x4E5C131, 0x63,0x05, 0x0, +0 }, + { 0x0608521,0x0E4A131, 0xD4,0x05, 0x4, +0 }, { 0x0F9F030,0x0F8F131, 0x9D,0x05, 0xA, +12 }, { 0x7F0F017,0x7F9B700, 0x00,0x0F, 0xA, +12 }, { 0x026AA21,0x0D7F132, 0xCF,0x84, 0xA, +0 }, @@ -4191,7 +4191,8 @@ const adldata adl[4425] = { 0x2E69515,0x1B6B211, 0x17,0x08, 0x0, +0 }, { 0x077FA21,0x06AC332, 0x07,0x0D, 0x0, +0 }, { 0x0F5F430,0x0F6F330, 0x0E,0x00, 0xA, +12 }, - { 0x1468331,0x017D232, 0x15,0x00, 0xA, +0 }, + { 0x139A331,0x0F8F133, 0x93,0x08, 0xC, +0 }, + { 0x139A331,0x0F8F133, 0x93,0x08, 0xA, +0 }, { 0x2257020,0x4266161, 0x95,0x05, 0xA, +0 }, { 0x1257021,0x0266141, 0x99,0x07, 0x8, +0 }, { 0x2426070,0x2154130, 0x4F,0x00, 0xA, +0 }, @@ -4200,12 +4201,12 @@ const adldata adl[4425] = { 0x521F571,0x4166022, 0x90,0x09, 0x6, +0 }, { 0x52151F0,0x4156021, 0x97,0x0D, 0x4, +12 }, { 0x223F8F2,0x4055421, 0x99,0x8A, 0xC, +0 }, - { 0x0A05211,0x0E4C411, 0x9F,0x03, 0xA, +0 }, - { 0x1C79612,0x0E45411, 0xD9,0x03, 0x4, +0 }, + { 0x4A35211,0x0E4C411, 0x9C,0x08, 0x6, +0 }, + { 0x2C79613,0x4E45411, 0xD7,0x08, 0xA, +0 }, { 0x023E133,0x0F2F131, 0xA2,0x09, 0xE, +0 }, { 0x023F132,0x0F2F131, 0x24,0x0A, 0xE, +0 }, - { 0x4C3C413,0x0B4D214, 0x9B,0x48, 0xA, -24 }, - { 0x5BAF900,0x0B4F211, 0x87,0x48, 0x6, +0 }, + { 0x5C3C404,0x1B4B519, 0xA1,0x00, 0xC, -31 }, + { 0x17A9913,0x0B4F213, 0x0F,0x00, 0x8, -19 }, { 0x223F832,0x4055421, 0x99,0x8A, 0xC, +0 }, { 0x433CB32,0x5057561, 0x9B,0x8A, 0xA, +0 }, { 0x1029033,0x4044561, 0x5B,0x85, 0x4, +0 }, @@ -4225,7 +4226,7 @@ const adldata adl[4425] = { 0x0235271,0x0198161, 0x1E,0x08, 0xE, +0 }, { 0x0235361,0x0196161, 0x1D,0x03, 0xE, +0 }, { 0x0155331,0x0378261, 0x94,0x00, 0xA, +0 }, - { 0x118537A,0x5177432, 0x21,0x00, 0x4, -12 }, + { 0x118543A,0x5177472, 0x1E,0x00, 0x4, -12 }, { 0x0364121,0x02B7221, 0x21,0x08, 0xC, +0 }, { 0x026F021,0x0056121, 0x26,0x03, 0xC, +0 }, { 0x0578321,0x117C021, 0x19,0x03, 0xC, +0 }, @@ -4233,21 +4234,22 @@ const adldata adl[4425] = { 0x036F121,0x337F121, 0x92,0x08, 0xE, +0 }, { 0x0368121,0x037F121, 0x92,0x08, 0xE, +0 }, { 0x0A66121,0x0976121, 0x9B,0x08, 0xE, +0 }, - { 0x0F37011,0x1F65052, 0x51,0x04, 0xA, +0 }, - { 0x1067021,0x1165231, 0x8A,0x00, 0x6, +0 }, + { 0x5237731,0x1F65012, 0x4B,0x00, 0xA, +0 }, + { 0x0137732,0x0F65011, 0xC7,0x0A, 0xA, +0 }, + { 0x1067021,0x1165231, 0x46,0x00, 0x6, +0 }, { 0x00B9820,0x10B5330, 0x8E,0x00, 0xA, +12 }, { 0x10B8020,0x11B6330, 0x87,0x00, 0x8, +12 }, - { 0x0235031,0x0076C64, 0x58,0x08, 0xA, +0 }, - { 0x055D531,0x0076C72, 0x17,0x0D, 0x6, +0 }, - { 0x2077830,0x2076331, 0x94,0x00, 0xA, +0 }, + { 0x1235031,0x0077C24, 0xC0,0x08, 0x2, +0 }, + { 0x045D933,0x4076C35, 0xD0,0x26, 0x4, +0 }, + { 0x2077830,0x2076331, 0x9F,0x00, 0xA, +0 }, { 0x0199031,0x01B6134, 0x95,0x80, 0xA, +0 }, { 0x0177532,0x0174531, 0x93,0x03, 0xC, +0 }, { 0x0277530,0x0174536, 0x14,0x9C, 0xE, +12 }, { 0x08D6EF1,0x02A3571, 0xC0,0x00, 0xE, +0 }, { 0x08860A1,0x01A6561, 0x5C,0x00, 0x8, +0 }, { 0x2176522,0x0277421, 0x5A,0x00, 0x6, +0 }, - { 0x1274472,0x01745B1, 0x8D,0x05, 0x4, +0 }, - { 0x2F0F051,0x09A7801, 0x03,0x12, 0xA, +0 }, + { 0x1267532,0x0166531, 0x8D,0x05, 0x4, +0 }, + { 0x2F0F011,0x0987801, 0x03,0x17, 0xA, +0 }, { 0x00457F2,0x0375761, 0xA8,0x00, 0xE, +0 }, { 0x2545C73,0x0776821, 0x00,0x0D, 0xE, +0 }, { 0x5543737,0x25D67A1, 0x28,0x00, 0x8, +0 }, @@ -4260,23 +4262,23 @@ const adldata adl[4425] = { 0x3AB8120,0x308F130, 0x9E,0x06, 0x0, +0 }, { 0x13357F1,0x00767E1, 0x21,0x00, 0xA, +0 }, { 0x43357F2,0x00767E1, 0x28,0x00, 0x0, +0 }, - { 0x2444830,0x43D67A1, 0x22,0x00, 0x8, +0 }, - { 0x534B821,0x13D87A1, 0x1F,0x00, 0xA, +0 }, + { 0x2444830,0x21D67A1, 0x22,0x00, 0x8, +0 }, + { 0x534B821,0x02D87A1, 0x1F,0x00, 0xA, +0 }, { 0x32B7420,0x12BF134, 0x46,0x00, 0x8, +0 }, { 0x5029072,0x0069061, 0x96,0x0C, 0x8, +0 }, { 0x1019031,0x0069061, 0x1A,0x0C, 0x6, +0 }, - { 0x245C224,0x2550133, 0x83,0x80, 0x9, -36 }, - { 0x2459224,0x2556133, 0x83,0x80, 0x9, -36 }, - { 0x132ED10,0x3E7D010, 0x87,0x08, 0x6, +12 }, - { 0x132ED30,0x3E7D010, 0x87,0x0D, 0x6, +12 }, - { 0x2946374,0x005A0A1, 0xA5,0x05, 0x2, +0 }, - { 0x2055F02,0x004FFE1, 0xA8,0x05, 0x0, +0 }, - { 0x0031131,0x0054361, 0xD4,0x00, 0x4, +0 }, - { 0x20311B0,0x00543E1, 0xD9,0x00, 0x4, +0 }, + { 0x245C224,0x2550133, 0x81,0x80, 0xB, -36 }, + { 0x2459224,0x2556133, 0x81,0x80, 0xB, -36 }, + { 0x132ED10,0x3E7D010, 0x87,0x0D, 0x6, +12 }, + { 0x132ED30,0x3E7D010, 0x87,0x12, 0x6, +12 }, + { 0x033513A,0x013C121, 0xA4,0x06, 0x2, +0 }, + { 0x273F325,0x0228231, 0x20,0x06, 0x4, +0 }, + { 0x0031131,0x0054361, 0xD4,0x08, 0x4, +0 }, + { 0x20311B0,0x00543E1, 0xD9,0x08, 0x4, +0 }, { 0x245A121,0x126A121, 0x98,0x05, 0xC, +0 }, { 0x255A421,0x126A121, 0x98,0x05, 0xC, +0 }, - { 0x20470E0,0x1148161, 0x59,0x03, 0x2, +0 }, - { 0x10460E1,0x2148161, 0x5F,0x83, 0x6, +0 }, + { 0x50470E1,0x1148161, 0x59,0x03, 0x2, +0 }, + { 0x10460E2,0x4148161, 0x5F,0x83, 0x6, +0 }, { 0x0336186,0x05452E1, 0xA7,0x00, 0x6, +0 }, { 0x13351A6,0x05452E1, 0xA7,0x00, 0x0, +0 }, { 0x2529084,0x1534341, 0x9D,0x80, 0xC, +0 }, @@ -4290,8 +4292,8 @@ const adldata adl[4425] = { 0x2322122,0x0133221, 0x8C,0x92, 0x6, +0 }, { 0x4033121,0x0132122, 0x93,0x48, 0x4, +7 }, { 0x074F624,0x0249303, 0xC0,0x0D, 0x0, +0 }, - { 0x3D2C092,0x1D2D131, 0x8E,0x03, 0x0, +0 }, - { 0x0D2D091,0x1D23132, 0x8E,0x03, 0x0, +0 }, + { 0x3D2C092,0x1D2D131, 0x8E,0x09, 0x0, +0 }, + { 0x0D2D091,0x1D23132, 0x8E,0x09, 0x0, +0 }, { 0x5F29054,0x0F2C241, 0x99,0x06, 0xE, +0 }, { 0x1F19011,0x0F2C241, 0x1A,0x06, 0x6, +0 }, { 0x05233E1,0x0131371, 0x1A,0x88, 0x7, +0 }, @@ -4306,7 +4308,7 @@ const adldata adl[4425] = { 0x3F0F014,0x6F7F611, 0x40,0x43, 0xA, +0 }, { 0x033F201,0x373F402, 0xD1,0x8A, 0x0, +0 }, { 0x6A7F907,0x229A904, 0x1A,0x00, 0xA, -12 }, - { 0x332F320,0x6E49423, 0x0E,0x08, 0x8, +0 }, + { 0x5E2F321,0x6E4F523, 0x1B,0x08, 0x8, +0 }, { 0x455F71C,0x0D68501, 0xA3,0x08, 0x6, +0 }, { 0x055F718,0x0D6E501, 0x23,0x08, 0x0, +0 }, { 0x1397931,0x2099B22, 0x80,0x00, 0x6, +0 }, @@ -4326,7 +4328,7 @@ const adldata adl[4425] = { 0x250F610,0x0E7F510, 0x00,0xC8, 0x6, +0 }, { 0x2114109,0x51D2101, 0x05,0x80, 0xA, +0 }, { 0x2114108,0x31D2101, 0x05,0x80, 0xA, +12 }, - { 0x4543311,0x357451A, 0x19,0x03, 0xE, -14 }, + { 0x0534313,0x7574A1F, 0x20,0x03, 0xE, -14 }, { 0x00437D2,0x0343471, 0xA1,0x07, 0xC, +0 }, { 0x0F0F00C,0x0F66700, 0x00,0xCD, 0xE, +0 }, { 0x200C327,0x6021300, 0x80,0x12, 0xE, -23 }, @@ -4355,29 +4357,22 @@ const adldata adl[4425] = { 0x2F7F602,0x0F8F802, 0x00,0x88, 0xE, +12 }, { 0x05476C1,0x30892C5, 0x80,0x08, 0x0, +0 }, { 0x05477C1,0x30892C5, 0x00,0x08, 0xA, -2 }, - { 0x007C604,0x007C604, 0x08,0x08, 0x1, +0 }, - { 0x201F302,0x057AB09, 0x03,0x07, 0xC, +12 }, + { 0x005C604,0x005C604, 0x08,0x00, 0x1, +0 }, + { 0x509F902,0x057AB07, 0x03,0x07, 0xC, +12 }, { 0x254F307,0x307F905, 0x04,0x08, 0x6, -5 }, { 0x254F307,0x207F905, 0x04,0x08, 0x8, +0 }, - { 0x006C604,0x007C604, 0x08,0x08, 0x1, +0 }, - { 0x201F312,0x057AB09, 0x03,0x07, 0xC, +12 }, + { 0x509F912,0x057AB07, 0x03,0x07, 0xC, +12 }, { 0x254D307,0x3288905, 0x04,0x03, 0xA, -5 }, - { 0x0015500,0x007C716, 0x0C,0x00, 0x0, +0 }, - { 0x201F312,0x057AB09, 0x00,0x07, 0xC, +12 }, - { 0x0015500,0x007C719, 0x0C,0x00, 0x0, +0 }, - { 0x001F312,0x047BB05, 0x03,0x07, 0xC, +12 }, - { 0x0015500,0x007C71B, 0x0C,0x00, 0x0, +0 }, - { 0x201F312,0x047BB09, 0x03,0x07, 0xC, +12 }, - { 0x0015500,0x007C71F, 0x0C,0x00, 0x0, +0 }, - { 0x210F509,0x305FE03, 0x8A,0x85, 0xE, +12 }, - { 0x200F508,0x305FE03, 0xC7,0x85, 0xC, +12 }, - { 0x2E1F119,0x3F3F11B, 0x04,0x0D, 0x8, +0 }, + { 0x509F902,0x057AB07, 0x03,0x07, 0x0, +12 }, + { 0x210F509,0x605FE05, 0x8A,0x8A, 0xE, +12 }, + { 0x400F509,0x605FE05, 0x07,0x8A, 0xA, +12 }, + { 0x2E1F11E,0x3F3F318, 0x04,0x00, 0x8, +0 }, { 0x2777603,0x3679601, 0x87,0x08, 0x6, +12 }, { 0x277C643,0x3679601, 0x87,0x08, 0xE, +12 }, { 0x366F905,0x099F701, 0x00,0x00, 0xC, +12 }, { 0x431A000,0x085B41A, 0x81,0x05, 0xA, +12 }, { 0x459F640,0x185B418, 0x00,0x20, 0xB, +12 }, - { 0x212FD04,0x305FD03, 0x01,0x00, 0x8, +12 }, + { 0x212FD08,0x305FD03, 0x01,0x03, 0x8, +12 }, { 0x2A8F9E3,0x0779643, 0x1E,0x08, 0x2, +6 }, { 0x0A5F7E8,0x0D89949, 0xDE,0x00, 0x0, +0 }, { 0x2A8F9E3,0x0779643, 0x1E,0x00, 0xE, +12 }, @@ -4394,8 +4389,11 @@ const adldata adl[4425] = { 0x367FE05,0x678F701, 0x09,0x08, 0x8, +12 }, { 0x367FD10,0x078F901, 0x00,0x0D, 0x8, +11 }, { 0x098600F,0x3FC8590, 0x08,0xC0, 0xE, +12 }, - { 0x009F020,0x37DA588, 0x07,0x00, 0xA, +12 }, - { 0x00FC020,0x32DA5A8, 0x07,0x00, 0xA, +12 }, + { 0x009F020,0x27DA788, 0x25,0x00, 0x0, +12 }, + { 0x00FC020,0x22DA388, 0x25,0x00, 0xA, +12 }, + { 0x0F00000,0x0F00000, 0x3F,0x3F, 0xC, +0 }, + { 0x000F020,0x40A8A00, 0x0A,0x00, 0xE, +0 }, + { 0x70F5F20,0x70F4F00, 0x00,0x00, 0x2, -12 }, { 0x0D1F815,0x078F512, 0x44,0x00, 0x8, +12 }, { 0x2D1F213,0x098F614, 0x9D,0x00, 0x0, +0 }, { 0x2D1F213,0x098F614, 0x9D,0x21, 0x0, -2 }, @@ -4442,7 +4440,7 @@ const adldata adl[4425] = { 0x04CA700,0x04FC600, 0x00,0x2B, 0x0, -12 }, { 0x0B5F704,0x002010C, 0x00,0x00, 0x8, +21 }, }; -const struct adlinsdata adlins[4547] = +const struct adlinsdata adlins[4549] = { { 0, 0, 0, 0, 1660, 1660,0.000000 }, { 1, 1, 0, 0, 1746, 1746,0.000000 }, @@ -8783,7 +8781,7 @@ const struct adlinsdata adlins[4547] = {3547,3547,109, 0, 1780, 1780,0.000000 }, {4097,4097, 79, 0, 126, 126,0.000000 }, {4098,4098, 0, 0, 3413, 3413,0.000000 }, - {4099,4100, 0, 1, 2040, 2040,0.031250 }, + {4099,4100, 0, 1, 1613, 1613,0.031250 }, {4101,4102, 0, 1, 2146, 2146,0.031250 }, {4103,4104, 0, 1, 1646, 1646,0.046875 }, {4105,4106, 0, 1, 1900, 1900,0.156250 }, @@ -8793,7 +8791,7 @@ const struct adlinsdata adlins[4547] = {4113,4114, 0, 1, 1740, 1740,0.000000 }, {4115,4116, 0, 1, 993, 993,0.000025 }, {4117,4118, 0, 1, 886, 886,0.000000 }, - {4119,4120, 0, 1, 1900, 1900,0.046875 }, + {4119,4120, 0, 1, 1153, 1153,0.046875 }, {4121,4122, 0, 1, 1420, 1420,0.000000 }, {4123,4124, 0, 1, 193, 193,0.000000 }, {4125,4126, 0, 1, 406, 406,0.000000 }, @@ -8807,7 +8805,7 @@ const struct adlinsdata adlins[4547] = {4140,4141, 0, 1, 40000, 46,0.140625 }, {4142,4143, 0, 1, 40000, 6,0.000000 }, {4144,4145, 0, 1, 40000, 153,0.109375 }, - {4146,4147, 0, 1, 600, 600,0.000000 }, + {4146,4147, 0, 1, 920, 920,0.000000 }, {4148,4149, 0, 1, 653, 653,0.000025 }, {4150,4151, 0, 1, 633, 633,0.000000 }, {4152,4153, 0, 1, 893, 893,0.046875 }, @@ -8815,182 +8813,184 @@ const struct adlinsdata adlins[4547] = {4156,4157, 0, 1, 40000, 60,-1.906250 }, {4158,4159, 0, 1, 40000, 60,-1.906250 }, {4160,4161, 0, 1, 2033, 2033,0.234375 }, - {4162,4163, 0, 1, 1600, 1600,0.031250 }, + {4162,4163, 0, 1, 1900, 1900,0.031250 }, {4164,4165, 0, 1, 1453, 1453,0.000000 }, {4166,4167, 0, 1, 2186, 2186,0.000000 }, {4168,4169, 0, 1, 1933, 1933,0.046875 }, {4170,4171, 0, 1, 633, 633,0.000000 }, {4172,4173, 0, 1, 486, 486,0.000000 }, {4174,4174, 0, 0, 313, 313,0.000000 }, - {4175,4175, 0, 1, 40000, 33,0.156250 }, - {4176,4177, 0, 1, 2040, 13,0.000000 }, - {4178,4178, 0, 0, 40000, 66,0.000000 }, - {4179,4180, 0, 1, 40000, 60,0.000025 }, - {4181,4181, 0, 0, 40000, 133,0.000000 }, - {4182,4183, 0, 1, 40000, 173,0.078125 }, - {4184,4185, 0, 1, 320, 320,0.156250 }, - {4186,4187, 0, 1, 1813, 1813,0.031250 }, - {4188,4189, 0, 1, 1740, 1740,0.031250 }, - {4190,4191, 0, 1, 40000, 213,0.062500 }, - {4192,4193, 0, 1, 40000, 500,-0.062500 }, - {4194,4194, 0, 1, 40000, 326,0.109375 }, - {4195,4195, 0, 1, 40000, 406,0.109375 }, - {4196,4197, 0, 1, 40000, 280,0.140625 }, - {4198,4199, 0, 1, 40000, 53,0.140625 }, - {4200,4201, 0, 1, 40000, 286,0.156250 }, - {4202,4203, 0, 1, 206, 206,0.125000 }, - {4204,4205, 0, 1, 40000, 26,0.000000 }, - {4206,4207, 0, 1, 40000, 20,0.031250 }, - {4208,4208, 0, 0, 40000, 6,0.000000 }, - {4209,4209, 0, 0, 40000, 20,0.000000 }, - {4210,4211, 0, 1, 40000, 160,0.031250 }, - {4212,4213, 0, 1, 40000, 73,0.062500 }, - {4214,4215, 0, 1, 2526, 2526,0.093750 }, - {4216,4216, 0, 1, 5153, 5153,0.125000 }, - {4217,4217, 0, 0, 40000, 66,0.000000 }, - {4218,4218, 0, 0, 40000, 40,0.000000 }, - {4219,4219, 0, 0, 40000, 0,0.000000 }, - {4220,4220, 0, 0, 40000, 0,0.000000 }, - {4221,4222, 0, 1, 40000, 60,0.000000 }, - {4223,4223, 0, 0, 40000, 33,0.000000 }, - {4224,4224, 0, 0, 40000, 6,0.000000 }, - {4225,4226, 0, 1, 40000, 40,0.000000 }, - {4227,4227, 0, 0, 40000, 0,0.000000 }, - {4228,4228, 0, 0, 40000, 6,0.000000 }, - {4229,4229, 0, 0, 40000, 33,0.000000 }, - {4230,4231, 0, 1, 40000, 33,0.031250 }, - {4232,4233, 0, 1, 40000, 20,0.046875 }, - {4234,4235, 0, 1, 420, 420,0.031250 }, - {4236,4236, 0, 0, 40000, 106,0.000000 }, - {4237,4237, 0, 0, 40000, 6,0.000000 }, - {4238,4239, 0, 1, 40000, 6,0.125000 }, - {4240,4241, 0, 1, 40000, 13,0.109375 }, - {4242,4243, 0, 1, 40000, 53,0.109375 }, - {4244,4245, 0, 1, 120, 0,-0.031250 }, - {4246,4246, 0, 0, 40000, 6,0.000000 }, - {4247,4248, 0, 1, 40000, 133,0.156250 }, - {4249,4250, 0, 1, 3886, 3886,0.125000 }, - {4251,4252, 0, 1, 40000, 26,0.031250 }, - {4253,4254, 0, 1, 40000, 320,0.078125 }, - {4255,4256, 0, 1, 846, 66,0.109375 }, - {4257,4258, 0, 1, 1293, 80,0.078125 }, - {4259,4260, 0, 1, 40000, 193,0.156250 }, - {4261,4262, 0, 1, 2040, 2040,0.109375 }, - {4263,4264, 0, 1, 1360, 1360,0.062500 }, - {4265,4266, 0, 1, 40000, 433,0.093750 }, - {4267,4268, 0, 1, 40000, 533,0.109375 }, - {4269,4270, 0, 1, 826, 826,0.093750 }, - {4271,4272, 0, 1, 40000, 926,0.125000 }, - {4273,4273, 0, 1, 886, 886,0.109375 }, - {4274,4275, 0, 1, 2186, 2186,-0.046875 }, - {4276,4277, 0, 1, 1486, 1486,0.125000 }, - {4278,4279, 0, 1, 40000, 393,-0.078125 }, - {4280,4281, 0, 1, 40000, 1166,0.140625 }, - {4282,4283, 0, 1, 360, 360,0.078125 }, - {4284,4285, 0, 1, 1693, 1693,0.031250 }, - {4286,4287, 0, 1, 760, 760,0.000000 }, - {4288,4289, 0, 1, 126, 126,0.031250 }, - {4290,4290, 0, 0, 633, 633,0.000000 }, - {4291,4292, 0, 1, 280, 280,0.000000 }, - {4293,4294, 0, 1, 40000, 26,0.062500 }, - {4295,4295, 0, 0, 40000, 66,0.000000 }, - {4296,4296, 0, 0, 40000, 53,0.000000 }, - {4297,4297, 0, 0, 1940, 1940,0.000000 }, - {4298,4298, 0, 0, 86, 86,0.000000 }, - {4299,4300, 0, 1, 280, 280,0.031250 }, - {4301,4301, 0, 0, 40, 40,0.000000 }, - {4302,4303, 0, 1, 53, 53,0.000000 }, - {4304,4305, 0, 1, 140, 140,0.000000 }, - {4306,4307, 0, 1, 26, 26,0.000000 }, - {4308,4309, 0, 1, 2153, 2153,0.109375 }, - {4310,4310, 0, 0, 600, 600,0.000000 }, - {4311,4312, 0, 1, 993, 26,0.000000 }, - {4313,4314, 0, 1, 5613, 5613,0.000000 }, - {4315,4315, 0, 0, 220, 220,0.000000 }, - {4316,4317, 0, 1, 10306, 526,0.000000 }, - {4318,4319, 0, 1, 1486, 13,0.000000 }, - {4320,4321, 0, 1, 40000, 660,0.000000 }, - {4322,4322, 0, 0, 120, 120,0.000000 }, - {4323,4323, 34, 0, 40, 40,0.000000 }, - {4324,4324, 28, 0, 73, 73,0.000000 }, - {4325,4326, 39, 1, 233, 233,0.000000 }, - {4325,4326, 33, 1, 193, 193,0.000000 }, - {4327,4328, 63, 1, 33, 33,0.000000 }, - {4329,4329, 15, 0, 13, 13,0.000000 }, - {4330,4330, 36, 0, 13, 13,0.000000 }, - {4330,4331, 36, 1, 133, 133,0.406250 }, - {4332,4333, 25, 1, 13, 13,0.000000 }, - {4334,4333, 25, 1, 33, 33,0.000000 }, - {4335,4336, 61, 1, 40, 40,0.000000 }, - {4337,4338, 37, 1, 53, 53,0.000000 }, - {4339,4340, 15, 1, 80, 80,0.000000 }, - {4341,4342, 48, 1, 73, 73,-1.906250 }, - {4343,4344, 19, 1, 120, 120,0.000000 }, - {4345,4345, 48, 0, 53, 53,0.000000 }, - {4346,4347, 15, 1, 33, 33,0.000000 }, - {4348,4349, 12, 1, 33, 33,0.000000 }, - {4350,4351, 12, 1, 33, 33,0.000000 }, - {4352,4351, 10, 1, 40, 40,0.000000 }, - {4353,4354, 60, 1, 286, 286,0.062500 }, - {4355,4355, 62, 0, 1726, 1726,0.000000 }, - {4356,4357, 80, 1, 106, 106,0.125000 }, - {4358,4358, 58, 0, 73, 73,0.000000 }, - {4359,4360, 31, 1, 313, 313,0.000000 }, - {4361,4361, 61, 0, 206, 206,0.000000 }, - {4362,4363, 41, 1, 100, 100,0.000000 }, - {4364,4365, 35, 1, 160, 160,0.000000 }, - {4366,4367, 29, 1, 40, 40,0.000000 }, - {4368,4369, 41, 1, 166, 166,0.000000 }, - {4368,4369, 37, 1, 160, 160,0.000000 }, - {4370,4371, 54, 1, 80, 80,0.000000 }, - {4370,4372, 48, 1, 80, 80,0.000000 }, - {4373,4374, 77, 1, 53, 53,0.000000 }, - {4375,4376, 72, 1, 46, 46,0.000000 }, - {4377,4377, 40, 0, 140, 140,0.000000 }, - {4378,4378, 45, 0, 313, 313,0.000000 }, - {4379,4379, 42, 0, 40000, 0,0.000000 }, - {4380,4380, 73, 0, 60, 60,0.000000 }, - {4381,4382, 68, 1, 40, 40,0.000000 }, - {4383,4384, 18, 1, 60, 60,0.000000 }, - {4385,4386, 18, 1, 106, 106,0.000000 }, - {4387,4387, 90, 0, 80, 80,0.000000 }, - {4388,4388, 90, 0, 306, 306,0.000000 }, - {4389,4390, 64, 1, 233, 233,0.031250 }, - {4391,4392, 80, 1, 140, 140,0.031250 }, - {4393,4394, 64, 1, 606, 606,0.000000 }, - {4395,4395, 67, 0, 20, 20,0.000000 }, - {4396,4397, 50, 1, 53, 53,0.000000 }, - {4398,4398, 36, 0, 66, 66,0.000000 }, - {4399,4399, 0, 0, 40000, 20,0.000000 }, - {4400,4400, 0, 0, 40000, 0,0.000000 }, - {4401,4401, 0, 0, 360, 360,0.000000 }, - {4402,4402, 0, 0, 586, 586,0.000000 }, + {4175,4176, 0, 1, 2533, 2533,0.078125 }, + {4177,4178, 0, 1, 2040, 13,0.000000 }, + {4179,4179, 0, 0, 40000, 66,0.000000 }, + {4180,4181, 0, 1, 40000, 60,0.000025 }, + {4182,4182, 0, 0, 40000, 133,0.000000 }, + {4183,4184, 0, 1, 40000, 173,0.078125 }, + {4185,4186, 0, 1, 333, 333,0.109375 }, + {4187,4188, 0, 1, 1813, 1813,0.031250 }, + {4189,4190, 0, 1, 1473, 1473,0.031250 }, + {4191,4192, 0, 1, 40000, 213,0.062500 }, + {4193,4194, 0, 1, 40000, 500,-0.062500 }, + {4195,4195, 0, 1, 40000, 326,0.109375 }, + {4196,4196, 0, 1, 40000, 406,0.109375 }, + {4197,4198, 0, 1, 40000, 280,0.140625 }, + {4199,4200, 0, 1, 40000, 53,0.140625 }, + {4201,4202, 0, 1, 40000, 286,0.156250 }, + {4203,4204, 0, 1, 206, 206,0.125000 }, + {4205,4206, 0, 1, 40000, 26,0.000000 }, + {4207,4208, 0, 1, 40000, 20,0.031250 }, + {4209,4209, 0, 0, 40000, 6,0.000000 }, + {4210,4210, 0, 0, 40000, 20,0.000000 }, + {4211,4212, 0, 1, 40000, 160,0.031250 }, + {4213,4214, 0, 1, 40000, 73,0.062500 }, + {4215,4216, 0, 1, 2526, 2526,0.093750 }, + {4217,4217, 0, 1, 5153, 5153,0.125000 }, + {4218,4219, 0, 1, 40000, 73,0.000000 }, + {4220,4220, 0, 0, 40000, 60,0.000000 }, + {4221,4221, 0, 0, 40000, 0,0.000000 }, + {4222,4222, 0, 0, 40000, 0,0.000000 }, + {4223,4224, 0, 1, 40000, 73,0.000000 }, + {4225,4225, 0, 0, 40000, 33,0.000000 }, + {4226,4226, 0, 0, 40000, 6,0.000000 }, + {4227,4228, 0, 1, 40000, 40,0.000000 }, + {4229,4229, 0, 0, 40000, 0,0.000000 }, + {4230,4230, 0, 0, 40000, 6,0.000000 }, + {4231,4231, 0, 0, 40000, 33,0.000000 }, + {4232,4233, 0, 1, 40000, 53,0.031250 }, + {4234,4235, 0, 1, 40000, 20,0.046875 }, + {4236,4237, 0, 1, 420, 420,0.031250 }, + {4238,4238, 0, 0, 40000, 106,0.000000 }, + {4239,4239, 0, 0, 40000, 6,0.000000 }, + {4240,4241, 0, 1, 40000, 6,0.125000 }, + {4242,4243, 0, 1, 40000, 13,0.109375 }, + {4244,4245, 0, 1, 40000, 53,0.109375 }, + {4246,4247, 0, 1, 226, 6,-0.031250 }, + {4248,4248, 0, 0, 40000, 6,0.000000 }, + {4249,4250, 0, 1, 40000, 133,0.156250 }, + {4251,4252, 0, 1, 4186, 13,0.125000 }, + {4253,4254, 0, 1, 40000, 26,0.031250 }, + {4255,4256, 0, 1, 40000, 660,0.078125 }, + {4257,4258, 0, 1, 846, 66,0.109375 }, + {4259,4260, 0, 1, 1293, 80,0.078125 }, + {4261,4262, 0, 1, 40000, 300,0.140625 }, + {4263,4264, 0, 1, 2040, 2040,0.109375 }, + {4265,4266, 0, 1, 1360, 1360,0.062500 }, + {4267,4268, 0, 1, 40000, 433,0.093750 }, + {4269,4270, 0, 1, 40000, 533,0.109375 }, + {4271,4272, 0, 1, 826, 826,0.093750 }, + {4273,4274, 0, 1, 40000, 926,0.125000 }, + {4275,4275, 0, 1, 886, 886,0.109375 }, + {4276,4277, 0, 1, 2186, 2186,-0.046875 }, + {4278,4279, 0, 1, 1486, 1486,0.125000 }, + {4280,4281, 0, 1, 40000, 393,-0.078125 }, + {4282,4283, 0, 1, 40000, 1166,0.140625 }, + {4284,4285, 0, 1, 360, 360,0.078125 }, + {4286,4287, 0, 1, 1693, 1693,0.031250 }, + {4288,4289, 0, 1, 760, 760,0.000000 }, + {4290,4291, 0, 1, 126, 126,0.031250 }, + {4292,4292, 0, 0, 300, 300,0.000000 }, + {4293,4294, 0, 1, 280, 280,0.000000 }, + {4295,4296, 0, 1, 40000, 26,0.062500 }, + {4297,4297, 0, 0, 40000, 66,0.000000 }, + {4298,4298, 0, 0, 40000, 53,0.000000 }, + {4299,4299, 0, 0, 1940, 1940,0.000000 }, + {4300,4300, 0, 0, 86, 86,0.000000 }, + {4301,4302, 0, 1, 280, 280,0.031250 }, + {4303,4303, 0, 0, 40, 40,0.000000 }, + {4304,4305, 0, 1, 53, 53,0.000000 }, + {4306,4307, 0, 1, 140, 140,0.000000 }, + {4308,4309, 0, 1, 26, 26,0.000000 }, + {4310,4311, 0, 1, 2153, 2153,0.109375 }, + {4312,4312, 0, 0, 293, 293,0.000000 }, + {4313,4314, 0, 1, 993, 26,0.000000 }, + {4315,4316, 0, 1, 5613, 5613,0.000000 }, + {4317,4317, 0, 0, 220, 220,0.000000 }, + {4318,4319, 0, 1, 10306, 526,0.000000 }, + {4320,4321, 0, 1, 1486, 13,0.000000 }, + {4322,4323, 0, 1, 40000, 660,0.000000 }, + {4324,4324, 0, 0, 120, 120,0.000000 }, + {4325,4325, 34, 0, 40, 40,0.000000 }, + {4326,4326, 28, 0, 73, 73,0.000000 }, + {4327,4328, 39, 1, 233, 233,0.000000 }, + {4327,4328, 33, 1, 193, 193,0.000000 }, + {4329,4330, 63, 1, 33, 33,0.000000 }, + {4331,4331, 15, 0, 13, 13,0.000000 }, + {4332,4332, 36, 0, 13, 13,0.000000 }, + {4332,4333, 36, 1, 133, 133,0.406250 }, + {4334,4335, 25, 1, 13, 13,0.000000 }, + {4336,4335, 25, 1, 33, 33,0.000000 }, + {4337,4338, 61, 1, 40, 40,0.000000 }, + {4339,4340, 37, 1, 53, 53,0.000000 }, + {4341,4342, 15, 1, 320, 320,0.000000 }, + {4343,4344, 48, 1, 73, 73,-1.906250 }, + {4341,4345, 19, 1, 320, 320,0.000000 }, + {4346,4346, 48, 0, 53, 53,0.000000 }, + {4341,4342, 22, 1, 353, 353,0.000000 }, + {4341,4342, 24, 1, 360, 360,0.000000 }, + {4341,4347, 27, 1, 393, 393,0.000000 }, + {4341,4342, 31, 1, 380, 380,0.000000 }, + {4348,4349, 60, 1, 246, 246,0.031250 }, + {4350,4350, 70, 0, 340, 340,0.000000 }, + {4351,4352, 80, 1, 106, 106,0.125000 }, + {4353,4353, 58, 0, 73, 73,0.000000 }, + {4354,4355, 31, 1, 313, 313,0.000000 }, + {4356,4356, 61, 0, 253, 253,0.000000 }, + {4357,4358, 41, 1, 100, 100,0.000000 }, + {4359,4360, 35, 1, 160, 160,0.000000 }, + {4361,4362, 29, 1, 40, 40,0.000000 }, + {4363,4364, 41, 1, 166, 166,0.000000 }, + {4363,4364, 37, 1, 160, 160,0.000000 }, + {4365,4366, 54, 1, 80, 80,0.000000 }, + {4365,4367, 48, 1, 80, 80,0.000000 }, + {4368,4369, 77, 1, 53, 53,0.000000 }, + {4370,4371, 72, 1, 46, 46,0.000000 }, + {4372,4372, 40, 0, 140, 140,0.000000 }, + {4373,4373, 38, 0, 73, 73,0.000000 }, + {4374,4374, 36, 0, 533, 533,0.000000 }, + {4375,4376, 60, 1, 26, 26,0.000000 }, + {4376,4377, 60, 1, 26, 26,0.000000 }, + {4378,4378, 73, 0, 60, 60,0.000000 }, + {4379,4380, 68, 1, 40, 40,0.000000 }, + {4381,4382, 18, 1, 60, 60,0.000000 }, + {4383,4384, 18, 1, 106, 106,0.000000 }, + {4385,4385, 90, 0, 80, 80,0.000000 }, + {4386,4386, 90, 0, 306, 306,0.000000 }, + {4387,4388, 64, 1, 233, 233,0.031250 }, + {4389,4390, 80, 1, 140, 140,0.031250 }, + {4391,4392, 64, 1, 606, 606,0.000000 }, + {4393,4393, 67, 0, 20, 20,0.000000 }, + {4394,4395, 50, 1, 53, 53,0.000000 }, + {4396,4396, 36, 0, 66, 66,0.000000 }, + {4397,4397, 0, 0, 40000, 20,0.000000 }, + {4398,4398, 0, 0, 40000, 0,0.000000 }, + {4399,4399, 0, 0, 360, 360,0.000000 }, + {4400,4400, 0, 0, 586, 586,0.000000 }, + {4401,4401, 0, 0, 40000, 0,0.000000 }, + {4402,4402, 0, 0, 40000, 0,0.000000 }, {4403,4403, 0, 0, 40000, 0,0.000000 }, - {4404,4404, 0, 0, 40000, 0,0.000000 }, + {4404,4404, 0, 0, 40000, 6,0.000000 }, {4405,4405, 0, 0, 40000, 0,0.000000 }, - {4406,4406, 0, 0, 40000, 6,0.000000 }, - {4407,4407, 0, 0, 40000, 0,0.000000 }, - {4408,4408, 0, 0, 146, 146,0.000000 }, - {4408,4408, 73, 0, 886, 886,0.000000 }, - {4409,4409, 0, 0, 40, 0,0.000000 }, - {4410,4410, 0, 0, 486, 0,0.000000 }, - {4411,4411, 0, 0, 1226, 1226,0.000000 }, - {4412,4412, 0, 0, 1480, 1480,0.000000 }, - {4413,4413, 0, 0, 46, 46,0.000000 }, - {4414,4414, 0, 0, 126, 126,0.000000 }, - {4414,4414, 12, 0, 106, 106,0.000000 }, - {4415,4415, 0, 0, 160, 160,0.000000 }, - {4415,4415, 1, 0, 153, 153,0.000000 }, - {4416,4416, 0, 0, 20, 20,0.000000 }, - {4416,4416, 23, 0, 26, 26,0.000000 }, - {4417,4417, 0, 0, 140, 140,0.000000 }, - {4418,4418, 0, 0, 486, 486,0.000000 }, - {4419,4419, 0, 0, 40000, 13,0.000000 }, - {4420,4420, 0, 0, 40000, 0,0.000000 }, - {4421,4421, 0, 0, 1226, 1226,0.000000 }, - {4422,4422, 0, 0, 766, 766,0.000000 }, - {4423,4423, 0, 0, 93, 93,0.000000 }, - {4424,4424, 0, 2, 40000, 0,0.000000 }, + {4406,4406, 0, 0, 146, 146,0.000000 }, + {4406,4406, 73, 0, 886, 886,0.000000 }, + {4407,4407, 0, 0, 40, 0,0.000000 }, + {4408,4408, 0, 0, 486, 0,0.000000 }, + {4409,4409, 0, 0, 1226, 1226,0.000000 }, + {4410,4410, 0, 0, 1480, 1480,0.000000 }, + {4411,4411, 0, 0, 46, 46,0.000000 }, + {4412,4412, 0, 0, 126, 126,0.000000 }, + {4412,4412, 12, 0, 106, 106,0.000000 }, + {4413,4413, 0, 0, 160, 160,0.000000 }, + {4413,4413, 1, 0, 153, 153,0.000000 }, + {4414,4414, 0, 0, 20, 20,0.000000 }, + {4414,4414, 23, 0, 26, 26,0.000000 }, + {4415,4415, 0, 0, 140, 140,0.000000 }, + {4416,4416, 0, 0, 486, 486,0.000000 }, + {4417,4417, 0, 0, 40000, 13,0.000000 }, + {4418,4418, 0, 0, 40000, 0,0.000000 }, + {4419,4419, 0, 0, 1226, 1226,0.000000 }, + {4420,4420, 0, 0, 766, 766,0.000000 }, + {4421,4421, 0, 0, 93, 93,0.000000 }, + {4422,4422, 0, 2, 40000, 0,0.000000 }, }; @@ -9002,7 +9002,7 @@ int maxAdlBanks() const char* const banknames[74] = { - "AIL (Star Control 3, Albion, Empire 2, many others)", + "AIL (Star Control 3, Albion, Empire 2, etc.)", "Bisqwit (selection of 4op and 2op)", "HMI (Descent, Asterix)", "HMI (Descent:: Int)", @@ -9016,47 +9016,47 @@ const char* const banknames[74] = "HMI (Aces of the Deep)", "HMI (Earthsiege)", "HMI (Anvil of Dawn)", - "DMX (Doom)", + "DMX (Doom 2)", "DMX (Hexen, Heretic)", - "DMX (MUS Play)", - "AIL (Discworld, Grandest Fleet)", + "DMX (DOOM, MUS Play)", + "AIL (Discworld, Grandest Fleet, etc.)", "AIL (Warcraft 2)", "AIL (Syndicate)", - "AIL (Guilty, Orion Conspiracy)", + "AIL (Guilty, Orion Conspiracy, TNSFC ::4op)", "AIL (Magic Carpet 2)", "AIL (Nemesis)", "AIL (Jagged Alliance)", - "AIL (When Two Worlds War)", - "AIL (Bards Tale Construction)", + "AIL (When Two Worlds War :MISS-INS:)", + "AIL (Bards Tale Construction :MISS-INS:)", "AIL (Return to Zork)", "AIL (Theme Hospital)", "AIL (National Hockey League PA)", "AIL (Inherit The Earth)", "AIL (Inherit The Earth, file two)", - "AIL (Little Big Adventure)", + "AIL (Little Big Adventure :: 4op)", "AIL (Wreckin Crew)", "AIL (Death Gate)", "AIL (FIFA International Soccer)", "AIL (Starship Invasion)", - "AIL (Super Street Fighter 2)", - "AIL (Lords of the Realm)", - "AIL (SimFarm, SimHealth)", + "AIL (Super Street Fighter 2 :4op:)", + "AIL (Lords of the Realm :MISS-INS:)", + "AIL (SimFarm, SimHealth :: 4op)", "AIL (SimFarm, Settlers, Serf City)", - "AIL (Caesar 2, MISSING INSTRUMENTS)", + "AIL (Caesar 2, :p4op::MISS-INS:)", "AIL (Syndicate Wars)", "AIL (Bubble Bobble Feat. Rainbow Islands, Z)", "AIL (Warcraft)", - "AIL (Terra Nova Strike Force Centuri)", - "AIL (System Shock)", + "AIL (Terra Nova Strike Force Centuri :p4op:)", + "AIL (System Shock :p4op:)", "AIL (Advanced Civilization)", - "AIL (Battle Chess 4000, melodic only)", - "AIL (Ultimate Soccer Manager)", - "AIL (Air Bucks, Blue And The Gray)", + "AIL (Battle Chess 4000 :p4op:)", + "AIL (Ultimate Soccer Manager :p4op:)", + "AIL (Air Bucks, Blue And The Gray, etc)", "AIL (Ultima Underworld 2)", "AIL (Kasparov's Gambit)", - "AIL (High Seas Trader)", - "AIL (Master of Magic, std percussion)", - "AIL (Master of Magic, orchestral percussion)", + "AIL (High Seas Trader :MISS-INS:)", + "AIL (Master of Magic, :4op: std percussion)", + "AIL (Master of Magic, :4op: orchestral percussion)", "SB (Action Soccer)", "SB (3d Cyberpuck :: melodic only)", "SB (Simon the Sorcerer :: melodic only)", @@ -10388,14 +10388,14 @@ const unsigned short banks[74][256] = 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806,4467,4468,4469,4470,4471, 4472,4473,4474,4475,4476,4477,4217,4478,4218,4479,4480,4481,4482,4483,4221,4484, 4485,4222,4486,4487,4224,4488,4489,4226,4490,4227,4491,4492,4493,4494,4495,4496, -4497,4498,4499,4500,4501, 320,4502,4503,4504,4231,4232,4505,4506,1374,4507,4508, -4509,4510,4511,4512,4513,4514,4515,4516, 806, 806, 806, 806, 806, 806, 806, 806, +4497,4498,4499,4500,4501, 320,4502,4503,4504,4505,4506,4507,4508,1374,4509,4510, +4511,4512,4513,4514,4515,4516,4517,4518, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, }, { -4517,4518,4519,4520,4518,4521,4522,4523,4524,4525,4526,4528,4529,4530,4531,4532, -4533,4535,4537,4530,4539,4540,4541,4542,4543,4544,4545, 295, 28, 29, 30, 31, +4519,4520,4521,4522,4520,4523,4524,4525,4526,4527,4528,4530,4531,4532,4533,4534, +4535,4537,4539,4532,4541,4542,4543,4544,4545,4546,4547, 295, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, @@ -10404,8 +10404,8 @@ const unsigned short banks[74][256] = 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, - 295, 295, 295, 127,4534, 128,4536, 130, 131, 132,4538, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144,4527, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 295, 295, 295, 127,4536, 128,4538, 130, 131, 132,4540, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144,4529, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, @@ -10415,7 +10415,7 @@ const unsigned short banks[74][256] = const AdlBankSetup adlbanksetup[74] = { - {0, 1, 1, 0, 0}, //Bank 0, AIL (Star Control 3, Albion, Empire 2, Sensible Soccer, Settlers 2, many others) + {0, 1, 1, 0, 0}, //Bank 0, AIL (Star Control 3, Albion, Empire 2, etc.) {0, 1, 1, 0, 0}, //Bank 1, Bisqwit (selection of 4op and 2op) {0, 0, 0, 0, 0}, //Bank 2, HMI (Descent, Asterix) {0, 0, 0, 0, 0}, //Bank 3, HMI (Descent:: Int) @@ -10429,18 +10429,18 @@ const AdlBankSetup adlbanksetup[74] = {0, 0, 0, 0, 0}, //Bank 11, HMI (Aces of the Deep) {0, 0, 0, 0, 0}, //Bank 12, HMI (Earthsiege) {0, 0, 0, 0, 0}, //Bank 13, HMI (Anvil of Dawn) - {2, 0, 0, 0, 0}, //Bank 14, DMX (Doom :: partially pseudo 4op) - {2, 0, 0, 0, 0}, //Bank 15, DMX (Hexen, Heretic :: partially pseudo 4op) - {2, 0, 0, 0, 0}, //Bank 16, DMX (MUS Play :: partially pseudo 4op) - {0, 1, 1, 0, 0}, //Bank 17, AIL (Discworld, Grandest Fleet, Pocahontas, Slob Zone 3d, Ultima 4, Zorro) + {2, 0, 0, 0, 0}, //Bank 14, DMX (Doom 2) + {2, 0, 0, 0, 0}, //Bank 15, DMX (Hexen, Heretic) + {2, 0, 0, 0, 0}, //Bank 16, DMX (DOOM, MUS Play) + {0, 1, 1, 0, 0}, //Bank 17, AIL (Discworld, Grandest Fleet, etc.) {0, 1, 1, 0, 0}, //Bank 18, AIL (Warcraft 2) {0, 1, 1, 0, 0}, //Bank 19, AIL (Syndicate) - {0, 1, 1, 0, 0}, //Bank 20, AIL (Guilty, Orion Conspiracy, Terra Nova Strike Force Centauri :: 4op) + {0, 1, 1, 0, 0}, //Bank 20, AIL (Guilty, Orion Conspiracy, TNSFC ::4op) {0, 1, 1, 0, 0}, //Bank 21, AIL (Magic Carpet 2) {0, 1, 1, 0, 0}, //Bank 22, AIL (Nemesis) {0, 1, 1, 0, 0}, //Bank 23, AIL (Jagged Alliance) - {0, 1, 1, 0, 0}, //Bank 24, AIL (When Two Worlds War :: 4op, MISSING INSTRUMENTS) - {0, 1, 1, 0, 0}, //Bank 25, AIL (Bards Tale Construction :: MISSING INSTRUMENTS) + {0, 1, 1, 0, 0}, //Bank 24, AIL (When Two Worlds War :MISS-INS:) + {0, 1, 1, 0, 0}, //Bank 25, AIL (Bards Tale Construction :MISS-INS:) {0, 1, 1, 0, 0}, //Bank 26, AIL (Return to Zork) {0, 1, 1, 0, 0}, //Bank 27, AIL (Theme Hospital) {0, 1, 1, 0, 0}, //Bank 28, AIL (National Hockey League PA) @@ -10451,25 +10451,25 @@ const AdlBankSetup adlbanksetup[74] = {0, 1, 1, 0, 0}, //Bank 33, AIL (Death Gate) {0, 1, 1, 0, 0}, //Bank 34, AIL (FIFA International Soccer) {0, 1, 1, 0, 0}, //Bank 35, AIL (Starship Invasion) - {0, 1, 1, 0, 0}, //Bank 36, AIL (Super Street Fighter 2 :: 4op) - {0, 1, 1, 0, 0}, //Bank 37, AIL (Lords of the Realm :: MISSING INSTRUMENTS) + {0, 1, 1, 0, 0}, //Bank 36, AIL (Super Street Fighter 2 :4op:) + {0, 1, 1, 0, 0}, //Bank 37, AIL (Lords of the Realm :MISS-INS:) {0, 1, 1, 0, 0}, //Bank 38, AIL (SimFarm, SimHealth :: 4op) {0, 1, 1, 0, 0}, //Bank 39, AIL (SimFarm, Settlers, Serf City) - {0, 1, 1, 0, 0}, //Bank 40, AIL (Caesar 2 :: partially 4op, MISSING INSTRUMENTS) + {0, 1, 1, 0, 0}, //Bank 40, AIL (Caesar 2, :p4op::MISS-INS:) {0, 1, 1, 0, 0}, //Bank 41, AIL (Syndicate Wars) {0, 1, 1, 0, 0}, //Bank 42, AIL (Bubble Bobble Feat. Rainbow Islands, Z) {0, 1, 1, 0, 0}, //Bank 43, AIL (Warcraft) - {0, 1, 1, 0, 0}, //Bank 44, AIL (Terra Nova Strike Force Centuri :: partially 4op) - {0, 1, 1, 0, 0}, //Bank 45, AIL (System Shock :: partially 4op) + {0, 1, 1, 0, 0}, //Bank 44, AIL (Terra Nova Strike Force Centuri :p4op:) + {0, 1, 1, 0, 0}, //Bank 45, AIL (System Shock :p4op:) {0, 1, 1, 0, 0}, //Bank 46, AIL (Advanced Civilization) - {0, 1, 1, 0, 0}, //Bank 47, AIL (Battle Chess 4000 :: partially 4op, melodic only) - {0, 1, 1, 0, 0}, //Bank 48, AIL (Ultimate Soccer Manager :: partially 4op) - {0, 1, 1, 0, 0}, //Bank 49, AIL (Air Bucks, Blue And The Gray, America Invades, Terminator 2029) + {0, 1, 1, 0, 0}, //Bank 47, AIL (Battle Chess 4000 :p4op:) + {0, 1, 1, 0, 0}, //Bank 48, AIL (Ultimate Soccer Manager :p4op:) + {0, 1, 1, 0, 0}, //Bank 49, AIL (Air Bucks, Blue And The Gray, etc) {0, 1, 1, 0, 0}, //Bank 50, AIL (Ultima Underworld 2) {0, 1, 1, 0, 0}, //Bank 51, AIL (Kasparov's Gambit) - {0, 1, 1, 0, 0}, //Bank 52, AIL (High Seas Trader :: MISSING INSTRUMENTS) - {0, 0, 0, 0, 0}, //Bank 53, AIL (Master of Magic, Master of Orion 2 :: 4op, std percussion) - {0, 0, 0, 0, 0}, //Bank 54, AIL (Master of Magic, Master of Orion 2 :: 4op, orchestral percussion) + {0, 1, 1, 0, 0}, //Bank 52, AIL (High Seas Trader :MISS-INS:) + {0, 0, 0, 0, 0}, //Bank 53, AIL (Master of Magic, :4op: std percussion) + {0, 0, 0, 0, 0}, //Bank 54, AIL (Master of Magic, :4op: orchestral percussion) {0, 0, 0, 0, 0}, //Bank 55, SB (Action Soccer) {0, 0, 0, 0, 0}, //Bank 56, SB (3d Cyberpuck :: melodic only) {0, 0, 0, 0, 0}, //Bank 57, SB (Simon the Sorcerer :: melodic only) From 2d79d187d506c67ada6a31710332936ed2a2ad1b Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 28 Mar 2018 20:37:55 +0300 Subject: [PATCH 7/7] OPNMIDI: Remove std:: from all snprintf calls --- src/sound/opnmidi/opnmidi_midiplay.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sound/opnmidi/opnmidi_midiplay.cpp b/src/sound/opnmidi/opnmidi_midiplay.cpp index 58c4c350a..cd77429d8 100644 --- a/src/sound/opnmidi/opnmidi_midiplay.cpp +++ b/src/sound/opnmidi/opnmidi_midiplay.cpp @@ -280,7 +280,7 @@ bool OPNMIDIplay::buildTrackData() evtPos.delay = ReadVarLenEx(&trackPtr, end, ok); if(!ok) { - int len = std::snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); + int len = snprintf(error, 150, "buildTrackData: Can't read variable-length value at begin of track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -308,7 +308,7 @@ bool OPNMIDIplay::buildTrackData() event = parseEvent(&trackPtr, end, status); if(!event.isValid) { - int len = std::snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); + int len = snprintf(error, 150, "buildTrackData: Fail to parse event in the track %d.\n", (int)tk); if((len > 0) && (len < 150)) errorString += std::string(error, (size_t)len); return false; @@ -2567,12 +2567,12 @@ retry_arpeggio: // if(ains.tone) // { // /*if(ains.tone < 20) -// std::snprintf(ToneIndication, 8, "+%-2d", ains.tone); +// snprintf(ToneIndication, 8, "+%-2d", ains.tone); // else*/ // if(ains.tone < 128) -// std::snprintf(ToneIndication, 8, "=%-2d", ains.tone); +// snprintf(ToneIndication, 8, "=%-2d", ains.tone); // else -// std::snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); +// snprintf(ToneIndication, 8, "-%-2d", ains.tone - 128); // } // std::printf("%s%s%s%u\t", // ToneIndication,