Merge branch 'finalburnneo-master'

This commit is contained in:
barbudreadmon 2024-10-29 08:52:34 +01:00
commit 346c1a50a1
13 changed files with 1045 additions and 437 deletions

View File

@ -172,8 +172,8 @@ INT32 CpsRunInit()
if (QsndInit()) {
return 1;
}
QsndSetRoute(BURN_SND_QSND_OUTPUT_1, 1.00, BURN_SND_ROUTE_LEFT);
QsndSetRoute(BURN_SND_QSND_OUTPUT_2, 1.00, BURN_SND_ROUTE_RIGHT);
QsndSetRoute(BURN_SND_QSND_OUTPUT_1, 2.00, BURN_SND_ROUTE_LEFT);
QsndSetRoute(BURN_SND_QSND_OUTPUT_2, 2.00, BURN_SND_ROUTE_RIGHT);
}
if (Cps == 2 || PangEEP || Cps1Qs == 1 || CpsBootlegEEPROM) EEPROMReset();

View File

@ -1277,12 +1277,12 @@ STD_ROM_PICK(Hbarrel)
STD_ROM_FN(Hbarrel)
// Heavy Barrel (US)
// Heavy Barrel (US, revision 3)
// DE-0297-1 main board, DE-0299-0 sub/rom board
static struct BurnRomInfo HbarreluRomDesc[] = {
{ "heavy_barrel_04.3c", 0x10000, 0x4877b09e, BRF_ESS | BRF_PRG }, // 0 68000 Program Code
{ "heavy_barrel_01.3a", 0x10000, 0x8b41c219, BRF_ESS | BRF_PRG }, // 1
{ "heavy_barrel_04-3u.3c", 0x10000, 0xc8d26d56, BRF_ESS | BRF_PRG }, // 0 68000 Program Code
{ "heavy_barrel_01-3u.3a", 0x10000, 0xae05753e, BRF_ESS | BRF_PRG }, // 1
{ "heavy_barrel_05.4c", 0x10000, 0x2087d570, BRF_ESS | BRF_PRG }, // 2
{ "heavy_barrel_02.4a", 0x10000, 0x815536ae, BRF_ESS | BRF_PRG }, // 3
{ "heavy_barrel_06.6c", 0x10000, 0xda4e3fbc, BRF_ESS | BRF_PRG }, // 4
@ -1328,6 +1328,56 @@ STD_ROM_PICK(Hbarrelu)
STD_ROM_FN(Hbarrelu)
// Heavy Barrel (US, revision 1)
static struct BurnRomInfo HbarreluaRomDesc[] = {
{ "heavy_barrel_04-1.3c", 0x10000, 0x4877b09e, BRF_ESS | BRF_PRG }, // 0 68000 Program Code
{ "heavy_barrel_01-1.3a", 0x10000, 0x8b41c219, BRF_ESS | BRF_PRG }, // 1
{ "heavy_barrel_05.4c", 0x10000, 0x2087d570, BRF_ESS | BRF_PRG }, // 2
{ "heavy_barrel_02.4a", 0x10000, 0x815536ae, BRF_ESS | BRF_PRG }, // 3
{ "heavy_barrel_06.6c", 0x10000, 0xda4e3fbc, BRF_ESS | BRF_PRG }, // 4
{ "heavy_barrel_03.6a", 0x10000, 0x7fed7c46, BRF_ESS | BRF_PRG }, // 5
{ "heavy_barrel_07.8a", 0x08000, 0xa127f0f7, BRF_ESS | BRF_PRG }, // 6 6502 Program
{ "heavy_barrel_25.15h", 0x10000, 0x8649762c, BRF_GRA }, // 7 Characters
{ "heavy_barrel_26.16h", 0x10000, 0xf8189bbd, BRF_GRA }, // 8
{ "heavy_barrel_18.14d", 0x10000, 0xef664373, BRF_GRA }, // 9 Tiles 1
{ "heavy_barrel_17.12d", 0x10000, 0xa4f186ac, BRF_GRA }, // 10
{ "heavy_barrel_20.17d", 0x10000, 0x2fc13be0, BRF_GRA }, // 11
{ "heavy_barrel_19.15d", 0x10000, 0xd6b47869, BRF_GRA }, // 12
{ "heavy_barrel_22.14f", 0x10000, 0x50d6a1ad, BRF_GRA }, // 13
{ "heavy_barrel_21.12f", 0x10000, 0xf01d75c5, BRF_GRA }, // 14
{ "heavy_barrel_24.17f", 0x10000, 0xae377361, BRF_GRA }, // 15
{ "heavy_barrel_23.15f", 0x10000, 0xbbdaf771, BRF_GRA }, // 16
{ "heavy_barrel_29.8h", 0x10000, 0x5514b296, BRF_GRA }, // 17 Tiles 2
{ "heavy_barrel_30.9h", 0x10000, 0x5855e8ef, BRF_GRA }, // 18
{ "heavy_barrel_27.8f", 0x10000, 0x99db7b9c, BRF_GRA }, // 19
{ "heavy_barrel_28.9f", 0x10000, 0x33ce2b1a, BRF_GRA }, // 20
{ "heavy_barrel_15.16c", 0x10000, 0x21816707, BRF_GRA }, // 21 Sprites
{ "heavy_barrel_16.17c", 0x10000, 0xa5684574, BRF_GRA }, // 22
{ "heavy_barrel_11.16a", 0x10000, 0x5c768315, BRF_GRA }, // 23
{ "heavy_barrel_12.17a", 0x10000, 0x8b64d7a4, BRF_GRA }, // 24
{ "heavy_barrel_13.13c", 0x10000, 0x56e3ed65, BRF_GRA }, // 25
{ "heavy_barrel_14.14c", 0x10000, 0xbedfe7f3, BRF_GRA }, // 26
{ "heavy_barrel_09.13a", 0x10000, 0x26240ea0, BRF_GRA }, // 27
{ "heavy_barrel_10.14a", 0x10000, 0x47d95447, BRF_GRA }, // 28
{ "heavy_barrel_08.2c", 0x10000, 0x645c5b68, BRF_SND }, // 29 Samples
{ "heavy_barrel_31.9a", 0x01000, 0x239d726f, BRF_ESS | BRF_PRG }, // 30 I8751
{ "mb7116e.12c", 0x00200, 0x86e775f8, BRF_OPT }, // 31 PROMs
{ "mb7122e.17e", 0x00400, 0xa5cda23e, BRF_OPT }, // 32
};
STD_ROM_PICK(Hbarrelua)
STD_ROM_FN(Hbarrelua)
// Hippodrome (US)
static struct BurnRomInfo HippodrmRomDesc[] = {
@ -5998,7 +6048,7 @@ struct BurnDriver BurnDrvHbarrel = {
struct BurnDriver BurnDrvHbarrelu = {
"hbarrelu", "hbarrel", NULL, NULL, "1987",
"Heavy Barrel (US)\0", NULL, "Data East USA", "DEC0",
"Heavy Barrel (US, revision 3)\0", NULL, "Data East USA", "DEC0",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_HISCORE_SUPPORTED, 2, HARDWARE_PREFIX_DATAEAST, GBF_RUNGUN, 0,
NULL, HbarreluRomInfo, HbarreluRomName, NULL, NULL, NULL, NULL, HbarrelInputInfo, HbarrelDIPInfo,
@ -6006,6 +6056,16 @@ struct BurnDriver BurnDrvHbarrelu = {
NULL, 0x400, 240, 256, 3, 4
};
struct BurnDriver BurnDrvHbarrelua = {
"hbarrelua", "hbarrel", NULL, NULL, "1987",
"Heavy Barrel (US, revision 1)\0", NULL, "Data East USA", "DEC0",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_ORIENTATION_VERTICAL | BDF_HISCORE_SUPPORTED, 2, HARDWARE_PREFIX_DATAEAST, GBF_RUNGUN, 0,
NULL, HbarreluaRomInfo, HbarreluaRomName, NULL, NULL, NULL, NULL, HbarrelInputInfo, HbarrelDIPInfo,
HbarrelInit, BaddudesExit, DrvFrame, HbarrelDraw, BaddudesScan,
NULL, 0x400, 240, 256, 3, 4
};
struct BurnDriver BurnDrvHippodrm = {
"hippodrm", NULL, NULL, NULL, "1989",
"Hippodrome (US)\0", NULL, "Data East USA", "DEC0",

View File

@ -120,6 +120,62 @@ static struct BurnDIPInfo DietgoDIPList[]=
STDDIPINFO(Dietgo)
static struct BurnDIPInfo DietgonDIPList[]=
{
{0x14, 0xff, 0xff, 0xff, NULL },
{0x15, 0xff, 0xff, 0xff, NULL },
{0 , 0xfe, 0 , 8, "Coin A" },
{0x14, 0x01, 0x07, 0x00, "3 Coins 1 Credits" },
{0x14, 0x01, 0x07, 0x01, "2 Coins 1 Credits" },
{0x14, 0x01, 0x07, 0x07, "1 Coin 1 Credits" },
{0x14, 0x01, 0x07, 0x06, "1 Coin 2 Credits" },
{0x14, 0x01, 0x07, 0x05, "1 Coin 3 Credits" },
{0x14, 0x01, 0x07, 0x04, "1 Coin 4 Credits" },
{0x14, 0x01, 0x07, 0x03, "1 Coin 5 Credits" },
{0x14, 0x01, 0x07, 0x02, "1 Coin 6 Credits" },
{0 , 0xfe, 0 , 8, "Coin B" },
{0x14, 0x01, 0x38, 0x00, "3 Coins 1 Credits" },
{0x14, 0x01, 0x38, 0x08, "2 Coins 1 Credits" },
{0x14, 0x01, 0x38, 0x38, "1 Coin 1 Credits" },
{0x14, 0x01, 0x38, 0x30, "1 Coin 2 Credits" },
{0x14, 0x01, 0x38, 0x28, "1 Coin 3 Credits" },
{0x14, 0x01, 0x38, 0x20, "1 Coin 4 Credits" },
{0x14, 0x01, 0x38, 0x18, "1 Coin 5 Credits" },
{0x14, 0x01, 0x38, 0x10, "1 Coin 6 Credits" },
{0 , 0xfe, 0 , 2, "Flip Screen" },
{0x14, 0x01, 0x40, 0x40, "Off" },
{0x14, 0x01, 0x40, 0x00, "On" },
{0 , 0xfe, 0 , 2, "Continue Coin" },
{0x14, 0x01, 0x80, 0x80, "1 Start/1 Continue" },
{0x14, 0x01, 0x80, 0x00, "2 Start/1 Continue" },
{0 , 0xfe, 0 , 4, "Lives" },
{0x15, 0x01, 0x03, 0x01, "1" },
{0x15, 0x01, 0x03, 0x00, "2" },
{0x15, 0x01, 0x03, 0x03, "3" },
{0x15, 0x01, 0x03, 0x02, "4" },
{0 , 0xfe, 0 , 4, "Difficulty" },
{0x15, 0x01, 0x0c, 0x08, "Easy" },
{0x15, 0x01, 0x0c, 0x0c, "Normal" },
{0x15, 0x01, 0x0c, 0x04, "Hard" },
{0x15, 0x01, 0x0c, 0x00, "Hardest" },
{0 , 0xfe, 0 , 2, "Free Play" },
{0x15, 0x01, 0x10, 0x10, "Off" },
{0x15, 0x01, 0x10, 0x00, "On" },
{0 , 0xfe, 0 , 2, "Alternative graphics" },
{0x15, 0x01, 0x20, 0x20, "Off" },
{0x15, 0x01, 0x20, 0x00, "On" },
};
STDDIPINFO(Dietgon)
static void __fastcall dietgogo_main_write_word(UINT32 address, UINT16 data)
{
deco16_write_control_word(0, address, 0x200000, data)
@ -479,24 +535,24 @@ static INT32 DrvScan(INT32 nAction, INT32 *pnMin)
}
// Diet Go Go (Europe v1.1 1992.09.26 v3)
// Diet Go Go (Europe v1.1 1992.09.26, set 1)
static struct BurnRomInfo dietgoRomDesc[] = {
{ "jy_00-3.4h", 0x040000, 0xa863ad0c, 1 | BRF_PRG | BRF_ESS }, // 0 68k Code
{ "jy_01-3.5h", 0x040000, 0xef243eda, 1 | BRF_PRG | BRF_ESS }, // 1
{ "jy_00-3.4h", 0x040000, 0xa863ad0c, 1 | BRF_PRG | BRF_ESS }, // 0 68k Code
{ "jy_01-3.5h", 0x040000, 0xef243eda, 1 | BRF_PRG | BRF_ESS }, // 1
{ "jy_02.14m", 0x010000, 0x4e3492a5, 2 | BRF_PRG | BRF_ESS }, // 2 Huc6280 Code
{ "jy_02.14m", 0x010000, 0x4e3492a5, 2 | BRF_PRG | BRF_ESS }, // 2 Huc6280 Code
{ "may-00.10a", 0x100000, 0x234d1f8d, 3 | BRF_GRA }, // 3 Characters & Background Tiles
{ "may-00.10a", 0x100000, 0x234d1f8d, 3 | BRF_GRA }, // 3 Characters & Background Tiles
{ "may-01.14a", 0x100000, 0x2da57d04, 4 | BRF_GRA }, // 4 Sprites
{ "may-02.16a", 0x100000, 0x3a66a713, 4 | BRF_GRA }, // 5
{ "may-04_w78_9235kd011.14a", 0x100000, 0xdedd2dd3, 4 | BRF_GRA }, // 4 Sprites
{ "may-05_w79_9235kd019.16a", 0x100000, 0xcb23835f, 4 | BRF_GRA }, // 5
{ "may-03.11l", 0x080000, 0xb6e42bae, 5 | BRF_SND }, // 6 OKI M6295 Samples
{ "may-03.11l", 0x080000, 0xb6e42bae, 5 | BRF_SND }, // 6 OKI M6295 Samples
{ "pal16l8b_vd-00.6h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 7 PLDs
{ "pal16l8b_vd-01.7h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 8
{ "pal16r6a_vd-02.11h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 9
{ "pal16l8b_vd-00.6h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 7 PLDs
{ "pal16l8b_vd-01.7h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 8
{ "pal16r6a_vd-02.11h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 9
};
STD_ROM_PICK(dietgo)
@ -504,20 +560,20 @@ STD_ROM_FN(dietgo)
struct BurnDriver BurnDrvDietgo = {
"dietgo", NULL, NULL, NULL, "1992",
"Diet Go Go (Europe v1.1 1992.09.26 v3)\0", NULL, "Data East Corporation", "DECO IC16",
"Diet Go Go (Europe v1.1 1992.09.26, set 1)\0", NULL, "Data East Corporation", "DECO IC16",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_HISCORE_SUPPORTED, 2, HARDWARE_PREFIX_DATAEAST, GBF_PLATFORM, 0,
NULL, dietgoRomInfo, dietgoRomName, NULL, NULL, NULL, NULL, DietgoInputInfo, DietgoDIPInfo,
NULL, dietgoRomInfo, dietgoRomName, NULL, NULL, NULL, NULL, DietgoInputInfo, DietgonDIPInfo,
DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x300,
320, 240, 4, 3
};
// Diet Go Go (Europe v1.1 1992.09.26 v2)
// Diet Go Go (Europe v1.1 1992.09.26, set 2)
static struct BurnRomInfo dietgoeRomDesc[] = {
{ "jy_00-2.4h", 0x040000, 0x014dcf62, 1 | BRF_PRG | BRF_ESS }, // 0 68k Code
{ "jy_01-2.5h", 0x040000, 0x793ebd83, 1 | BRF_PRG | BRF_ESS }, // 1
{ "jy_00-3.4h", 0x040000, 0xa863ad0c, 1 | BRF_PRG | BRF_ESS }, // 0 68k Code
{ "jy_01-3.5h", 0x040000, 0xef243eda, 1 | BRF_PRG | BRF_ESS }, // 1
{ "jy_02.14m", 0x010000, 0x4e3492a5, 2 | BRF_PRG | BRF_ESS }, // 2 Huc6280 Code
@ -538,7 +594,7 @@ STD_ROM_FN(dietgoe)
struct BurnDriver BurnDrvDietgoe = {
"dietgoe", "dietgo", NULL, NULL, "1992",
"Diet Go Go (Europe v1.1 1992.09.26 v2)\0", NULL, "Data East Corporation", "DECO IC16",
"Diet Go Go (Europe v1.1 1992.09.26, set 2)\0", NULL, "Data East Corporation", "DECO IC16",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_PREFIX_DATAEAST, GBF_PLATFORM, 0,
NULL, dietgoeRomInfo, dietgoeRomName, NULL, NULL, NULL, NULL, DietgoInputInfo, DietgoDIPInfo,
@ -547,11 +603,11 @@ struct BurnDriver BurnDrvDietgoe = {
};
// Diet Go Go (Europe v1.1 1992.08.04)
// Diet Go Go (Europe v1.1 1992.09.26, set 3)
static struct BurnRomInfo dietgoeaRomDesc[] = {
{ "jy_00-1.4h", 0x040000, 0x8bce137d, 1 | BRF_PRG | BRF_ESS }, // 0 68k Code
{ "jy_01-1.5h", 0x040000, 0xeca50450, 1 | BRF_PRG | BRF_ESS }, // 1
{ "jy_00-2.4h", 0x040000, 0x014dcf62, 1 | BRF_PRG | BRF_ESS }, // 0 68k Code
{ "jy_01-2.5h", 0x040000, 0x793ebd83, 1 | BRF_PRG | BRF_ESS }, // 1
{ "jy_02.14m", 0x010000, 0x4e3492a5, 2 | BRF_PRG | BRF_ESS }, // 2 Huc6280 Code
@ -572,7 +628,7 @@ STD_ROM_FN(dietgoea)
struct BurnDriver BurnDrvDietgoea = {
"dietgoea", "dietgo", NULL, NULL, "1992",
"Diet Go Go (Europe v1.1 1992.08.04)\0", NULL, "Data East Corporation", "DECO IC16",
"Diet Go Go (Europe v1.1 1992.09.26, set 3)\0", NULL, "Data East Corporation", "DECO IC16",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_PREFIX_DATAEAST, GBF_PLATFORM, 0,
NULL, dietgoeaRomInfo, dietgoeaRomName, NULL, NULL, NULL, NULL, DietgoInputInfo, DietgoDIPInfo,
@ -581,6 +637,40 @@ struct BurnDriver BurnDrvDietgoea = {
};
// Diet Go Go (Europe v1.1 1992.08.04)
static struct BurnRomInfo dietgoebRomDesc[] = {
{ "jy_00-1.4h", 0x040000, 0x8bce137d, 1 | BRF_PRG | BRF_ESS }, // 0 68k Code
{ "jy_01-1.5h", 0x040000, 0xeca50450, 1 | BRF_PRG | BRF_ESS }, // 1
{ "jy_02.14m", 0x010000, 0x4e3492a5, 2 | BRF_PRG | BRF_ESS }, // 2 Huc6280 Code
{ "may-00.10a", 0x100000, 0x234d1f8d, 3 | BRF_GRA }, // 3 Characters & Background Tiles
{ "may-01.14a", 0x100000, 0x2da57d04, 4 | BRF_GRA }, // 4 Sprites
{ "may-02.16a", 0x100000, 0x3a66a713, 4 | BRF_GRA }, // 5
{ "may-03.11l", 0x080000, 0xb6e42bae, 5 | BRF_SND }, // 6 OKI M6295 Samples
{ "pal16l8b_vd-00.6h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 7 PLDs
{ "pal16l8b_vd-01.7h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 8
{ "pal16r6a_vd-02.11h", 0x000104, 0x00000000, 6 | BRF_NODUMP }, // 9
};
STD_ROM_PICK(dietgoeb)
STD_ROM_FN(dietgoeb)
struct BurnDriver BurnDrvDietgoeb = {
"dietgoeb", "dietgo", NULL, NULL, "1992",
"Diet Go Go (Europe v1.1 1992.08.04)\0", NULL, "Data East Corporation", "DECO IC16",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_HISCORE_SUPPORTED, 2, HARDWARE_PREFIX_DATAEAST, GBF_PLATFORM, 0,
NULL, dietgoebRomInfo, dietgoebRomName, NULL, NULL, NULL, NULL, DietgoInputInfo, DietgoDIPInfo,
DrvInit, DrvExit, DrvFrame, DrvDraw, DrvScan, &DrvRecalc, 0x300,
320, 240, 4, 3
};
// Diet Go Go (USA v1.1 1992.09.26)
static struct BurnRomInfo dietgouRomDesc[] = {

File diff suppressed because it is too large Load Diff

View File

@ -325,6 +325,32 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,105,40,50,14
END
IDD_HARDFXSETTINGS DIALOGEX 0, 0, 214, 169
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "HardFX shader options"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "Option #1", IDC_SPRITE1, 3, 36*0, 208, 35
CONTROL "Value",IDC_HARDFX_SLIDER1,"msctls_trackbar32", WS_TABSTOP, 5, 36*0+10, 160, 18
EDITTEXT IDC_HARDFX_SLIDER_EDIT1,167,36*0+10,35,14,SS_CENTERIMAGE
GROUPBOX "Option #2", IDC_SPRITE2, 3, 36*1, 208, 35
CONTROL "Value",IDC_HARDFX_SLIDER2,"msctls_trackbar32", WS_TABSTOP, 5, 36*1+10, 160, 18
EDITTEXT IDC_HARDFX_SLIDER_EDIT2,167,36*1+10,35,14,SS_CENTERIMAGE
GROUPBOX "Option #3", IDC_SPRITE3, 3, 36*2, 208, 35
CONTROL "Value",IDC_HARDFX_SLIDER3,"msctls_trackbar32", WS_TABSTOP, 5, 36*2+10, 160, 18
EDITTEXT IDC_HARDFX_SLIDER_EDIT3,167,36*2+10,35,14,SS_CENTERIMAGE
GROUPBOX "Option #4", IDC_SPRITE4, 3, 36*3, 208, 35
CONTROL "Value",IDC_HARDFX_SLIDER4,"msctls_trackbar32", WS_TABSTOP, 5, 36*3+10, 160, 18
EDITTEXT IDC_HARDFX_SLIDER_EDIT4,167,36*3+10,35,14,SS_CENTERIMAGE
PUSHBUTTON "Defaults",IDRETRY,52,150,50,14
DEFPUSHBUTTON "OK",IDOK,158,150,50,14
PUSHBUTTON "Cancel",IDCANCEL,105,150,50,14
END
IDD_SCANLINE DIALOGEX 0, 0, 214, 59
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select desired scanline intensity"
@ -1455,6 +1481,7 @@ BEGIN
MENUITEM "CRT Bicubic", MENU_DX9_ALT_HARD_FX_CRT_BICUBIC
MENUITEM "CRT Retro Scanlines", MENU_DX9_ALT_HARD_FX_CRT_RETROSL
MENUITEM "CRT CGA", MENU_DX9_ALT_HARD_FX_CRT_CGA
MENUITEM "Selected Shader's Settings", MENU_DX9_ALT_HARD_FX_SETTINGS
END
POPUP "SoftFX algorithm"
BEGIN

View File

@ -422,6 +422,7 @@ int StatedSave(int nSlot);
// numdial.cpp
int NumDialCreate(int bDial);
void GammaDialog();
void HardFXShaderSettingsDialog();
void ScanlineDialog();
void PhosphorDialog();
void ScreenAngleDialog();

View File

@ -23,6 +23,15 @@ struct VidPresetDataVer VidPresetVer[4] = {
// last one set at desktop resolution
};
static void HardFXLoadDefaults()
{
int totalHardFX = MENU_DX9_ALT_HARD_FX_LAST - MENU_DX9_ALT_HARD_FX_NONE;
for (int thfx = 0; thfx < totalHardFX; thfx++) {
HardFXConfigs[thfx].hardfx_config_load_defaults();
}
}
static void CreateConfigName(TCHAR* szConfig)
{
_stprintf(szConfig, _T("config/%s.ini"), szAppExeName);
@ -40,6 +49,8 @@ int ConfigAppLoad()
setlocale(LC_ALL, "");
#endif
HardFXLoadDefaults();
CreateConfigName(szConfig);
if ((h = _tfopen(szConfig, _T("rt"))) == NULL) {
@ -165,6 +176,21 @@ int ConfigAppLoad()
VAR(bVidMotionBlur);
VAR(bVidForce16bitDx9Alt);
{
int totalHardFX = MENU_DX9_ALT_HARD_FX_LAST - MENU_DX9_ALT_HARD_FX_NONE;
for (int thfx = 0; thfx < totalHardFX; thfx++) {
// for each fx, check if it has settings that needs to be saved
for (int thfx_option = 0; thfx_option < HardFXConfigs[thfx].nOptions; thfx_option++) {
TCHAR szLabel[64];
_stprintf(szLabel, _T("HardFXOption[%d][%d]"), thfx, thfx_option);
TCHAR* szValue = LabelCheck(szLine, szLabel);
if (szValue) HardFXConfigs[thfx].fOptions[thfx_option] = _tcstod(szValue, NULL);
}
}
}
// Sound
VAR(nAudSelect);
VAR(nAudVolume);
@ -519,6 +545,19 @@ int ConfigAppSave()
_ftprintf(h, _T("\n// If non-zero, force 16 bit emulation even in 32-bit screenmodes\n"));
VAR(bVidForce16bitDx9Alt);
_ftprintf(h, _T("\n// HardFX shader options\n"));
{
int totalHardFX = MENU_DX9_ALT_HARD_FX_LAST - MENU_DX9_ALT_HARD_FX_NONE;
for (int thfx = 0; thfx < totalHardFX; thfx++) {
// for each fx, check if it has settings that needs to be saved
for (int thfx_option = 0; thfx_option < HardFXConfigs[thfx].nOptions; thfx_option++) {
_ftprintf(h, _T("HardFXOption[%d][%d] %lf\n"), thfx, thfx_option, HardFXConfigs[thfx].fOptions[thfx_option]);
}
}
}
_ftprintf(h, _T("\n\n\n"));
_ftprintf(h, _T("// --- Sound ------------------------------------------------------------------\n"));
_ftprintf(h, _T("\n// The selected audio plugin\n"));

View File

@ -789,6 +789,11 @@ void MenuUpdate()
CheckMenuItem(hMenu, MENU_DX9_ALT_HARDWAREVERTEX, (bVidHardwareVertex) ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(hMenu, MENU_DX9_ALT_MOTIONBLUR, (bVidMotionBlur) ? MF_CHECKED : MF_UNCHECKED);
CheckMenuRadioItem(hMenu, MENU_DX9_ALT_HARD_FX_NONE, MENU_DX9_ALT_HARD_FX_LAST, MENU_DX9_ALT_HARD_FX_NONE + nVidDX9HardFX, MF_BYCOMMAND);
// Enable HardFX Settings if we have options!
bool hFXDisabled = (nVidDX9HardFX == 0) || (HardFXConfigs[nVidDX9HardFX].nOptions == 0);
EnableMenuItem(hMenu, MENU_DX9_ALT_HARD_FX_SETTINGS, hFXDisabled ? (MF_GRAYED | MF_BYCOMMAND) : (MF_ENABLED | MF_BYCOMMAND));
CheckMenuItem(hMenu, MENU_DX9_ALT_FORCE_16BIT, bVidForce16bitDx9Alt ? MF_CHECKED : MF_UNCHECKED);
break;
}

View File

@ -7,6 +7,31 @@ const double RADTODEG = 57.29577951308232286465f; // Radians to Degrees
static int nExitStatus;
static bool bIsProperFloatString(TCHAR *szText)
{
bool bValid = 1;
bool bPoint = 0;
if (_tcslen(szText) == 0) return 0;
// Scan string in the edit control for illegal characters
for (int i = 0; szText[i]; i++) {
if (szText[i] == _T('.')) {
if (bPoint) {
bValid = 0;
break;
}
} else {
if (!_istdigit(szText[i])) {
bValid = 0;
break;
}
}
}
return bValid;
}
// -----------------------------------------------------------------------------
static INT_PTR CALLBACK DefInpProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM)
@ -49,6 +74,201 @@ int NumDialCreate(int)
return 1;
}
// -----------------------------------------------------------------------------
// HardFX Shader Settings dialog
static void HardFXUpdateValues(HWND hDlg)
{
for (int i = 0; i < 4; i++) { // 4 edit controls!
TCHAR szText[18];
int SLIDER_ID = IDC_HARDFX_SLIDER1 + i;
int SLIDER_EDIT_ID = IDC_HARDFX_SLIDER_EDIT1 + i;
int f2i = HardFXConfigs[nVidDX9HardFX].fOptions[i] * 10000;
float temp = HardFXConfigs[nVidDX9HardFX].fOptions[i];
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETPOS, (WPARAM)true, (LPARAM)f2i);
_stprintf(szText, _T("%0.2f"), temp);
SendDlgItemMessage(hDlg, SLIDER_EDIT_ID, WM_SETTEXT, (WPARAM)0, (LPARAM)szText);
}
}
static INT_PTR CALLBACK HardFXShaderSettingsProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam) // LPARAM lParam
{
static float nPrevSettings[4]; // for the "Cancel" button
int SLIDER_ID;
int SLIDER_ID_RAW;
int SLIDER_EDIT_ID;
switch (Msg) {
case WM_INITDIALOG: {
// back-up settings for "cancel" option
nPrevSettings[0] = HardFXConfigs[nVidDX9HardFX].fOptions[0];
nPrevSettings[1] = HardFXConfigs[nVidDX9HardFX].fOptions[1];
nPrevSettings[2] = HardFXConfigs[nVidDX9HardFX].fOptions[2];
nPrevSettings[3] = HardFXConfigs[nVidDX9HardFX].fOptions[3];
nExitStatus = 0;
WndInMid(hDlg, hScrnWnd);
for (int i = 0; i < 4; i++) { // 4 edit controls!
// Initialise option
SLIDER_ID = IDC_HARDFX_SLIDER1 + i;
SLIDER_EDIT_ID = IDC_HARDFX_SLIDER_EDIT1 + i;
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETRANGE, (WPARAM)0, (LPARAM)MAKELONG(1, 20000));
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETLINESIZE, (WPARAM)0, (LPARAM)200);
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETPAGESIZE, (WPARAM)0, (LPARAM)250);
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETTIC, (WPARAM)0, (LPARAM)7500);
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETTIC, (WPARAM)0, (LPARAM)10001);
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETTIC, (WPARAM)0, (LPARAM)12500);
// Set Controlbox heading
TCHAR szHeading[255] = _T("Not Available");
HWND hHeading = GetDlgItem(hDlg, IDC_SPRITE1 + i);
SetWindowText(hHeading, (i < HardFXConfigs[nVidDX9HardFX].nOptions) ? ANSIToTCHAR(HardFXConfigs[nVidDX9HardFX].szOptions[i], NULL, 0) : szHeading);
if (i >= HardFXConfigs[nVidDX9HardFX].nOptions) {
EnableWindow(hHeading, FALSE);
HWND hSlider = GetDlgItem(hDlg, SLIDER_ID);
HWND hSliderEdit = GetDlgItem(hDlg, SLIDER_EDIT_ID);
EnableWindow(hSlider, FALSE);
EnableWindow(hSliderEdit, FALSE);
}
}
HardFXUpdateValues(hDlg);
// Update the screen
if (bVidOkay) {
VidRedraw();
VidPaint(0);
}
return TRUE;
}
case WM_COMMAND: {
switch (HIWORD(wParam)) {
case BN_CLICKED: {
if (LOWORD(wParam) == IDOK) {
nExitStatus = 1;
SendMessage(hDlg, WM_CLOSE, 0, 0);
}
if (LOWORD(wParam) == IDCANCEL) {
nExitStatus = -1;
SendMessage(hDlg, WM_CLOSE, 0, 0);
}
if (LOWORD(wParam) == IDRETRY) { // [Defaults] Button is here!
HardFXConfigs[nVidDX9HardFX].hardfx_config_load_defaults();
HardFXUpdateValues(hDlg);
}
break;
}
case EN_UPDATE: {
SLIDER_ID = -1;
SLIDER_EDIT_ID = -1;
switch (LOWORD(wParam)) {
case IDC_HARDFX_SLIDER_EDIT1:
case IDC_HARDFX_SLIDER_EDIT2:
case IDC_HARDFX_SLIDER_EDIT3:
case IDC_HARDFX_SLIDER_EDIT4:
SLIDER_EDIT_ID = LOWORD(wParam);
SLIDER_ID = IDC_HARDFX_SLIDER1 + (SLIDER_EDIT_ID - IDC_HARDFX_SLIDER_EDIT1);
SLIDER_ID_RAW = SLIDER_ID - IDC_HARDFX_SLIDER1;
break;
}
if (nExitStatus == 0 && SLIDER_ID != -1) {
TCHAR szText[18] = _T("");
bool bValid = 1;
if (SendDlgItemMessage(hDlg, SLIDER_EDIT_ID, WM_GETTEXTLENGTH, (WPARAM)0, (LPARAM)0) < 16) {
SendDlgItemMessage(hDlg, SLIDER_EDIT_ID, WM_GETTEXT, (WPARAM)16, (LPARAM)szText);
}
bValid = bIsProperFloatString(szText);
if (bValid) {
float fTemp = _tcstod(szText, NULL);
int nPos = fTemp * 10000;
HardFXConfigs[nVidDX9HardFX].fOptions[SLIDER_ID_RAW] = fTemp;
SendDlgItemMessage(hDlg, SLIDER_ID, TBM_SETPOS, (WPARAM)true, (LPARAM)nPos);
if (bVidOkay) {
VidRedraw();
VidPaint(0);
}
}
}
break;
}
break;
}
}
case WM_HSCROLL: {
switch (LOWORD(wParam)) {
case TB_BOTTOM:
case TB_ENDTRACK:
case TB_LINEDOWN:
case TB_LINEUP:
case TB_PAGEDOWN:
case TB_PAGEUP:
case TB_THUMBPOSITION:
case TB_THUMBTRACK:
case TB_TOP: {
if (nExitStatus == 0) {
// Update the contents of the edit control
SLIDER_ID = -1;
SLIDER_EDIT_ID = -1;
switch (GetDlgCtrlID((HWND)lParam)) {
case IDC_HARDFX_SLIDER1:
case IDC_HARDFX_SLIDER2:
case IDC_HARDFX_SLIDER3:
case IDC_HARDFX_SLIDER4:
SLIDER_ID = GetDlgCtrlID((HWND)lParam);// - IDC_HARDFX_SLIDER1;
SLIDER_EDIT_ID = IDC_HARDFX_SLIDER_EDIT1 + (SLIDER_ID - IDC_HARDFX_SLIDER1);
SLIDER_ID_RAW = SLIDER_ID - IDC_HARDFX_SLIDER1;
// Update the contents of the edit control
int nPos = SendDlgItemMessage(hDlg, SLIDER_ID, TBM_GETPOS, (WPARAM)0, (LPARAM)0);
float fTemp = (float)nPos / 10000;
HardFXConfigs[nVidDX9HardFX].fOptions[SLIDER_ID_RAW] = fTemp;
HardFXUpdateValues(hDlg);
if (bVidOkay) {
VidRedraw();
VidPaint(0);
}
}
break;
}
}
break;
}
break;
}
case WM_CLOSE:
if (nExitStatus != 1) {
// cancel pressed, restore backed-up settings
HardFXConfigs[nVidDX9HardFX].fOptions[0] = nPrevSettings[0];
HardFXConfigs[nVidDX9HardFX].fOptions[1] = nPrevSettings[1];
HardFXConfigs[nVidDX9HardFX].fOptions[2] = nPrevSettings[2];
HardFXConfigs[nVidDX9HardFX].fOptions[3] = nPrevSettings[3];
}
EndDialog(hDlg, 0);
}
return 0;
}
void HardFXShaderSettingsDialog()
{
FBADialogBox(hAppInst, MAKEINTRESOURCE(IDD_HARDFXSETTINGS), hScrnWnd, (DLGPROC)HardFXShaderSettingsProc);
}
// -----------------------------------------------------------------------------
// Gamma dialog

View File

@ -49,6 +49,7 @@
#define IDD_GAMEINFO 81
#define IDD_DOWNLOAD_LOCAL 82
#define IDD_CHOOSEMONITOR 83
#define IDD_HARDFXSETTINGS 84
#define IDR_MENU 100
#define IDR_MENU_BLITTER_1 110
@ -203,6 +204,16 @@
#define IDC_CHOOSE_MONITOR_VER_LIST 20144
#define IDC_CHOOSE_MONITOR_TEXT 20145
#define IDC_LIST3 20146
#define IDC_HARDFX_SLIDER1 20147
#define IDC_HARDFX_SLIDER2 20148
#define IDC_HARDFX_SLIDER3 20149
#define IDC_HARDFX_SLIDER4 20150
#define IDC_HARDFX_SLIDER5 20151
#define IDC_HARDFX_SLIDER_EDIT1 20152
#define IDC_HARDFX_SLIDER_EDIT2 20153
#define IDC_HARDFX_SLIDER_EDIT3 20154
#define IDC_HARDFX_SLIDER_EDIT4 20155
#define IDC_HARDFX_SLIDER_EDIT5 20156
#define IDC_DRVCOUNT 20200
#define IDC_TREE2 20201
@ -897,7 +908,8 @@
#define MENU_DX9_ALT_HARD_FX_CRT_BICUBIC 11456
#define MENU_DX9_ALT_HARD_FX_CRT_RETROSL 11457
#define MENU_DX9_ALT_HARD_FX_CRT_CGA 11458
#define MENU_DX9_ALT_HARD_FX_LAST 11458 // last one
#define MENU_DX9_ALT_HARD_FX_LAST 11458 // last one (same id as previous line!)
#define MENU_DX9_ALT_HARD_FX_SETTINGS 11470
#define MENU_DX9_ALT_SOFT_AUTOSIZE 11490
#define MENU_DX9_ALT_FORCE_16BIT 11491

View File

@ -1976,6 +1976,16 @@ static void OnCommand(HWND /*hDlg*/, int id, HWND /*hwndCtl*/, UINT codeNotify)
}
break;
case MENU_DX9_ALT_HARD_FX_SETTINGS: {
if (UseDialogs()) {
InputSetCooperativeLevel(false, bAlwaysProcessKeyboardInput);
AudBlankSound();
HardFXShaderSettingsDialog();
GameInpCheckMouse(); //? dink?
}
break;
}
case MENU_GAMMA_OTHER: {
if (UseDialogs()) {
double nOldGamma = nGamma;

View File

@ -203,6 +203,22 @@ extern INT32 bVidCorrectAspect;
extern INT32 bVidArcaderes;
extern INT32 nVidDX9HardFX;
struct hardfx_config {
char *szFileName;
int nOptions;
const float fDefaults[4];
float fOptions[4];
char *szOptions[4];
void hardfx_config_load_defaults() {
for (int i = 0; i < 4; i++) {
fOptions[i] = fDefaults[i];
}
}
};
extern hardfx_config HardFXConfigs[];
extern INT32 bVidArcaderesHor;
extern INT32 bVidArcaderesVer;

View File

@ -1790,15 +1790,27 @@ struct transp_vertex {
float u, v;
};
char *HardFXFilenames[] = {
"support/shaders/crt_aperture.fx",
"support/shaders/crt_caligari.fx",
"support/shaders/crt_cgwg_fast.fx",
"support/shaders/crt_easymode.fx",
"support/shaders/crt_standard.fx",
"support/shaders/crt_bicubic.fx",
"support/shaders/crt_retrosl.fx",
"support/shaders/crt_cga.fx"
/*
// in interface.h! for reference only.
struct hardfx_config {
char *szFileName;
int nOptions;
const float fDefaults[4];
float fOptions[4];
char *szOptions[4];
};
*/
hardfx_config HardFXConfigs[] = {
{ "n/a", 0, }, // 0 (note: zero entry is "None")
{ "support/shaders/crt_aperture.fx", 0, }, // 1
{ "support/shaders/crt_caligari.fx", 0, }, // 2
{ "support/shaders/crt_cgwg_fast.fx", 0, }, // 3
{ "support/shaders/crt_easymode.fx", 0, }, // 4
{ "support/shaders/crt_standard.fx", 0, }, // 5
{ "support/shaders/crt_bicubic.fx", 0, }, // 6
{ "support/shaders/crt_retrosl.fx", 1, { 0.0, 0.0, 0.0, 0.0 }, { 0, 0, 0, 0 }, "Animation (0 = disabled)", NULL, NULL, NULL }, // 7
{ "support/shaders/crt_cga.fx", 0, }, // 8
};
#undef D3DFVF_LVERTEX2
@ -2045,17 +2057,26 @@ static int dx9AltSetVertex(unsigned int px, unsigned int py, unsigned int pw, un
return 0;
}
static void UpdateShaderVariables()
{
if (pVidEffect && pVidEffect->IsValid()) {
pVidEffect->SetParamFloat2("texture_size", nTextureWidth, nTextureHeight);
pVidEffect->SetParamFloat2("video_size", (nRotateGame ? nGameHeight : nGameWidth) + 0.5f, nRotateGame ? nGameWidth : nGameHeight + 0.5f);
pVidEffect->SetParamFloat2("video_time", nCurrentFrame, (float)nCurrentFrame / 60);
pVidEffect->SetParamFloat4("user_settings", HardFXConfigs[nDX9HardFX].fOptions[0], HardFXConfigs[nDX9HardFX].fOptions[1], HardFXConfigs[nDX9HardFX].fOptions[2], HardFXConfigs[nDX9HardFX].fOptions[3]);
}
}
static int dx9AltSetHardFX(int nHardFX)
{
// cutre reload
//static bool reload = true; if (GetAsyncKeyState(VK_CONTROL)) { if (reload) { nDX9HardFX = 0; reload = false; } } else reload = true;
if (nHardFX == nDX9HardFX)
{
return 0;
}
nDX9HardFX = nHardFX;
if (pVidEffect) {
@ -2070,19 +2091,16 @@ static int dx9AltSetHardFX(int nHardFX)
// HardFX
pVidEffect = new VidEffect(pD3DDevice);
int r = pVidEffect->Load(HardFXFilenames[nHardFX - 1]);
int r = pVidEffect->Load(HardFXConfigs[nHardFX].szFileName);
if (r == 0)
{
bprintf(0, _T("HardFX ""%S"" loaded OK!\n"), HardFXFilenames[nHardFX - 1]);
// common parameters
pVidEffect->SetParamFloat2("texture_size", nTextureWidth, nTextureHeight);
pVidEffect->SetParamFloat2("video_size", (nRotateGame ? nGameHeight : nGameWidth) + 0.5f, nRotateGame ? nGameWidth : nGameHeight + 0.5f);
pVidEffect->SetParamFloat2("video_time", nCurrentFrame / 5, nCurrentFrame / 5);
bprintf(0, _T("HardFX ""%S"" loaded OK!\n"), HardFXConfigs[nHardFX].szFileName);
UpdateShaderVariables();
}
else
{
FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_UI_HARDFX_MODULE), HardFXFilenames[nHardFX - 1]);
FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_UI_HARDFX_MODULE), HardFXConfigs[nHardFX].szFileName);
FBAPopupDisplay(PUF_TYPE_ERROR);
}
@ -2449,10 +2467,7 @@ static int dx9AltRender() // MemToSurf
}
}
if (pVidEffect && pVidEffect->IsValid()) {
pVidEffect->SetParamFloat2("video_time", nCurrentFrame / 5, nCurrentFrame / 5);
// pVidEffect->SetParamFloat2("user_settings", fDX9ShaderSettings[0], fDX9ShaderSettings[1]); // at some point!
}
UpdateShaderVariables(); // once per frame
pD3DDevice->BeginScene();