SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   Realism- and gameplay-related hardcode fixes for SH3.EXE (https://www.subsim.com/radioroom/showthread.php?t=174225)

h.sie 11-22-10 05:08 AM

I apologize for any problems my work makes. These problems are not intended. I understand my work as WIP (Mod Workshop!!) and thus problems can occur - they are almost naturally when working with Asm in different OS. So people who fear CTDs should not use my patches - or they should make tests only with an second Installation of SH3 as I do. A CTD is not that worse. It's only that the EIP (instruction pointer of the CPU) doesn't know where to go......:D.

USE ON YOUR OWN RISK!

Time to update my first post.

h.sie 11-22-10 05:28 AM

@Stiebler:

No I did not mean a different constant setting. I had random changes of fog in mind.

Yoriyn 11-22-10 05:44 AM

H.sie: Can you try to upload new EnvSim.act with 12h (or any other) weather change intervals time? Cos last one (with 2h) causing constant weather for me (no change).

h.sie 11-22-10 06:18 AM

@Yoriyn: Currently not, since work is still in progress. If I'm ready, I'll hopefully upload one working bugfree version.

I am sorry for not being able to fulfill individual wishes. In order to not drive crazy I have to focus on one topic at the time.

And I also apologize for not responding to requests for individual wishes (which normally is not my style).

h.sie

Yoriyn 11-22-10 06:43 AM

Don't worry about my wishes, I'm very happy of progress you made in the game modification. Just can't wait when you make another big step to fix a weather :yeah:

Magic1111 11-22-10 06:49 AM

Quote:

Originally Posted by makman94 (Post 1539559)
H.Sie , the envsim.act you uploaded is crashing (maybe is an issue again for the win 7 ?)

Quote:

Originally Posted by Stiebler (Post 1539575)
@General:
Like Makman, I found that use of H.sie's new envsim.act file caused a crash in second-stage loading (after the main menu appears, and the player starts a patrol). I am also using 64-bit Windows-7. This occurred with an un-modded form of the 4GB_Sh3.exe that I have been using for some time now without problems.
In my case, it was a very serious crash, that apparently corrupted at least one other key file. I had to copy over a clean install from another drive and start again.

Stiebler.

Hi h.sie !

I´ve become the same CTD using the envsim.act (Win 7 64Bit) !

Best regards,
Magic

h.sie 11-22-10 08:21 AM

Every CTD pains me. And I must say "thank you" and "sorry" to those who anyhow help me with testing. But it shows that I have to restrict on only essential fixes in the future. no eyecandy, no "nice-to-have".

Stiebler 11-22-10 12:04 PM

@H.sie:
Quote:

5. Windspeed:
The internal algorithm for windspeed calculates an emphasis factor (depending on season, region and so on) and multipies this emphasis factor with a random number. The result lies between 0 and sometimes more than 20m/s. But later the values are delimited to [0,499.....15m/s]. We should not change that -> Side effects. But that's the reason why windspeed sticks at 15m/s; the algorithm is overdriven in some situations.
This is a very valuable discovery.

Surely this is the first point to fix: emphasis-factor x random-number can give more than 20 m/s.

Redistribute - do NOT create an upper limit! - the random number so that >15 m/s cannot be achieved. For example, if the random numbers are in the range 0-255, but a random number > 200 results in wind speeds > 15 m/s, then multiply all random numbers produced in this part of the code by 200/256.

This will require a jump out of the code to a few lines of assembly at the end of the code, then a jump back to the exit point. Can you show a few lines of the key assembly code in this forum-thread? (with comments about which variables are referred to?).

Stiebler.

Gammel 11-22-10 02:08 PM

great work you already did h.sie - sorry for interupting the weather talk... :)

snorkeling with type XXI i have no diesel underwater sound, can anyone using the latest bugfix patch confirm?
Further f12 camera image is blurry 5 knoths and above but thats no biggy to me.

Yoriyn 11-22-10 02:18 PM

I have the same problems on moded version, but can't reproduce this problems on stock (clean) game.

CherryHarbey 11-22-10 02:29 PM

Quote:

Originally Posted by Stiebler (Post 1539760)
@H.sie:
This is a very valuable discovery.

Surely this is the first point to fix: emphasis-factor x random-number can give more than 20 m/s.

Redistribute - do NOT create an upper limit! - the random number so that >15 m/s cannot be achieved. For example, if the random numbers are in the range 0-255, but a random number > 200 results in wind speeds > 15 m/s, then multiply all random numbers produced in this part of the code by 200/256.

This will require a jump out of the code to a few lines of assembly at the end of the code, then a jump back to the exit point. Can you show a few lines of the key assembly code in this forum-thread? (with comments about which variables are referred to?).

Stiebler.

or alternatively take two random numbers between 0 and 16 and multiply together. Maximum value will still be 256 and answer from the range 0 to 256 but skewed towards the lower end.

h.sie 11-22-10 05:26 PM

@Gammel, Yoriyn: Thanks for response. I tried to reproduce your sound issue on Win7/64 and WinXP/32. I chose a XXI in 1945. Started snorkelling. In the modded game I could hear the diesel sound for about 20 seconds while going Full ahead, but then engines are limited to 1/3 ahead - diesel sound disappeared almost completely. But the same happened in unmodded sh3.exe when I manually reduced speed to 1/3 ahead: diesel sound disappeared almost completely.

I also cannot reproduce your F12 freecam bug, neither on Win7/64 nor on WinXP/32. F12 always looks good for me. Only explaination could be a modded cameras.dat (maybe someone enabled blur effect for free cam???). I use the original cameras.dat from GWX3. So please disable all mods that change cameras.dat and try again. What GUI do you use?

h.sie

Gammel 11-22-10 06:08 PM

Quote:

Originally Posted by Gammel (Post 1539805)
great work you already did h.sie - sorry for interupting the weather talk... :)

snorkeling with type XXI i have no diesel underwater sound, can anyone using the latest bugfix patch confirm?
Further f12 camera image is blurry 5 knoths and above but thats no biggy to me.

Quote:

I have the same problems on moded version, but can't reproduce this problems on stock (clean) game.
dam'n you're right - it's the f**kin mods :DL
but which one?

Clean GWX with h.sie's patch is fine (diesel acoustics snorkeling), sorry for false alarm

note to myself: only reporting here while testing with all mods disabled :-))

gui used was MaGui final...

h.sie 11-22-10 06:35 PM

@Stiebler:

You can see it by yourself: Take a debugger (I use OllyDbg2) and set a Breakpoint at EnvSim.act+0xDD61. This code section is executed only when new weather is calculated, so use high TC.

Take a look at the variable referenced by [ESI+3d4]. At the end of the routine, it contains the NewWindspeed calculated!!!

At EnvSim.act+0xDD61 you see the routine call for a random number (RND) between -1 and +1. After the call, the RND is in the FPU, st(0).

In EnvSim.act+0xDD66 the random value (RND) is multiplied with 15,0. So that st(0) can contain values between -15 and +15.

Later, after some other code, In EnvSim.act+0xDD99 a value of 15 is added, so that we have values between 0 and 30 in st(0).

Later, at EnvSim.act+0xDDA5 and so on, the value of st(0) is restricted to [0,4499 - 15].

This is what I described earlier. Looking at the windspeed statistics I presented earlier, one can see, that windspeed was never higher than 6 m/s in Koenigsberg. From this I reasoned an (intelligent) emphasis factor (area dependent?), but which I could not locate in the code up to now.

But I made a mistake: The code does not always go this described easy-to-understand path, that means things are more complex than I initially thought. It needs some more time, but I'm pessimistic I'll understand what happens.

So we can only correct the calculated values for windspeed and fog by a little patch at the end of the routine. Maybe some random function or a function that restricts the length of fog periods to a certain value.

h.sie

Magic1111 11-23-10 02:21 AM

Hello h.sie !

Short question: Is it possible to use your modded File "envsim.act" with your Patch V15C (or without a modded SH3.exe from you as an "Standalone-MOD") ? Or must I use the "envsim.act" ONLY in COMBINATION with your Patch V15D BETA3 ? :hmmm:

Best regards,
Magic


All times are GMT -5. The time now is 05:54 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.