I just bought a Happ 3” trackball for exclusively playing Golden Tee. It’s P/N 56-0113-00K/(55-0302-00). Can it be upgraded to “work” well with golden tee?
April 26, 2024, 09:50:58 pm
I'm sorry, I don't think I understand--what exactly is the context that you're using this in? What gun is this being plugged into?I believe so but I will double check to be sure. I did make an edit to my previous post about not having the trigger and pump wired through the pico board, so I think that may have something to do with it as well. I'll get those wired up tomorrow and report back. They are mapped to the right and left mouse button through a third party app.So, I'm having an issue where it doesn't seem to be working properly unless I open the GUI then select the port, unselect it, then reselect it. It pops up with an error about the data not being received in time but it will operate fine until I close the error box. I'm on the latest version. Any ideas?You would be the first to run into such an issue without the app having crashed. Is it the latest versions of both halves? OS/version?
I'm a bit confused by it all. That said, I don't recall buttons not being hooked up to be the cause?
I'm sorry, I don't think I understand--what exactly is the context that you're using this in? What gun is this being plugged into?I believe so but I will double check to be sure. I did make an edit to my previous post about not having the trigger and pump wired through the pico board, so I think that may have something to do with it as well. I'll get those wired up tomorrow and report back. They are mapped to the right and left mouse button through a third party app.So, I'm having an issue where it doesn't seem to be working properly unless I open the GUI then select the port, unselect it, then reselect it. It pops up with an error about the data not being received in time but it will operate fine until I close the error box. I'm on the latest version. Any ideas?You would be the first to run into such an issue without the app having crashed. Is it the latest versions of both halves? OS/version?
I believe so but I will double check to be sure. I did make an edit to my previous post about not having the trigger and pump wired through the pico board, so I think that may have something to do with it as well. I'll get those wired up tomorrow and report back. They are mapped to the right and left mouse button through a third party app.So, I'm having an issue where it doesn't seem to be working properly unless I open the GUI then select the port, unselect it, then reselect it. It pops up with an error about the data not being received in time but it will operate fine until I close the error box. I'm on the latest version. Any ideas?You would be the first to run into such an issue without the app having crashed. Is it the latest versions of both halves? OS/version?
So, I'm having an issue where it doesn't seem to be working properly unless I open the GUI then select the port, unselect it, then reselect it. It pops up with an error about the data not being received in time but it will operate fine until I close the error box. I'm on the latest version. Any ideas?You would be the first to run into such an issue without the app having crashed. Is it the latest versions of both halves? OS/version?
// Merge in the wheel edge latch bit
if (m_hdc68k_wheel_edge)
{
result ^= 0x4000;
printf("hdc68k_port1_r: merge latch result=%04X m_hdc68k_last_wheel=%04X\n", result, m_hdc68k_last_wheel);
m_hdc68k_wheel_edge = 0;
}
m_hdc68k_last_port1 = result;
return result;
}
uint16_t harddriv_state::hda68k_port1_r()
{
uint16_t result = m_a80000->read();
if (m_hdc68k_wheel_edge)
{
result ^= 0x4000;
printf("hda68k_port1_r: merge latch result=%04X m_hdc68k_last_wheel=%04X\n", result, m_hdc68k_last_wheel);
m_hdc68k_wheel_edge = 0;
}
return result;
}
uint16_t harddriv_state::hdc68k_wheel_r()
{
static float ema_wheel = 0.0f; // Persistent storage of EMA across calls
static const float alpha = 0.05f; // Smoothing factor for EMA, adjustable
static bool initialized = false; // To check if ema_wheel is initialized
uint16_t new_wheel = m_12badc[0].read_safe(0xffff);
// Display the wheel position when left shift is pressed
if (machine().input().code_pressed(KEYCODE_LSHIFT))
{
popmessage("wheel new=%04X", new_wheel);
}
// Determine if the current game is Hard Drivin's Airborne
bool is_hdrivair = (machine().system().name == std::string("hdrivair"));
// Edge detection logic with condition for Hard Drivin's Airborne
if (is_hdrivair)
{
// Use a specific mask for Hard Drivin's Airborne
if ((m_hdc68k_last_wheel & 0x0c00) != (new_wheel & 0x0c00))
{
m_hdc68k_wheel_edge = m_hdc68k_wheel_edge == 0 ? 1 : 0;
}
}
else
{
// Use the default mask for other games
if ((m_hdc68k_last_wheel & 0x0c00) != (new_wheel & 0x0c00))
{
m_hdc68k_wheel_edge = m_hdc68k_wheel_edge == 0 ? 1 : 0;
}
}
if (is_hdrivair)
{
// EMA calculation only for Hard Drivin's Airborne
if (!initialized)
{
ema_wheel = new_wheel; // Initialize EMA with the first reading
initialized = true;
}
else
{
ema_wheel = alpha * new_wheel + (1 - alpha) * ema_wheel; // Update EMA
}
}
else
{
// For other games, use the raw wheel data without EMA
ema_wheel = new_wheel;
}
m_hdc68k_last_wheel = new_wheel;
// Calculate the output based on whether Hard Drivin's Airborne is being played
uint16_t ema_output;
if (is_hdrivair)
{
// Shift left by 7 for hdrivair
ema_output = static_cast<uint16_t>(ema_wheel) << 7;
}
else
{
// Shift left by 8 for other games
ema_output = static_cast<uint16_t>(ema_wheel) << 8;
}
ema_output &= 0xFFF0; // Mask to clear the last hexadecimal digit
// Return the EMA-adjusted wheel value, with the last digit zeroed
return ema_output;
// return (static_cast<uint16_t>(ema_wheel) << 8) & 0xFF00; /* << 8) | 0xff; */
}