Log in

View Full Version : FOTRS Ultimate .9 on Mac


MrNishino
08-06-19, 01:23 AM
Hello,

My first post here: I'm running SH4 on my 2019 iMac, including stock v1.5 and FOTRS 1.3, with no problem by using a Wineskin wrapper. Just started using FOTRS Ultimate .9 and am very impressed with it, it's like a whole new game. That said, .9 is having performance issues (including freezing up) and I think some of that is that I'm not using Large Address Aware. I realize that that installation instructions for FOTRS Ultimate .9 call for running Large Address Aware, however since I'm using SH4 with Wineskin on my Mac, I'm not sure if there is a way to use Large Address Aware. Does anyone have any suggestions on how to make it run better? I really like this version and would love to really dig in and play it more.

Thanks in advance!

Aktungbby
08-06-19, 01:46 AM
MrNishino!:Kaleun_Salute:

THEBERBSTER
08-06-19, 05:40 AM
A Warm Welcome To The Subsim Community > MrNishino
Subsim <> Make A Donation <> See The Benefits <> Support The Community (http://www.subsim.com/radioroom/showpost.php?p=2027002&postcount=1)
SH3 – 4 - 5 Tutorials > Downloads > Other Useful Information > See Links in My Signature Below

propbeanie
08-06-19, 07:56 AM
Our resident Wine expert is MIA, and Rockin Robbins who does Linux and Wine is not around as much, but we'll see if he knows anything about the Mac Wineskin. Don't hold your breath though. Have you tried to find any info on playing old DirectX v9 games in any of the Wineskin documentation - if there is any?... Also, "Welcome to SubSim!" :subsim:
:salute:

cdrsubron7
08-06-19, 10:38 AM
Welcome aboard, MrNishino. Happy to have you with us. :salute:

MrNishino
08-06-19, 11:30 AM
Thanks for the welcome all!

No, I don't know much about Wine at all, I followed a tutorial and used a porting kit which did the work for me. I could try to do more research, though I must admit I'm not very comfortable with this stuff. Part of me is thinking maybe it would just be easier to run Windows 10 via Bootcamp. I even have a retired Mac laying around that I could use just for that. Maybe this would be easier and work more efficiently?

BarracudaUAK
08-06-19, 02:57 PM
Our resident Wine expert is MIA...

Would you by chance be refering to me?

I'm here, I'm just not logging in every time I stop by.
I just wave as I roll by... :D





...
I'm not sure if there is a way to use Large Address Aware.

...




If memory serves, I could not get the SH4 specific Large Address Aware patch to work with the steam version, on WINE, running Linux...
Or maybe that was Fallout: New Vegas? :hmmm:


HOWEVER!


I did find a generic LAA patch program that simply changes the right 'bits' in the exe file header for most exe files, and it worked for FO:NV and also for SH4 I think...:hmmm:


It's been a while and I've been playing a bunch of other games (Kerbal Space Program, Fallout 4, etc.)


But, if you want to try to patch it, I can try to help.


Well I'm off to give this another go and refresh my memory on how to do this.




Barracuda

propbeanie
08-06-19, 03:50 PM
:har: :lurk: why - yes, I was! :yeah:


You might be referring to the NTCore 4gig (https://ntcore.com/?page_id=371) Patch? It doesn't use the MS netFramework :salute:

BarracudaUAK
08-06-19, 05:46 PM
:har: :lurk: why - yes, I was! :yeah:


You might be referring to the NTCore 4gig (https://ntcore.com/?page_id=371) Patch? It doesn't use the MS netFramework :salute:


Yeah, I think that's the one.

Just checked my Steam install folder for the "Win 7 64 bit" prefix (aka bottle), and I did indeed patch it with the generic 4gb patch.

Just ran a quick test, at the terminal type: wine 4gb_patch.exe sh4.exe


I had the file manager (Dolphin in KDE) open so I could see the changes as they happened...
4gb_patch.exe made a copy of sh4.exe named sh4.exe.Backup, then patched sh4.exe


I tried running SH4 and it kept complaining about missing .dll files, so... I'm reinstalling SH4.


I modded that one several times and I might have had issues.
Plus, it'll re-install directx, etc. since it will technically be the "first run", so that might fix it.
I've had this Steam install for a few years, occasionally Wine seems to 'reset' a prefix when it upgrades.


I'll post up how it goes once I've had a chance to test both un-patched and patched SH4.



EDIT: It's still complaining (and including some of the SH4 game files), so I'm trying my 32bit Win7 (formerly XP) install of the Windows Steam client.




Barracuda

BarracudaUAK
08-06-19, 06:36 PM
And it works...




I tried the 32bit prefix where I had installed dx9 many moons ago, and sh4 worked (finally).
Both BEFORE, and AFTER the LAA patch.


Just for clarity...
At a terminal:

wine 4gb_patch.exe sh4.exe


And it should patch it with no issues.


Barracuda

propbeanie
08-06-19, 06:50 PM
Noice... now for MrNishino to tell us if that works on a Mac... :salute:

MrNishino
08-06-19, 09:32 PM
Just gave it a try, didn't work. Got a message "Couldn't open executable".

propbeanie
08-06-19, 10:15 PM
I don't remember how the file attributes (sharing & permissions??) work on a Mac, been too long, but in Windows, there is a Read-only attribute that prevents anything from altering an executable file, unless you have administrator rights. Since the NTCore applet, and others like it, flip 2 bits in the header of the "target" file, if you don't have write permission, you might get that message... :salute:

BarracudaUAK
08-06-19, 10:30 PM
Just gave it a try, didn't work. Got a message "Couldn't open executable".




Did you just (double) Click the 4gb_patch.exe?


If I do that in my file manager it gives me the same error.
To patch it I must use the terminal..



Does a Mac have a "terminal", i.e. a command line interface (like DOS was)?


I'm thinking it should, since Apples OS is (was) based on Unix...


I'll do some checking... Which OS version are you running?
Might help narrow it down a bit!:up:




I'll be back again... hopefully sooner this time.:D


Barracuda

BarracudaUAK
08-06-19, 11:10 PM
So it does... found a few links here that walks you through how to access it.
This page is from 2012, and it's for OSX...
https://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line


Scroll down the page in the link to:


"How to open the Command Line"
That should get you started, and give you a basic idea.


-------------------------------


IF you have a newer version of MacOS (when did it change?), then this link from 2017 may be more helpful.
https://www.taniarascia.com/how-to-use-the-command-line-for-apple-macos-and-linux/


It goes into a bit more detail, but it still will tell you how to find it, and then gives more info.

Main area to focus on (for now) would be the Sections:
"What is the Command Line?"

until you reach the section "Creating Files and Directories".


You can skip the rest (for now), as it is not necessary to know to use the patch.

Either will give you the basic commands (they are the same), but appearently accessing the terminal is different.

Then we just need find your SH4 Directory/Folder and then we can get sh4.exe patched.


------------------------------------------------------------------------------------------------------

If you want to check WINDOWS file permissions, i.e. "read only"...
In the Terminal type:


wine winefile


This will start a Win95/98 style file manager.
Find your SH4 folder
"Right-click" on sh4.exe (I'm not sure how you do that on a Mac...)

Select "Properties"
Then look for the "Read Only" check-box at the bottom.
IF it is 'checked', click the box to 'uncheck' it and then click OK.


Exit "winefile" by clicking "File" in the top left corner
Then Click "Exit".
------------------------------------------------------------------------------


Barracuda

MrNishino
08-07-19, 01:12 AM
Just tried the terminal and got the message "cannot execute binary file". And my OS is 10.14.6. Thanks!

BarracudaUAK
08-07-19, 02:26 AM
Just tried the terminal and got the message "cannot execute binary file". And my OS is 10.14.6. Thanks!


Ok, a quick search on this shows that the file is either,


A: not compiled (unlikely)
or
B: A Linux executable (that would be WINE).

So, since WINE is compiled and running, and we know it is because you could play SH4...

That leaves me with a few questions:

1: Where you in the SH4 folder in the terminal?

2: Is the 4gb_patch.exe in the SH4 folder?

and last and possibly most important:

3: Where is WINE installed???


I'm thinking 1 and 2 are "yes", given the error message, but just to confirm. :up:
I'll investigate the last question.


EDIT: Quick test, can you open a terminal and type:
wine --version


It should print out the version that you have, this will let me confirm it is talking about WINE.
On my system I get this:

wine-4.12.1 (Staging)

Yours should be similar.
END EDIT.



Barracuda

MrNishino
08-07-19, 09:17 AM
Yes to 1 & 2. This is running on a Wineskin Wrapper. As far as location, I have a directory I named Silent Hunter Fall of the Rising Sun, which contains three folders: Contents, drive_c, and Wineskin.

The folder "drive_c" contains the Ubisoft SH4 files, buried under a couple layers.

The "Contents" folder contains some Wine files, including a Wineskin launcher and Unix executable called winetricks.

In the "Wineskin" folder, where I ran Terminal, this is what I could find so far: Wineskin 2.9.0.2, Engine: WS10WineCX64Bit18.5.0.

BarracudaUAK
08-07-19, 07:37 PM
I saw you post earlier, but just got a chance to reply...


I'm digging, but just wanted to let you know I'm still looking...:Kaleun_Binocular:






Barracuda

BarracudaUAK
08-07-19, 08:11 PM
BTW, if you haven't already guessed,
I haven't used a Apple/Mac in years. So I'm trying to figure out where it all goes.

------------------------------------------------------------------------------------------------------------------------

OK, I *THINK* I know why it gave an error last time... It might not know where the WINE executable file is.


Or maybe I'm barking up the wrong tree... :hmmm:

However this site gives the rundown on how to setup several things...

I'm NOT suggesting you do all of this, I'm just referencing it so you know where I'm getting all my Mac info... :doh:

http://www.speedofmac.com/tutorials/how-to-use-wine.html

The top box under "Before", gives me a clue as to where WINE itself is located.

~/./wine/bin/wineBut a few lines later it listed as:

/wine/bin/wineTry those in a terminal, and see what it spits out.

If it's not there, then it should give an error, otherwise -IF IT WORKS- you should get WINE giving you something like this:


Usage: wine PROGRAM [ARGUMENTS...] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit
wine --patches Output patch information and exit
wine --check-libs Checks if shared libs are installed
-----------------------------------------------------------------------------------------------


When you get a chance to check it and post back, then we'll have a better idea what to do next.

Barracuda

MrNishino
08-07-19, 10:20 PM
Thanks again for all your help. Haven’t had a chance yet to try it, will do later this evening. To clarify: since we’re looking for the Wine executable, that means that the patch modifies the Wine executable, not the SH4 executable?

BarracudaUAK
08-07-19, 10:50 PM
To clarify: since we’re looking for the Wine executable, that means that the patch modifies the Wine executable, not the SH4 executable?

No, the patch does modify sh4.exe...

We just need to find WINE to make sure that we are telling MacOS to run 'wine'.

Best DOS example I can think of (since DOS is very simple, and it's all command line):
Let's say you want to edit a file named "textfile.txt", but it is on D:\.

All system files (including the program "edit") are on "C:\".
You must either:

1: Be at:

C:\and type:
edit d:\textfile.txtOR

2: Be at:
D:\and type:
C:\edit textfile.txtOR

3: From ANYWHERE ELSE, such as:
E:\games\too\many\folders\and\even\more\foldersYou must type:
C:\edit D:\textfile.txtWe are specificaly calling each program and file by their location.





Now UNIX/BSD(UNIX)/MacOS/Linux:
IF a directory is in the "PATH", then the OS will look for the executable (such as wine) there.
IF the executable is not in any of those directories it will give an error.


So all we are doing is looking for "wine" so we can tell the OS to /run/this/file/located/right/here.


It's like asking someone "Can you go get some milk from [store name here]?"
And *NOT* leaving them to their own devices.


Hopefully I didn't lose you with my rambling...:doh:



Barracuda

MrNishino
08-07-19, 11:03 PM
"No such file or directory". The closest thing I could find is a Wineskin executable. I also tried running the patch in a few of the folders, no luck.

BarracudaUAK
08-07-19, 11:19 PM
"No such file or directory". The closest thing I could find is a Wineskin executable. I also tried running the patch in a few of the folders, no luck.


OK...:hmmm:


This would have been helpful to find a bit sooner...:doh:

Try throwing this in a terminal:
find / -name wine You may get a bunch of directories...


On Linux it's usually in
/bin
or
/usr/bin


I'm not sure how close MacOS still is to UNIX's system structure.
Still digging...


EDIT: BTW, what is the extension for a Mac executable file?
EDIT EDIT: All the sites I find tell me HOW to install it, but not WHERE it's installed!

Barracuda

MrNishino
08-08-19, 12:42 AM
Got lots of folders and all said Access or Permission Denied. I'm going to try reinstalling SH4 with Wineskin Winery instead of that porting kit I used, maybe this will be different. I really don't know anything about any of this stuff, but now that we're under the hood, I'll try this (just started it and not looking encouraging). And as far as Mac executable extensions, DMG and APP.

I'm beginning to wonder if I should just install Windows 10 via Bootcamp instead, as MS permits unregistered use of it. Mac OS is going to stop supporting 32 bit applications soon, they announced Mojave is the last OS to support 32 bit, so I'll have to deal with that in a few months as well. What do you think?

BarracudaUAK
08-08-19, 01:44 PM
Got lots of folders and all said Access or Permission Denied. I'm going to try reinstalling SH4 with Wineskin Winery instead of that porting kit I used, maybe this will be different.
...


Going the direct route does help cut down on the variables.
Might get a better result.



I really don't know anything about any of this stuff,
...


I don't really know anything about Mac, other than it's based on UNIX.:o
So that's the direction I've been working from.
So we're kinda in this together! :doh:


...
but now that we're under the hood, I'll try this (just started it and not looking encouraging).
...


In my experience with Linux, it never does.
Until it works. :up:

...
I'm beginning to wonder if I should just install Windows 10 via Bootcamp instead, as MS permits unregistered use of it. Mac OS is going to stop supporting 32 bit applications soon, they announced Mojave is the last OS to support 32 bit, so I'll have to deal with that in a few months as well. What do you think?

This is the same as a "dual-boot" on Linux.
You could, but that's a whole seperate can of worms.
I've definately got 0 experience doing that on a Mac, so I would be of no help there.

As far as the 32bit, many Linux Distrobutions are dropping 32bit versions of the OS.
But, so far, most are keeping 'multi-lib' (I think thats the name) which allows 32bit programs on a 64bit OS.

So it depends how Wine handles it. If the Windows exe(SH4) can have all 32bit requirements satisfied by 64bit WINE, then it should be ok in the long run.


...
And as far as Mac executable extensions, DMG and APP.
...


Ok,I read something about it on one of the sites, but they didn't go into details.:doh:
I'm wondering if the...
Re-reading some of your earlier post I think I may have missed something...


...
This is running on a Wineskin Wrapper. As far as location, I have a directory I named Silent Hunter Fall of the Rising Sun, which contains three folders: Contents, drive_c, and Wineskin.

The folder "drive_c" contains the Ubisoft SH4 files, buried under a couple layers.

The "Contents" folder contains some Wine files, including a Wineskin launcher and Unix executable called winetricks.

In the "Wineskin" folder, where I ran Terminal, this is what I could find so far: Wineskin 2.9.0.2, Engine: WS10WineCX64Bit18.5.0.

Is that files full name
"Wineskin.app"?
If so can you open the "Wineskin" folder again, and in a terminal type:

WineskinAnd see what it does?

They may have re-named the executable file for MacOS...:hmmm:
Or I'm totally wrong.



Barracuda

MrNishino
08-08-19, 05:51 PM
I will give all this stuff a try this weekend when I get a chance and report back. And thanks once again!

propbeanie
08-08-19, 08:40 PM
Is your current Mac OS a 32-bit version? I'm not familiar with them at all anymore. If it is, I'm wondering if it can even address the require memory. I know the Mac addressing scheme is different from the Windows XP version, of which you can only use 3.25gig maximum anyway, no matter the addressing scheme, since the OS uses all of the rest.

All you need to do though is set the bits on the SH4.exe file... do you have a PC available that you could copy the SH4.exe to, even by sneaker-net, and set the bits on the PC with NTCore, copy it back to the Mac and see what happens?... :salute:

MrNishino
08-08-19, 09:26 PM
My Mac OS is 64 bit and allows 32 bit software to run, but when the next big OS version comes out that will end (per Apple’s announcement). I don’t have a PC, but that’s an interesting idea and I could give it a try. I’ll try that as well this weekend. Thanks!

MrNishino
08-08-19, 09:32 PM
Since I am planning on trying the Windows via Bootcamp method, I could try this once I have Windows running. I have an older retired Mac laying around where I was going to try Windows first (so I don’t have to have it on my newer one if I don’t like Windows).

propbeanie
08-08-19, 11:50 PM
Since I am planning on trying the Windows via Bootcamp method, I could try this once I have Windows running. I have an older retired Mac laying around where I was going to try Windows first (so I don’t have to have it on my newer one if I don’t like Windows).
Oh, it is a paradigm shift, to say the least... Even after 30 years, I still miss aspects of the old Macintosh II machines. Then again, I miss my C-64... :har:

BarracudaUAK
08-09-19, 12:08 AM
I will give all this stuff a try this weekend when I get a chance and report back. And thanks once again!


Any time...:up:
As I dig for info, I post things I would be trying, if I was sitting in front of the computer.
Appologies if that get tiresome.

...
All you need to do though is set the bits on the SH4.exe file... do you have a PC available that you could copy the SH4.exe to, even by sneaker-net, and set the bits on the PC with NTCore, copy it back to the Mac and see what happens?... :salute:


Also a possibility...
I was about to suggest hex-editing it by hand, but he might think we are crazy and run away screaming.

My Mac OS is 64 bit and allows 32 bit software to run, but when the next big OS version comes out that will end (per Apple’s announcement). I don’t have a PC, but that’s an interesting idea and I could give it a try. I’ll try that as well this weekend. Thanks!

Since I am planning on trying the Windows via Bootcamp method, I could try this once I have Windows running. I have an older retired Mac laying around where I was going to try Windows first (so I don’t have to have it on my newer one if I don’t like Windows).


Sounds like a viable solution, even if it is just for running nothing but mod tools.

I have a few WINE 'prefixes' (aka "bottles") configured for the sole purpose of running mod tools, save editors, etc.

I should be around my PC this weekend, if you need any more "help" lemme know.

A lot of good it's been so far!:doh:



Barracuda

MrNishino
08-09-19, 01:30 AM
Success!! (Sort of).

Since I have no idea about how Wine runs or where it's installed or anything about this stuff (and computers in general) at all, I downloaded Wine off WineHQ and installed in a logical location. In order for it to run, it requires XQuartz also installed.

Well, well, well, the 4gb Patch didn't work, but LAA did. And it did indeed modify the SH4 exe. And SH4 FOTRS indeed appears to be functional. It does not appear to freeze up - I ran Battle off Samar, which had previously killed it instantly and it seems to be ok. That said, the performance is not exactly impressive and not confidence inspiring. Good enough to play, but I wouldn't be surprised to see it freeze up every so often either. It'll need more testing.

Knowing that Wine and LAA do indeed work, I'm thinking that I could try to a reinstall this weekend not using the porting kit I had used, just to see if that could improve the performance. I also am curious how it compares with a Windows install.

And then of course there's the open question about what happens when the newest Mac OS comes out in the next couple months.

Thank you once again Gentlemen!

propbeanie
08-09-19, 09:16 AM
Congratulations on the partial success of at least getting the bits in SH4.exe flipped to show that it can address over 2gig of RAM. As for "efficiency" with the game, one big thing is to empty the Save folder. The game installs in the Silent Hunter folder, but actually runs mostly off of the data that is transferred to the Save folder automatically when you run the game the first time. If you don't clear the Save folder, the old data in that folder is still used, even though you might have newer data in the game folder now, such as a new mod activated. Very frustrating aspect of the older games.

For the video display with Windows, you want to match the monitor to Windows to the game. In other words, if you have a 1980x1024 display, set Windows to that same 1980x1024 display setting. Once in the game, scroll down the list of settings for the same display resolution. That way, you've got a one-to-one ratio and no conversions. Also, those other settings in the "Options - Graphic Settings" in the game can make or break your "efficiency". I am on an i7 laptop with onboard Intel graphics, with a 1600x900 display (Windows set the same), so shared memory with the 8gig of RAM in the beast, and this is what it will run:

https://i.imgur.com/bGM76Of.jpg

my old i3 (may it rest in peace) was similar. I also have sober's anti-lag (https://www.subsim.com/radioroom/downloads.php?do=file&id=2871) now running on the laptop as an experiment, with the the cfg file set to "RenderAheadLimit=2" and "FPSlimit=30", to see if I can control its framerate. You do not need over 30fps in the game, since it doesn't use anything over that, and all you do when it runs higher, is throw the game's internal "clocks" out of whack, taking them out of sync with each other, as Front Runner discovered. I am going to have to change my game resolution settings to the 60Hz choice though, because I am getting a steady 25fps in the game right now with the above settings at 40Hz. Previous to putting in anti-lag, it would run at 45-70 fps, depending upon what was happening around my boat. :salute:

MrNishino
08-09-19, 11:52 AM
Where is the Save folder located? I don't see a folder called Save, but I do see a file called Settings.sav and that was modified last night.

And in terms of screen settings: my display is 4k and the OS is set to that. When I've run SH4 in 4k, it made the game controls too small to read. Is there a setting or mod for that perhaps?

BarracudaUAK
08-09-19, 12:11 PM
Success!! (Sort of).
...


Good to hear. (I know that feeling!)


SH4 saves in Windows are usually in "My Documents"...
Which means with WINE it'll be 1 of 2 places...

In Linux when the Distro (such as Fedora) has WINE set to do the 'desktop integration'...
It uses the "Documents" folder...

Should be either:

1: ~/Documents/SH4

or in the .wine folder,

2: ~/.wine/drive_c/users/[user-name]/My Documents

"~" is usually /home/[user-name] (on Linux/BSD/UNIX)
I'm not exactly sure if MacOS changes that, and in UNIX a "." means it's 'hidden'.


Barraucda

MrNishino
08-09-19, 02:11 PM
I have a ~/Documents/SH4/data/cfg folder, inside are:

some .cfg and .tmp files, and:

/SaveGames
/UPCInitial
/UserPlayerContext
/UserPlayerContextGE

Could I just delete or empty the entire ~/Documents/SH4 folder?

I'm also going to try a fresh install without opening it prior to running LAA and installing FOTRS and compare how they run.

BarracudaUAK
08-09-19, 02:21 PM
...

Could I just delete or empty the entire ~/Documents/SH4 folder?

I'm also going to try a fresh install without opening it prior to running LAA and installing FOTRS and compare how they run.




Yes, SH4 will create all needed files.



Barracuda

propbeanie
08-09-19, 04:59 PM
Where is the Save folder located? I don't see a folder called Save, but I do see a file called Settings.sav and that was modified last night.

And in terms of screen settings: my display is 4k and the OS is set to that. When I've run SH4 in 4k, it made the game controls too small to read. Is there a setting or mod for that perhaps?
The 4k resolution is 4096x2160, which is basically a 1.9:1 resolution, so you could do a divisible of that, such as half at 2048x1080, or 2k, and you should see a definite size improvement, and not end up with a distorted image. :salute:

MrNishino
08-09-19, 10:47 PM
Cleared out that folder and it does indeed help - noticeable improvement in performance. Not perfect, but fully usable. I'll probably try the Windows installation at some point and will report back on how it goes, but right now at least I have a fully functioning game.

With regard to Mission Editor and Wine, what do you suggest? Should I make a wrapper for that as well or just open it in Wine? I've already been working on a few missions over the past couple weeks (and would love to contribute them to this site once they're in good shape).

BarracudaUAK
08-09-19, 11:15 PM
Cleared out that folder and it does indeed help - noticeable improvement in performance. Not perfect, but fully usable. I'll probably try the Windows installation at some point and will report back on how it goes, but right now at least I have a fully functioning game.

With regard to Mission Editor and Wine, what do you suggest? Should I make a wrapper for that as well or just open it in Wine? I've already been working on a few missions over the past couple weeks (and would love to contribute them to this site once they're in good shape).


Good to know it's working.



Try the one that you are using for SH4.
I have the Steam version of SH4 1.5, and I can only get the mission editor to run in the same prefix/bottle that SH4 runs in.


Barracuda