VIDEO Patch for pixel-perfect scaling (SDL1)

Here you can discuss the development of patches.

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-26 @ 12:19

Please, test fullscreen emulation via a borderless window as imlemented in alpha 20. To activate the new feature set fullborderless to true.
DosFreak wrote:I don't know about the particulars of borderless fullscreen but when modifying SDL to get DOSBox to work on NT 3.50 I had to disable fullscreen support in SDL. So when you switch DOSBox to "fullscreen" it's a fullscreen window. You can also tell it's a window see there's no desktop icon mess or lag when switching between fullscreen and window mode and there's the DOSBox title bar at the top of the screen. Dunno if useful for your purposes since it's likely overkill but it was fun figuring it out.
Thank you, but (I hope) I have managed without your reference. To put it short, it was a matter of passing SDL_NOFRAME instead of SDL_FULLSCREEN.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby KainXVIII » 2019-1-26 @ 12:30

Ant_222 wrote:Please, test fullscreen emulation via a borderless window as imlemented in alpha 20. To activate the new feature set fullborderless to true.
DosFreak wrote:I don't know about the particulars of borderless fullscreen but when modifying SDL to get DOSBox to work on NT 3.50 I had to disable fullscreen support in SDL. So when you switch DOSBox to "fullscreen" it's a fullscreen window. You can also tell it's a window see there's no desktop icon mess or lag when switching between fullscreen and window mode and there's the DOSBox title bar at the top of the screen. Dunno if useful for your purposes since it's likely overkill but it was fun figuring it out.
Thank you, but (I hope) I have managed without your reference. To put it short, it was a matter of passing SDL_NOFRAME instead of SDL_FULLSCREEN.

Will try it after patch implemented in ECE build :cool:
User avatar
KainXVIII
Member
 
Posts: 328
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-26 @ 12:38

KainXVIII wrote:Will try it after patch implemented in ECE build :cool:
Volunteers for beta-testing may use my development build from the attachment.
You do not have the required permissions to view the files attached to this post.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Pat86 » 2019-1-26 @ 14:56

It seems to break more on my side:

With openglpp tearing is back in windowed fullscreen eventhough glfullvsync=true. in regular window tearing is gone, yet main menu+loading screen dont lag either.

With surfacepp i have random pixel garbage on every side. switchting with ALT+ENTER between regular window and windowed fullscreen it seems to show the previous pixels around the game.

Image
Image
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-26 @ 19:54

Pat86 wrote:With openglpp tearing is back in windowed fullscreen eventhough glfullvsync=true. in regular window tearing is gone, yet main menu+loading screen dont lag either.
Windowed fullscreen is new in this version, so you can't technically say it is back, unless I misunderstand you... It is strange that windowed fullscreen (i.e. borderless window) and normal windowed modes behave differently. They don't on my PC. Notice that glfullvsync works only with true hardware fullscreen (i.e. when fullborderless is false).
Pat86 wrote:With surfacepp i have random pixel garbage on every side. switchting with ALT+ENTER between regular window and windowed fullscreen it seems to show the previous pixels around the game.
I do not have it in my environment, will try to fix it.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-26 @ 22:40

Pat86 wrote:With surfacepp i have random pixel garbage on every side. switchting with ALT+ENTER between regular window and windowed fullscreen it seems to show the previous pixels around the game.
Please, test if this bug is fixed in the attached build. Edit: I have attached the patch as well.
You do not have the required permissions to view the files attached to this post.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Pat86 » 2019-1-27 @ 13:11

yes it is :)

btw when i start openglpp with fullborderless=true it still starts as a regular window. ALT+ENTER brings it to fullscreen. Is this borderless window or real fullscreen as it tears in fullscreen. Yet in regular window it doesnt. tried it with the crystal cave title screen.
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-28 @ 08:45

Thanks for testing, Pat.
Pat86 wrote:btw when i start openglpp with fullborderless=true it still starts as a regular window.
This setting does not activate fullscreen mode, but rather tells DOSBox to emulate it in a window whenever fullscreen is activated. If you want DOSBox to start in fullscreen, set the standard parameter fullscreen to true.
Pat86 wrote:Is this borderless window or real fullscreen as it tears in fullscreen. Yet in regular window it doesnt. tried it with the crystal cave title screen.
Thanks for the information, I will try to reproduce it on another PC.

Edit: I ask everybody to test on your machines whether regular windowed mode behavies differently from the borderless fullscreen window.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby FulValBot » 2019-1-28 @ 09:11

V-sync will never works with borderless mode, sry... (and also antialiasing, that with some windows games can cause crash when borderless mode is enabled)
FulValBot
Newbie
 
Posts: 75
Joined: 2008-3-01 @ 18:43

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-28 @ 09:32

FulValBot wrote:V-sync will never works with borderless mode, sry
Why? What is the big difference from a regular window?
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby FulValBot » 2019-1-28 @ 09:35

I think that v-sync can works only with exclusive fullscreen mode (most games will show that option only with fullscreen mode)

In windowed and borderless mode you can't see tearing, if i remember; i don't know if there are differences

And alt tab will works very fast
FulValBot
Newbie
 
Posts: 75
Joined: 2008-3-01 @ 18:43

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-28 @ 09:46

I am not talking about hardware V-Sync, which is activated by glfullvsync and works only in true fullscreen. I am referring to bladeSk's idea of using a borderless fullscreen winodow as a way to make avail of V-Sync built into the later versions of Windows:
bladeSk wrote:A feature used by modern games that relies on the OS to provide VSYNC. This eliminates screen tearing.
What I find confusing is that for Pat86 this seems to work in regular window yet doesn't work in a borderless one. Pat, did you have
Code: Select all
windowresulution=desktop
while testing?
FulValBot wrote:In windowed and borderless mode you can't see tearing, if i remember
Have you confirmed it with the latest version of my patch?
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Pat86 » 2019-1-28 @ 14:59

Ant_222 wrote: Pat, did you have
Code: Select all
windowresulution=desktop
while testing?


yes. i dont know if it helps, but i'm on windows 10 build 1809.

Jazz Jackrabbit
fullborderless = main menu+loading screen doesnt lag, yet it tears ingame.
windowed = main menu+loading screen doesnt lag nor tears ingame.

Code: Select all
[sdl]
fullresolution=desktop
windowresolution=desktop
output=openglpp
fullborderless=true

[dosbox]
machine=vgaonly
captures=..\captures\28
memsize=8

[render]
aspect=true
scaler=none

[cpu]
cycles=max 95% limit 30000
cycleup=1000
cycledown=1000

[mixer]
rate=49716

[sblaster]
oplemu=nuked
oplrate=49716

[joystick]
deadzone=0

[dos]
keyboardlayout=de129

[autoexec]
mount C "D:\GOG Games\Jazz Jackrabbit"
C:
cd \
JAZZ.EXE
exit



Crystal Caves
fullborderless = title screen has this nasty tearing line
windowed = title screen scrolls smooth without tearing

Code: Select all
[sdl]
fullborderless=true
fullresolution=desktop
windowresolution=desktop
output=openglpp

[dosbox]
machine=ega
captures=..\captures\34
memsize=8

[render]
aspect=true
scaler=none

[joystick]
deadzone=0

[autoexec]
mount C "C:\Program Files (x86)\3DRealms\Anthology\Crystal Caves"
C:
cd \
CC1.EXE
exit


Hocus Pocus
fullborderless = main menu doesnt lag (slow music), yet it tears ingame
windowed = main menu doesnt lag (slow music) nor tears ingame

Code: Select all
[sdl]
fullresolution=desktop
windowresolution=desktop
output=openglpp
fullborderless=true

[dosbox]
captures=..\captures\33

[render]
aspect=true
scaler=none

[mixer]
rate=48000

[sblaster]
oplemu=nuked
oplrate=48000

[joystick]
deadzone=0

[autoexec]
mount C "C:\Program Files (x86)\3DRealms\Anthology\Hocus Pocus"
C:
cd \
HOCUS.EXE
exit
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-28 @ 15:28

Thanks for helping, Pat. Whereas I am using Windows XP and cannot reproduce the problem, I am going to ask you for more tests. Can you, by the way, build DOSBox from source code?
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Pat86 » 2019-1-28 @ 15:50

Sorry, i'm not familiar with it. :-\
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-28 @ 15:53

Pat86 wrote:Sorry, i'm not familiar with it. :-\
But no problem. I will send you test builds if you don't mind.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Pat86 » 2019-1-28 @ 15:57

Sure thing. Glad i can help. :)
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-28 @ 19:43

Then please test the attached build with openglpp and openglnb. On my PC the tearing line appears at seemingly random vertical positions, which change when switching from regular window to borderless and back, so look carefully. I will also need a screenshot of borderless mode.
You do not have the required permissions to view the files attached to this post.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Pat86 » 2019-1-29 @ 10:14

openglpp

for everything borderless = seeable taskbar + outline of my desktop on both + upper sides

Jazz = no tearing nor main menu lag in windowed nor borderless.
Crystal Cave = random "whole gamescreen" jittering on the titlescreen in windowed & borderless. not this 1 tearing line like before.
Hocus Pocus = main menu music plays fine in both windowed and borderless, yet there's tearing ingame in borderless. in windowed its fine.

openglnb

does borderless work here too, because i dont see any outlines + taskbar here like with openglpp

Jazz = no main menu lag in both modes, yet it tears in fullscreen. windowed is fine.
Crystal Cave = random "whole gamescreen" jittering in windowed. in fullscreen there's this 1 bigger tearing line like before.
Hocus Pocus = main menu music plays fine in both windowed and fullscreen, yet there's tearing ingame in fullscreen. in windowed its fine.
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

Re: VIDEO Patch for pixel-perfect scaling (SDL1)

Postby Ant_222 » 2019-1-29 @ 21:01

So shall we say that a tiny clearance between the borderless window and the screen helps with the tearing in Jazz Jackrabbit and Hocus Pocus, but not in Crystal Cave?
Pat86 wrote:does borderless work here too, because i dont see any outlines + taskbar here like with openglpp
Yes, but it fits the window exactly to the screen size, whereas in openglpp, for the sake of experiment, it makes the window very slightly smaller than the screen.

Can you now test the same games with the official build of bladeSk's fork? Since it is anothet product, you will have to use different config-file settings:
Code: Select all
fullresolution=desktop
output=openglnb
pixelperfect=true
borderless=true
This version uses the config file named dosbox-SVN.conf . It will create one if it is not there already.

Edit: Replaced my own build with the official one.
Ant_222
Member
 
Posts: 477
Joined: 2010-7-24 @ 21:29

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests