Convert this Titan Two Script to Titan One?
4 posts
• Page 1 of 1
Convert this Titan Two Script to Titan One?
Hi there, can anyone convert this Titan Two Script to Titan One (if it's possible)? This script was made to use the Zuiki Densha de Go Nintendo Switch Controller to work on the PS4. Any help greatly appreciated with this. I was able to purchase a Titan One recently, finding a Titan Two has been really difficult. Here's the Titan Two Script obtained from GitHub:
- Code: Select all
#pragma METAINFO("Zuiki Densha-de-GO! for PS4", 1, 0, "Wes Alvaro")
// Converts NS Zuiki Densha-de-GO! controller mascon values for PS4.
// Mascon values need conversion or else mascon positions are skipped.
// No changes are needed for other controls (including EB).
// Controls should be set to 「スタンダード」"Standard" + 「ダイレクト」"Direct".
#include <switch.gph>
// The mascon is controlled with the left analog stick's y-axis.
// Values are negative for braking, positive for powering, 0 when neutral.
#define MASCON SWITCH_LY
// The following values were from my controller and Titan 2.
// It's possible that these values are not consistent across all controllers.
// To account for differences, an epsilon of 5 (which is equal to half of the
// smallest range 10) is added when making comparisons. Sadly, the input values
// can't be easily recognized by a function due to their curious value jumps.
// Power Corrections:
// Input values to Titan 2 from NS Zuiki:
#define NS_B8 -96.08
#define NS_B7 -85.10
#define NS_B6 -74.90
#define NS_B5 -63.92
#define NS_B4 -52.94
#define NS_B3 -42.75
#define NS_B2 -31.76
#define NS_B1 -20.78
#define NS_N 00.39
#define NS_P1 24.71
#define NS_P2 43.53
#define NS_P3 61.57
#define NS_P4 80.39
#define NS_P5 100.0
// Output values from Titan 2 to PS4:
// The following values are accepted by the PS4 for Standard + Direct controls.
// These values don't need any adjustment as they are unrelated to hardware.
// The positions map 1-to-1 with the NS_ values above.
#define PS_B8 -100.0
#define PS_B7 -90.00
#define PS_B6 -75.00
#define PS_B5 -65.00
#define PS_B4 -60.00
#define PS_B3 -50.00
#define PS_B2 -40.00
#define PS_B1 -30.00
#define PS_N 00.00
#define PS_P1 40.00
#define PS_P2 50.00
#define PS_P3 60.00
#define PS_P4 80.00
#define PS_P5 100.0
// Epsilon for NS input value differences between hardware:
#define E 5.0
#define IF_POS(NS, PS) if (pOut < NS + E) { pOut = PS; }
#define ELSE_IF_POS(NS, PS) else IF_POS(NS, PS)
main {
// Initialize the output to the current value of the mascon:
fix32 pOut = get_val(MASCON);
// Translate mascon position value from NS to PS values:
IF_POS(NS_B8, PS_B8)
ELSE_IF_POS(NS_B7, PS_B7)
ELSE_IF_POS(NS_B6, PS_B6)
ELSE_IF_POS(NS_B5, PS_B5)
ELSE_IF_POS(NS_B4, PS_B4)
ELSE_IF_POS(NS_B3, PS_B3)
ELSE_IF_POS(NS_B2, PS_B2)
ELSE_IF_POS(NS_B1, PS_B1)
ELSE_IF_POS( NS_N, PS_N)
ELSE_IF_POS(NS_P1, PS_P1)
ELSE_IF_POS(NS_P2, PS_P2)
ELSE_IF_POS(NS_P3, PS_P3)
ELSE_IF_POS(NS_P4, PS_P4)
ELSE_IF_POS(NS_P5, PS_P5)
// Set adjusted mascon position value:
set_val(MASCON, pOut);
}
-
brownsuga2k - Private First Class
- Posts: 2
- Joined: Tue Aug 30, 2022 4:24 am
Re: Convert this Titan Two Script to Titan One?
This script wont function as expected as the Titan one does not use fix32 (decimal) values.
- Mad
- Major General
- Posts: 4474
- Joined: Wed May 22, 2019 5:39 am
Re: Convert this Titan Two Script to Titan One?
Ok, thank you. If I were to change the values to whole numbers, would that be accepted by the scripting software for Titan One (eg. -96 instead of -96.08)? Realize that might be a fraction off (pun intended I guess
, but I would be ok with that if it meant small gameplay deviation. Please let me know if this might be worth trying, and if there are any other alterations to the script to be made so it is accepted by Titan One.

-
brownsuga2k - Private First Class
- Posts: 2
- Joined: Tue Aug 30, 2022 4:24 am
Re: Convert this Titan Two Script to Titan One?
brownsuga2k wrote:Hi there, can anyone convert this Titan Two Script to Titan One (if it's possible)?
Heh, I just did exactly this for myself, let me know if it works! https://gist.github.com/jsoltren/903dd5 ... eb8ff10b00
See also https://www.reddit.com/r/DenshadeGO/com ... er_on_ps4/
-
XMIT - Private
- Posts: 1
- Joined: Sun Nov 20, 2022 7:00 pm
4 posts
• Page 1 of 1