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 "Hey You man, wanna have some Overscan ?" 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 Sreen Memory Machine and gonna buy the Interlace- HAM-Baby ? Stop it man ! 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 sreen 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 gorgious 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 ! Well this means, 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-professionel Desktop-Video applications for examle 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 some month ago I got a demo disk on which a nice grahic screen appeared. But what the hack was this ? In the lower border of the ST screen was a scrolling text message ! How to come ? Had my monitor been shifted away ? Not at all ! I couldn`t trust my eyes ! This programmer called 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 ! Did 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) didn't told us ? Not at all ! He had found the software-trick, that if the picture frequency is shortly 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 with a left and right border) What a guy ! He must have been poked "till the shit hits the fan(Glue)" ! To understand all this screen manipulation I have shortly to 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 50 times per second written onto the tube. (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 onother 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 vertikal 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 vertikal 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 there arrived the 2 new demo programs "Amiga-Demo" from the TEX-Programmers ( some special assembler graphics wizzards ) and the LT.PRG (the death of the left border) of the TNT-Crew. This 2 programs blowed 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 don't know yet, because the assembler code is very sophisticated crypted so no chance for a tracking monitor program disassembler. But it's possible that they use a 50 Hertz to 71 Hertz switching every scanline synchronized with the video adress counter. Must be very tricky code ! They wanna keep this still a secret ! (In the meantime February `89 the gorgious UNION-Demo was launched: Level 16 has now implemented a full software controlled Overscan screen with no borders at all!; unbelieveable, but very timeconsumming interruptprogramming; not much time left for animation !) I thought, wow ! If these guys are able to display some border graphics with some very tricky but time consumming code how about trying to convince the little Shifter to do this with a simple hardware modification and without any time consumming 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-Emable-Signal changed its puls-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 bush but which comes from the Glue and is also controling the MMU is telling the internal counter of the MMU to take over the adress of the next "semi frame" from the video.bas adress 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 adress is been written all 2 microseconds to the video adress counter in FF8205/07/09. Remains at this point the Display Enable Signal longer at high level, accordingly more memory RAM is adressed as screen video ram by the MMU and still transfered to the Shifter during every scan line! So with the Puls 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 vertikal snchronisation 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 in Overscan mode: super gorgious !) 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 bush connector. Make sure to use the Composite Sync Signal directly from the Emitter of the driver (buffer) transistor. (Take a look into Your circuit diagram of Your ST!) At the 520 STM (the STs with RF-modulators) there the internal Composite Sync Signal is missing. Here 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 signal 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 signal which come from the GLUE which could 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 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 lot 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 this two Pins. This could be done by a simple 3 Pins 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 could happen, that the color palettes have 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 only sometimes occur during booting but this is the only time ! 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 himself after a Reset ! Softwareadaption 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, but going from the very left to the very right.(without a border) But what has happened to the lower half screen ? There is some pretty moiree jumping and changing in a strange pattern of 16 bits in various colors ! What is this, You will ask ? Don't worry, be happy ! 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 wether 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 Adress into the Screen Starting Adress 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 just wonderfull ! 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 ! Unfortuneally the best two graphics programms, CAD3D from TOM HUDSON and CYBERPAINT from JIM KENT don`t work at this moment with this higher resolution. TOM and JIM are YOU jet listening to this ??? Please try to adapt Your superb programs !!! This 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 the new 19" Matrix or Mat Screen Monitors that are used espacially for DTP with Calamus and other applications. Wouldn`t this be great to design Your objects on such 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-sequenzer (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 videomusic production in the Music-Business Industry ! Still a few words to 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 about 7 kByte can be used for storing palette information or other stuff. If it's to memory wasting the software could also store only the 59640 Bytes for oneO„ ˆό€ρƒˆ r`€ ‚ˆO€ΟŽOŽO„€Ο€Ο€ˆΑπp‰€O€O€€Ο€ˆρƒˆOΔΐΟ€€ Ϝ‚ˆO‚Οˆˆ‚O€‚ ˆO„ ρ‚ˆ@πpπpœˆ O€ρƒˆO‡€„O„€Ο„ˆŽ‚ρ‚O€ρƒˆOœ€ˆO„ŒO„Žπp‰€‚ˆO€ˆ‚όŽ€ˆO‚OƒˆˆOŽˆOŽ„O„O‡‚ˆ„O„Ž„ˆ„ˆ πp€‚ ώˆΘΟ€‚ ˆOŒ€όŽ€ ΐπpƒŽΘO€‚OƒˆˆOƒŽO€OŒˆOŽΟ€ˆ„Ο„Ž‚ˆOŽ „ˆO€ώ €ΟΐO€‚ˆpp„ „Ž ˆ ψ„€OƒˆO€‚ ˆ@ŒŽO‡€ˆΟ„ˆˆ„O˜˜ΓΔΗΖ@GΔ@πpπpœ€ρƒ‚O‚OŽ„ˆ ‚O‰€ˆ:7·;΄Ί47ΊΉ'»2Ή9±°·()#†…$³;²;·ΊΆ240»2:94²²:70»7΄²:42Ή²6ittle two disadvantages we would have been forced to generate a very special NEW DISPLAY ENABLE Signal which would have been needed an anormous amount of counters and flip-flops. So it's easier to live with this a little more memory consuming but simple to install Composite Sync signal. The difference between 50 and 60 Hertz color mode : In 50 Hz mode with using the Composite„ŒO„ŽΟ‚OƒŽˆOΔΔ@Ϝ‚ˆpp‡ˆΟ„ ρ‚ˆ@πpΔΖGϜ‚ˆOŽˆO€‚ ˆOΐπpƒˆO€ƒˆΟΔΗϜ‚ˆOŽˆΘΟ€‚ ˆOŒˆ O€Οer 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 signal 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 signal which come from the GLUE which could 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 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 lot 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 this two Pins. This could be done by a simple 3 Pins 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 could happen, that the color palettes have 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 only sometimes occur during booting but this is the only time ! 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 himself after a Reset ! Softwareadaption 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, but going from the very left to the very right.(without a border) But what has happened to the lower half screen ? There is some pretty moiree jumping and changing in a strange pattern of 16 bits in various colors ! What is this, You will ask ? Don't worry, be happy ! 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 wether 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 Adress into the Screen Starting Adress 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 just wonderfull ! 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 ! Unfortuneally the best two graphics programms, CAD3D from TOM HUDSON and CYBERPAINT from JIM KENT don`t work at this moment with this higher resolution. TOM and JIM are YOU jet listening to this ??? Please try to adapt Your superb programs !!! This 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 the new 19" Matrix or Mat Screen Monitors that are used espacially for DTP with Calamus and other applications. Wouldn`t this be great to design Your objects on such 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-sequenzer (a second Atari ST for example ) which is controlling a complete orchestra of synthesizers !