ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > General Discussion > scanlines and resolution
scanlines and resolution
  Author    Thread Reply to topic
theelf



Joined: 19 Feb 2006
Posts: 24
scanlines and resolution 

Hi!

two questions

first, is possible to use scanlines with OpenGL? i will love to have real scanlines for EGA games, but my CRT is 31khz, then i need to emulate them


Second not too important, is possible to use non 4:3 resolutions?
for example, i use 1600x1200 right now in my CRT, but i will preffer 1280x1200 or 1280x100 for example, because i already use 1600x1200 for some emulators at 60hz

Or a way to select 70hz for a resolution


Thanks a lot


Last edited by theelf on Wed Apr 13, 2016 2:44 am; edited 1 time in total

 Reply with quote  
Post Mon Feb 01, 2016 6:31 pm 
 View user's profile Send private message Visit poster's website
theelf



Joined: 19 Feb 2006
Posts: 24
 

Any ideas? still stuck in this problems with scummvm

Thanks

 Reply with quote  
Post Fri Mar 25, 2016 1:33 am 
 View user's profile Send private message Visit poster's website
eriktorbjorn
ScummVM Developer


Joined: 31 Oct 2005
Posts: 3303
Re: scanlines in OpenGL and resolution 

quote:
Originally posted by theelf

first, is possible to use scanlines with OpenGL? i will love to have real scanlines for EGA games, but my CRT is 31khz, then i need to emulate them



I don't use the OpenGL modes myself, and know very little about it, so I could easily be wrong. But from what I understand, there isn't any such feature. (There is a "TV2x" graphics mode, but then it's no longer OpenGL.)

quote:
Originally posted by theelf

Second not too important, is possible to use non 4:3 resolutions?
for example, i use 1600x1200 right now in my CRT, but i will preffer 1280x1200 or 1280x100 for example, because i already use 1600x1200 for some emulators at 60hz

Or a way to select 70hz for a resolution


It looks like it does check available fullscreen resolutions, and picks the one it thinks will be the most suitable... but I don't know if there's any way to force it to use a particular one.

It does save the previously used mode in the ScummVM settings file as "last_fullscreen_mode_width" and "last_fullscreen_mode_height", but I can't tell if editing that by hand makes any difference.

Last edited by eriktorbjorn on Tue Mar 29, 2016 9:59 am; edited 1 time in total
 Reply with quote  
Post Tue Mar 29, 2016 4:57 am 
 View user's profile Send private message
criezy
ScummVM Developer


Joined: 23 Sep 2006
Posts: 540
Location: West Sussex, UK
 

In OpenGL fullscreen mode you can toggle between available resolutions using Crtl+Alt and either + or -

 Reply with quote  
Post Tue Mar 29, 2016 7:29 am 
 View user's profile Send private message
theelf



Joined: 19 Feb 2006
Posts: 24
 

Thanks for reply, finally i decided to moddify the sourcecode and add a 6x scale with variable scanlines

Now the EGA games look amazing in my CRT, very similar to my old EGA screen


In 640x480 the doublescan of normal 31khz break all the magic for scanlines, but in higher resolutions, the magic is back again!


Monkey Island in 1920x1440 using a 6x scaler, and no need for OpenGL










I have a problem, when i press F5, the cursor have scanlines too Laughing

Just when is the scummvm menu, in normal ingame no... any ideas?


 Reply with quote  
Post Tue Mar 29, 2016 11:14 am 
 View user's profile Send private message Visit poster's website
theelf



Joined: 19 Feb 2006
Posts: 24
 

Hi guys, sorry double post, but i need some advice


Finally i did a nice normal6x, bit now i want to do a scanlines6x


Can I have some advice how to do? im stuck in this one


First i edit surfacesdl-graphics.cpp in "backends\graphics\surfacesdl"

and changed
case GFX_TV2X:
newScaleFactor = 2;

to
case GFX_TV2X:
newScaleFactor = 6;


But im stuck in this code.. any advice how to convert to scale6x? now is scaling to 2x


code:
template<typename ColorMask>
void TV2xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
               int width, int height) {
   const uint32 nextlineSrc = srcPitch / sizeof(uint16);
   const uint16 *p = (const uint16 *)srcPtr;

   const uint32 nextlineDst = dstPitch / sizeof(uint16);
   uint16 *q = (uint16 *)dstPtr;

   while (height--) {
      for (int i = 0, j = 0; i < width; ++i, j += 2) {
         uint16 p1 = *(p + i);
         uint32 pi;

         pi = (((p1 & ColorMask::kRedBlueMask) * 7) >> 3) & ColorMask::kRedBlueMask;
         pi |= (((p1 & ColorMask::kGreenMask) * 7) >> 3) & ColorMask::kGreenMask;

         *(q + j) = p1;
         *(q + j + 1) = p1;
         *(q + j + nextlineDst) = (uint16)pi;
         *(q + j + nextlineDst + 1) = (uint16)pi;
      }
      p += nextlineSrc;
      q += nextlineDst << 1;
   }
}



 Reply with quote  
Post Wed Apr 13, 2016 2:46 am 
 View user's profile Send private message Visit poster's website
rootfather
ScummVM Team Member


Joined: 31 Mar 2015
Posts: 34
Location: Germany
 

Hi theelf, your 6x scaler looks really nice.

Do you have any plans to continue work on this and maybe try to submit a patch to get it included in the main ScummVM branch?

 Reply with quote  
Post Fri Apr 22, 2016 5:54 pm 
 View user's profile Send private message Send e-mail Visit poster's website
dr.zeissler



Joined: 01 Jan 2007
Posts: 20
 

quote:
Originally posted by theelf
Thanks for reply, finally i decided to moddify the sourcecode and add a 6x scale with variable scanlines
Now the EGA games look amazing in my CRT, very similar to my old EGA screen
In 640x480 the doublescan of normal 31khz break all the magic for scanlines, but in higher resolutions, the magic is back again!
Monkey Island in 1920x1440 using a 6x scaler, and no need for OpenGL


I have a problem, when i press F5, the cursor have scanlines too Laughing
Just when is the scummvm menu, in normal ingame no... any ideas?



Can't see the sample pictures Sad
My G4-Mini (OSX10.3.9) does not show a regular raster either in fullscreen or window mode when choosing tv2x. Is it broken or is it due to my screen (15" TFT 1024x768 native). It does not get any better if I choose aspact-correction.

Thx
Doc
 Reply with quote  
Post Sat Sep 01, 2018 10:32 am 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge