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 » 2018-4-17 @ 08:24

Hey, Ant_222, I just wanted to let you know that your patch doesn't apply any longer to the current revision of DOSBox (r4095), it might even breka the changes introduced with it (more than 256 colors in opengl output). I (hopefully) was able to fix it in ECE by manually implementing the changes in the diff and by removing two more instances of the check that get newly set at another point, effectively breaking the changes made before (see PP3.jpg).
PP1.JPG

PP2.JPG

PP3.JPG
You do not have the required permissions to view the files attached to this post.
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 364
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2018-4-17 @ 12:15

Thanks a lot, Yesterplay80. Can you please clarify what you did. In the first image I see unpatched code. The current SVN version is to the left and your modification to the right? Is the same true of the second image?

The third image shows some changes to the patched code. What is on the left and what is on the right?

When I have time, I will examine those changes and will try to add them to the patch.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby Yesterplay80 » 2018-4-17 @ 14:56

On the left, marked in red, is always your latest patch (adapted to ECE, so the line numbers might differ). The first two images on the right show, marked in green, the changes that were required to make it applicable (again, with ECE) again, the third image shows the changes I made to re-enable the support for more than 256 colors in OpenGL output, which the latest revision added.
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 364
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2018-4-17 @ 21:40

I think your changes are correct and should not break anything. Please test, however, the attached modification. I cannot currently upload it to the title post because of a problem with this forum.
You do not have the required permissions to view the files attached to this post.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby Ant_222 » 2018-4-17 @ 21:41

Sorry, wrong attachment. The correct one is here.
You do not have the required permissions to view the files attached to this post.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby Yesterplay80 » 2018-4-19 @ 06:53

Thanks, I will try the patch with the next DOSBox revision!
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 364
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2018-4-19 @ 19:31

To whomever it may concern: the diff between r4094 and r4095 has this change:
Code: Select all
--- src/gui/sdlmain.cpp   (revision 4094)
+++ src/gui/sdlmain.cpp   (revision 4095)
@@ -414,6 +414,8 @@
       goto check_gotbpp;
 #endif
    case SCREEN_OVERLAY:
+      //We only accept 32bit output from the scalers here
+      //Can't handle true color inputs
       if (flags & GFX_RGBONLY || !(flags&GFX_CAN_32)) goto check_surface;
       flags|=GFX_SCALING;
       flags&=~(GFX_CAN_8|GFX_CAN_15|GFX_CAN_16);
That is, in spite of the comment, the test of was not made more rigorous.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby Serious Callers Only » 2018-4-19 @ 21:01

The complete change is less rigorous (for opengl output), not overlay:
https://bazaar.launchpad.net/~i30817/do ... ision/3998
Serious Callers Only
Member
 
Posts: 371
Joined: 2003-4-26 @ 21:34

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

Postby Yesterplay80 » 2018-7-13 @ 17:46

I don't know if Ant_222 is active here any more, however: The latest revision r4132 breaks his patch, but that's easily fixed. Et voilà!
pp15b.diff
You do not have the required permissions to view the files attached to this post.
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 364
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2018-7-14 @ 09:13

Yesterplay80 wrote:I don't know if Ant_222 is active here any more, however: The latest revision r4132 breaks his patch, but that's easily fixed. Et voilà!
pp15b.diff
Thanks for the notification, Yesterplay80. I am going on vacation tomorrow, but I will try to fix it upon return.

Edit: What is the easiest way to update a patch according to incompatible changes in the source? My procedure is tedious: check which places are broken, take the last successfully patched version, and manually implement in it the changes from the SVN.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby Yesterplay80 » 2018-7-15 @ 07:02

Ne need to try, the diff I posted already is the fixed version. Have fun in your vacations!
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 364
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2018-7-15 @ 09:33

Thank you kindly. I have added your patch to the title post as pixel-perfect-alpha14-4132.patch.zip .
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby KainXVIII » 2018-7-19 @ 13:31

Btw, latest daily build of ScummVM now has this :cool:

scu.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
KainXVIII
Member
 
Posts: 282
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

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

Postby Ant_222 » 2018-7-19 @ 16:30

I thought they had added it way before I had made my patch... Do they approximate the aspect ratio using the 5x6 method, i.e. by scaling 320x200 into 1600x1200? If so, I am very glad for them and wish that one happy day my patch or its equivalent is included into official DOSBox.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby KainXVIII » 2018-7-19 @ 18:57

Ant_222 wrote:I thought they had added it way before I had made my patch... Do they approximate the aspect ratio using the 5x6 method, i.e. by scaling 320x200 into 1600x1200? If so, I am very glad for them and wish that one happy day my patch or its equivalent is included into official DOSBox.

I frequently updating scummvm with daily builds, but noticed pixel perfect scaling only week or so ago. But who knows, maybe i was unobservant and miss it.
User avatar
KainXVIII
Member
 
Posts: 282
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

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

Postby Ant_222 » 2018-7-19 @ 19:48

You are correct. The previous version of pixel-perfect scaling was in a separate branch.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby vogam » 2018-8-15 @ 16:19

Hello Ant_222,

nice patch I like it.

But the patch file has many unneeded stuff.
- added tailing spaces and tabs
- changed spaces to tabs and vice versa
- added or removed spaces in line
- out commented (test-)code added

That makes your patch harder to read as necessary and merging in the future maybe complicater as needed.
As attachment a cleaned file, cross diffed with your file and compiled errorless. Feel free to use it, credits not needed.
You do not have the required permissions to view the files attached to this post.
vogam
Newbie
 
Posts: 1
Joined: 2018-8-15 @ 13:17

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

Postby Ant_222 » 2018-8-22 @ 19:16

Many thanks for tidying up my mess, vogam. May I ask of you another service—to post a diff of between the source patched with my original and with your fixed patched. I will review the changes and, if all is OK, upload your fix on the title patch of the thread.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

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

Postby Yesterplay80 » 2018-8-27 @ 16:35

FYI: Commit r4144 once again breaks your patch, Ant_222, because of two added lines. I'll look into it later for ECE.
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 364
Joined: 2016-2-23 @ 11:02
Location: Germany

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

Postby Ant_222 » 2018-8-27 @ 16:42

Yesterplay80 wrote:FYI: Commit r4144 once again breaks your patch, Ant_222, because of two added lines. I'll look into it later for ECE.
. Begin busy on other projects now, may I ask you to test the vogam's fixed version? He said he had fixed inconsistent whitespace (space and tabs). If not, I will do it as soon as I can.
Ant_222
Member
 
Posts: 377
Joined: 2010-7-24 @ 21:29

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 1 guest