Skip to main content
? Niklas 'Tanis of TCB' Malmqvist

THE SECRET OF THE FISH by Udo of TEX

On our visit to Holland (see the article in the ST NEWS Volume  3 
Issue  2) Richard urged me to write an article about the  'fish'. 
If you don't know anything about the 'fish' get your hand on  our 
"B.I.G.  Demo"  and view our second Psych-O-Screen.  Perhaps  you 
will  see a fish in the bottom right corner of the  screen  where 
usually the border appears. If you can't see any fish you are one 
of  the few poor guys who have an ATARI SC1224  monitor.  But  at 
least  you must see some 'air bubbles'.  The fish was painted  to 
explain the presence of the air bubbles, and the air bubbles were 
only painted to hide a useful error of the video chip. And now we 
have  reached the theme of this article:  Fooling the video  chip 
not to make the lower border.

1) How to switch off the lower border:

   To  irritate  the  video shifter you  must  switch  the  video 
   frequency  from  50 to 60 Hz in the last line of  the  screen. 
   This  will irritate the video chip so it forgets to  draw  the 
   last  2  Bytes  of the screen memory (this  causes  the  right 
   border   to  start  16  pixels  earlier  and  to   hide   this 
   malfunction the air bubbles were painted in the screen). After 
   displaying  200 lines the MMU is checking if 32000  Byte  have 
   been  displayed.  But due to the 2 Byte error there are  still 
   some left.  If switch back to 50 Hz in the left border of  the 
   next  line,  the MMU will continue sending memory data to  the 
   shifter  without stopping.  It depends on the monitor and  the 
   ST's  video  transistor but in the best case you will  see  64 
   more  lines  of video data till the monitor starts  his  blank 
   gap.  I  will now explain a routine doing this,  which  is  my 
   modified RIP (raster interrupt program) from ST NEWS Volume  2 
   Issue 6. 
   A complete source is somewhere on this disk (in the "PROGRAMS" 
   folder, ED).

   First  we need a level 4 routine which is called at every  VBL 
   (that means 50 times per second).

   new4:
   clr.b  $fffffa1b.w              ;stop timer
   move.b #199,$fffffa21.w         ;set data register
   move.b #8,$fffffa1b.w           ;start timer
   new4b:
   jmp    $000000

   This  rout sets the timer c data register to 199 so  our  main 
   program  will  be interrupted to handle  the  border  removing 
   properly.

   Now the Timer C handler:
   newtb:
   clr.b   $fffffa1b.w             ;timer stop
   movem.l d0/d3-d7/a0-a6,-(sp)
   move.w  #$fa21,a4
   move.b  #180,(a4)               ;set counter
   move.b  #8,-6(a4)

   This  will  install  a new Timer C data so we  are  no  longer 
   disturbed by the Timer C, but it is still running.

   moveq   #0,d0                   ;wait till middle of line
   mulu    d0,d0
   mulu    d0,d0
   move.b  #0,$ffff820a.w          ;on to 60 Hz

   We  now  spent a lot of time multiplying nonsense to  let  the 
   electron  beam  run  in  the middle of  the  screen  and  then 
   switched to 60 Hz.

   move.b  (a4),d0                 ;wait for right border
   wait:
   cmp.b   (a4),d0
   beq     wait

   As the Timer C is still running,  we use this loop to wait for 
   the right border.

   moveq   #0,d0                   ;wait on left border
   mulu    d0,d0
   mulu    d0,d0
   move.b  #2,$ffff820a.w          ;back to 50 Hz

   With this commands we spent some time waiting for the HBL then 
   we switched back to 50 Hz.

   movem.l (sp)+,d0/d3-d7/a0-a6
   bclr    #0,$fffffa0f.w          ;end of interrupt
   rte

   Now we have ended the Interruptrout.

This was my explanation of the border removing for those who  had 
no time or no patience to read it in the scroller of the  "B.I.G. 
Demo".  The only disadvantage of the program is that in the worst 
case  you can see only 8 lines of the border graphic (on  a  very 
bad  SC1224  monitor).  But  I  hope you  can  use  this  program 
efficiently.

I you have any questions or suggestions write to:
          TEX
          P.O. Box 1322
        D-6702 Bad Dürkheim
          West Germany

                                             Udo (-me-) of TEX

Disclaimer
The text of the articles is identical to the originals like they appeared in old ST NEWS issues. Please take into consideration that the author(s) was (were) a lot younger and less responsible back then. So bad jokes, bad English, youthful arrogance, insults, bravura, over-crediting and tastelessness should be taken with at least a grain of salt. Any contact and/or payment information, as well as deadlines/release dates of any kind should be regarded as outdated. Due to the fact that these pages are not actually contained in an Atari executable here, references to scroll texts, featured demo screens and hidden articles may also be irrelevant.