Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Hacking Hydro Thunder..err Offroad Thunder (Updated)  (Read 41959 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #80 on: February 13, 2016, 06:24:38 pm »
Ok disregard what I just typed in regards to the info.... this is so convoluted I'm confusing myself.  Long story short start and pause are mapped to joystick buttons 8 and 7 respectively.

*edit*  (Modified since I found more)

The address of "pcoffroad.exe+7A0549" holds the button data in two bytes.  Why 2 bytes when the data can fit in one and every game I've ever seen only uses one byte?  Because Midway.  ;) The analog stuff is in the byte before.

here is the mapping:


Analog:
x- = 4
x+ = 8
y- = 1
y+ = 2
z- = 16
z+ = 32

Digital:
up= 1
down= 2
left= 4
right= 8
button 1 = 128
button 2 = 256
button 3 = 64
button 4 = 512
button 5 = 2048
button 6 = 8192
button 7 = 1024
button 8 = 4096
button 9 = 16384
button 10 = 32768
As you can see it makes no logical sense what-so-ever.  Typically button 1 would be "1", two would be "2" and they'd go up by a power of 2 each time (button 3 is "4" button 4 is "8" ect).

But anyway that's what I've got to work on. 

The easiest way is probably to NOP the code that passes the data into that variable and set it myself. 

*edit*

I blocked the code that writes to these and sure enough I can control them.
« Last Edit: February 13, 2016, 06:41:41 pm by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #81 on: February 13, 2016, 07:14:19 pm »
So blocking it blocks the inputs in the race as well.  Incidentally it's the same byte I have to write to when controlling the vr buttons.  I don't have to block anything on that though... I just write to the viewport byte the view I want, then send a "1"  to simulate the view button press. 

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #82 on: February 13, 2016, 09:00:55 pm »
Since this game uses Backspace for back, I thought I'd start with the oddball keys newer games never use.

The UP arrow reverses the track.

the END key opens the box to enter the secret code (haven't tried entering anything yet)
Entered a few random things and they worked.

While the secret code box is open:

HOME enters 1
UP Arrow enters 2
END enters 3

This basically means those are your view buttons while in the track and truck selection screens.

for the sake of clarity......



While in the track or truck selection menu:

HOME=red view button 1 (Slam Cam)
UP ARROW=orange view button 2 (Crash Cam)
END=yellow view button 3 (Chopper Cam)
While in a race, these do nothing and have been replaced with C=change view.



Default In-Game Controls (can be remapped):

Start = Enter
Pause = Esc
Steering = Left & Right arrows
Gas = Left ALT
Brake = Down Arrow
Nitro = Spacebar
Shift Up = Left Shift
Shift Down = Left CTRL
Change View = C
« Last Edit: February 13, 2016, 09:57:00 pm by BadMouth »

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #83 on: February 13, 2016, 09:31:35 pm »
Here is what I'm thinking:

Home, up arrow, & END aren't used in-race.  Pressing them has no effect and won't screw anything up.
So if you could use those keys to force the views while in game(instead of having a single change view button),
Then they would behave as expected in both the menu and the race.

Sorry if I missed how it worked on the original arcade, but I'd be fine with pressing the yellow view button (chopper cam) to enter the secret code
and pressing the orange view button (crash cam) to reverse the track.
Entering the secret codes would correspond to the correctly colored/numbered buttons on screen.

People without an H-shifter may prefer to keep the shift up/shift down method.

EDIT: from mame history.dat
Quote
- TIPS AND TRICKS -


* Codes : Before picking a truck or a track, press the Yellow Button. This will bring up the Cheat Screen. Use the camera view buttons to enter the codes. NOTE : The Truck Codes can only be entered at the Truck Selection Screen.

Chieftan Truck : Red, Red, Red

Dust Devil Car : Red, Orange, Yellow

Hyena Truck : Yellow, Yellow, Yellow

Wild Car Truck : Orange, Orange, Orange

No Drones : Red, Orange, Red

No Nitros : Orange, Red, Orange

No Catch-Ups : Yellow, Red, Yellow

Cliffhanger Track : Yellow, Orange, Red


Sounds like the right button to enter the cheat code anyway...

« Last Edit: February 13, 2016, 10:01:52 pm by BadMouth »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #84 on: February 13, 2016, 11:15:58 pm »
Well it would be 3 of 6 keys I didn't try when testing. 

I agree, vr3 makes more sense than start. 

I'm less worried about the view and more the other buttons, particularly start, pause, ok and cancel.  I'm going to have to play with it a little more and see if the game can tolerate simulated keypresses.  I mean for most of us we could just fire up the Logitech profiler or equivalent and map some buttons to the needed keys. 

I don't foresee having to mess with the arrows either.  I can't imagine a setup where the wheel isn't mapped to x AND there isn't a hat switch on the gamepad/wheel AND there aren't already buttons mapped to arrow keys somewhere. 

The shifter thing is going to be a non-issue.  I don't have to block anything... I can just write to the shift position.. so the original shifter and optional h-shifter buttons can co-exist. 

Thanks for the heads up.  I most likely won't have to block the menus now, which makes things a lot easier.   
« Last Edit: February 13, 2016, 11:50:58 pm by Howard_Casto »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #85 on: February 14, 2016, 12:00:21 am »
Yeah so I tested and the game takes to simulated key presses quite well. In my test I monitored the "1" key and pressed Enter whenever it was pressed.  Worked just great.  If your start button is already mapped to enter, then you are still good to go. 

I agree with your assessment... considering how odd the keys in question are, I don't really see any need to block them.  Enter, Backspace, Escape, Home and End aren't going to be used as gameplay keys on any person's cab.  While up might I don't exactly see a problem with accidentally selecting a mirror map in the menus. 

As for the hardcoding on the joystick.... ehh... I don't know.  I might have to block that considering buttons 2 and 3 are probably used on most people's wheels. 

Can't the profilers remap a button's position though?  Like remap button 1 to show up as button 9 or what have you?  Mapping around the problem buttons might be another solution.

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #86 on: February 16, 2016, 11:15:14 am »
profilers remap a button's position though?  Like remap button 1 to show up as button 9 or what have you?  Mapping around the problem buttons might be another solution.

Yeah, profiler can reassign anything to anything except for the clutch pedal.
It will work for people with Logitech wheels anyway, which are the majority.

Would it be possible to block the game from recognizing the buttons while still allowing a program like joy2key or autohotkey to recognize it and post the keys?

Out of curiosity, have you played the game with analog steering yet?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #87 on: February 16, 2016, 12:36:11 pm »
Yes, but it's an all or nothing deal.  If I block buttons I also block analog axis.  Mind you I probably need to do that anyway to get an analog brake and gas.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #88 on: February 16, 2016, 01:43:27 pm »
No I haven't played it yet.  I'll be using the Outrun FXT wrapper, so what I'm doing right now is looking for bugs so when I copy it to a new folder I don't have to maintain two builds separately. 

What I did was let the car sit on the road and gradually increased the value and made the wheels turn. Then I tried it with a few values (locked in place) to make sure it was indeed turning gradually instead of off/on like it is now. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #89 on: February 28, 2016, 02:04:29 am »
I guess I should be working on this huh.....  Currently setting up games on my rig, one at a time.  I have a new version of Outrun FXT ready, so I'll release that first and then modify it for this. 

Impact93

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:March 06, 2016, 05:26:26 pm
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #90 on: March 01, 2016, 07:57:13 pm »
So.   Hydro Thunder is off the table now because somewhere out there lurks a rare PC version that kind of works? I gave up on the idea of running it via MAME because 5 years ago everyone said it wasn't possible to get Hydro Thunder with force feedback working on a MAME unit.



I haven't posted on these forums in a long time but my two favorite games were Hydro Thunder and SFRush, its the reason i converted a busted SFRush cab into a sit down Xbox360 Cab.  All i had to do was hack apart an Xbox360 force feedback wheel and fit it into the SFRush wheel case. After that i just changed the POTS on the arcade unit to ones with the same voltage that the xbox360 gas and brake pedal use.  It was the best way that i could figgure to be able to play Hydro Thunder Hurricane, Outrun2006, Daytona and any other race game on 360, many of the games with force feedback. I ended up converting a side by side Final Lap into the same sort of thing but 2 player.

Once Xbox360 Arcade went down in support of the new XboxOne i can no longer access Hydro Thunder Hurricane (great game btw) and as such i havent played my arcade unit very much at all this last year.  I hear that the game is available on Xbox1 now but the xbox360 steering wheel is NOT compatible with an xbox1.  I find myself considering ripping out the Xbox controls and going the route of MAME on pc now.

I would love to be able to play Offroad Thunder and Hydro Thunder with FFB in the same arcade unit, not to mention OutRun,F-zero,MKart etc.    I think its amazing the work you guys are putting into this topic. Really something special. I will continue to lurk around the forums and see if i can bring myself to learn all the new stuff you guys are referencing.

sorry for the off topic, i've just been reading a lot in these Race Cab forums over the past few days and the same names keep popping up and i figured a KUDOS was in order

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #91 on: March 01, 2016, 10:42:53 pm »
It isn't off the table, it's just of a lower priority.  I have a tendency to follow the rabbit down the rabbit hole  way to far on projects like these, so I've learned to pace myself.  Realistically it shouldn't be terribly hard to support hydro thunder as well, but that's if time allows. 

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #92 on: May 31, 2016, 04:03:35 pm »
 :bump

Just keeping this on the radar.  >:D

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #93 on: May 31, 2016, 04:24:30 pm »
Yeah.  Currently the controls to my rig are in a rat's nest of wires in the floor.  Since it'll be difficult to wire up, I'm waiting until I can install everything permanently.  I've stained the dash panel and I still have to cut some recesses in the back for the dot-matrix display.  Then I can re-assemble the dash, at least, and I'll be able to test stuff. I really need to update my status on that... things are in the home stretch.

MTPPC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 26, 2021, 02:25:46 pm
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #94 on: July 28, 2016, 05:20:48 pm »
I was just thinking that analog inputs to an Audrino or AVR could be used to do PWM style keyboard inputs to those digital input PC games. I guess it would depend on the input latency of the software and hardware, but I would love to put SFRush in my Pentium 4 driving cabinet if it wasn't for the digital inputs.
Pinball and Video Arcade Repair in Billings, MT USA
http://pinballmd.com/

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:March 26, 2024, 08:00:17 pm
  • <insert personal text here>
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #95 on: October 31, 2016, 07:47:01 am »
Bump for some ORT Analog luv!!!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #96 on: October 31, 2016, 01:07:04 pm »
I need to fix the ff issue in 2k6 first.  I'm just going to copy over the fxt wrapper and make changes, so it doesn't make much sense to work on this until I get this last bug sorted out. 

VirtuaIceMan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 106
  • Last login:March 23, 2024, 08:16:45 pm
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #97 on: November 02, 2016, 09:10:43 am »
Just going back to Hydro Thunder for a sec; the standalone Eurocom version works fine via dgVoodoo's DirectX dlls, meaning you can run it in HD resolutions (1440x1080 for example). It looks awesome!

The MAT3 versions do some weird rendering tricks, so dgVoodoo won't work with them.

http://dege.freeweb.hu/dgVoodoo2.html

I'm currently grabbing screenshots of old racing games up-rezzed to HD. Some really look good (Colin McRae Rally 1 for example: http://forums.codemasters.com/discussion/47401/colin-mcrae-rally-1-in-hd).
Check out my racing game videos, including every PC F1 and Rally game ever, over here: https://www.youtube.com/user/VirtuaIceMan/

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #98 on: November 02, 2016, 02:09:36 pm »
I took a look at the cheat engine file I've made for this game.  I think we pretty much have everything we need, it's just a matter of me plugging it in.  With that in mind I might go ahead and start on this one as I can plug in the new ff code later.  I'm busy atm though so it might be next week before I get to do anything fun. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #99 on: November 02, 2016, 11:54:57 pm »
You guys guilted me into it.  I started converting outrun fxt into offroad thunder fxt.  I hooked up the VR buttons thus far, which isn't much, but it lets me know how well the game is going to handle memory writes.  So far so good.... I'll work on it a little bit each night if I'm not too tired. 

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:March 26, 2024, 08:00:17 pm
  • <insert personal text here>
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #100 on: November 03, 2016, 07:37:19 am »
Yay!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #101 on: November 03, 2016, 01:03:15 pm »
So I've got most of the outputs hooked up.  Next comes the hard stuff, aka the controls.  I've been playing with it a bit and man, I think it might be easiest to override the controls completely and handle them all on my end.  The view button acts as start in the menus which is very awkward.  Couple that with the fact that the three "real" view buttons don't work and the fact that I'll have to remap the wheel and pedals and I might as well.  I mean all that is left are the shift buttons start and pause. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #102 on: November 04, 2016, 08:20:34 pm »
Well the got the wheel hooked up, and it works.  The problem is the stuff that I had to block to control the wheel is killing the menu controls as well.  That would be an issue except I can't seem to find what variables I need to write to in order to control them manually. 

This might take more time than originally thought. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #103 on: November 04, 2016, 11:51:42 pm »
Ok I figured it out...  That was weird.  Anyway the basics are done, so let me hookup the outputs. 

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:March 26, 2024, 08:00:17 pm
  • <insert personal text here>
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #104 on: November 05, 2016, 01:49:56 am »
Can't wait!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #105 on: November 05, 2016, 03:12:15 pm »
I got the pedals hooked up.  I found a bug or three in the pedal parsing code which may fix issues in outrun. 

Nitro, rpms, speedo, brake lamp, all that good stuff is hooked up as well.  Next I'll work on the force-feedback.  Like with outrun, I'll probably do a release with just xinput rumble first and then adapt it to force feedback. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #106 on: November 05, 2016, 07:17:07 pm »
Hmm.... So I hooked up xinput.. and it kind of sucks.  For lack of a better description, the effects are kind of floaty.  Sometimes they will remain on for too long or fire just because you are sliding really hard and the resolution is kind of low.  Keep in mind afaict I have hooked up the dormant effect variables, so their crappiness isn't my doing. 

Oh well, I might be able to smooth them out later. 

For now I think they are good enough and tomorrow (or later tonight if I still have trouble sleeping) I'll concentrate on hooking up all the menu buttons.  Then I have to make a config program and we are ready for a release!

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:March 26, 2024, 08:00:17 pm
  • <insert personal text here>
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #107 on: November 05, 2016, 07:41:57 pm »
[jittering intensifies]soon![/ji]

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #108 on: November 06, 2016, 02:40:58 pm »
I will feel obligated to put a driving cab back together when this is done.

Sent from my Life One X2 using Tapatalk


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #109 on: November 06, 2016, 04:26:25 pm »
Well I've hit another snag.   It isn't huge like last time, but I'll have to nop a TON of stuff to get the menu buttons working correctly.  I think I've found around 20 instruction sets so far and counting.

Now the good news is the basic functionality works out of the box.  The wheel will navigate the menus just fine and the gas pedal acts as a start button in the game.  I've already gotten vr-override working along with shifter override so that's really all you need.  Getting the three view buttons to work within the menus and blocking key codes.... that is the challenge. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #110 on: November 07, 2016, 09:25:41 pm »
So I streamlined things a bit and I managed to find all the instruction sets I have to no op in order to get full of control of the games.  It was "only" 15 sets.... sheesh. 

So I'll block them and start setting up buttons.  Fortunately I don't think it's going to be a big deal to control the buttons since, if you think about it only one will ever be pressed at once.  You won't hit VR1 and Nitro at the same time, or Start and Back, ect......  the only things you press at once would be gas, brake and the wheel and those are all separate with independent writes.

So yeah, back on track.  Expect a release later this week after this nightmare of an election is over.  Or you know, longer if I have to move to Canada.  ;) 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #111 on: November 09, 2016, 07:46:46 pm »
Ugh. 

So I've got to test the gearshift and some misc stuff but controls now work. 

All that's left is to:

Find some values only active in attract mode, so I can make the start button blink when appropriate. 
Find the value I need to write to in order to get past the initial start screen. 
Find the value to bring up the pause menu.
Make some documentation. 

In addition, it should be possible to find the resolution values within the exe and alter them.  This won't improve the crappy textures any, but the models should look less pixelated.  There are something like 20-30 mentions of "640" and "480" in the exe.  Changing them all results in a crash while changing just a few results in some weird rendering.  Painstakingly replacing one value at a time and checking the results may be the only way to figure out exactly what needs changed.  I might have to recruit help with that. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #112 on: November 10, 2016, 02:38:24 pm »
Ok...  status update since I have time today. 

I found the value I need to change to enable the pause menu.  In addition, I figured out a way to pause the game without that godawful blue midway arcade treasures menu.  It doesn't make a whole lot of sense to use it anyway as the only relevant options are exit race and exit game (which there is a dedicated button for). 

I also figured out how to auto-skip that stupid splash screen that shows all the menu controls.  You still hear the "beep" but other than that you never see it. 

I also found the float value that throbs the "press enter" message when in attract.  I can use this to determine when to blink the start lamp. 

So I think I'm about done. 

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #113 on: November 10, 2016, 02:48:43 pm »
 :applaud:

I've actually made enough progress on my other projects that I might be able to put a driving cab back together before the end of the year.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #114 on: November 10, 2016, 03:13:26 pm »
That's great.  I'm done enough with mine to enjoy games.  There are some cosmetic issues I want to fix and I didn't get time to build the wooden wheel or properly mount the detachable h shifter, but the 360 wheel is done and works great and although I haven't had time to wire it up yet, the yoke is finished as well. 

I need to buy a flight stick, but I'm having trouble finding what I want.  What are the pot values for a 360 gamepad?  I might wire up a custom built one to a hack and that way I would have rumble.  Force-feedback sticks have all but vanished and I really don't want to deal with 15 year old sticks.  I can use the yoke for most stuff in a pinch though.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #115 on: November 11, 2016, 11:50:59 am »
So I got the start lamp working and I now have a fairly accurate set of variables to tell me when you are in the attract, in the menus, or in a race.  That means I can get the VR lamps in line as well.  I still need to make a combined vr lamp for those with only one view button. 

BadMouth

  • Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #116 on: November 11, 2016, 12:10:23 pm »
Good lord, we have lamps now?!  :lol
I would have been happy with just having actual steering.

I need to buy a flight stick, but I'm having trouble finding what I want.  What are the pot values for a 360 gamepad?  I might wire up a custom built one to a hack and that way I would have rumble.  Force-feedback sticks have all but vanished and I really don't want to deal with 15 year old sticks.  I can use the yoke for most stuff in a pinch though.

Modern gamepads including xbox360 pads use 10k pots, but they're limited deflection (they cover their resistance range over say 90-120 degrees of physical movement).  Off the shelf pots are morel like 270-280 degrees.
You can calibrate it out in emulators, but it won't work for a lot of games.  A lot of modern controllers don't offer calibration in windows anymore.  5k (or half voltage) is center.

I have a cyber sled control panel (dual analog trigger-sticks) that I swapped 10k pots into and wired to a gamepad.
It works OK in MAME.  Since it's only using a small portion of the travel of the pots, sometimes it feels like it's taking big steps rather than being smooth analog.
In retrospect, I should have just used the stock 5k arcade pots with an Ultimarc APAC or similar interface.

Old joysticks are 100k and were wired directly to the gameport.  No electronics inside the stick.
You can wire up 100k pots to a $7 USB gameport adapter and it will show up as a generic joystick (no rumble).

The PC version of the happ arcade stick used 100k limited deflection pots that cost like $25 each + Happ's high shipping.
I forked over $40 to buy one in hopes of using the numbers on it to find a generic supplier for them.
I found the manufacturer, but the part number was a generic "built to customer request" number.

So to summarize, joysticks use limited deflection pots that  cover their total range over a much shorter distance...and you can't buy them anywhere for a reasonable price.

One of my 3D printer goals is to make parts to convert an arcade quality joystick to analog using either tiny thumbstick pots or gearing to get around the deflection issue.
It probably won't come anytime soon though.
« Last Edit: November 11, 2016, 12:13:04 pm by BadMouth »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #117 on: November 11, 2016, 12:31:57 pm »
Eh... I don't want to drag this one out like 2k6 (which is admittedly much harder to work on than this game).  I know when I put it on my rig I'll want blinky lights.  I figure why do 30 incremental releases when I can do two big ones and a bug fix and that's it.  I still think I'll have everything but FF ready by this weekend though and I'll release it Sunday most likely.

You would be surprised how much misc code is in there, including what looks like some leftover arcade stuff.  It looks like this particular build was also for the gamecube and ps2 and they literally just recompiled and used some logic gates for any platform specific calls. 

In terms of the flight stick it'll most likely get use for afterburner and some of the positional gun games (Jurassic park, rail chase, ect) and that's about it. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #118 on: November 11, 2016, 01:48:09 pm »
Just tested the gearshift override.... it works as planned (I don't know why it wouldn't, I used the code from 2k6).  I want to clean up the code a bit, but I might be able to release this earlier than I thought. 

shaolindrunkard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 570
  • Last login:August 19, 2021, 11:13:43 am
Re: Hacking Hydro Thunder..err Offroad Thunder (Updated)
« Reply #119 on: November 11, 2016, 04:52:58 pm »
Good lord, we have lamps now?!  :lol
I would have been happy with just having actual steering.

I need to buy a flight stick, but I'm having trouble finding what I want.  What are the pot values for a 360 gamepad?  I might wire up a custom built one to a hack and that way I would have rumble.  Force-feedback sticks have all but vanished and I really don't want to deal with 15 year old sticks.  I can use the yoke for most stuff in a pinch though.

Modern gamepads including xbox360 pads use 10k pots, but they're limited deflection (they cover their resistance range over say 90-120 degrees of physical movement).  Off the shelf pots are morel like 270-280 degrees.
You can calibrate it out in emulators, but it won't work for a lot of games.  A lot of modern controllers don't offer calibration in windows anymore.  5k (or half voltage) is center.

I have a cyber sled control panel (dual analog trigger-sticks) that I swapped 10k pots into and wired to a gamepad.
It works OK in MAME.  Since it's only using a small portion of the travel of the pots, sometimes it feels like it's taking big steps rather than being smooth analog.
In retrospect, I should have just used the stock 5k arcade pots with an Ultimarc APAC or similar interface.

Old joysticks are 100k and were wired directly to the gameport.  No electronics inside the stick.
You can wire up 100k pots to a $7 USB gameport adapter and it will show up as a generic joystick (no rumble).

The PC version of the happ arcade stick used 100k limited deflection pots that cost like $25 each + Happ's high shipping.
I forked over $40 to buy one in hopes of using the numbers on it to find a generic supplier for them.
I found the manufacturer, but the part number was a generic "built to customer request" number.

So to summarize, joysticks use limited deflection pots that  cover their total range over a much shorter distance...and you can't buy them anywhere for a reasonable price.

One of my 3D printer goals is to make parts to convert an arcade quality joystick to analog using either tiny thumbstick pots or gearing to get around the deflection issue.
It probably won't come anytime soon though.

My planned driving cabs are going to use 360 controllers. I too found that the pot values for the sticks is 10k, but when I tested a 10k pot with a Happ wheel from an Offroad Challenge machine the wheel was waaay too sensitive. Just on a hunch I decided to try it with the 5k pot that was already on the machine and low and behold it works SHOCKINGLY WELL... At least in pc games and also Daytona USA on the Model 2 emu... The steering is super smooth and seems to be just the right sensitivity... Really surprised me...
My plan is to have a simple digital flight stick wired to the D-pad for various uses.