SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-13-11, 02:34 AM   #901
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Quote:
Originally Posted by Stiebler View Post
@H.sie:

But I have discovered something else!
the q-d-tank is referenced by float [esi+438h].
the crash-dive flag is referenced by byte [esi+440h].

Stiebler.
@Stiebler: What's wrong with that? I don't see any problem.

Congratulations to your fix. I also have a fix that still has some problems. Short code but difficult, since it uses pointers. So as always: 2 solutions are better that none.

Your fix is only located in SH3Sim.act or does it also change sh3.exe?

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie

Last edited by h.sie; 01-13-11 at 03:17 AM.
h.sie is offline   Reply With Quote
Old 01-13-11, 07:05 AM   #902
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default Stiebler ‘Crash-Dive Blues’ Fix.

I have fixed the crash-dive blues.

Code principle is completely trivial:
IF (crash-dive-flag = 0) THEN quick-dive tank = 0.5000.

Of course, it took H.sie and me some time to discover all the key features. I myself wrote over one page of assembly code just to locate the quick-diving tank. Then I found it fixed at [esi+438h], so I could reduce all the code to a few lines!

The fix appears to solve all problems, even though it sets q-d-tank to 0.500 on surface, when value should be 0.000 (sometimes).

This code is also called uselessly every time there is a call to the hydroplanes. However, the code is so compact, that any code to avoid this useless recall would probably be a lot slower!

I've given everything a massive test under all dive conditions that I can think of: crash-dives, interrupted crash-dives by clicking on depth-gauge above and below crash-depth, conventional dives, orders to periscope depth, interrupted crash-dive with order to periscope depth, blowing ballast, resumed crash dives after interruption. *Everything" works well, with full stability at slow underwater speed.

I shall release the code for some bold testers after H.sie has examined it.

@H.sie:
You have a PM.
You need SH3SIm.act only, no need to alter sh3.exe.

Stiebler.
Stiebler is offline   Reply With Quote
Old 01-13-11, 07:25 AM   #903
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Stiebler: That would be really great!!! I'll look into it ASAP.

One thing I ask myself: With your fix the q-d-tank is 0,5 instead of (as you wrote) 0.0 when surfaced. Doesn't this change the boats physics when surfaced, since the boats mass is higher??

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie

Last edited by h.sie; 01-13-11 at 08:24 AM.
h.sie is offline   Reply With Quote
Old 01-13-11, 08:51 AM   #904
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default Crash-dive Blues NOT fixed

I have found in further testing that the value of esi, used to point to the crash-dive flag and the q-d-tank, varies repeatedly in the vicinity of a convoy, and ultimately causes a serious computer crash (values written to wrong memory).

Back to the drawing-board.

@H.sie:
Quote:
One thing I ask myself: With your fix the q-d-tank is 0,5 instead of (as you wrote) 0.0 when surfaced. Doesn't this change the boats physics when surfaced, since the boats mass is higher??
I considered that, too. But the U-boat seems to ride perfectly well in the water on the surface.

I also considered if a residual value of 0.500 in the q-d-tank might affect depth-keeping after an interrupted crash-dive at periscope depth, or if it would affect rate of rising from deep waters. Or maybe the crash-dive rate might be affected.

None of these parameters seem to be affected enough to notice.

Stiebler.
Stiebler is offline   Reply With Quote
Old 01-13-11, 03:53 PM   #905
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Stiebler: Good news: I was able to reconstruct direct pointers to the quick-dive tank and the crash-dive flag, so they both can easily be accessed & manipulated from the little controlling routine I programmed in sh3.exe for continuously watching/controlling multiple things (like snorkel speed restriction and so on). I don't have to patch Sh3Sim.act. So my fix will work very similar to yours, but without risking to write into wrong memory locations:

Immediately (or some seconds after) the crash-dive flag is set from 1 back to 0, I force q-d-tank=0,5 once.

And since the fix is active only in the special situation when crash-dive flag is switched from 1 back to 0, it won't affect other situations, e.g. when boat is surfaced.

That's it. Very optimistic that it will work.
h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie

Last edited by h.sie; 01-13-11 at 06:11 PM.
h.sie is offline   Reply With Quote
Old 01-13-11, 05:14 PM   #906
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

I think the "crash dive blues" is history. After some tests I think one can now interrupt the crash dive anytime without losing control of the boat. The fix is only active once, immediately after a crash dive is interrupted, that means: it does not affect boats physics in other situations. (Yeah!)

@Stiebler: Will send you a PM with a BETA version, including Fix code.

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 01-14-11, 11:53 AM   #907
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@H.sie,

Great work!

I shall test it immediately. You have a PM.

Stiebler.
Stiebler is offline   Reply With Quote
Old 01-14-11, 01:03 PM   #908
Fubar2Niner
Silent Hunter
 
Fubar2Niner's Avatar
 
Join Date: Nov 2002
Location: London. UK
Posts: 4,139
Downloads: 275
Uploads: 0
Default

@h.sie & @Stiebler

Geez guys, don't you ever take a break, I'm going to nominate you both for next years awards already

Best regards.

Fubar2Niner
Fubar2Niner is offline   Reply With Quote
Old 01-14-11, 03:31 PM   #909
Magic1111
Silent Hunter
 
Join Date: Sep 2008
Location: Germany - Sailing on U-552 in North Atlantic
Posts: 4,429
Downloads: 783
Uploads: 0


Default

Quote:
Originally Posted by Fubar2Niner View Post
@h.sie & @Stiebler

I'm going to nominate you both for next years awards already

Best regards.

Fubar2Niner
...yes, me too...
__________________
Magic1111 is offline   Reply With Quote
Old 01-15-11, 06:39 AM   #910
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Thanks guys. The best award for me is a working sim.

Waiting now for Stieblers final test results...........
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 01-15-11, 09:59 AM   #911
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

Nominate H.sie for the award, not me.

He does all the hard work.

Test results so far:
H.sie's fix for the Crash-dive blues works perfectly.

I have tested it in convoys with crash-dives, interrupted crash-dives, with damage, without damage, after air attacks, after destroyer attacks, with silent running, without silent running, and reloading after a saved game. Everything so far is perfect.

Stiebler.
Stiebler is offline   Reply With Quote
Old 01-15-11, 10:20 AM   #912
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Great! So I'm pleased to announce the "Fix for the Crash Dive Blues by h.sie and Stiebler" (whose idea I used in the fix) to be included in the forthcoming patch version V15E. But it will take some time to program the (external) torpedo reload issue.

Crash dive blues now is history!

h.sie
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 01-15-11, 10:24 AM   #913
LGN1
Ace of the Deep
 
Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
Default

Great news, h.sie & Stiebler I'm looking forward to V15E!

Cheers, LGN1
LGN1 is offline   Reply With Quote
Old 01-15-11, 03:05 PM   #914
Delareon
Planesman
 
Join Date: Dec 2006
Posts: 192
Downloads: 77
Uploads: 0
Default

Does this also mean the bug where u cant save your game while dived should be fixed (because your boat sometimes sinks and you cant do anything against it)?
(Probably fixed of course always with the risk of a bug while in mass tests but....you know )

Never experienced the bug myself because since i first heard about that bug from multiple sources i never tried it on my own.
Delareon is offline   Reply With Quote
Old 01-15-11, 03:17 PM   #915
fitzcarraldo
Argentinian Skipper
 
fitzcarraldo's Avatar
 
Join Date: Jul 2009
Location: Somewhere between Buenos Aires and the Bungo Suido
Posts: 5,129
Downloads: 3215
Uploads: 0


Default

Quote:
Originally Posted by h.sie View Post
Great! So I'm pleased to announce the "Fix for the Crash Dive Blues by h.sie and Stiebler" (whose idea I used in the fix) to be included in the forthcoming patch version V15E. But it will take some time to program the (external) torpedo reload issue.

Crash dive blues now is history!

h.sie
Great news! Watching the new update...

Best regards.

Fitzcarraldo
__________________



My subject is War, and the pity of War. The Poetry is in the pity - Wilfred Owen.
fitzcarraldo is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:29 AM.


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