VOGONS


VIDEO Patch for pixel-perfect scaling (SDL1)

Topic actions

Reply 480 of 733, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

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).

The attachment PP1.JPG is no longer available
The attachment PP2.JPG is no longer available
The attachment PP3.JPG is no longer available

My full-featured DOSBox SVN builds for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 481 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 482 of 733, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

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 for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 483 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 484 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

Sorry, wrong attachment. The correct one is here.

Reply 485 of 733, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

Thanks, I will try the patch with the next DOSBox revision!

My full-featured DOSBox SVN builds for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 486 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

To whomever it may concern: the diff between r4094 and r4095 has this change:

--- 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.

Reply 488 of 733, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

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à!

The attachment pp15b.diff is no longer available

My full-featured DOSBox SVN builds for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 489 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
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.

Reply 490 of 733, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

Ne need to try, the diff I posted already is the fixed version. Have fun in your vacations!

My full-featured DOSBox SVN builds for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 491 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

Thank you kindly. I have added your patch to the title post as pixel-perfect-alpha14-4132.patch.zip .

Reply 492 of 733, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie

Btw, latest daily build of ScummVM now has this 😎

The attachment scu.jpg is no longer available

Reply 493 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 494 of 733, by KainXVIII

User metadata
Rank Oldbie
Rank
Oldbie
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.

Reply 495 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

You are correct. The previous version of pixel-perfect scaling was in a separate branch.

Reply 496 of 733, by vogam

User metadata
Rank Newbie
Rank
Newbie

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.

Reply 497 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 498 of 733, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

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 for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 499 of 733, by Ant_222

User metadata
Rank Oldbie
Rank
Oldbie
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.