[hatari-devel] User selectable threshold for window zooming

Eero Tamminen eerot at users.berlios.de
Sun Feb 21 17:32:06 CET 2010


Hi,

On Thursday 04 February 2010, Thomas Huth wrote:
> Eero Tamminen <eerot at users.berlios.de> wrote:
> > For screen to get more than doubled, the original width would need to
> > be < 267 pixels and height < 184 pixels which at least I've never
> > seen... And ST/STE resolutions are never zoomed more than double.
>
> You haven't seen a lot of Falcon demos yet, have you? ;-)
> Try "Terrorize your soul" for example, it switches to 320x100 or so a
> couple of times... that means nScreenZoomY has been set to 5 with the
> old code, that's a lot more than simply doubling the resolution...

"b ($FF82C2).w ! ($FF82C2).w :trace"  on this gives:

Startup situation:
  $ff82c2 = $0

In the tunnel screen:
  $ff82c2 = $1

And after this the demo on some screens toggles this bit.

This is the line doubling bit.  The screen size is 320x100 without Hatari
zooming.  Shouldn't line doubling bit automatically double the *vertical*
resolution like is done for the ST-med interlace?

(And then screen zooming doubling both directions is the correct thing to
do as that maintains the correct aspect ratio.)


Could you please check/answer this (see below).  What's the right thing to
do to Falcon resolution / window size emulation?


On Sunday 31 January 2010, Eero Tamminen wrote:
> On Friday 29 January 2010, Eero Tamminen wrote:
> > On Friday 29 January 2010, Eero Tamminen wrote:
> > > Except for the ST-medrez case in screen.c, I was just wondering why
> > > one would want to zoom vertical and horizontal directions by
> > > different amounts?   Does it make sense for Falcon?
> >
> > Answering myself... Yes, it has interlace mode.  But I would like this
> > zoom-only-vertically thing to be done on Falcon only when it make
> > sense like it's done on ST medrez.
> >
> > So, how do I know in hostscreen.c whether Falcon is using an interlaced
> > screen mode?
>
> Again answering myself (I'm talking to myself, should I be worried?)...
>
> $FF82C2, the Video Control register tells this.  I tested what changes
> happen to it when toggling the TOS4 video options.
>
> On Hatari RGB monitor emu:
> - On the 320x200 default res, none of the bits are set.
> - Changing from 40  to 80 columns mode sets the Half pixel width bit 2.
> - Enabling the interlace option, sets the Interlace bit 1.
>
> On Hatari VGA monitor emu:
> - On the 320x200 default res, the Half pixel width bit 2 and
>   Line doubling bit 0 are both set (TOS4 says "line doubling=on).
> - Changing from 40  to 80 columns mode clears the Half pixel width bit 2
>   and sets the Quarter pixel bit 3.  Vertical resolution increases from
>  200 to 480, more than double (interlace doubled the res exactly).  Why?
> - Changing line doubling to off, clears bit 0.
>
> So, I can catch them.   But should Hatari really double vertical and
> horizontal resolution differently when some of these bits are set, and
> if yes, for which of them?

If the window size should be doubled in some direction like is done with
the ST medrez, Videl code could tell that to the hostscreen stuff based
on this register's values.

I just want to know what kind of zoom factors should be automatically used
when these bits are set.

(The user zooming/doubling setting is then a separate thing to do after
this.)


> > > Attached is a patch that makes the desired target window resolution
> > > selectable from the configuration file.  If resolution would still
> > > fit to that size when doubled, it will be doubled in both directions.
> >
> > Any comments on the patch?  Only thing missing from it is the GUI
> > code for letting user to specify the target/max window size for
> > doubling and having a command line option for that + doc updates.
> >
> > It will prevent Hatari from trying to use a resolution (e.g.
> > borders+doubling) that can be larger than what user wants it to use.
>
> Attached is a new patch and screenshots of the Screen dialog which
> I split in the patch into separate (Atari) Monitor and (Hatari) Window
> dialogs.
>
> The window dialog has user configurable Max size for doubled resolutions
> (doubling won't be used if it would make window larger in either
> direction than the given max size).
>
> Enabling doubling means now just that you specify your screen resolution,
> or leave it at default values (800x600) if you don't have a larger
> monitor or don't want larger Falcon resolutions to be scaled too.
>
> If you want to temparily disable doubling completely, that will now be
> more awkward (one needs to set the max resolution low enough that screen
> will be never doubled), but is that really a problem?


	- Eero

PS.  Sometimes I get this infinitely from TYS:
	Dsp: 0x0010: 0x00007f unknown instruction

-> Something gotten broken in DSP emulation after v1.3.1?



More information about the hatari-devel mailing list