PSO PC Windowed: Correct aspect ratio
Moderators: BlueCrab, Aleron Ives
- TulioAdriano
- DCEmu Freak
- Posts: 59
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Tue Aug 18, 2015 9:32 am
- Has thanked: 1 time
- Been thanked: 2 times
Re: PSO PC Windowed: Correct aspect ratio
Well, who'd have thought... a simple program with barely 20 lines of code to resize the PSO window grew... and grew...
... And now thanks to the amazing support here, it's now a full fledged loaded/patcher capable of allowing online connection to sylverant, patching the fixes and switching the game from fullscreen into a window... all with a clean installation of PSO, no extra tools needed.
Capture of the program after launching PSO.
Thanks to Tremcaster for the encouragement (I had the chance of meeting him on Altimira while testing the program with a clean PSO for the first time) and suggestions.
And billion thanks to BlueCrab for sharing his loader source code with me. Thanks to that this patcher became done so quickly.
This doesn't do the patching that blocks the mouse from being used, but on the other hand, PSO doesn't read global inputs so switching windows in game is not a problem.
There's a strange bug in Fullscreen mode... but I think it's Windows 10 related. It is described in the readme along with all the other instructions and descriptions of the new features.
I learned a bunch working on this program and hopefully I'll be able to improve and contribute with more stuff in the future.
The download like is here. I changed the name of the file so the old URL will only download the resizer that's meant to work with the windowed exe. I haven't made tests using the windowed exe with this launcher but it *should* work fine. This launcher is really meant to work with a clean installation of PSO though. If launching a windowed version of PSO causes any issues, PSO can be launched first and then upon opening the Launcher, the resize tools will still be available to tweak the window size.
Well, that's it for now. Comments, feedbacks, bugs? I'm all ears.
... And now thanks to the amazing support here, it's now a full fledged loaded/patcher capable of allowing online connection to sylverant, patching the fixes and switching the game from fullscreen into a window... all with a clean installation of PSO, no extra tools needed.
Capture of the program after launching PSO.
Thanks to Tremcaster for the encouragement (I had the chance of meeting him on Altimira while testing the program with a clean PSO for the first time) and suggestions.
And billion thanks to BlueCrab for sharing his loader source code with me. Thanks to that this patcher became done so quickly.
This doesn't do the patching that blocks the mouse from being used, but on the other hand, PSO doesn't read global inputs so switching windows in game is not a problem.
There's a strange bug in Fullscreen mode... but I think it's Windows 10 related. It is described in the readme along with all the other instructions and descriptions of the new features.
I learned a bunch working on this program and hopefully I'll be able to improve and contribute with more stuff in the future.
The download like is here. I changed the name of the file so the old URL will only download the resizer that's meant to work with the windowed exe. I haven't made tests using the windowed exe with this launcher but it *should* work fine. This launcher is really meant to work with a clean installation of PSO though. If launching a windowed version of PSO causes any issues, PSO can be launched first and then upon opening the Launcher, the resize tools will still be available to tweak the window size.
Well, that's it for now. Comments, feedbacks, bugs? I'm all ears.
There are 10 types of people. Those who understand binaries and those who don't.
-
- Insane DCEmu
- Posts: 148
- Joined: Mon Jul 02, 2007 1:11 pm
- Has thanked: 1 time
- Been thanked: 0
Re: PSO PC Windowed: Correct aspect ratio
Amazing work there! No need to thank me, I'm the one who should be thanking you!!
-Bug-report-
I tried with a clean full exe and a modified window exe and both seem to be working fine... however...
Apparently something got broken in this new release that was working fine before: The Ratio setting under "Custom size".. when you switch from the default "4:3 Pixel Perfect" to this and you try to change the numbers, things get messed up.
Oh, and I think you forgot to include the readme text file
-Bug-report-
I tried with a clean full exe and a modified window exe and both seem to be working fine... however...
Apparently something got broken in this new release that was working fine before: The Ratio setting under "Custom size".. when you switch from the default "4:3 Pixel Perfect" to this and you try to change the numbers, things get messed up.
Oh, and I think you forgot to include the readme text file
- BlueCrab
- The Crabby Overlord
- Posts: 5661
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: PSO PC Windowed: Correct aspect ratio
Ah... Fun to see my Mithos.dll floating around now.
That said, please don't forget that you have to release the source code along with each binary and give credit where credit is due (copyright message/license information in an about box, for instance), in compliance with the GPLv3.
Also, for those that don't know (which is probably everyone), assuming most of the patching for the new functionality was borrowed from my code, this will work with many versions of the pso.exe binary. When I was writing Mithos.dll (and the corresponding unreleased launcher Yggdrasill), I tested it with a bunch of different versions of the main game binary, including the one that comes on the CD release of the game (which is not the same one that most people end up using).
That said, please don't forget that you have to release the source code along with each binary and give credit where credit is due (copyright message/license information in an about box, for instance), in compliance with the GPLv3.
Also, for those that don't know (which is probably everyone), assuming most of the patching for the new functionality was borrowed from my code, this will work with many versions of the pso.exe binary. When I was writing Mithos.dll (and the corresponding unreleased launcher Yggdrasill), I tested it with a bunch of different versions of the main game binary, including the one that comes on the CD release of the game (which is not the same one that most people end up using).
-
- Insane DCEmu
- Posts: 148
- Joined: Mon Jul 02, 2007 1:11 pm
- Has thanked: 1 time
- Been thanked: 0
Re: PSO PC Windowed: Correct aspect ratio
Just tried with PC NTE and it works. Thing is, you can online play online if you select online mode in the autorun.exe first, and offline if you run autorun.exe again and select offline mode. You have to go back and forward if you want to play one mode or the other.
Bluecrab, are going to release a simple loader when PC NTE becomes available on Sylverant? I suppose you won't modify pso.exe since that would alter the nte installer sega provided thus making it illegal to distribute right?
Instead maybe you could offer a solution to patch the ip via a run-time patch option like the ones Tulio implemented on his launcher?
I would picture something like this:
I wonder how you're going to manage PC NTE SNAKs...
Bluecrab, are going to release a simple loader when PC NTE becomes available on Sylverant? I suppose you won't modify pso.exe since that would alter the nte installer sega provided thus making it illegal to distribute right?
Instead maybe you could offer a solution to patch the ip via a run-time patch option like the ones Tulio implemented on his launcher?
I would picture something like this:
I wonder how you're going to manage PC NTE SNAKs...
- TulioAdriano
- DCEmu Freak
- Posts: 59
- Joined: Tue Aug 18, 2015 9:32 am
- Has thanked: 1 time
- Been thanked: 2 times
Re: PSO PC Windowed: Correct aspect ratio
Hi again, sorry for forgetting the readme.txt, the link to the source code is there. But here's the direct one: https://bitbucket.org/tulioadriano/2dpsolauncher
I noticed that bug now. I think I know what it's causing it. I'll work on a fix for it ASAP. Also it's already set to connect to Sylverant... except... I don't know what NTE is.
Thanks a lot!
I noticed that bug now. I think I know what it's causing it. I'll work on a fix for it ASAP. Also it's already set to connect to Sylverant... except... I don't know what NTE is.
Thanks a lot!
There are 10 types of people. Those who understand binaries and those who don't.
-
- Insane DCEmu
- Posts: 148
- Joined: Mon Jul 02, 2007 1:11 pm
- Has thanked: 1 time
- Been thanked: 0
Re: PSO PC Windowed: Correct aspect ratio
Check out this topic.TulioAdriano wrote:Also it's already set to connect to Sylverant... except... I don't know what NTE is.
- BlueCrab
- The Crabby Overlord
- Posts: 5661
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: PSO PC Windowed: Correct aspect ratio
The patch he implemented in his launcher is actually my code from my (unreleased) launcher.Treamcaster wrote:Instead maybe you could offer a solution to patch the ip via a run-time patch option like the ones Tulio implemented on his launcher?
As for serial numbers and whatnot, haven't even looked at all. It's just not high on my list of things to do.
-
- Insane DCEmu
- Posts: 148
- Joined: Mon Jul 02, 2007 1:11 pm
- Has thanked: 1 time
- Been thanked: 0
Re: PSO PC Windowed: Correct aspect ratio
Interesting, thanks for sharing your code!BlueCrab wrote:The patch he implemented in his launcher is actually my code from my (unreleased) launcher.Treamcaster wrote:Instead maybe you could offer a solution to patch the ip via a run-time patch option like the ones Tulio implemented on his launcher?
As for serial numbers and whatnot, haven't even looked at all. It's just not high on my list of things to do.
I was looking into NTE reg entries and it doesn't have any ACCESS nor SERIAL entries as the full version does...
- TulioAdriano
- DCEmu Freak
- Posts: 59
- Joined: Tue Aug 18, 2015 9:32 am
- Has thanked: 1 time
- Been thanked: 2 times
Re: PSO PC Windowed: Correct aspect ratio
Yep, my code taps straight into BlueCrab technology.
Updated the program, now the bug messing up the custom resolution input is gone. Try it and let me know.
I read the topic and still one question remain: is that NTE the network trial edition? If so, now everything is clear, and based on what BlueCrab said, the patcher should be compatible with a wide scope of executables, including the pre-patched ones.
Updated the program, now the bug messing up the custom resolution input is gone. Try it and let me know.
I read the topic and still one question remain: is that NTE the network trial edition? If so, now everything is clear, and based on what BlueCrab said, the patcher should be compatible with a wide scope of executables, including the pre-patched ones.
There are 10 types of people. Those who understand binaries and those who don't.
-
- Insane DCEmu
- Posts: 148
- Joined: Mon Jul 02, 2007 1:11 pm
- Has thanked: 1 time
- Been thanked: 0
Re: PSO PC Windowed: Correct aspect ratio
Bug seems to be fixed now, thanks I don't see the fullscreen bug you reported in the readme though.. (running w8.1). Might be a w10 issue like you said.
NTE topics:
viewtopic.php?f=75&t=102447
viewtopic.php?f=75&t=103047
However your loader does not patch the nte pso.exe IP to Sylverant.net since it is in another location inside the .exe... but even if it did we wouldn't be able to go online because:
Yeah there are various NTEs for PC/GC/DC and they're all unique. Sega released 2 demos back in the day for PSO PC: NTE (Network Trial Edition) and an offline-only demo containing just the forest map.TulioAdriano wrote:
I read the topic and still one question remain: is that NTE the network trial edition? If so, now everything is clear, and based on what BlueCrab said, the patcher should be compatible with a wide scope of executables, including the pre-patched ones.
NTE topics:
viewtopic.php?f=75&t=102447
viewtopic.php?f=75&t=103047
However your loader does not patch the nte pso.exe IP to Sylverant.net since it is in another location inside the .exe... but even if it did we wouldn't be able to go online because:
Aleron Ives wrote:Sylverant requires registration, and the NTE has no serial number or access key, so even if you did redirect the game to connect here, you'd be blocked. BlueCrab would need to add an exception to the server to allow NTE users to connect by automatically assigning them temporary Guild Card numbers. The NTE probably connects on a different port, too, so Sylverant would need to be able to respond to it.
- Aleron Ives
- DCEmu Nutter
- Posts: 872
- Joined: Wed Jan 05, 2011 2:15 pm
- Location: California
- Has thanked: 0
- Been thanked: 25 times
- Contact:
Re: PSO PC Windowed: Correct aspect ratio
Uh, yes it does, which is why the patch to disable the mouse exists. If you don't disable the mouse, you can't actually multitask, because PSO constantly steals the mouse cursor and places it in the center of your screen (so you can use it to move by dragging the cursor while holding the left button). Is this a Windows 10 quirk, or did you patch the window to no longer have global focus and to not blink in the task bar when minimised? I'm guessing it's the latter, as I think BlueCrab's loader already did those things.TulioAdriano wrote:This doesn't do the patching that blocks the mouse from being used, but on the other hand, PSO doesn't read global inputs so switching windows in game is not a problem.
One thing I wonder if you could do would be to add a "borderless full screen" option. As everybody knows, PSO isn't smart enough to hold its aspect ratio in full screen, so it will stretch to the dimensions of your monitor. You can play in a window, but then you don't get the same kind of immersive "console" experience. It would be pretty spiffy if you could add a borderless full screen option to automatically scale the window to fit the dimensions of your screen and then add black borders to pad the unused portions of your monitor (including covering the window borders and title bar). Dolphin is able to do this with GC/Wii games, so you might have a look at its code if you're not sure how to do such a thing (and want to do it).
The only other potential missing feature I guess would be the ability to have the PSO window hold its aspect ratio when you click and drag it, so you can scale it to whatever dimensions you like without having to worry about distorting the window (unless that's what the lock ratio checkbox does?).
"Fear the HUnewearl."
- TulioAdriano
- DCEmu Freak
- Posts: 59
- Joined: Tue Aug 18, 2015 9:32 am
- Has thanked: 1 time
- Been thanked: 2 times
Re: PSO PC Windowed: Correct aspect ratio
I don't know what I did, hehe but running on a clean EXE installed from the installation disc, I don't have that issue. I had it when I was used that "psoexe_vista7window.zip", but here I'm typing this message as PSO runs on the other monitor and the mouse input and keyboard strokes are not being captured at all. What I did was to remove all vestiges of PSO from my computer (that includes the registry keys) and then doing a clean install. All I did after that was to run the loaded, set the SN/AK and launch PSO. So far multitasking has been a breeze, but I don't believe that cleaning the reg keys is necessary, perhaps just a clean exe.Aleron Ives wrote:Uh, yes it does, which is why the patch to disable the mouse exists. If you don't disable the mouse, you can't actually multitask, because PSO constantly steals the mouse cursor and places it in the center of your screen (so you can use it to move by dragging the cursor while holding the left button). Is this a Windows 10 quirk, or did you patch the window to no longer have global focus and to not blink in the task bar when minimised? I'm guessing it's the latter, as I think BlueCrab's loader already did those things.
Now that I've gained control of PSO display I want to study how to add a few things here and there. They include a letterboxed full screen and hopefully antialias, so that people don't need to set pixel perfect resolutions to get it looking good. I experimented with antialias yesterday but so far, enabling it is crashing PSO.Aleron Ives wrote:One thing I wonder if you could do would be to add a "borderless full screen" option. As everybody knows, PSO isn't smart enough to hold its aspect ratio in full screen, so it will stretch to the dimensions of your monitor. You can play in a window, but then you don't get the same kind of immersive "console" experience. It would be pretty spiffy if you could add a borderless full screen option to automatically scale the window to fit the dimensions of your screen and then add black borders to pad the unused portions of your monitor (including covering the window borders and title bar). Dolphin is able to do this with GC/Wii games, so you might have a look at its code if you're not sure how to do such a thing (and want to do it).
With auto-size enabled, you could use the updown controls to make the window grow or shrink in aspect ratio at will. I know it's not as practical as resizing directly from the PSO window, but all in due time. I'm still grasping the API hooking techniques and soon enough I'll hook up windows events so that I can make it possible to intercept the windows resize messages and adjust the window size accordingly.Aleron Ives wrote:The only other potential missing feature I guess would be the ability to have the PSO window hold its aspect ratio when you click and drag it, so you can scale it to whatever dimensions you like without having to worry about distorting the window (unless that's what the lock ratio checkbox does?).
There are 10 types of people. Those who understand binaries and those who don't.
- Aleron Ives
- DCEmu Nutter
- Posts: 872
- Joined: Wed Jan 05, 2011 2:15 pm
- Location: California
- Has thanked: 0
- Been thanked: 25 times
- Contact:
Re: PSO PC Windowed: Correct aspect ratio
You would never want to do that, though. For one thing, the original pso.exe will still delete your Meseta if the game crashes for any reason in online mode. Newer pso.exe versions don't do that anymore.TulioAdriano wrote:I don't know what I did, hehe but running on a clean EXE installed from the installation disc, I don't have that issue.
You have to enable AA through the graphics driver AFAIK, so the method will probably be different depending upon which graphics vendor supplied the GPU for the PC. I have a guide on how to enable AA/AF/Vsync for nVidia cards here.TulioAdriano wrote:Now that I've gained control of PSO display I want to study how to add a few things here and there. They include a letterboxed full screen and hopefully antialias, so that people don't need to set pixel perfect resolutions to get it looking good. I experimented with antialias yesterday but so far, enabling it is crashing PSO.
"Fear the HUnewearl."
Re: PSO PC Windowed: Correct aspect ratio
You want pillarboxing (black borders on sides), not letterboxing (black borders on top+bottom).TulioAdriano wrote:They include a letterboxed full screen and hopefully antialias, so that people don't need to set pixel perfect resolutions to get it looking good.
- TulioAdriano
- DCEmu Freak
- Posts: 59
- Joined: Tue Aug 18, 2015 9:32 am
- Has thanked: 1 time
- Been thanked: 2 times
Re: PSO PC Windowed: Correct aspect ratio
Ah, of course, these names...
Small update to the program, now all screenshots are in native resolution rather than the window size, just like PSO would do it.
Did some more experimenting with modifying the dx parameters but it isn't going well. I better study it a little more before poking around. As for the driver pso profile for AA, although I'm running on an ATI card, I tried it before I started writing the resizer program... the thing is... whenever I set the AA settings, the driver window crash (!). This isn't a good sign... and I made sure to update the drivers right before I started my tests... This could be related to Windows 10 though. I'm running on a 2011 laptop so it shouldn't be happening.
Other than that, spent some quality time this afternoon with Treamcaster and (Little One) on Altimira. For those who wonder, I always play with a FOmarl character named LAYA.
Small update to the program, now all screenshots are in native resolution rather than the window size, just like PSO would do it.
Did some more experimenting with modifying the dx parameters but it isn't going well. I better study it a little more before poking around. As for the driver pso profile for AA, although I'm running on an ATI card, I tried it before I started writing the resizer program... the thing is... whenever I set the AA settings, the driver window crash (!). This isn't a good sign... and I made sure to update the drivers right before I started my tests... This could be related to Windows 10 though. I'm running on a 2011 laptop so it shouldn't be happening.
Other than that, spent some quality time this afternoon with Treamcaster and (Little One) on Altimira. For those who wonder, I always play with a FOmarl character named LAYA.
There are 10 types of people. Those who understand binaries and those who don't.
- Aleron Ives
- DCEmu Nutter
- Posts: 872
- Joined: Wed Jan 05, 2011 2:15 pm
- Location: California
- Has thanked: 0
- Been thanked: 25 times
- Contact:
Re: PSO PC Windowed: Correct aspect ratio
No I don't. Not all of us use 16:9 monitors, you know.tueidj wrote:You want pillarboxing (black borders on sides), not letterboxing (black borders on top+bottom).
I wonder if PSO is even sophisticated enough to be able to be AAed in a window. On Windows 7 at least, the game looks horrible in window mode: the entire screen gets massively aliased, as though the image is made with sprites from a 16-bit game that are being upscaled. Even the SEGA logo becomes jagged. It doesn't happen on XP, though, so I don't know if it's a flaw with the window mode hack or if 7 is having trouble with a D3D8 game.TulioAdriano wrote:whenever I set the AA settings, the driver window crash (!).
"Fear the HUnewearl."
Re: PSO PC Windowed: Correct aspect ratio
Sounds like you are, just not with the proper orientation.Aleron Ives wrote:No I don't. Not all of us use 16:9 monitors, you know.
- Aleron Ives
- DCEmu Nutter
- Posts: 872
- Joined: Wed Jan 05, 2011 2:15 pm
- Location: California
- Has thanked: 0
- Been thanked: 25 times
- Contact:
Re: PSO PC Windowed: Correct aspect ratio
So why would that need vertical padding to properly display a 4:3 image?
- K_I_R_E_E_K
- Mental DCEmu
- Posts: 302
- Joined: Mon Oct 27, 2008 6:47 pm
- Has thanked: 0
- Been thanked: 3 times
Re: PSO PC Windowed: Correct aspect ratio
So i decided to test this and it's not really working.
When i tick the checkbox to make this windowed (despite already using a window mode) the launcher gives an error, i'm not sure if it's because i'm trying to use window on window mode or if it will work if i grab the fullscreen exe, but for now i get this: (unticking the window part, the game launches)
Screenshots work even in window mode but i can't have the launcher on top of the window otherwise it appears on top of the screenshot
*tries to run the game in higher resolutions*
The screenshots always come at 640x480 it seems
Yes i know it was likely not to work, but i had to try anyway.
When i tick the checkbox to make this windowed (despite already using a window mode) the launcher gives an error, i'm not sure if it's because i'm trying to use window on window mode or if it will work if i grab the fullscreen exe, but for now i get this: (unticking the window part, the game launches)
Spoiler!
Spoiler!
The screenshots always come at 640x480 it seems
Yes i know it was likely not to work, but i had to try anyway.
Spoiler!