News:

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

Main Menu

Restunts repository - Git mirror

Started by dreadnaut, March 19, 2021, 12:00:36 AM

Previous topic - Next topic

dreadnaut

I have mirrored dstien's SVN repository for restunts to BitBucket, both to have a backup and for ease of access. I don't intend for any work to go ahead on it, but it's useful to point at files.

https://bitbucket.org/dreadnaut/restunts/

Duplode

That's useful, thanks for the initiative! (In particular, y'all can now look at the code from the comfort of your browser, so if you are curious feel free to have a stroll around it.)

dreadnaut

Yep, this is really to make the restunts code accessible, so that it become easier to talk about it. It's not that difficult to check it out from dstien's SVN, but this is easier.

In particular, it's easy to link to a specific file and line:
https://bitbucket.org/dreadnaut/restunts/src/master/src/restunts/asm/seg001.asm#lines-6171

It would be interesting to compare the assembly for that function in different Stunts versions 🤔

Daniel3D

Quote from: dreadnaut on March 20, 2021, 12:14:48 AM
Yep, this is really to make the restunts code accessible, so that it become easier to talk about it. It's not that difficult to check it out from dstien's SVN, but this is easier.

In particular, it's easy to link to a specific file and line:
https://bitbucket.org/dreadnaut/restunts/src/master/src/restunts/asm/seg001.asm#lines-6171

It would be interesting to compare the assembly for that function in different Stunts versions 🤔
Late response but I was looking a bit in the part of the code that starts at your line.
If i read it correctly this part looks at grip per wheel (corners of the hitbox?)
and takes the sum of it. then applies that to the angle of the wheels (eg steering)
that produces skidding.

(im not a programmer so this could be wrong. but seems right)
what i also notice is that the code takes the steering input for left and right steering in the same code.
so there should not be a difference in left and right steering.
I was scanning throug this part kind of hoping to see some indications of the source of the left corner bias.
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
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

#4
Now the reason for reading this topic again.  [edit typo, accidentally quoted myself earlier today]

I would like to play a bit with the code (maybe i learn something along the way)
but for me it is difficult to compile the executable because i dont have enough information.
I have 0 experience in this, so could somebody give me a step by step?

What software do I need? (on what platform | in my case DOS or windows)
How do i setup the make file?
Do i need to configure the software before compiling?

I saw referenc to turboC. i assume that refers to Borland Turbo C.
and Tasm and BCC, (bcc is also borland i think) but that is as far as my info goes.
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
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

I think everything is in the repo, most of the programs and description, there is a docs or something folder that describes all

Daniel3D

Quote from: llm on October 25, 2021, 08:08:04 PM
I think everything is in the repo, most of the programs and description, there is a docs or something folder that describes all
You are right. I found it this afternoon after a bit of idly browsing through the data.

I had been looking in the | restunts/docs | section.

I looked at the readme in the main directory to, but not good enough. All the information is in there.
https://bitbucket.org/dreadnaut/restunts/src/master/readme.txt

How to build restunts on Windows:
  1) Double click tools\mount_stunts_to_s.bat (only needed once per reboot)
  2) Start cmd.exe and enter the following commands:
    S:
    cd tools
    setpath.bat
    cd \src\restunts
    make


looks simple enough.
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
---------
Check out the STUNTS resources on my Mega (globe icon)

Duplode

Quote from: Daniel3D on October 25, 2021, 11:19:38 AM
Late response but I was looking a bit in the part of the code that starts at your line.
If i read it correctly this part looks at grip per wheel (corners of the hitbox?)
and takes the sum of it. then applies that to the angle of the wheels (eg steering)
that produces skidding.

Pretty much so. It adds up the grip for each wheel and compares it to the grip that would be required, given the car speed and steering angle, in order to decide whether the car should be skidding. There are a few places in which the turning direction is looked at, in particular to use the absolute value of the turning angle (look for jge and neg; there's also a multiplication by minus one/imul with 0FFFFh). Though I couldn't see it back in the day, or simply didn't look at it closely enough, I think its quite likely left corner bias arises somewhere in there.

Daniel3D

I'm trying to find it because I think it is a bug.
A chance to the steering that was either badly changed or changed, cancelled, and badly reversed.

I want to find out more.

I tried compiling but it uses the C code in assembly I believe.
How can I change the makefile to build just from assembly code?

Changes I want to do (like moving buttons or changing the default car) I can do now in the assembly code directly. (I understand that much)
For the rest, I'll pass it through CAS for verification.
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
---------
Check out the STUNTS resources on my Mega (globe icon)

dreadnaut

Do we have a decompiled version of the same piece of code in 1.0? It would be interested to compare the grip calculations between the two versions.

Daniel3D

Nope, we only have 1 version decompiled (stunts 1.1 I believe)

I would like to have the PC-98 version decompiled because it is so different but the replays are 1.1 compatible.
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
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

Quote from: Daniel3D on October 26, 2021, 08:07:00 AM
I tried compiling but it uses the C code in assembly I believe.
How can I change the makefile to build just from assembly code?
Alright,
reading English late at night is apparently not easy.
It was all there in the read me. Just didn't understand at first.

Also, the map to S function didn't function. So a made a different solution to get the S drive.
The end result is the same, and I can compile the game now.
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
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

#12
I've found a typo in a makefile.
Not serious, but it made my first attempt fail.
https://bitbucket.org/dreadnaut/restunts/src/aa1e714a66f8f9bd0d78bb1c0c3ab6b69252721d/src/restunts/dos/makefile#lines-14

ASMORIG_OBJFILES = $(ASM_OBJDIR)\segments.obj $(ASMORIG_OBJDIR)\seg000.obj
should be ASMORIG of course.
If the file exists there then it won't be a problem I think, but still.

I will not touch the repository, I do not consider myself qualified to do so.




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
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

Sorry. Me again.
I compiled a original stunts and a restunts with the readme. And besides the above mentioned false start they both were compiled without issues.

But.
ReStuntoexe is 808kb large and ReStunts.exe is over 970kb.
How did they become so large?

They run fine as far as I can tell..
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
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

The original asm code should produce a skimcga.exe like size, due to its assembler nature it could be only grow as big as the asm code more or less exactly defines

The size of the build with ported c code will be compiler defined, usually c based code could be (much) larger, but ~900 kb seems very large, maybe its the debug information thats get added to the executable