Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolution 1920x1080 is possible? #2

Open
usernatilds opened this issue Jan 12, 2018 · 3 comments
Open

Resolution 1920x1080 is possible? #2

usernatilds opened this issue Jan 12, 2018 · 3 comments

Comments

@usernatilds
Copy link

Thanks.

@tetration
Copy link
Owner

tetration commented Jan 12, 2018

I think that if you are able to run the game through the sc3u.dynamic executable its possible to play it on 1080P(1920x1080) or even higher 4K. However the sc3u.dynamic is known for being unstable and some Debian based distros dont run it well. I´ve just recently made a patch for the Windows version to run in Full HD. When I have some free time again I will try to dig through the files of the linux version more. And then I will try to make a patch for the standard linux executable of the game to run in Full HD.

In the meantime I recommend you to try to use the sc3u.dynamic to try to run it in 1080P or higher resolutions.

Edit: You can find the sc3u.dynamic in the folders of the game which can probably be found in usr/local/games/SC3U/sc3u.dynamic

@usernatilds
Copy link
Author

Edit sc3u.dynamic? A try using leafpad, but appear in binary.

@Tatsh
Copy link

Tatsh commented Feb 28, 2024

Yes. It is possible. The following information only applies to sc3u.dynamic:

In sc3u.dynamic the offsets are:

width1 F57E5
height1 F57EF

width2 F57FB
height2 F5805

The reason there are 2 sets is because of a branch that falls back to 800x600 if the read configuration is considered invalid. Anything outside of the built-ins are considered invalid up to 1280x1024.

Before running the patched game, delete ~/.loki/sc3u or the patch will not work due to prior settings.

# Set to 4K
from struct import pack
with open('sc3u.dynamic.bak', 'rb') as f:
    content = list(f.read())
width_bytes = pack('<h', 3840)
height_bytes = pack('<h', 2160)
for w_offset in (0xF57E5, 0xF57FB):
    content[w_offset] = width_bytes[0]
    content[w_offset + 1] = width_bytes[1]
for h_offset in (0xF57EF, 0xF5805):
    content[h_offset] = height_bytes[0]
    content[h_offset + 1] = height_bytes[1]
with open('sc3u.dynamic', 'wb') as f:
    f.write(bytes(content))

Default values are 640 (0x8002), 480 (0xE001) and 800 (0x2003), 600 (0x5802) respectively.

Example values for manual patching:

1920 = 0x8007
1440 = 0xA005

1920 = 0x8007
1080 = 0x3804

3840 = 0x000F
2160 = 0x7008

If you try to set these values in sc3.cfg then the unpatched game will fallback to 800x600.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants