Re: [hatari-devel] Open Hatari in big window

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


Hi,

On 3/29/20 5:08 AM, David Savinkoff wrote:
----- On Mar 28, 2020, at 5:54 PM, Eero Tamminen oak@xxxxxxxxxxxxxx wrote:
On 3/28/20 9:17 PM, th.huth@xxxxxxxxx wrote:
Am 13.03.2020 23:26 schrieb Eero Tamminen:
To get 320x200 window for ST-low with the patch
set on SDL2, one would need to limit Hatari max
window size to <640x400, and set Zoom factor to 1.
I think that change is acceptable now that GPUs
and high resolutions are common.

That sounds pretty confusing, too.

It's something that almost nobody should need or
want. Even with my 10 year old monitor, smallest
supported resolution is 640x480.

I Have a monitor like this one. However, I have an All-In-Wonder
Radeon video card from 2003 that doubles the resolution so that
this monitor displays 320x200 in the 640x400 mode.

Hatari should keep the native resolutions of the ST so that future
hardware (or even SDL2 can handle this situation).

My comment is about how --zoom *command line
option* works, not about removing some functionality.


FYI: Hatari already defaults to doubling ST low resolution (when that fits to your monitor).

This is done by setting Hatari FB maximum
size to large enough value by default:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/configuration.c?id=56240f77#n837

And screen.c using max size options to decide
whether it can use doubled low-res screen size:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/screen.c?id=56240f77#n576


Only thing that changes is that "--zoom" option
will now always force use of that same default
(doubled) maximum window size, and that change is
done only when Hatari has been compiled with SDL2.

After my patches, if you use --zoom option with
SDL2, you need to give also --max-width/-height
options to revert max size back to your own
smaller values.

If you don't use --zoom option, nothing changes
(in regards to Hatari window size), even if you
build Hatari with SDL2 + my patches.

And how things work with SDL1 side isn't changed
at all.


I have never liked the scan doubling feature (please don't make this
non-optional) in Hatari because it is not Hatari's job to do video processing.
This should be done by SDL2 (if it doesn't already support this), or done by
the operating system or extra hardware.

Emulating Atari monitor behavior is very much
Hatari's job.

I doubt you would e.g. enjoy very much 1-pixel
high resolutions in the Toons (Falcon) demo.

Even if your monitor would support such
resolutions, that wouldn't be enough, it would
also need to be able to switch resolutions fast
enough that you would see something else than
black when the demo switches between resolutions
several times a second.

On real Atari machine, the size of Atari screen in
your monitor doesn't change (significantly) based
on what resolution you've selected.  Hatari does
need to emulate that.


Btw. It seems I need to update also maximum screen
size options.  Attached is updated doc patch.


	- Eero
commit ea4c34354386e99eb1529a79b8c8c17b3163b2e2
Author: Eero Tamminen <oak@xxxxxxxxxxxxxx>
Date:   Fri Mar 6 22:57:17 2020 +0200

    Document graphics handling changes
    
    - Document new zoom/scale functionality and move it to general
      display options as it isn't ST/STe specific
    - Remove zoom TODO item
    - Describe maximum screen size interaction with zoom option and
      Atari monitor emulation
    - Note what SDL is as it's referred in many places in hatari.1
    - Update release notes for the graphics changes
    
    TODO: update manual "The Hatari Screen Dialog" section after
          this patch series is in.

diff --git a/doc/hatari.1 b/doc/hatari.1
index 99138ad8..3a23f08f 100644
--- a/doc/hatari.1
+++ b/doc/hatari.1
@@ -2,7 +2,7 @@
 .\" First parameter, NAME, should be all caps
 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
 .\" other parameters are allowed: see man(7), man(1)
-.TH "HATARI" "1" "2014-05-08" "Hatari" ""
+.TH "HATARI" "1" "2020-03-29" "Hatari" ""
 .\" Please adjust this date whenever revising the manpage.
 
 .SH "NAME"
@@ -14,8 +14,9 @@ hatari \- Atari ST/STE/TT/Falcon emulator
 .RI  [directory|diskimage|program]
 
 .SH "DESCRIPTION"
-Hatari is an Atari ST/STE/TT/Falcon emulator for Linux, FreeBSD, BeOS and
-other Systems which are supported by the SDL library.
+Hatari is an Atari ST/STE/TT/Falcon emulator for Linux and other
+Systems which are supported by the SDL (cross-platform graphics, input
+and sound) library.
 .PP
 With Hatari one can run games, demos or applications written for Atari
 ST, STE or Falcon.  Atari TT support is experimental.  Hatari supports
@@ -123,10 +124,45 @@ Show statusbar (with floppy leds etc etc)
 Show overlay drive led when statusbar isn't shown
 .TP
 .B \-\-max\-width <x>
-Preferred / maximum window width for borders / zooming
+Preferred / maximum Hatari screen width
 .TP
 .B \-\-max\-height <x>
-Preferred / maximum window height for borders / zooming
+Preferred / maximum Hatari screen height.
+
+Maximum width and height options are part of Hatari's Atari monitor
+emulation. They limit the size Hatari should aim for its internal SDL
+framebuffer, and how much of the Atari screen borders are visible.
+
+On an SDL2 build, framebuffer is then scaled to the Hatari output
+window based on the specified Hatari zoom factor (see below).
+
+Aim of this is to have all resolutions show up in approximately same
+size, like on a real Atari monitor. Hatari's internal integer scaling
+support sets some limits on this, so it's an expert option.
+
+Note: Only reason to change the defaults, should be limiting this to a
+smaller resolution for performance reasons, e.g. for video recording,
+or on really underpowered systems, to make monitor do all of the
+ST-low resolution scaling by forcing Hatari to ask SDL for CGA / QVGA
+resolution.
+.TP
+.B \-z, \-\-zoom <x>
+With the Hatari SDL1 build, this is just a shortcut for overriding
+maximum screen size settings with values that result in ST/STe low
+resolution being doubled or not (1=no, 2=yes).
+
+With the Hatari SDL2 build, this option overrides max width/height
+options so that e.g. ST-low resolution gets always doubled, resulting
+in all resolutions (except TT-high) having approximately same size.
+
+Zoom factor is then used to scale that up (or down) to the Hatari
+output window.  This way scaling gives approximately same sized window
+regardless of current Atari resolution, like on a real Atari monitor.
+
+With non-integer zoom factors, linear scaling is used to smooth out
+the output, with integer zoom factors, scaling is done using nearest
+neighboring pixels for sharper output.  This applies also to window
+resizes.
 .TP
 .B \-\-bpp <bool>
 Force internal bitdepth (x = 8/15/16/32, 0=disable)
@@ -147,8 +183,8 @@ the resulting sound break). Otherwise fullscreen will use a resolution
 that is closest to the Hatari window size.
 
 As Hatari ST/STe display code doesn't support zooming (except low-rez
-doubling), it doesn't get scaled (by Hatari or monitor) when this is
-enabled, and you may get large black borders around ST/STe screen.
+doubling) with SDL1, it doesn't get scaled (by Hatari or monitor) when
+this is enabled, and you may get large black borders around ST/STe screen.
 Therefore this is mainly useful only if you suffer from the described
 effects, but still want to grab mouse and remove other distractions
 from the screen just by toggling fullscreen mode. (disabled by
@@ -159,9 +195,6 @@ Hatari uses this threshold to decide when to render a screen with
 the slower but more accurate Spectrum512 screen conversion functions
 (0 <= x <= 512, 0=disable)
 .TP
-.B \-z, \-\-zoom <x>
-Zoom (double) low resolution (1=no, 2=yes)
-.TP
 .B \-\-video-timing <x>
 Wakeup State for MMU/GLUE (x=ws1/ws2/ws3/ws4/random,
 default ws3). When powering on, the STF will randomly choose one of these
diff --git a/doc/manual.html b/doc/manual.html
index 3f7b6352..fd717202 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -617,14 +617,47 @@ etc)</p>
 &lt;bool&gt;</p>
 <p class="paramdesc">Show overlay drive led when statusbar
 isn&rsquo;t shown</p>
-<p class="parameter">--max-width
-&lt;x&gt;</p>
-<p class="paramdesc">Preferred / maximum window width
-for borders / zooming</p>
-<p class="parameter">--max-height
-&lt;x&gt;</p>
-<p class="paramdesc">Preferred / maximum window height
-for borders / zooming</p>
+<p class="parameter">--max-width &lt;x&gt;</p>
+<p class="paramdesc">Preferred / maximum Hatari screen width</p>
+<p class="parameter">--max-height &lt;x&gt;</p>
+<p class="paramdesc">Preferred / maximum Hatari screen height.
+</p><p class="paramdesc">
+Maximum width and height options are part of Hatari's Atari monitor
+emulation. They limit the size Hatari should aim for its internal SDL
+framebuffer, and how much of the Atari screen borders are visible.
+</p><p class="paramdesc">
+On an SDL2 build, framebuffer is then scaled to the Hatari output
+window based on the specified Hatari zoom factor (see below).
+</p><p class="paramdesc">
+Aim of this is to have all resolutions show up in approximately same
+size, like on a real Atari monitor. Hatari's internal integer scaling
+support sets some limits on this, so it's an expert option.
+</p><p class="paramdesc">
+Note: Only reason to change the defaults, should be limiting this to a
+smaller resolution for performance reasons, e.g. for video recording,
+or on really underpowered systems, to make monitor do all of the
+ST-low resolution scaling by forcing Hatari to ask SDL for CGA / QVGA
+resolution.
+</p>
+<p class="parameter">-z, --zoom &lt;x&gt;</p>
+<p class="paramdesc">
+With the Hatari SDL1 build, this is just a shortcut for overriding
+maximum screen size settings with values that result in ST/STe low
+resolution being doubled or not (1=no, 2=yes).
+</p><p class="paramdesc">
+With the Hatari SDL2 build, this option overrides max width/height
+options so that e.g. ST-low resolution gets always doubled, resulting
+in all resolutions (except TT-high) having approximately same size.
+</p><p class="paramdesc">
+Zoom factor is then used to scale that up (or down) to the Hatari
+output window.  This way scaling gives approximately same sized window
+regardless of current Atari resolution, like on a real Atari monitor.
+</p><p class="paramdesc">
+With non-integer zoom factors, linear scaling is used to smooth out
+the output, with integer zoom factors, scaling is done using nearest
+neighboring pixels for sharper output.  This applies also to window
+resizes.
+</p>
 <p class="parameter">--bpp
 &lt;bool&gt;</p>
 <p class="paramdesc">Force internal bitdepth (x =
@@ -657,10 +690,6 @@ mode. (disabled by default)</p>
 when to render a screen with the slower but more accurate
 Spectrum512 screen conversion functions (0 &lt;= x &lt;= 512,
 0=disable)</p>
-<p class="parameter">-z, --zoom
-&lt;x&gt;</p>
-<p class="paramdesc">Zoom (double) low resolution (1=no,
-2=yes)</p>
 <p class="parameter">--video-timing
 &lt;x&gt;</p>
 <p class="paramdesc">Wakeup State for MMU/GLUE (x=ws1/ws2/ws3/ws4/random,
diff --git a/doc/release-notes.txt b/doc/release-notes.txt
index 7c34b90a..cfce3a17 100644
--- a/doc/release-notes.txt
+++ b/doc/release-notes.txt
@@ -3,12 +3,14 @@
                                    --------
                                 Release Notes
 
+
  Development version
  -------------------
 
-Note:
-The following features are deprecated and will be removed in a future release:
-- Support for the SDL 1.2 library (i.e. SDL 2.0 should be used instead)
+Following features are deprecated and will be removed in a future release:
+- Support for the SDL 1.2 library (i.e. SDL 2.x should be used instead)
+- SDL 2.x "bUseSdlRenderer" config and "GPU scaling" GUI options
+  (after HW support for SDL2 is available widely enough)
 - The old UAE CPU core (i.e. the new WinUAE CPU core should be used instead)
 - Python 2 support (Python 2 is end of life in 2020, use Python 3 instead)
 - The "external" disassembler (i.e. use "--disasm uae" instead)
@@ -40,8 +42,16 @@ Emulator:
     and TOS stack overflows in some rare cases
 - Support read-only HD image files, and show error dialogs
   for image file open/lock issues
-- Low/med-rez line doubling uses less CPU and doubled lines in
-  "TV" display mode are now drawn at half intensity, not as black
+- Hatari graphics support:
+  - Low/med-rez line doubling uses less CPU and doubled lines in
+    "TV" display mode are now drawn at half intensity, not as black
+  - SDL2: "--zoom" option accepts any values between 1.0 - 8.0
+  - SDL2: scale quality is autoselected; nearest pixel for sharp
+    output with integer scaling factors, and linear scaling to
+    smooth out issues with non-integer scaling & window resizes.
+  - SDL2: Now redundant "nRenderScaleQuality" config option is
+    removed and "Linear scaling" option in GUI is replaced with
+    the "GPU scaling" option (=bUseSdlRenderer config option)
 - Show mouse grab toggle shortcut key in startup statusbar message
 - Center host mouse to Hatari window on Atari resets and resolution
   changes only when window is focused and mouse pointer is within it
diff --git a/doc/todo.txt b/doc/todo.txt
index db5b88e0..b2ec60f0 100644
--- a/doc/todo.txt
+++ b/doc/todo.txt
@@ -178,8 +178,6 @@ on BerliOS hatari-devel mail thread for more info.)
 	- Line based screen change detection/checks:
 		- blit only changed lines
 		- simpler / faster (LED) overlay handling
-	- x3 and x4 zooming routines for ST-Low resolution
-	  (SDL2 scales to monitor size, so it can be blurry)
 	- Include some fancy zooming routines like 2xSaI or Super-Eagle
 
 - Improve directory handling:


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