Jump to content
IGNORED

Moj Mikro magazine listings: Clear screens in interesting ways


Gury

Recommended Posts

Hello Atarians,

 

In this topic I will present some ways of clearing the screens. Most of the included listings can be modified for any graphics or text mode. Program examples are written in Atari BASIC, with DATA lines incorporating machine language routines. These routines can be examined in link references below.

 

The material is taken from Moj Mikro magazine issue number 2/1989 and the author of the listings is Zlatko Bleha.

mojmikro_logo.png

 

All listings can be found here. Before using please unzip file in directory of your choice. This file is ATR image file, which can be used with any Atari emulator and its disk drive capability for example. It is formatted as a single density disk, with Atari DOS 2.75 installed. To load and run the programs you must have BASIC turned on (XL/XE), or Atari BASIC cartridge plugged (400/800/1200XL).

 

Listing: Clear screen 1

 

This is one of the easiest effective ways of clearing the whole screen. Every byte in video RAM shifts right. After one such cycle of the shift the high bit of every byte in the video RAM is reset (cleared). Repeating this process 8 times we will clear whole byte. Considering that process is done on all bytes in video RAM, the whole screen will be cleared. The program can be modified to shift data left. An example is using graphics mode 8.

 

clear_screen1.pngclear_screen1_1.png

clear_screen1_2.pngclear_screen1_3.png

clear_screen1_4.png

 

Load instructions:

LOAD "D:M8902261.BAS

RUN

 

Listing: Clear screen 2

 

This demonstration shows another way of clearing the screen by moving alternating lines to the edge of opposite side. The implemented routine is little more complicated than the one from the first example, considering the process involved. Program consists of main loop and three subroutines LDIR, LDDR and ADD40, which task is to move screen rows to left or right side and increase the address of video RAM. This routine can be used in any graphics or text mode with changing of the parameter for the rows affected.

 

The example here is using graphics mode 8.

 

clear_screen2.pngclear_screen2_1.pngclear_screen2_2.pngclear_screen2_3.pngclear_screen2_4.pngclear_screen2_5.png

clear_screen2_7.pngclear_screen2_8.png

 

Load instructions:

LOAD "D:M8902262.BAS

RUN

 

Following example uses the same routine for clearing the screen, but in text mode (graphics mode 0).

 

clear_screen2b.pngclear_screen2b_2.png

clear_screen2b_3.pngclear_screen2b_5.png

clear_screen2b_7.pngclear_screen2b_9.png

 

Load instructions:

LOAD "D:M8902263.BAS

RUN

 

Listing: Clear screen 3

 

In this demonstration the screen is disappearing line by line, beginning at the top of the screen (first line scrolls left, next to right, and so on). The example uses text mode (graphics mode 0) and opposed to the previous example, the routine uses delay instructions to slow down the process of clearing the screen, because without it, the effect could not be even noticed. The clearing process in graphics mode 0 is probably too fast, but it will run normally in graphics mode 8, for example. Try to experiment with this delay in different graphics modes for best results.

 

clear_screen3.pngclear_screen3_2.png

clear_screen3_3.pngclear_screen3_6.png

clear_screen3_7.pngclear_screen3_8.png

clear_screen3_11.png

 

Load instructions:

LOAD "D:M8902264.BAS

RUN

 

Listing: Clear screen 4

 

Another demonstration, which simulates curtains on the stage. The whole screen scrolls from the center to the edges until the picture disappears.

 

clear_screen4.pngclear_screen4_2.png

clear_screen4_4.pngclear_screen4_8.png

clear_screen4_14.pngclear_screen4_15.png

 

Load instructions:

LOAD "D:M8902265.BAS

RUN

 

Listing: Clear screen 5

 

This example demonstrates clearing the screen in two stages. It works in the following manner: First line moves to the second line, zeroing the first line. Third line moves to the fourth line, and so on... After first stage, the picture on the screen will be repositioned. The second stage will clear the screen. This example uses graphics mode 8, which is recommended mode for the routine used. The process would be too fast in graphics modes with lower resolution, so you would have to put some delay instructions to slow it down.

 

clear_screen5.pngclear_screen5_1.png

clear_screen5_2.pngclear_screen5_3.png

 

Load instructions:

LOAD "D:M8902266.BAS

RUN

 

 

Here is the actual article from Moj Mikro with included assembly language routine listings:

 

http://retrospec.sgn.net/users/tomcat/yu/magshow.php?auto=&page=26&all=MMH_89_02

http://retrospec.sgn.net/users/tomcat/yu/magshow.php?auto=&page=27&all=MMH_89_02

http://retrospec.sgn.net/users/tomcat/yu/magshow.php?auto=&page=28&all=MMH_89_02

 

 

Greetings,

Gury

moj_mikro_clear_screen.zip

Edited by Gury
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...