(*-------------------------------------------------------------------------*)
(*                                                                         *)
(*  This shows one Error (I guess it's not my fault) in Intuition or       *)
(*  Graphics or so:                                                        *)
(*                                                                         *)
(*  A 4-BitPlanes deep Hires-OverScan Screen in PAL size can't be opened ! *)
(*  There are around 44 Lines missing at the Bottom.                       *)
(*  I've got no idea why this is so.                                       *)
(*                                                                         *)
(*  For all those German Guys:                                             *)
(*                                                                         *)
(*  Dieses kleine Programm zeigt einen Fehler in Intuition oder Graphics   *)
(*  (ich glaub', daß es nicht mein Fehler ist):                            *)
(*                                                                         *)
(*  Es kann kein Hochauflösender OverScan-Screen, der 4 BitPlanes tief     *)
(*  in PAL-Größe geöffnet werden. Unten werden etwa 44 Zeilen abgeschnitten*)
(*  Ich hab' keine Ahnung, warum dem so ist.                               *)
(*                                                                         *)
(*  Wer ich bin? Fridtjof [fbs], AMOK                                      *)
(*-------------------------------------------------------------------------*)

MODULE ScreenTest;

FROM SYSTEM IMPORT ADR;

FROM Intuition IMPORT OpenScreen,CloseScreen,NewScreen,ScreenPtr,
       customScreen;
FROM Graphics IMPORT ViewModeSet,ViewModes,Move,Text,RastPortPtr;

VAR
  i: LONGCARD;
  ns: NewScreen;
  s: ScreenPtr;
  RP: RastPortPtr;

BEGIN
(*------  Open Hires-OverScan-Screen:  ------*)
  WITH ns DO
    leftEdge := 0;      topEdge := 0;
    width    := 656;    height  := 256;
    depth    := 4;
    viewModes    := ViewModeSet{hires};
    type         := customScreen;
    font         := NIL;
    defaultTitle := NIL;
    gadgets      := NIL;
    customBitMap := NIL;
  END;
  s := OpenScreen(ns);
  RP := ADR(s^.rastPort);
  Move(RP,200,100);
  Text(RP,ADR("Dies ist Hires 656x256."),23);
  Move(RP,180,120);
  Text(RP,ADR("Test Bottom Border with Mouse !!!"),33);
  FOR i:=0 TO 250000 DO END;
  CloseScreen(s);
(*------  Open Lores-OverScan-Screen:  ------*)
  WITH ns DO
    leftEdge := 0;      topEdge := 0;
    width    := 336;    height := 256;
    depth    := 4;
    viewModes    := ViewModeSet{};
    type         := customScreen;
    font         := NIL;
    defaultTitle := NIL;
    gadgets      := NIL;
    customBitMap := NIL;
  END;
  s := OpenScreen(ns);
  RP := ADR(s^.rastPort);
  Move(RP,30,100);
  Text(RP,ADR("Dies ist Lores 336x256."),23);
  Move(RP,10,120);
  Text(RP,ADR("Test Bottom Border with Mouse !!!"),33);
  FOR i:=0 TO 500000 DO END;
  CloseScreen(s);
END ScreenTest.
