Re: [hatari-devel] Hatari screen options (was: Hatari manual.html)

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


Hi Eero,

Thanks for the patch. Ive tried it, I think there is potential to
make a minimal set (maybe even fewer than now) of simple,
intuitive and flexible video options with very little changes.
(all you did was move a bracket)

The patch does as advertised. See attachment.
My on-screen LCD monitor information showed:
800x600 for 400x300  (as expected)
and
832x624 for 416x312  (as expected)

I, however, get a segmentation fault when changing from
ST low to ST high resolution in full-screen mode with EmuTOS.

STe Earth Demo 400x300 and 416x312 - works the same
whether the patch is used or not (as expected).

Borders work the same also.

I have noticed (for a long time) that "Max Zoomed win"
in the SDL menu only shows values that are dividable
by sixteen (probably to make scrolling them faster),
however, any number works. Note that some resolutions
(400x300) are not dividable by sixteen. Maybe making
them dividable by 8 would be better.


----- Eero Tamminen wrote:
> Hi,
> 
> On keskiviikko 26 helmikuu 2014, David Savinkoff wrote:
> > What Hatari needs to do here is USE the user-supplied
> > resolution (if available), and crop the picture if necessary.
> 
> Attached patch does that.
> 
> 
> Downsides of what you request are following:
> 
> * If you disable borders from Hatari settings, you get non-optimal [1]
>   resolution unless you re-calculate and change the user-supplied
>   resolution.
> 
> * Requesting larger framebuffer from SDL than is strictly needed,
>   uses more memory.
> 
> So it doesn't make sense to make that default.
> 
> 
> 	- Eero
> 
> [1] While it might match your screen ratio better, screen coverage
>     and performance wise it's worse.
> 
> 
> 
> > There is no need for Max Size because the picture gets
> > cropped if it is larger than the window.
> > In the situation where the user requests a nonexistent
> > resolution, Hatari will have to select one that is closest.
> > 
> > > SDL will then select suitable resolution for that frame-
> > > buffer and center the framebuffer to that resolution [1].
> > > What it selects, is resolution equal, or next up from size
> > > Hatari requested for framebuffer.  If no user max size is
> > > specified, SDL selected resolution is same as reported limit.
> > 
> > SDL's selection logic is the last resort when all else fails.
> > 
> > > [1] With earlier SDL versions Hatari needs to do the padding
> > > 
> > >     / centering itself, newer SDL versions do it for Hatari.
> > > 
> > > The purpose of what Hatari does is avoid Hatari aborting
> > > because it asked for too large (non-existing) resolution.
> > > 
> > > Purpose of user specified max size is to help in that,
> > > and limiting Hatari window size in windowed mode
> > > (very useful for Falcon mode).
> > > 
> > > > Then the monitor then selects the best it can do.
> > > > (400x300 for CRT // 400x300 scaled to 800x600 for LCD)
> > > 
> > > So this is what you actually wanted?
> > 
> > Intuition would suggest that if you requested a resolution
> > that actually existed, Hatari would request it and get it.
> > Here Hatari requests something different and accidentally
> > gets the correct resolution.
> > 
> > > > It looks like Hatari could be improved though.
> > > > Hatari should be primed with standard video modes so
> > > > that it can make smarter requests.
> > > 
> > > Smarter how?
> > 
> > By using the resolutions provided in this email.
> > 
> > If a user requests one of the resolutions in this email,
> > Hatari should unconditionally request it from SDL.
> > If the request fails, Hatari should make the request
> > that it currently does.
> > 
> > > > My suggestion is
> > > > to prime Hatari with the xrandr results that I gave
> > > > for my LCD monitor (unless you can find a more
> > > > inclusive list). Note that the important video modes
> > > > are the low resolution modes, or multiples thereof.
> > > 
> > > Hatari uses SDL, not Xrand.  SDL is portable, Xrandr not.
> > > 
> > > 	- Eero
> > > 	
> > > > (below)
> > > > **** EXHIBIT (1) *************************************
> > > > I asked for 416x312 and got 416x276 because
> > > > Hatari has regressed from when I tested years ago on
> > > > my CRT monitor (by laboriously incrementing through
> > > > sequential numbers with the Hatari SDL GUI to observe
> > > > video modes. Notably, being able to see when 400x300
> > > > and 416x312 popped up).
> > > > 
> > > > Hatari used to provide the resolution requested with
> > > > the status bar disabled. Now the user-requested
> > > > resolution is ignored and replaced with something else.
> > > > 
> > > > I did not notice because the visual impact is insidious.
> > > > 
> > > > ******************************************************
> > > > !!!   SURPRISE   !!!
> > > > 
> > > > I ask for 416x312
> > > > 
> > > > Hatari requests:
> > > >  SDL screen request: 416 x 276 @ 0 (windowed)
> > > >  SDL screen granted: 416 x 276 @ 32
> > > > 
> > > > I say WRONG and WRONG
> > > > 
> > > > Monitor says (on screen independently):
> > > >  832x624
> > > > 
> > > > I get a full screen at 416x312 (see xrandr below)
> > > > *******************************************************
> > > > 
> > > > $ xrandr
> > > > 
> > > >  SZ:    Pixels          Physical       Refresh
> > > > 
> > > > *0   1280 x 1024   ( 361mm x 292mm )  *60
> > > > 
> > > >  1   1280 x 960    ( 361mm x 292mm )   60
> > > >  2   1280 x 800    ( 361mm x 292mm )   75   70   60
> > > >  3   1280 x 768    ( 361mm x 292mm )   85   75   70   60
> > > >  4   1280 x 720    ( 361mm x 292mm )   85   75   70   60
> > > >  5   1152 x 864    ( 361mm x 292mm )   75   70   60
> > > >  6   1024 x 768    ( 361mm x 292mm )   75   70   60   85
> > > >  7    832 x 624    ( 361mm x 292mm )   75
> > > >  8    800 x 600    ( 361mm x 292mm )   75   72   60   56   85
> > > >  9    720 x 400    ( 361mm x 292mm )   70   85
> > > >  10   640 x 480    ( 361mm x 292mm )   75   73   67   60   85
> > > >  11   640 x 400    ( 361mm x 292mm )   85
> > > >  12   640 x 350    ( 361mm x 292mm )   85
> > > >  13   640 x 360    ( 361mm x 292mm )   85   75   70   60
> > > >  14   416 x 312    ( 361mm x 292mm )   75
> > > >  15   400 x 300    ( 361mm x 292mm )   85   75   72   60   56
> > > >  16   320 x 240    ( 361mm x 292mm )   85   75   73   60
> > > >  17   360 x 200    ( 361mm x 292mm )   85
> > > >  18   320 x 200    ( 361mm x 292mm )   85
> > > >  19   320 x 175    ( 361mm x 292mm )   85
> > > > 
> > > > Current rotation - normal
> > > > Current reflection - none
> > > > Rotations possible - normal
> > > > Reflections possible - none
> > > > 
> > > > xrandr output looks very reasonable. Resolutions
> > > > 416x312 and less appear undocumented for the LCD
> > > > monitor. Maybe the R100 [Radeon 7200 / All-In-Wonder]
> > > > video card does something.
> > > > 
> > > > Sincerely,
> > > > David Savinkoff
> 

$ /home/user/hatari/bin/hatari
fdc enable drive=0 on
fdc enable drive=1 on
fdc enable drive=0 on
fdc enable drive=1 on
Hatari v1.7.0, compiled on:  Feb 23 2014, 13:12:12
Desktop resolution: 1280x1024
Configured max Hatari resolution = 416x312.
resolution: request limits for: 0x0x0
resolution: video mode asked: 0x0x0 (fullscreen)
resolution: searching a good video mode (any bpp)
resolution: largest found video mode: 1280x1024
resolution: video mode selected: 1280x1024x0
resolution: limit to user configured max
resolution limit:
        416 x 312
limited resolution:
        1 * (48 + 320 + 48) x (29 + 200 + 47)
        = 416 x 276 (+ statusbar)
SDL screen request: 416 x 312 @ 0 (fullscreen)
SDL screen granted: 416 x 312 @ 32
Building CPU table for configuration: 68000 (compatible mode)
1874 CPU functions
Building CPU function table (0 1 1).
GEMDOS HDD emulation, G: <-> /home/user/atari/hd/G.
GEMDOS HDD emulation, H: <-> /home/user/atari/hd/H.
Loaded TOS version 2.06, starting at $e00000, country code = 3, PAL
Skipped TOS patches.




$ /home/user/hatari/bin/hatari
fdc enable drive=0 on
fdc enable drive=1 on
fdc enable drive=0 on
fdc enable drive=1 on
Hatari v1.7.0, compiled on:  Feb 23 2014, 13:12:12
Desktop resolution: 1280x1024
Configured max Hatari resolution = 400x300.
resolution: request limits for: 0x0x0
resolution: video mode asked: 0x0x0 (fullscreen)
resolution: searching a good video mode (any bpp)
resolution: largest found video mode: 1280x1024
resolution: video mode selected: 1280x1024x0
resolution: limit to user configured max
resolution limit:
        400 x 300
limited resolution:
        1 * (32 + 320 + 32) x (29 + 200 + 47)
        = 384 x 276 (+ statusbar)
SDL screen request: 400 x 300 @ 0 (fullscreen)
SDL screen granted: 400 x 300 @ 32
Building CPU table for configuration: 68000 (compatible mode)
1874 CPU functions
Building CPU function table (0 1 1).
GEMDOS HDD emulation, G: <-> /home/user/atari/hd/G.
GEMDOS HDD emulation, H: <-> /home/user/atari/hd/H.
Loaded TOS version 2.06, starting at $e00000, country code = 3, PAL
Skipped TOS patches.





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