Hi H.sie.
I tested your patch (h.sie Pointer Test) and on all boats except of IIA and IID everything was ok.
On IIA and IID, instead of medium damage I received a message "uboat lost".
Checked on pure SH3 and with SH3+Uboat Total War.
I have also a question regarding your periscope fix. When the boat is at above 7kts speed, it's automatically going down - good. However, it is possible also to force lowering when the sub for example below 30 m of depth ? It would prevent against searching for DDs coming to attack.
Once again thank for help with SH3.exe, now I can patch the file

.
@SquareSteelBar: Thank you for the link