Re: [hatari-devel] SDL2 and Videl mode handing issue

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Sun, 13 Nov 2016 13:54:48 +0200
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On 11/13/2016 10:06 AM, Thomas Huth wrote:
> > Am Mon, 7 Nov 2016 01:34:09 +0200
> > schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:  
> >> When you added SDL2 support, you ifdeffed out
> >> the Videl resolution scaling code for SDL2.  
> >
> > Yes, scaling is done by SDL2 in a much better way, so that part
> > should not be used anymore.
> >  
> >> As result, I get "Failed to create 5120x516@32
> >> texture" error and Hatari exit when Mahabharata
> >> demo starts.
> >>
> >> Could you look at it at some point?  
> >
> > It does not abort for me here,  
> 
> Texture size limits differ between GPUs and their driver versions.
> 
> 
> > but I can see that the demo temporarily
> > switches to such a huge resolution, which does not make sense.
> > The problem is here that we calculate the Videl resolution via the
> > FF8210 register and the current BPP value. I think this is wrong and
> > should be fixed one day, likely via HDB and HDE instead, but I don't
> > have a clue how these Videl registers work, and currently lack the
> > time to get into this...
> > So I now added a work-around that does some sanity check on the
> > width and limits the resolution if it is bigger than 1200 pixels
> > (IIRC the Videl width could hardly be bigger than 1024 pixels, so
> > 1200 should be a fair limit here).  
> 
> There's a demo that uses 1600x600@16 mode:
> 	http://www.pouet.net/prod.php?which=25543

Good to know, I wasn't aware of that one yet!

> So, I increased the max width to 2048:
> http://answers.unity3d.com/questions/563094/mobile-max-texture-size.html
> 
> I also updated the compatibility list.
> 
> Same check would be good also for height, with some
> debug output about need for scaling (i.e. potential
> issue in Hatari emulation).

Videl height is limited to 2048 already, the values in
VIDEL_getScreenHeight() are masked with 0x7ff. So limiting the width to
2048, too, sounds like even a better choice now ;-)

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/