Compare commits

...

3 Commits

Author SHA1 Message Date
nassau-tk d3f04136ea
Merge 19866e3834 into fbe0c8b9cc 2025-01-17 19:14:25 +03:00
shockdude fbe0c8b9cc USB: Fix DJ Hero Turntable automatic mapping & turntable multiplier 2025-01-17 10:44:52 -05:00
nassau-tk 19866e3834 Fix Raksuho Pachi-slot series glitch 2025-01-17 15:36:34 +09:00
2 changed files with 24 additions and 12 deletions

View File

@ -53333,6 +53333,8 @@ SLPS-20307:
name-sort: "らくしょう! ぱちすろせんげん - もぐもぐふうりんかざん・しょうきんくび・びりーざびっぐ・すーぱーぶらっくじゃっく"
name-en: "Rakushou! Pachi-Slot Sengen - MoguMoguFuuRinKaZan,Shoukin Kubi,Billy the Big,Super Black Jack"
region: "NTSC-J"
gsHWFixes:
cpuFramebufferConversion: 1 # A liitle fixes some graphic glitchs on upper screen (not Perfectly).
SLPS-20308:
name: "花火百景 [特典版]"
name-sort: "はなびひゃっけい [とくてんばん]"
@ -53790,6 +53792,8 @@ SLPS-20404:
name-sort: "らくしょう! ぱちすろせんげん2 - じゅうじか・でかだん"
name-en: "Rakushou! Pachi-Slot Sengen 2 - Juujika, Deka Dan"
region: "NTSC-J"
gsHWFixes:
cpuFramebufferConversion: 1 # A liitle fixes some graphic glitchs on upper screen (not Perfectly).
SLPS-20405:
name: "スロッターUPコア5 ルパン大好き!主役は銭形"
name-sort: "すろったーUPこあ 5 るぱんだいすき!しゅやくはぜにがた"
@ -53866,6 +53870,8 @@ SLPS-20419:
name-sort: "らくしょう! ぱちすろせんげん3 - りおでかーにばる・じゅうじか600しき"
name-en: "Rakushou! Pachi-Slot Sengen 3 - Rio de Carnival, Juujika 600-shiki"
region: "NTSC-J"
gsHWFixes:
cpuFramebufferConversion: 1 # A liitle fixes some graphic glitchs on upper screen (not Perfectly).
SLPS-20420:
name: "ウルトラマンネクサス"
name-sort: "うるとらまんねくさす"
@ -54075,6 +54081,8 @@ SLPS-20460:
name-sort: "らくしょう! ぱちすろせんげん4 - しんもぐもぐふうりんかざん りおでかーにばる"
name-en: "Rakushou! Pachi-Slot Sengen 4 - Shin MoguMogu FuuRinKaZan,Rio de Carnival"
region: "NTSC-J"
gsHWFixes:
cpuFramebufferConversion: 1 # A liitle fixes some graphic glitchs on upper screen (not Perfectly).
SLPS-20461:
name: "SIMPLE2000シリーズ Vol.99 THE 原始人"
name-sort: "しんぷる2000しりーず Vol. 99 THE げんしじん"
@ -58925,6 +58933,8 @@ SLPS-25770:
name-sort: "らくしょう! ぱちすろせんげん5 - りおぱらだいす"
name-en: "Rakushou! Pachi-Slot Sengen 5 - Rio Paradise"
region: "NTSC-J"
gsHWFixes:
cpuFramebufferConversion: 1 # A liitle fixes some graphic glitchs on upper screen (not Perfectly).
SLPS-25771:
name: "グリムグリモア [初回生産版]"
name-sort: "ぐりむぐりもあ [しょかいせいさんばん]"
@ -59794,6 +59804,8 @@ SLPS-25921:
name-sort: "らくしょう! ぱちすろせんげん6 - りお2 くるーじんぐ ヴぁなでぃーす"
name-en: "Rakushou! Pachi-Slot Sengen 6 - Rio 2 Cruising Vanadis"
region: "NTSC-J"
gsHWFixes:
cpuFramebufferConversion: 1 # A liitle fixes some graphic glitchs on upper screen (not Perfectly).
SLPS-25922:
name: "Vitamin Z [限定版]"
name-sort: "びたみん Z [げんていばん]"

View File

@ -93,19 +93,19 @@ namespace usb_pad
u8 right_turntable = 0x80;
if (data.left_turntable_ccw > 0)
{
left_turntable -= static_cast<u8>(std::min<int>(data.left_turntable_ccw * turntable_multiplier, 0x7F));
left_turntable -= static_cast<u8>(std::min<int>(data.left_turntable_ccw, 0x7F));
}
else
{
left_turntable += static_cast<u8>(std::min<int>(data.left_turntable_cw * turntable_multiplier, 0x7F));
left_turntable += static_cast<u8>(std::min<int>(data.left_turntable_cw, 0x7F));
}
if (data.right_turntable_ccw > 0)
{
right_turntable -= static_cast<u8>(std::min<int>(data.right_turntable_ccw * turntable_multiplier, 0x7F));
right_turntable -= static_cast<u8>(std::min<int>(data.right_turntable_ccw, 0x7F));
}
else
{
right_turntable += static_cast<u8>(std::min<int>(data.right_turntable_cw * turntable_multiplier, 0x7F));
right_turntable += static_cast<u8>(std::min<int>(data.right_turntable_cw, 0x7F));
}
buf[3] = 0x80;
buf[4] = 0x80;
@ -369,19 +369,19 @@ namespace usb_pad
break;
case CID_DJ_LEFT_TURNTABLE_CW:
s->data.left_turntable_cw = static_cast<u32>(std::clamp<long>(std::lroundf(value * 128.0f), 0, 128));
s->data.left_turntable_cw = static_cast<u32>(std::clamp<long>(std::lroundf(value * s->turntable_multiplier * 128.0f), 0, 128));
break;
case CID_DJ_LEFT_TURNTABLE_CCW:
s->data.left_turntable_ccw = static_cast<u32>(std::clamp<long>(std::lroundf(value * 128.0f), 0, 128));
s->data.left_turntable_ccw = static_cast<u32>(std::clamp<long>(std::lroundf(value * s->turntable_multiplier * 128.0f), 0, 128));
break;
case CID_DJ_RIGHT_TURNTABLE_CW:
s->data.right_turntable_cw = static_cast<u32>(std::clamp<long>(std::lroundf(value * 128.0f), 0, 128));
s->data.right_turntable_cw = static_cast<u32>(std::clamp<long>(std::lroundf(value * s->turntable_multiplier * 128.0f), 0, 128));
break;
case CID_DJ_RIGHT_TURNTABLE_CCW:
s->data.right_turntable_ccw = static_cast<u32>(std::clamp<long>(std::lroundf(value * 128.0f), 0, 128));
s->data.right_turntable_ccw = static_cast<u32>(std::clamp<long>(std::lroundf(value * s->turntable_multiplier * 128.0f), 0, 128));
break;
case CID_DJ_DPAD_UP:
@ -446,8 +446,8 @@ namespace usb_pad
{"EffectsKnobRight", TRANSLATE_NOOP("USB", "Effects Knob Right"), nullptr, InputBindingInfo::Type::HalfAxis, CID_DJ_EFFECTSKNOB_RIGHT, GenericInputBinding::RightStickRight},
{"LeftTurntableCW", TRANSLATE_NOOP("USB", "Left Turntable Clockwise"), nullptr, InputBindingInfo::Type::HalfAxis, CID_DJ_LEFT_TURNTABLE_CW, GenericInputBinding::LeftStickRight},
{"LeftTurntableCCW", TRANSLATE_NOOP("USB", "Left Turntable Counterclockwise"), nullptr, InputBindingInfo::Type::HalfAxis, CID_DJ_LEFT_TURNTABLE_CCW, GenericInputBinding::LeftStickLeft},
{"RightTurntableCW", TRANSLATE_NOOP("USB", "Right Turntable Clockwise"), nullptr, InputBindingInfo::Type::HalfAxis, CID_DJ_RIGHT_TURNTABLE_CW, GenericInputBinding::LeftStickDown},
{"RightTurntableCCW", TRANSLATE_NOOP("USB", "Right Turntable Counterclockwise"), nullptr, InputBindingInfo::Type::HalfAxis, CID_DJ_RIGHT_TURNTABLE_CCW, GenericInputBinding::LeftStickUp},
{"RightTurntableCW", TRANSLATE_NOOP("USB", "Right Turntable Clockwise"), nullptr, InputBindingInfo::Type::HalfAxis, CID_DJ_RIGHT_TURNTABLE_CW, GenericInputBinding::LeftStickUp},
{"RightTurntableCCW", TRANSLATE_NOOP("USB", "Right Turntable Counterclockwise"), nullptr, InputBindingInfo::Type::HalfAxis, CID_DJ_RIGHT_TURNTABLE_CCW, GenericInputBinding::LeftStickDown},
{"LeftTurntableGreen", TRANSLATE_NOOP("USB", "Left Turntable Green"), nullptr, InputBindingInfo::Type::Button, CID_DJ_LEFT_GREEN, GenericInputBinding::Unknown},
{"LeftTurntableRed", TRANSLATE_NOOP("USB", "Left Turntable Red"), nullptr, InputBindingInfo::Type::Button, CID_DJ_LEFT_RED, GenericInputBinding::Unknown},
{"LeftTurntableBlue", TRANSLATE_NOOP("USB", "Left Turntable Blue"), nullptr, InputBindingInfo::Type::Button, CID_DJ_LEFT_BLUE, GenericInputBinding::Unknown},
@ -464,8 +464,8 @@ namespace usb_pad
{
static constexpr const SettingInfo info[] = {
{SettingInfo::Type::Float, "TurntableMultiplier", TRANSLATE_NOOP("USB", "Turntable Multiplier"),
TRANSLATE_NOOP("USB", "Apply a multiplier to the turntable"),
"1.00", "0.00", "100.0", "1.0", "%.0fx", nullptr, nullptr, 1.0f}};
TRANSLATE_NOOP("USB", "Apply a sensitivity multiplier to turntable rotation.\nXbox 360 turntables require a 256x multiplier, most other turntables can use the default 1x multiplier."),
"1.00", "0.00", "512.0", "1.0", "%.0fx", nullptr, nullptr, 1.0f}};
return info;
}