Yeah, get it online joined and play tournaments with like.. 70 new courses.
May 08, 2024, 07:23:24 pm
void harddriv_state::hd68k_wr2_write(offs_t offset, uint16_t data)
{
/*
Observations
============
The 'data' repeats every 4 times this function is called.
Offset always seems to be zero.
Combining the 1st and 3rd byte of data gives you the steering
wheel force feedback.
When the game does not want to rotate the wheel in any direction,
0xE000 is read.
When the game wants the wheel to rotate clockwise, you see this:
0xE000 increment to 0xE01F,
then jumps to 0xE100 which increments to 0xE11F,
then jumps to 0xE200 which increments to 0xE21F,
then jumps to 0xE300 which increments to 0xE31F,
etc...
When the game wants the wheel to rotate anticlockwise, you see this:
0xE000 jumps to 0xFF1F which decrements to 0xFF00,
then jumps to 0xFE1F which decrements to 0xFE00,
then jumps to 0xFD1F which decrements to 0xFD00,
then jumps to 0xFC1F which decrements to 0xFC00,
etc...
Bits 0 to 7 never go above 32 (0x1f). Thus Bits 5 to 7 are unused.
If bits 12 to 15 are 0xE this indicates the game is trying to turn
the wheel clockwise. If they are 0xF, it is trying to turn the
wheel anticlockwise.
Shifting bits 8 to 11 right 3 places, gives you a value that
increments/decrements logically.
Testing
=======
In service mode, view the OPERATOR SCREENS and go to the 2nd page
where there are 2 interesting options:
Steering During Attract Mode
Steering Wheel Force
When Steering During Attract Mode is enabled, when you watch the
attract mode, you'll see the the m_wheel_force change value as the
game attempts to move the steering wheel while the car is moving around
the track.
When Steering Wheel Force is set to 'Very light' you'll see
m_wheel_force in the range -70 to 70. When set to 'Stiff' you'll see
m_wheel_force in the range -127 to 127.
*/
static unsigned int static_count = 0;
static uint8_t static_data[4];
//printf("wr2 offset=%04X data=%04X\n", offset, data);
//Store the data in this array (Must be a better way to do read this stuff...)
static_data[static_count] = data;
static_count++;
if (static_count > 3)
{
uint16_t force_combined, force_shifted;
int m_wheel_force;
static_count = 0;
//Combine the force (1st and 3rd byte)
force_combined = ((static_data[2]<<8)&0xff00) | (static_data[0]&0x00ff);
//Shift the force so that it logically increments/decrements
force_shifted = (((force_combined)>>3)&0x01f0) | (force_combined&0xf01f);
//Use the force
if ((force_shifted&0xf000) == 0xe000)
{
m_wheel_force = int(force_shifted&0x0fff); //Clockwise force (+ive number)
}
else
{
m_wheel_force = int(force_shifted&0x0fff) - 511; //Anticlockwise force (-ive number)
}
if (machine().input().code_pressed(KEYCODE_F))
{
popmessage("wr2 wheel=0x%04X force=%d", m_hdc68k_last_wheel, m_wheel_force);
}
}
}
So I'm messing with this for the first time. I've used CRTEmudriver for a while but never used it to run modern PC games. So I'm just trying out a few games and was recommended this thread.Yes, standalone switchres works perfect.
Instead of adding a modeline for every resolution, I saw a comment from 2020 that said to download a standalone version of Switchres. Is that still the recommended way to do this in 2024?