VIDEO - Overscan border (SDL1)

Here you can discuss the development of patches.

VIDEO - Overscan border (SDL1)

Postby Qbix » 2005-8-23 @ 08:32

Post comments here.
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10522
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Overscan border patch

Postby HunterZ » 2005-8-23 @ 14:30

I wish I could remember some games besides Crystal Caves and Secret Agent that use this. Will this work with text-mode applications as well?
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6072
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Overscan border patch

Postby h-a-l-9000 » 2005-8-23 @ 14:36

IBM Alley cat (CGA) also changes the border.
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: Overscan border patch

Postby avatar_58 » 2005-8-23 @ 15:04

HunterZ wrote:I wish I could remember some games besides Crystal Caves and Secret Agent that use this. Will this work with text-mode applications as well?


I think Crystal Caves is the only game that truly *needs* it while other games just use it for effect.
User avatar
avatar_58
Oldbie
 
Posts: 955
Joined: 2005-2-02 @ 02:11
Location: Canada

Re: Overscan border patch

Postby ykhwong » 2005-8-23 @ 16:34

Yes, I can see the border on the screen, playinig Crystal Caves.
You do not have the required permissions to view the files attached to this post.
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Overscan border patch

Postby HunterZ » 2005-8-23 @ 17:28

I have a comment (not a complaint by any means!) based on that screenshot - it seems to be doing weird things with the color blending:
- blending of white and red makes green (look at the $ on the lower-left and the stone along the left and right edges of the screen)
- blending of brown (red+green) and red makes purple/magenta (look at the wood platforms on the right side)
- blending of hi-intensity red with red makes a weird pastel yellow (look at the heart highlights at the bottom middle)

I'm guessing it's doing some quick-'n-dirty math on the color values or something.
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6072
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Overscan border patch

Postby ykhwong » 2005-8-23 @ 17:36

Well.. I'm not sure that it has a problem but
I could change the color of border.
(overscanstrength= option in dosbox.conf)
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Overscan border patch

Postby Kippesoep » 2005-8-23 @ 18:03

Looks like its overflowing istead of saturating when adding the colours. Vasyl's earlier screenshots didn't show this bug. Could be related to desktop bitdepth (perhaps it's a bug only in 16bit mode, not in 32bit mode).
My site: Ramblings on mostly tech stuff.
User avatar
Kippesoep
Oldbie
 
Posts: 1015
Joined: 2005-5-04 @ 22:36
Location: Netherlands

Re: Overscan border patch

Postby ykhwong » 2005-8-23 @ 18:27

I'm usually using 32bit depth colors.
I set overscanstrength=30, then the border seems to be correct.
(default value was 2)
Please see this screenshot.
You do not have the required permissions to view the files attached to this post.
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Overscan border patch

Postby Kippesoep » 2005-8-23 @ 18:50

That cannot possibly be right. Looking at Vasyl's patch, he uses interp_w2 to blend the two pixels. There, a blend weight of 30 means that the border should have an opacity of 30 parts in 31 (just under 97%). It would look nearly solid red, which it doesn't in your screenshot.

According to Vasyl's patch, the accepted values are 1..10 anyway. Setting it to 30 will actually be the same as setting it to 1 (resulting in 50% blending -- which is what it looks like in the screenshot).

Without seeing the code, I can't really tell what's going on, but there has to be a bug somewhere. The problem HunterZ first mentioned is definitely an error in blending, as there is no way in which proper blending could make dark red (at 67%) and white (at 33%) result in light green.
User avatar
Kippesoep
Oldbie
 
Posts: 1015
Joined: 2005-5-04 @ 22:36
Location: Netherlands

Re: Overscan border patch

Postby ykhwong » 2005-8-23 @ 19:05

I couldn't apply overscan patch immediately because optimization patch modified lots of line in render_templates.h. (I applied vesa 16bit + overscan + the latest svga + other experimental patches.)
I changed all the 'pmake(src[x])' to 'xmake(src,x)' in render_template.h
manually and added Scaler_Line++; in every scaler.
I will check what I did wrong.
Last edited by ykhwong on 2005-8-24 @ 02:42, edited 1 time in total.
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Overscan border patch

Postby ykhwong » 2005-8-23 @ 19:31

I set overscanstrength=3. Is this correct?
You do not have the required permissions to view the files attached to this post.
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Overscan border patch

Postby HunterZ » 2005-8-23 @ 19:49

Looks fine to me. Did you re-merge the patch or is this with the same build as the other screenshots?

Also, what do 0 and 1 look like?
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6072
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Overscan border patch

Postby Kippesoep » 2005-8-23 @ 20:09

Weird. It looks fine, but the value is strange. At overscanstrength=3, the white of the dollarsign should have its blue/green levels reduced by a factor of 4. Since the white isn't pure (0xFF in each channel), but slightly darker (0xFC), I'd expect 0x3F for blue/green. Instead, they're 0x38 (reduction by 4.5).

Not really a problem and perhaps caused by something else (maybe something as simple as gamma correction in your PNG), but it bugs me that I can't explain it.

Still, this version does show a proper red everywhere. If it works at factor 2 as well, I think the bug is probably just in my mind. Just ignore me :depressed:
User avatar
Kippesoep
Oldbie
 
Posts: 1015
Joined: 2005-5-04 @ 22:36
Location: Netherlands

Re: Overscan border patch

Postby ykhwong » 2005-8-24 @ 01:50

Thanks for your test, Kippesoep.
Maybe you're right. Applying overscan patch to clean cvs source is different from applying overscan + other experimental patches (on the result).
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Overscan border patch

Postby vasyl » 2005-8-24 @ 04:49

I did not measure exact color values, relied on interp_w2 implementation itself. The first (broken) screenshot is really odd. It seems that blending almost worked but there was color overflow from one component to another, almost like blending was used on some packed color format without unpacking first. That suggests bug in interp_w2 but the CVS version looks rock solid to me. Bug like that would also cause color artefacts in complex scalers.
vasyl
Oldbie
 
Posts: 680
Joined: 2005-3-27 @ 04:53

Re: Overscan border patch

Postby HunterZ » 2005-8-26 @ 14:04

From this thread: viewtopic.php?p=65711#65711
avatar_58 wrote:Alrighty the new border patch applied to ykhwong's works like a charm. For some reason though it does not work with "surface" when in fullscreen. Instead I set it to "overlay" and it works great. Changing it to a 1 pixel wide border is good enough for me and doesn't get in the way of the HUD.

Good work all. :happyhappy:


His statement about it not working with surface mode bothers me, although I haven't tried to replicate it.
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6072
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Overscan border patch

Postby ykhwong » 2005-8-27 @ 01:42

It does work in surface, but not in fullscreen mode.
To clarify, openglhq & surface output support overscan border in windows mode, not in fullscreen.
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Re: Overscan border patch

Postby HunterZ » 2005-8-27 @ 03:02

Is there a way to fix this? What is the technical reason why it doesn't currently work?
You're perfect, yes it's true...but without me, you're only you.
User avatar
HunterZ
l33t++
 
Posts: 6072
Joined: 2003-1-31 @ 19:04
Location: Seattle

Re: Overscan border patch

Postby vasyl » 2005-8-27 @ 05:02

Odd, I thought that all rendering goes through scalers in render_templates.h. In fact, I am positive that it does. ykhwong: Can you tell which scaler is in use in full screen mode in your case? If it is "normal", double-check that it is patched correctly -- it is the only scaler that has implementation without PMAKE/XMAKE, and that implementation must be disabled and replaced in order for overscan to work.
vasyl
Oldbie
 
Posts: 680
Joined: 2005-3-27 @ 04:53

Next

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 3 guests