News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

4D Sports Driving Amiga formats + converting Stunts DOS cars to Amiga

Started by earok, March 13, 2023, 01:39:22 AM

Previous topic - Next topic

earok

Thought this may be of some interest here - I did some experiments converting some of the DOS custom cars to Amiga, details are at English Amiga Board.

I don't know if I'll do any more on the project, I got stuck on the dashboard graphics (which seem to be crunched in a custom format, and presumably are VERY different to the DOS format anyway). But in brief, I discovered:

- The resource files are identical to the DOS format, excepting that the byte order of words and longwords is flipped for the Motorola M68K processor.

- 3D shapes are almost identical (word/longword flipping not withstanding) except that the "reserved" part of the structure can have a value, and vertices are four words instead of three.
 
Having said that - I think they are just junk values, and the additional word of data on vertices is probably just to keep data aligned at multiples of 8.

KyLiE

Even though the Amiga version of the game is considered inferior, any investigation into it is indeed very interesting.  Great work! :)

Overdrijf

Quote from: KyLiE on March 13, 2023, 06:34:23 AMEven though the Amiga version of the game is considered inferior, any investigation into it is indeed very interesting.  Great work! :)

"Hi, welcome, I see this is your first post here, your game is inferior."  ;)


Hi earok, (welcome, I see this is your first post here!) This is really cool. I don't know the first thing about the Amiga file formats, but your solution to the dashboard problem, substituting an original dashboard, is pretty clever, and will serve well at least until a conversion method is found, if ever.

Note that there are two problems with this:
1 The coordinates for the meter needles are in the car____.res file so in many cases your meters are now nonsense. Even when the dashboard was adapted from an original car and the meters are the same size and in the same place the speed and rpm scales may still have been altered. This can be fixed if tou have a way to edit the .res files. Does Carblaster or Carworks work on Amiga files?
2 The same story goes for the gear shifting coordinates. But if you change those to match the new dashboard you're also very subtly altering the behavior of the car, the time it takes to shift.

I wish you a lot of luck with the endeavor. Sounds like fun!

Daniel3D

Hey earok, and welcome here.

Thank you for your research, you have answered a question posted recently.
See This topic on the question if custom cars can be ported to the Amiga version.

Edit (after reading the Amiga forum post and realising that you were way ahead if where I thought you'd be)
If we know how they dashboars are different I think we could automate it and make a full converter.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts or 4D Sports Driving.

KyLiE

Quote from: Overdrijf on March 13, 2023, 07:40:12 AM
Quote from: KyLiE on March 13, 2023, 06:34:23 AMEven though the Amiga version of the game is considered inferior, any investigation into it is indeed very interesting.  Great work! :)

"Hi, welcome, I see this is your first post here, your game is inferior."  ;)

That certainly isn't what I was insinuating.  I was actually referring to a few comments on his original thread on the English Amiga Board.  I'm sorry if that was the impression I gave. :(

Daniel3D

Ok. As far as I understand now you made a converter for the 3D shape. There is no conversion yet for dashboard.
What I don't see clearly is what you do with the res file.
The res file contains information that is used in the dashboard and the performance values.
 If you use a dashboard of another car you need a matching res file.. (same number of gears, same type of speedometer.)

So you made something amazing, but I don't think we are there yet. But I believe now that I can be done.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts or 4D Sports Driving.

Cas

Very good work!  I would like to take a look at the Amiga dashboard format to see if I can understand it and maybe help. Is it a compressed format?
Earth is my country. Science is my religion.

Duplode

Hello and welcome, @earok ! This is a very interesting project. In particular, it can be very useful for the mods planned by Striker :)

Quote from: Daniel3D on March 13, 2023, 11:26:21 AMWhat I don't see clearly is what you do with the res file.
The res file contains information that is used in the dashboard and the performance values.
 If you use a dashboard of another car you need a matching res file.. (same number of gears, same type of speedometer.)

earok's progam also converts the CAR*.RES files to the Amiga format. That being so, this can be dealt with by adjusting the speedometer coordinates and other such things to match the new dashboard, as it used to be done in the days before Stressed, in the DOS file, and then running the converter. (Just remember to keep the spacing between the positions of the gear knob the same, as that actually affects car behaviour by changing the time it takes to shift gears.)

earok

I'm so sorry I missed all of these messages! I thought I had notifications set on this thread.

I did notice the needles etc didn't line up between the custom dashboard and the Amiga original, but I hadn't even thought of the idea of fixing the dashboard by copying the original Amiga dashboard settings into the RES file. I probably should add that to the utility if we can't solve the dashboard conversion issue.

I'll try to take another look at dashboards in the next few days. From memory, they were compressed in a way that I couldn't immediately recognise, it didn't have a header etc. But I'm assuming that the Amiga version will accept uncompressed dashboards so long as they're in the right format.

What I *might* be able to do is run the game, find the uncompressed dashboard in memory, and then dump that to give some clues as to what format is expected.

Cas

Quote from: earokWhat I *might* be able to do is run the game, find the uncompressed dashboard in memory, and then dump that to give some clues as to what format is expected.
I think this is a very good idea. If it got too complicated, taking a look at the compressed file may give a hint on what is expected if uncompressed. Especially, knowing the DOS uncompressed format to compare with.
Earth is my country. Science is my religion.