VIDEO Patch for pixel-perfect scaling (SDL1)

Here you can discuss the development of patches.

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

Postby Yesterplay80 » 2019-1-19 @ 10:24

Did you remove the option "surface-collapse-dbl" or did I mess up something while adjusting the patch to the ECE source?
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 414
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2019-1-19 @ 10:27

Yesterplay80 wrote:Did you remove the option "surface-collapse-dbl" or did I mess up something while adjusting the patch to the ECE source?
I removed it. But my patch needs further work to handle double-width and double-height modes properly.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Yesterplay80 » 2019-1-19 @ 11:54

Ant_222 wrote:I removed it. But my patch needs further work to handle double-width and double-height modes properly.

OK, I just wanted to maku sure I didn't do something wrong. Your newest patch is integrated in DOSBox ECE r4180.3, ready to download from my site!
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 414
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2019-1-19 @ 11:56

Yesterplay80 wrote:OK, I just wanted to maku sure I didn't do something wrong. Your newest patch is integrated in DOSBox ECE r4180.3, ready to download from my site!
Thank you very much. I am sorry to say that I made a serious error in the handling of double-height and double-width modes and will issue a fix soon.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Pat86 » 2019-1-19 @ 14:58

Unfortuantely With openglpp i get tearing in fullscreen with fast games (Jazz Jackrabbit). Windowed is fine. With surfacepp there's no tearing in fullscreen nor windowed.
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

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

Postby Ant_222 » 2019-1-19 @ 17:58

Pat86 wrote:Unfortuantely With openglpp i get tearing in fullscreen with fast games (Jazz Jackrabbit). Windowed is fine. With surfacepp there's no tearing in fullscreen nor windowed.
Is the tearing present in vanilla DOSBox with openglnb?
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Pat86 » 2019-1-19 @ 19:02

In fullscreen yes, 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-19 @ 20:41

Pat86 wrote:In fullscreen yes, windowed its fine.
Then it is not a problem of my patch, but I will see what I can do about it. Does anybody happen to know how to avoid tearing or turn on V-Sync in OpenGL via SDL 1.2? bladeSk's fork, for example, does it by faking fullscreen via a borderless window, but I fear his solution is not cross-platform. Another question, of course, is why is there no tearing with surface output? Is there still no tearing if you disable double buffering (fulldouble)?
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Pat86 » 2019-1-19 @ 21:17

Yes, even with double buffering turned off (btw. i'm using DBGL to configure), there is no tearing with surfacepp output in fullscreen. Turning on double buffering with surfacepp output results in quite a performance drop in fullscreen. very choppy main menu etc (Jazz Jackrabbit). yet windowed is fine again. ;)
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

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

Postby Ant_222 » 2019-1-19 @ 21:35

Pat86 wrote:Yes, even with double buffering turned off (btw. i'm using DBGL to configure), there is no tearing with surfacepp output in fullscreen.
I wonder why.
Turning on double buffering with surfacepp output results in quite a performance drop in fullscreen. very choppy main menu etc (Jazz Jackrabbit). yet windowed is fine again. ;)
Because double-buffering is not available in windowed mode. It requires a hardware surface.
Last edited by Ant_222 on 2019-1-19 @ 21:38, edited 1 time in total.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Pat86 » 2019-1-19 @ 21:38

All my tests rely on Jazz Jackrabbit btw, as the tearing is very much present in there. Borderless window seems like a good workaround for the beginning.
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

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

Postby Ant_222 » 2019-1-19 @ 21:44

Pat86 wrote:All my tests rely on Jazz Jackrabbit btw, as the tearing is very much present in there. Borderless window seems like a good workaround for the beginning.
Either I am tearing-blind or there is no perceivable tearing with openglpp in fullscreen on my system with Jazz Jackrabbit. I shall be grateful if other users test openglpp for screen tearing.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Pat86 » 2019-1-19 @ 22:31

Hm. Maybe it's a graphic card / driver specific thing? I'm on Windows 10 with an GTX 970 (latest driver)

I tried to record it with my smartphone (as OBS doesnt seem to capture it). Look at the threes at the beginning and you might see the tearing line going down consistently:

https://www.dropbox.com/s/fb1nr0o4fvgqi ... 4.mp4?dl=0
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

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

Postby krcroft » 2019-1-19 @ 23:05

Pat86 wrote:
Ant_222 wrote:
Pat86 wrote:Unfortuantely With openglpp i get tearing in fullscreen with fast games (Jazz Jackrabbit). Windowed is fine. With surfacepp there's no tearing in fullscreen nor windowed.
Is the tearing present in vanilla DOSBox with openglnb?
In fullscreen yes <snip>


Tested vanilla r4180 DOSBox on Linux, I see zero tearing with output=openglnb, fullscreen, with double buffering on or off. I've got plenty of native games that tear badly and have no problem seeing it. I'm using the CDROM version. My in-game configuration is: High graphic detail and [FAST] colors. My Jazz dosbox.conf:

Code: Select all
[cpu]
core=dynamic
cycles=max 95% limit 30000
cputype=auto

[dosbox]
machine=svga_s3
memsize=16

[render]
aspect=false

[mixer]
nosound=false
rate=48000
blocksize=2048
prebuffer=20

[gus]
gus=yes
gusrate=48000
gusbase=240
gusirq=5
gusdma=3

[dos]
xms=true
ems=false
umb=true

[speaker]
pcspeaker=false
tandy=off
disney=false

[sblaster]
sbtype=none
User avatar
krcroft
Member
 
Posts: 251
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

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

Postby Ant_222 » 2019-1-19 @ 23:11

Can somebody please check the tearing with the attached patch?
You do not have the required permissions to view the files attached to this post.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

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

Pat86 wrote: tried to record it with my smartphone (as OBS doesnt seem to capture it). Look at the threes at the beginning and you might see the tearing line going down consistently:
https://www.dropbox.com/s/fb1nr0o4fvgqi ... 4.mp4?dl=0
I saw it on my own machine once I knew where to look. The patch attached to the previous post seems to remove tearing. Can you try it?
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Pat86 » 2019-1-19 @ 23:45

unfortunately i dont know how to apply the patch - i just use Yesterplays ECE. :-\
Pat86
Newbie
 
Posts: 24
Joined: 2019-1-19 @ 13:47

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

Postby krcroft » 2019-1-20 @ 00:22

Ant_222 wrote:Can somebody please check the tearing with the attached patch?


Patched r4180 source, tested on Linux w/ fullscreen output=openglnb (same config as above). Zero tearing during gameplay, however at the starting menu, I could cause serve video lag and audio drop out when I rapidly moved my selection up and down in the menu. No lag during gameplay though (and I'm capping it at 30,000 cycles).

Also confirming the patch was active, as I saw this on the console: "Trying to turn on V-sync... ...success" roughly 4 times before I quit the game.
User avatar
krcroft
Member
 
Posts: 251
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

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

Postby Ant_222 » 2019-1-20 @ 09:15

krcroft wrote:atched r4180 source, tested on Linux w/ fullscreen output=openglnb (same config as above). Zero tearing during gameplay,
Excellent! Thanks for testing.
krcroft wrote:however at the starting menu, I could cause serve video lag and audio drop out when I rapidly moved my selection up and down in the menu.
As always, the question is whether you can reproduce this lag in stock DOSBox with openglnb.If V-Sync is the cause, I can add an option to turn it off.
krcroft wrote:Also confirming the patch was active, as I saw this on the console: "Trying to turn on V-sync... ...success" roughly 4 times before I quit the game.
You should see this message every time you enter fullscreen mode.
Last edited by Ant_222 on 2019-1-20 @ 09:26, edited 1 time in total.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

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

Postby Ant_222 » 2019-1-20 @ 09:25

Pat86 wrote:unfortunately i dont know how to apply the patch - i just use Yesterplays ECE. :-\
Then you can try it when YP80 incorporates my alpha 18.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests