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 09-11-10 04:47 AM

@Badger:

As is wrote earlier: Changing that Factor (byte at 0x11CF90) will -- O N L Y -- (!!!!) work in the non-starforced sh3.exe with former checksum: 510b271d14621361386197be6bd8cc0c , that has been patched with V01 in order to add the routines for longer repair times.

Changing that byte in a different version of sh3.exe will surely shred that executable. So if you are not sure what you do, make a backup of your files.

This course is for users with advanced computer skills only and all is done on your own risk.
I am not responsible for any damage.

h.sie

Badger Finn 09-11-10 07:47 PM

Quote:

Originally Posted by h.sie (Post 1482376)
But my assembler knowledge is not good enough to add new features. I spent 5 hours only to realise a floating-point division by 60,0 because I still have problems with FPU commands.

My assembler knowledge is nonexsisent...ill learn...

Quote:

Originally Posted by h.sie (Post 1482376)
I can test it only for my version of sh3.exe and I've read somewhere that there are 4 different versions of the executable available. Pessimistic that it works with the other versions since it uses absolute hex-addresses. But adapting to the other versions is easy.

Well thats my current mission adapting to other versions...I can only reverse engineer from what your prepared to share...

Quote:

Originally Posted by h.sie (Post 1482376)
When the fix works stable I plan to apply my routines directly into the executable in order to make it independent from the launcher and compatible to SH3 Commander.

Cool I think I can eventually figure that out...lol may take me years...probably more of a result than waiting for UBI...

Quote:

Originally Posted by h.sie (Post 1482376)
@Badger:
As is wrote earlier: Changing that Factor (byte at 0x11CF90) will --
O N L Y -- (!!!!) work in the non-starforced sh3.exe with former checksum: 510b271d14621361386197be6bd8cc0c , that has been patched with V01 in order to add the routines for longer repair times.

Indeed -

Quote:

Originally Posted by h.sie (Post 1482376)
Changing that byte in a different version of sh3.exe will surely shred that executable. So if you are not sure what you do, make a backup of your files.

Modders first rule!

Quote:

Originally Posted by h.sie (Post 1482376)
This course is for users with advanced computer skills only and all is done on your own risk.
I am not responsible for any damage.
h.sie

Thanks for the reply h.sie. I know my way around a computor and you wont find any posts @ subsim from me telling others there mod is faulty and broke my game.

But you will find a few pointed at UBI!!!
Thanks and ill just keep following along -
Cheers for your insights...
Badger

SquareSteelBar 09-12-10 02:59 AM

Quote:

Originally Posted by h.sie
...I can test it only for my version of sh3.exe and I've read somewhere that there are 4 different versions of the executable available...

What's the fourth one?

I know 1. the first one with SF, 2. the cracked one and 3. the non-SF 'official' one...

h.sie 09-12-10 03:34 AM

@SquareSB

Here I read something about 4 different versions:

http://www.9teuflottille.de/index2.html

In the meantime I found a way to enlarge a code section of the exe in the PE header of the file so that no code caves are necessary anymore for my routines. that means the starforced version can be modded easily, too.

my focus is still on fixing some bugs of MY unprotected version of sh3.exe. this will take some time. but when I'm finished, I'll either publish all assembler routines I wrote so that a skilled person can fix the starforced versions, or I'll make a course similar to the above one for starforced version also.

but this time effort only makes sense for me if there is interest.


in the meantime I could fix the display of the repair times. two hours e.g. are now displayed as 2:00 and not as 0:02.

h.sie 09-12-10 03:42 AM

@Badger: Instead of learning assembler (it took weeks to update my knowledge I had from my education years ago) I would suggest to buy the unprotected version of sh3 for some cents. or maybe you have a friend who has unprotected sh3 and doesn't use it anymore and can give it to you as a present.

h.sie 09-12-10 03:49 AM

@Badger:

You will only be able to reverse-engineer my work (which is contained in the file V01) if you DO HAVE the unprotected version of sh3.exe. otherwise you'll fail, because V01 is simply a binary difference built upon unprotected sh3.exe. but if you already have that unprotected exe file, there is no need to reverse-engineer.

SquareSteelBar 09-12-10 04:14 AM

Quote:

Originally Posted by h.sie (Post 1491244)
...Here I read something about 4 different versions:

http://www.9teuflottille.de/index2.html...

Can't find anything at that link - the page is nearly empty... :hmmm:

Do you mean Friedl's site?
http://www.9teuflottille.de/phpBB2/v...3224a77bfddab8

The four versions mentioned there are related to the form they're offered:

1. US download version
2. US DVD version
3. EMEA download version
4. EMEA DVD version

I think they all use the same exe...
The difference between US and EMEA versions is the handling of showing swastikas.


Quote:

Originally Posted by h.sie
...but this time effort only makes sense for me if there is interest...

AFAIK there're many people interested in... :rock:

Anvart 09-12-10 04:32 AM

Quote:

Originally Posted by h.sie (Post 1485333)
CherryH.... is right. Open Command prompt from Accesoires

I already wrote about it at this forum (for a long time)...
I have Win XP...
and you can do menu item "Command Prompt" (for example... or other name) for your explorer...
You must create reg-file with *.reg extension... with next content (and to execute this file):
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\O penDOSBox]
@="Command Prompt"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\O penDOSBox\Command]
@="CMD.EXE /K CD %1"
...
or slightly other form (more modern NT), but the same:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\C mdPromptW]
@="Command Prompt"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\C mdPromptW\Command]
@="cmd.exe /k cd \"%1\""
...
Using:
Open explorer,
go to folder, where you want to work with your file (using DosBox),
open File menu item...
lower you see the name of the chosen folder... open this menu item...
and you see "Command Prompt" menu item... click it :D
... cmd.exe will be executed and you will see your favorite DosBox...
or using right-click popup menu.
...
Advantage - speed and you will not be to write path (full name) for the work-file.

P.S. Some spaces - d efective forum engine... :haha:

h.sie 09-12-10 10:18 AM

@SquareSB: Yes, I meant Friedl's Site. Sorry for the wrong link.

@Anvart: Coool. That's what I was looking for.:)

SquareSteelBar 09-12-10 11:51 AM

Quote:

Originally Posted by Anvart (Post 1491254)
...
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\CmdPromptW]
@="Command Prompt"
...

Or in german:

[HKEY_LOCAL_MACHINE\........]
@="Eingabeaufforderung hier öffnen"


That's a good old registry tweak... :up:

h.sie 09-12-10 12:06 PM

V15A
 
New Version V15A of the online-course "How to fix SH3 repair times bug" available. Course material see my mediafire page, Folder: SH3-Bugfixes.

What it does:
--------------
* Repair times of equipment are 60 times longer than in stock.
* Flooding behaviour as in stock sh3/GWX.
* Longer Repair times are now displayed correct in damage screen (02:00 instead of 00:02).
* Shows patch version number v 1.5A in main menu.


How to apply the bugfix: See the course here:

http://www.subsim.com/radioroom/show...4&postcount=32

But use patch V15A instead of V01 now.

-----------------------------------------------------------------------
For those who want to enlarge the repair times by a factor of 120 instead of 60:

Open sh3.exe using a Hex-Editor and change the byte-value of hex-address 0x145022 from 70 to F0.

(works only for sh3.exe patched to V15A).

-----------------------------------------------------------------------
Use this information on your own risk. I am not responsible
for any damage caused by incorrect appliance of that information.
-----------------------------------------------------------------------

Reminder: This is a technical demonstation for educational and research purposes only. It shows a new technique how SH3 could be modified in order to achieve longer repair times AND realistic floodingtimes. Since it is strongly forbidden to modify copyrighted materials, you MUST IMMEDIATELY delete all files that are modified/created during this demonstration. It is not allowed to use these files for your gameplay and it is even more forbidden to share the files with others. If you are planning to break copyright laws, you are not allowed to take part at this demonstration.

CherryHarbey 09-12-10 02:55 PM

Quote:

Originally Posted by h.sie (Post 1491422)
* Longer Repair times are now displayed correct in damage screen (02:00 instead of 00:02).

Would this show the minutes as well as the hours to repair.
eg stock displays 00:02 but is actually 00:02:35, would this display as 02:35 or 02:00 with V1.5A?

And once again, great demostration of what could be possible if the copyright laws were different.

h.sie 09-12-10 03:11 PM

@CH

Minutes (when more than 59) are messed up because of an SH3 bug. E.g. 1h20 should be displayed as 01:20, but in SH3 it looks 01:80 (one hour 80 minutes). So I programmed it to always show 00 minutes, that means, only 1 hour steps are displayed. But in RL nobody would be able to estimate repair time exactly for every minute.

Periscope damaged, sir. It'll take 2 hours, 34 minutes and 50 seconds.
Only Spock can do that.

CherryHarbey 09-12-10 03:17 PM

Quote:

Originally Posted by h.sie (Post 1491513)
Periscope damaged, sir. It'll take 2 hours, 34 minutes and 50 seconds.
Only Spock can do that.

:)
fair point, I hadn't thought it through.....

h.sie 09-12-10 05:26 PM

@SqareSB: Thanks for the clarification. That makes things easier.

@ALL: Does anybody have detailed information about how long a submarine should be able to dive? the game simulates about 48 hours, but someone told me that in reality much more time was possible?

h.sie


All times are GMT -5. The time now is 10:01 PM.

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.