

 > OVERSCAN? STReport NewsPlus     An all new graphics mode with promise
   ============================

     Courtesy, CIS


                              Stefan Hartmann
                    Electronic Research and Development
                            Keplerstrasse 11 B
                              1000 Berlin 10
                               West-Germany
                      Tel: West-Germany/30 344 23 66,
                    email on Compuserve ID: 72017,3216


 Introduction of an "Xtended Graphics Mode" for the Atari ST Computers

 from:  
                  Stefan Hartmann (Hardware and article) 
                                   and 
                  Carsten Isakovic(Software:Overscan.PRG)


     If You are a graphics freak and an owner of  an Atari  ST computer You
 might have been looking with keen eyes into the direction of the Commodore
 Amiga Computer and have  been  thinking  about  selling  Your  32000 Bytes
 Screen Memory Machine and gonna buy the Interlace- HAM-Baby?

                   Stop! This article will tell You why!

     With a  simple switch (cost about a buck) and additionally only at the
 STM520:  2  Rectifier  diodes,  2  Resistances,  a  NPN  Transistor  and a
 capacitor, we  will show  You how  to get a visible 59640 Bytes big Screen
 Memory (in 50 Hertz Mode). (the  following description  will apply  for 50
 Hertz mode  , 60  Hertz Mode  and Monochrome-Overscan-Mode  has some other
 screen memory size)

                           What does this mean ?

     This means  in  Low  resolution  mode  there  are  now  420*284 Pixels
 available to  display, still  16 colors  per pixel.   In midres resolution
 there we have now the gorgeous resolution of 840*284 Pixel, still 4 colors
 per dot.  In monochrome mode we get now 688*480 pixel with a well adjusted
 SM124 monochrome monitor.

     In color mode there is no  more screen  window visible  but pixels all
 over the  screen, indeed  some pixels  You'll never see, because they hide
 behind the  left  and  right  monitor  tube  border  till  You  adapt Your
 horizontal screen width.

   The same thing is available on the Amiga. There they call this mode :

                                 OVERSCAN

     This overscan  mode is now with this article also possible for all the
 Atari ST computers, from the 512KB 260 machine to the Mega ST 4.

     That  means  the  Atari  ST  can  now  like  the  Amiga  be  used  for
 semi-professional Desktop-Video  applications for  example together with a
 genlock-interface to get a scrolled text message in the lower  border of a
 video movie.

             How was this little hardware modification found ?

     The story of the Overscan modification began, when about a month ago I
 obtained a demo disk of a superb  graphic  effort.    But  a  very strange
 addition  appeared.    In  the  lower  border  of the ST screen appeared a
 scrolling text message!  How was  this  possible?    Had  my  monitor lost
 calibration?  Of course not...

 I couldn't  believe my eyes!  This programmer, Alyssa (special nickname of
 this hacker-guy) had programmed a very fine flowing scrolling text message
 out of  pixel graphics at the bottom of the screen where normally only the
 color  palette  register  0  (that  means  the  static  border  color)  is
 available.

 Had this guy found an undocumented "poke" to switch off the lower border
 and display further pixel graphics, which Mr. Shiraz Shivji (the father
 of the ST) informed us of?  Not really...

 He had found the software-trick, that if the picture frequency is abruptly
 switched inside the 199th scan line from 50 to 60 Hertz the result is that
 the Glue  chip is  disturbed, so  that it  holds its Display-Enable-Signal
 longer at  High  (5  Volts)  -  Level  and  this  tells  the  MMU  and the
 Video-Shifter to  display Pixel-Graphics till the end of the screen.  (but
 still keeping a left and right border).

 To understand all this screen manipulation I will briefly explain  how the
 ST generates  its picture  in color  mode:  In 50 Hertz Mode the screen is
 build up of 313 scan lines which are  written 50  times per  second to the
 screen.  (In 60 Hertz mode there are 263 scan lines displayed)

 This means that the Atari doesn't work with Interlace, the so called "half
 frames" (semi frames) are placed precisely one upon another so there is no
 placement shifting like in TV-Systems (e.g. NTSC).

 Normally, in  50 Hertz  mode the first 39 scan lines are displayed without
 pixel graphics but with  background color  palette 0.   This  is the upper
 Border.   Then there  are 200 scan lines in which the normal Screen window
 is displayed but still with this left and right border, which is still
 generated from palette 0.

 The following 45 scan  lines display  the lower  border, still  palette 0.
                  (normally no pixel graphics available)
 The last  29 scan  lines of  the total  313 lines are not visible, because
 they are used for  vertical blanking.  This is  needed to  synchronize the
 picture frequency of a connected monitor.

 The Blanking  is done  by the  blank-signal that  is also generated by the
 Glue chip and this signal switches the RGB-D/A-Resistor-Converter  to Zero
 when the  vertical blank  period is  active. (In  60 Hertz Mode the normal
 mode is : upper border 14 scan lines, 200 display  lines, 24  lower border
 scan lines and 25 scan lines blanked).

 A few  months ago,  we received  2 new demo programs "Amiga-Demo" from the
 TEX-Programmers ( some special assembler graphics wizards ) and the LT.PRG
 (the death  of the  left border) of the TNT-Crew.  This 2 programs blew my
 mind  because  they  already  featured  pixel  graphics  inside  the right
 (Amiga-Demo) and  in either  border(left and  right, LT.PRG).  How this is
 possible,  I'm  not  sure  yet,  because   the  assembler   code  is  very
 sophisticated and encrypted thus, no chance for a tracking monitor program
  or disassembly.   But it's possible that they use a 50 Hertz to 71 Hertz,
 switching every scanline  synchronized  with  the  video  address counter.
 Must be  very tricky  code!   Seems they want this kept a secret!  (In the
 meantime February '89 the UNION-Demo  was  launched:    Level  16  has now
 implemented a  full software controlled Overscan screen with no borders at
 all!; unbelievable, but very  time  consuming  interrupt  programming; not
 much time left for animation.)

 I  thought,  what  if....If  these  guys  are  able to display some border
 graphics with some very tricky but time consuming code how about trying to
 convince the little Shifter to do this with a simple hardware modification
 and without any time consuming calculations?

                                No problem

 I fetched  my  scope,  booted  the  Amiga-Demo  and  switched  between the
 additional right  border pixel  display and  normal mode.   At this time I
 took a  closer look  with the  scope next  to the  Shifter area  of the ST
 board.    That's  it!    I  recognized  that  if I switched the modes, the
 Display-Enable-Signal changed its pulse-stop relationship.

 The Display Enable Signal determines if pixel graphics should be displayed
 by the Shifter or if the border should be displayed (palette register 0).
 Every time if this signal goes high, pixel graphics is displayed, if it is
 low, palette 0 is displayed.   The Display  Enable signal  is generated by
 the Glue,  like the  Blank-, HSync- and VSync-Signal which are all used to
 generate the picture.  The DE-Signal also goes to the MMU and  the Timer B
 Input  of  the  MFP  chip  (for  counting  the scan line through interrupt
 routines).

 The screen is build  up with  the following  sequence:   The vertical Sync
 signal which  is not  only going  to the  monitor connector buss but which
 comes from the Glue  and  is  also  controlling  the  MMU  is  telling the
 internal counter  of the  MMU to  take over  the address of the next "semi
 frame" from the video.bas address FF8201 and FF8203.   If  now the Display
 Enable signal  goes high  then the  DCYC (Display-Cycle-Clock) signal from
 the MMU is activated which is strobing the videodisplay information (pixel
 graphics) from the RAM in 16 bits words into the Shifter for displaying.

 That means  the DCYC signal clocks the Load Input of the Shifter.  At this
 moment the internal counter of the MMU is counting upwards.

 The actual address has  been  written  all  2  microseconds  to  the video
 address counter  in FF8205/07/09.   And  remains at this point holding the
 Display Enable Signal longer at high level, accordingly more memory RAM is
 addressed as  screen video  ram by  the MMU  and still  transferred to the
 Shifter during every scan line.

 So with the Pulse Stop relationship of the DE signal we can determine the
 size of the screen window.  At last we have the Blank signal which is also
 blanking the video signal from the RGB-Converter during horizontal flyback
 time and vertical synchronization time (as mentioned above).   To complete
 the description,  there is  still the CMPS Signal (Color Map Chip Select),
 which is generated by the MMU and which is only  changing for  telling the
 Shifter to  load a new color palette. (what will Spectrum 512 look like in
 Overscan mode: (stunning!)

 Conclusion:
     
 How do I find the right signal in exchange for the DE signal ?

 Looking around inside the ST I  found the  Composite Sync  Signal which is
 generated by an AND-Combining of the HSync and VSync Signals.  One can use
 the already installed Composite  Sync Signal  which feeds  the monitor bus
 connector.   Make sure  to use the Composite Sync Signal directly from the
 Emitter of the driver (buffer) transistor.  (Take  a look  at Your circuit
 diagram of  Your ST!)   At  the 520  STM (the  STs with RF-modulators) the
 internal Composite  Sync Signal  is missing.   You  have to  add the above
 mentioned circuit of 2 rectifiers, 2 resistors a transistor and a optional
 buffer capacitor( buffers the collector (5Volts) of the  transistor versus
 ground).

 This Composite Sync Signal is ideal for controlling the new Overscan mode.
 We have been trying other signals for example: only the  HSync, the VSync,
 the Blank  signal or  only permanent  5 Volts  but this  doesn't work with
 either 50 and 60 Hertz and GEM couldn't be installed.

 To find a better signal than the Composite Sync signal is not possible
 with such a simple modification.   The ST  has only  4 signals  which come
 from the  GLUE which  can possibly  be used  to create  a "  new " Display
 Enable signal, because all other signals vary.

 The only time invariant signals are :
      1. The old DE-Signal
      2. The HSync Signal
      3. The VSync Signal
      4. The BLANK Signal.

 And still hold the divided clock frequencies 2 MHz and 500 kHz.  To create
 a better  signal than the composite sync signal one would have to use some
 counters and dividers to build up a better "DE"-signal.  This would mean a
 great deal of additional hardware.

 GEM needs  a video scan line whose number has to be able to divide by 4 to
 install it. So the Composite Sync  Signal  was  the  simplest  solution to
 find.

                 Description of the Hardware Modification

 The Display  Enable Signal which is going to the Shifter Pin 37 and to the
 MMU Pin 52 has to be cut and instead of this the Composite Sync Signal has
 to be fed to these two Pins.

 This could  be done  by a  simple 3  Pin switch which switches between the
 original and the new Overscan Mode.  The switch could be installed  at the
 back of  the ST  for example.   It  is also  possible to  switch it during
 operation of the ST without hanging up.    If  You  switch  back  it might
 happen, that the color palettes having been cycled.

 This  is  due  to  percussion  during  switching  but  could be removed by
 switching 3 or 4  times again  till the  color palettes  are in  the right
 order again.  

 Hint: If  there will a shifted palette as the desktop appears, You have to
 switch again a few times the change-over switch so due  to percussion this
 shifted palettes  will disappear.   This  shifted palettes sometimes occur
 during bootup and only at bootup.

         How to connect and wire the Overscan-change-over-switch:

 Directly at the Emitter  of the  Composite Sync  signal driver Transistor,
 You pick  up the  buffered Composite  Sync Signal and feed it to the third
 pin of the switch.  The second pin of the switch (the  pin in  the middle)
 goes to the pin 37 of the Shifter and pin 52 of the MMU.  The first pin of
 the switch is connected to pin 39 of the Glue (Display Enable Signal)

 Reminder: the MFP 68901 pin 20 still gets the Display Enable Signal in
 both modes!!!  We have tried to use also the Composite Sync  for the Timer
 B-Input in  Overscan mode,  but then  the ST  doesn't boot  itself after a
 Reset.

                 Software Adaptation to the Overscan Mode

 If You switch directly from the normal desktop  after booting  without any
 accessories  or  programs  to  the  Overscan  mode, You will see some nice
 "pixel trash" in the upper half of the screen, going from the very left to
 the very right.  (without a border)

 But what  has happened  to the  lower half  screen?  There is some strange
 jumping and changing of colors in a strange pattern of 16 bits.

 What is  this, You  will ask?   This  is only  the display  of RAM databus
 signals!    This  happens  because  the normal Video screen display Ram is
 installed at the top of the available ST Memory.  If switched  to Overscan
 the  ST  needs  more  than  the  32kBytes  but there at the top is no more
 available, so behind the end of  the RAM  the ST  displays the undefinable
 Databus signals!   What  a funny picture! (I just wonder whether the first
 game will use this for displaying "screen communication  problems" like in
 the game: Carrier Command ?)

 So the answer to get a correct full screen Overscan picture is:
 Write a lower Address into the Screen Starting Address Pointer FF8201/03.
 But then there is still the Pixel-Trash, but now all over the screen.

 This is because the color bit planes have changed their place. This can be
 corrected by adapting the GEM.

 This was done by us by writing the Overscan.PRG which adapts the GEM.

 It runs with the Blitter-TOS and the new ROM-TOS 1.4 and the BETA-RAMTOS
 and the Developer-RAMTOS 1.4, but not with the old ROMTOS from 1985 !

 You start it out of the AUTO-folder of a disk or from  the harddisk  and a
 whole new OVERSCAN-world opens up.

 If You  push the  CONTROL button  during booting,  it will come up with an
 installation menu and You can change  the Overscan-resolution,  so it will
 fit  to   Your  monitor  screen  adjustment!    You  can  then  save  this
 Overscan-adjustment, so it will  boot itself  up with  the right  size the
 next  time  !(The  installation  menu  is only available from Overscan.PRG
 version 1.5 up)

 The GEM desktop with this resolution is wonderful.

 With this solution one  can use  already a  few programs,  which get their
 screen parameters  directly from GEM and don't write the graphics directly
 into the screen memory, for example  the DOODLE.PRG,  Wordplus, GEM Paint,
 Easydraw, Kuma  Graph and  Spreadsheet etc.   These programs and some more
 already work with Overscan in color and monochrome mode.

 Unfortunately, the best two graphics programs,  CAD3D from  TOM HUDSON and
 CYBERPAINT  from  JIM  KENT  don't  work  at  this moment with this higher
 resolution.

 TOM and JIM are YOU reading  to this?   Please,  try to  adapt Your superb
 programs...

 The Overscan.PRG  patches the  TOS with  the negative LINE A-Variables, so
 every application, for example CAD3D only would have  to fetch  the actual
 SCREEN SIZE with the command OPEN WORKSTATION (VDI).  This will also apply
 for the new 19" Matrix or Mat Screen Monitors that are used especially for
 DTP with Calamus and other applications.

 Wouldn't it be great to design Your objects on a big screen with CAD3D?

 Imagine, an OVERSCAN-Delta-Animation in color played back in realtime from
 a 800 MBYTE Hardisk, synchronized by  midi-clock with  a midi-sequencer (a
 second Atari ST for example ) which is controlling a complete orchestra of
 synthesizers.  What a realtime multi media show this would be.  This could
 also open  up a  whole new  world of  video music  production in the Music
 Industry.

 A few words about the screen-memory partitioning in OVERSCAN mode in
 50 Hertz image frequency:

 The visible screen memory is now  59640  Bytes  (if  Your  monitor  can be
 regulated to  this screen width and height).  But because of the Composite
 Sync Signal there are  also pixels  displayed during  the blanking  time (
 flybacktime) of  one scan  line.   This are  26 Bytes per scan line.  This
 adds up to 7384 Bytes more than the visible 59640  Bytes.   This means the
 actual size  of the  screen memory  has to be 67024 Bytes big. (calculated
 for 50 Hertz, in 60 Hertz some other size will fit)  This is about 7 kByte
 can be  used for  storing palette information or other stuff.  If it's due
 to memory wasting, the software could also store only the  59640 Bytes for
 one screen but then reloading will take a short moment longer, due to jump
 over the 26 unused Bytes in every video scan line.

 Because of the pulse stop  relation  time  of  the  Composite  Sync signal
 during vertical blanking time there are also some Pixels transferred which
 aren't visible but blanked.  That's why there has to be an offset starting
 address of  about 5 kBytes subtracted from the video.bas pointer registers
 FF8201/03.

 But this is already done with our Overscan.PRG.  If we would have tried to
 avoid these little two disadvantages we would have been forced to generate
 a very special NEW DISPLAY ENABLE Signal which  would have  been needed an
 enormous amount of counters and flip-flops.  So it's easier to live with a
 little more memory consumption  by using  the simple  to install Composite
 Sync signal.

     The difference between 50 and 60 Hertz color mode :

 In 50  Hz mode with using the Composite Sync signal You have 236 Bytes per
 scan line.  210  Bytes are  visible.   The other  20 Bytes  aren't visible
 because of  horizontal flyback  blanking (the  BLANK signal of the GLUE is
 doing his job during this time period).   Well,  236 Bytes  can be divided
 by 4,  this is  what GEM  needs.  So 50 Hertz GEM SHELL installation is no
 problem.

 At this moment, our Overscan.PRG (version 1.6) runs the GEM SHELL only in
 50 and 71 Hz.

 In 60 Hertz mode You have 234 Bytes per scan line.  This is only dividable
 by 2!  So it might be that we will get GEM only to work in Mid-Res-mode in
 60 Hz, but a specially written Cyberpaint could  also handle  60 Hertz, if
 the color palettes are adapted the right way for Lowres.  There would have
 to be 2 different versions of Cyberpaint like Spectrum 512,  because in 50
 Hz there  are 512 clock cycles and in 60 Hz there are 508 Clock cycles per
 scan line.  In 60 Hz there are also only 238 visible scan lines instead of
 284 of the 50 Hz mode.

 My proposal  is, first  to adapt  CAD3D to  50 Hz mode so that the created
 DELTA-files could then transferred  to  a  special  Cyberpaint  that might
 handle also  50 and  60 Hz mode.  This Overscan-Cyberpaint then could also
 convert the 284 scan  lines pictures  to the  visible 238  NTSC compatible
 scan lines pictures.

 So, is  it possible  you could design Your CAD3D animation with a 50 Hertz
 bigger screen and load it  with  Cyberpaint  into  a  60  Hertz compatible
 animation.

                       The monochrome Overscan-mode

 When we  developed the hardware Overscan mode for the first time in end of
 september 1988, we only adapted the color mode.   When we  switched to the
 monochrome mode,  there the  flyback beams of the monochrome monitor SM124
 were visible because in monochrome mode  the ST  sends NO  Blank-signal to
 the SM124 circuit.  Look at it now in monochrome Overscan-mode, before You
 boot the Overscan.PRG.  You still also see the flyback beams because there
 is no  flyback blanking due to this new pulse- stop- time- relationship of
 the composite sync signal.

 So the SM124 has to blank the  flyback  beams  itself.    With  the normal
 DE-signal controlling the picture size it's no problem.  But we did modify
 this  with  Overscan,  so  switched  to  the  Composite  Sync  signal  for
 controlling the  picture size,  we get now 800*500 pixels generated by the
 ST in monochrome mode. 
   
 This is to much for the  SM124:   It doesn't  fit onto  the screen  of the
 SM124.
   
 This means:  many pixels are displayed during flyback time of the electron
 beam and we get the unwanted visible flyback beams onto the screen.  So we
 thought, that the monochrome mode wouldn't be possible to install
 with the Composite Sync signal.

 But then in January 1989, I had the idea to fill all the new screen memory
 with $FF:   And  THAT'S IT  : the whole screen was BLACK!  No more flyback
 beams to see!  So  it  was  possible  to  suppress  the  flyback  beams by
 adjusting the  screen memory in this way, that in every visible monochrome
 Overscan- scanline the last  Bytes have  to be  set to  $FF !(so  they are
 blanked and no longer visible)  Well, this is the trick to install the GEM
 SHELL also in monochrome Overscan mode.

 With this software adjustment we get now at maximum 688*480  pixel without
 distortion on a, from the manufacturer well calibrated, SM124 monitor.
 The  resolution  is  again  adjustable  with  our Overscan.PRG through the
 installation menu.

 With a NEC Multisync monitor one gets 732 pixel in one scan  line, so it's
 now  possible  to  do  true  HERCULES graphics emulation, which needs only
 720*350 pixel.  With the NEC Multisync we have now 732*480 pixels.

 Maybe Avant Garde Software will fit their PC-Ditto to run this fully
 emulated Hercules graphics mode?

 There is the rumor that; Mr. Sack from West Germany, who has developed
 the first running  Hardware  MS-DOS  emulator  will  include  OVERSCAN for
 emulating the HERCULES graphics mode in the near future.

 I'm  working  now  to  modify  the  SM124 monitor with a little additional
 hardware, so it will also display at least the 720 pixels on one scan line
 for Hercules emulation.

 Maybe, I'll  get the  full 800*500  pixel display  to work on the modified
 SM124 soon?

 (Take a look at the OVERSCAN.DOC file for  a more  detailed explanation of
 the new screen memory partitioning in monochrome Overscan mode)

                               In Conclusion

 Overscan brings  a whole new world of applications to the ST especially in
 Desktop-Video and  new Big  screen-applications and  Hercules emulation in
 monochrome mode.   In  color mode there will be programs like on the Amiga
 in two versions, one PAL and one NTSC versions.

 There is still the hope that  HDTV  brings  us  a  new  world  standard in
 picture  frequency  and  picture  resolution,  so everybody could swap and
 exchange  videotape  cassettes  with  computer-graphics  or  movies  on it
 between Europe and America without needing to convert.

 I  still  hope,  that  Europe  will  change to 60 Hertz picture frequency,
 because if not, we will have to program our next generation of color
 computers, for  recording HDTV  graphics onto  tape, in  the flickering 50
 Hertz mode.  But only because a new standard for television surely remains
 at least for 20 years,  please  help  us  avoid  the  flickering  50 Hertz
 EUREKA-HDTV-Freaks-standard.

 It would  be no  problem to use a 60 Hertz picture frequency in Europe, as
 You can see it clearly, if  You connect  Your ST  to the SCART(RGB-Inputs)
 connector of  Your television  set and  then switch Your ST to 60 Hertz by
 software !(change Hz.PRG) No problem at all.


 Literature:
               1. Data Becker : ST-Intern
               2. Circuit diagram of the ST computers
               3. Markt and Technik Verlag, ST68000 magazine,issue May and
                  June 1989: "Ausser Rand und Band mit Hyperscreen";       
                  publishing of this article by the german
                  ST68000 magazine.


 West-Berlin, on the 2nd July 1989      Stefan Hartmann
 This article is copyright protected (c) 1989 and 1990

 P.S.: I  have drawn  some pictures with Degas monochrome of the new screen
 partitioning and we have made  some  digitized  photos,  also  PI3 format,
 which shows the board modifications and the switch wiring.





  _______________________________________________________________________

