ZX Review #7-8-9-10
08 ноября 1997

Studies - The procedure for display pictures. Fade-OUT effect (picture goes beyond the edge of the screen). Visual effect "Fountain." Fade-OUT effect, mimicking the TV off. Procedure "Ignition" pictures. The program continuously drawing a picture.

<b>Studies</b> - The procedure for display pictures. Fade-OUT effect (picture goes beyond the edge of the screen). Visual effect
(C) Komandin IG, Kaluga


   And again I want to offer
some of his (and not only
its) programmok to the "Etudes."


   1. For starters, according to tradition,
suggest a fairly simple
protsedurku display pictures.
The program as it pulls
picture, located at BUFF, from the center of the screen to
edges. Procedure corrupts
image in memory, so again it will work as a challenge
quenching procedure, Waist
picture of the screen.
140.

          ORG 40000
BUFF EQU 50000

          ENT


          LD DE, BUFF-16384

          LD C, 128
LOOP2 LD HL, # 400F

          LD B, 192
LOOP1 PUSH BC

          PUSH HL

          ADD HL, DE

          LD B, 16
L1 RL (HL)

          DEC HL

          DJNZ L1

          POP HL

          PUSH HL

          LD B, 16
L2 RL (HL)

          DEC HL

          DJNZ L2

          POP HL

          INC HL

          PUSH HL

          ADD HL, DE

          LD B, 16
L3 RR (HL)

          INC HL

          DJNZ L3

          POP HL

          LD B, 16
L4 RR (HL)

          INC HL

          DJNZ L4

          LD BC, 15

          ADC HL, BC

          POP BC

          DJNZ LOOP1

          DEC C

          JR NZ, LOOP2

          LD HL, BUFF +6144

          LD DE, 22528

          LD BC, 768

          LDIR

          RET
2

   2. The following procedure - quite interesting FADE-OUT 
effect. The picture seemed to be gradually broken in the middle 
screen and goes for his province. 140.

; (C) ZX-MANIACS
;

          ORG 40000

          ENT


          LD HL, # 400F

          LD B, 1
LOOP1 PUSH HL

          PUSH BC

          CALL SLIDE

          POP BC

          POP HL

          INC B

          LD A, B

          CP 192

          JR NZ, LOOP1

          LD HL, # 480F

          LD B, 128
LOOP2 PUSH BC

          LD B, 128

          PUSH HL

          CALL SLIDE

          POP HL

          POP BC

          DJNZ LOOP2

          RET
SLIDE PUSH BC

          PUSH HL

          PUSH HL

          LD B, 16

          XOR A
L1 RL (HL)

          DEC HL

          DJNZ L1

          POP HL

          INC HL

          XOR A

          LD B, 16
L2 RR (HL)

          INC HL

          DJNZ L2

          POP HL

          CALL DOWN

          POP BC

          DJNZ SLIDE

          RET
DOWN INC H

          LD A, H

          AND 7

          RET NZ

          LD A, L

          ADD A, 32

          LD L, A

          RET C

          LD A, H

          SUB 8

          LD H, A

          RET
2

   3. And now the time has come
very interesting. The following program is the main reason for 
writing this article. It's quite beautiful,

In my opinion, the graphic pixel effect, which I call
FOUNTAIN. Its action is as follows: in the middle
the lower edge of the screen appears
250 points, which are emitted in
different directions for a variety of
parabolic trajectories. As
only any of the points of touching the lower edge of the screen,
She reappears in the center with
new "zaprogrammiruemoy" trajectory. This creates a
the effect of continuously running
fountain. Most clearly and beautifully
procedure looks in the following settings:


  BORDER 0: PAPER 0: INK 7:

  BRIGHT 1: POKE 23624,71


   The idea of ​​the program arose when
view ENLIGHT-ovsky demonstrashki ZY-ZY, what a great
Thanks to the authors. I would also like to thank A. Astafieva
for an article about how to obtain random
numbers - one of its PRNG generators I have used in their
program.
140.
; FONTAIN
; (C) ZX-MANIACS
; BY KOMANDIN ILYA
; SPECIAL FOR INFORCOM
;

          ORG 40000

          ENT


          LD HL, COORDS

          LD B, 250
M1 CALL RND

          AND 7

          ADD A, 120

          LD (HL), A

          INC HL

          LD (HL), 0

          INC HL

          CALL RND

          AND 15

          INC A

          LD (HL), A

          INC HL

          CALL RND

          AND 7

          SUB 3

          LD (HL), A

          INC HL

          DJNZ M1
LOOP LD HL, COORDS

          LD B, 250
M2 PUSH BC

          PUSH HL

          LD C, (HL)

          INC HL

          LD B, (HL)

          LD A, 191

          SUB B

          PUSH HL

          CALL 8880

          LD B, A

          LD A, 7

          SUB B

          ADD A, A

          ADD A, A

          ADD A, A

          ADD A, 134

          LD (RPX), A

          DEFB # CB
RPX NOP

          POP HL

          INC HL

          LD B, (HL)

          DEC HL

          LD A, (HL)

          ADD A, 8

          LD (HL), A

          INC HL

          INC HL

          LD B, (HL)

          DEC HL

          DEC HL

          DEC HL

          LD A, (HL)

          ADD A, B

          LD (HL), A

          LD C, (HL)

          INC HL

          LD B, (HL)

          LD A, 191

          SUB B

          PUSH HL

          CALL 8880

          LD B, A

          LD A, 7

          SUB B

          ADD A, A

          ADD A, A

          ADD A, A

          ADD A, 198

          LD (SPX), A

          DEFB # CB
SPX NOP

          POP HL

          LD A, (HL)

          OR A

          JR NZ, PASS

          LD (HL), 0

          DEC HL

          CALL RND

          AND 7

          ADD A, 120

          LD (HL), A

          INC HL

          INC HL

          CALL RND

          AND 15

          INC A

          LD (HL), A

          INC HL

          CALL RND

          AND 7

          SUB 3

          LD (HL), A
PASS POP HL

          POP BC

          INC HL

          INC HL

          INC HL

          INC HL

          DJNZ M2

          LD HL, 22496

          LD DE, 22497

          LD BC, 31

          LD (HL), 0

          LDIR

          LD A, # 7F

          IN A, (# FE)

          RRA

          JP C, LOOP

          RET
RND LD DE, 0

          LD A, D

          ADD A, # 77

          LD D, A

          RLC E

          ADD A, E

          LD E, A

          LD (RND +1), DE

          RET
COORDS DEFS 100
2

   4. Well that's all of my programs. Further, I propose 
several procedures of my friend and the second member of the 
group ZX-MANIACS Cherebaeva Andrew.



   The first program - FADE-OUT
effect that simulates the shutdown
TV.
140.
; (C) CHEREBAEV ANDREY
;

          ORG 40000

          ENT


          LD HL, # 5820

          LD DE, # 5ADF

          LD B, 11
LOOP1 PUSH BC

          LD B, 32
LOOP PUSH BC

          LD (HL), 127

          LD BC, # 0020

          SBC HL, BC

          LD (HL), 0

          ADC HL, BC

          INC HL

          EX DE, HL

          LD (HL), 127

          ADC HL, BC

          LD (HL), 0

          SBC HL, BC

          DEC HL

          EX DE, HL

          POP BC

          DJNZ LOOP

          POP BC

          HALT

          DJNZ LOOP1

          LD HL, # 595F

          LD B, 32
LOOP2 INC L

          LD (HL), 0

          DJNZ LOOP2

          LD B, 16

          LD HL, # 5980

          LD DE, # 599F

          XOR A
LOOP3 LD (HL), A

          INC L

          LD (DE), A

          DEC E

          HALT

          DJNZ LOOP3

          LD B, 8

          LD A, 63

          LD HL, # 598F
LOOP4 LD (HL), A

          SUB 9

          HALT

          HALT

          HALT

          HALT

          HALT

          DJNZ LOOP4

          RET
2

   The second procedure "burns"
picture, acting absolutely
opposed to the previous one. These
two applets is convenient to use together.
140.
; (C) CHEREBAEV ANDREY
;

          ORG 40000

BUFF EQU 50000

          ENT


          LD HL, 22528

          LD (HL), 0

          PUSH HL

          POP DE

          INC DE

          LD BC, 767

          LDIR

          LD HL, BUFF

          LD DE, 16384

          LD BC, 6144

          LDIR

          LD B, 8

          XOR A

          LD HL, # 598F
LOOP4 LD (HL), A

          ADD A, 9

          HALT

          HALT

          HALT

          HALT

          HALT

          DJNZ LOOP4

          LD B, 16

          LD HL, # 598F

          LD DE, # 5990

          LD A, 127
LOOP3 LD (HL), A

          DEC L

          LD (DE), A

          INC E

          HALT

          DJNZ LOOP3

          LD HL, # 595F

          LD DE, # 59A0

          LD B, 11
LOOP1 PUSH BC

          LD B, 32
LOOP PUSH BC

          LD (HL), 127

          LD BC, # 0020

          ADC HL, BC

          CALL PUT

          SBC HL, BC

          DEC HL

          EX DE, HL

          LD (HL), 127

          LD BC, # 0020

          SBC HL, BC

          CALL PUT

          ADC HL, BC

          INC HL

          EX DE, HL

          POP BC

          DJNZ LOOP

          POP BC

          HALT

          DJNZ LOOP1

          LD HL, BUFF +6144

          LD DE, # 5800

          LD BC, 768

          LDIR

          RET

PUT PUSH HL

          PUSH DE

          LD DE, BUFF-16384

          ADC HL, DE

          LD A, (HL)

          POP DE

          POP HL

          LD (HL), A

          RET
2

   And finally, the third procedure - a "remake" is widely 
known program continuously drawing a picture from the top down 
the lines (see, for example, ZX REVIEW 2.1 for 1996).. The new 
version of the picture is displayed along with attributes, 
making the effect much wins. 144.

1910; (C) CHEREBAEV ANDREY
1920; 'KOMANDIN ILYA
30;
40 ORG 40000
50 ENT
60 BUFF EQU 50000
70 LD HL, 22528
80 LD (ATTR), HL
90 XOR A
100 LD B, 24
110 LOOP PUSH BC
120 LD B, 8
130 LOOP1 PUSH BC
140 PUSH AF
150 LD C, 0
160 CALL 8880
170 EX DE, HL
180 LD HL, BUFF-16384
190 ADC HL, DE
200 LD BC, 32
210 LDIR
220 POP AF
230 INC A
240 POP BC
250 HALT
260 DJNZ LOOP1
270 LD DE, (ATTR)
280 LD HL, BUFF-16384
290 ADC HL, DE
300 LD BC, 32
310 LDIR
320 LD (ATTR), DE
330 POP BC
340 DJNZ LOOP
350 RET
360 ATTR DEFW 0
2

   In the above embodiment
programs first portions of 8
lines derived monochrome
image and then superimposed on it the attributes. If
You want the opposite effect
(Eg, if the background in your picture is unchanged, and all 
the attributes - INK), then simply move the lines 270-320 to a 
new location between lines 110 and 120.



           *







Other articles:

TR-DOS for beginners - The end.

Computer novella - Prince of Persia.

Computer novella - Laser team (the game Laser Squad).

Crossing Dragon - Game Rapscallion.

Crossing Dragon - Playing The Runes of Zendos.

Crossing Dragon - Playing The Saga.

Crossing Dragon - Game Witch's Cauldron.

Crossing Dragon - Create Adventyuru. Review of the editors.

Crossing Dragon - Create a dictionary to Adventyurnoy game.

Program, which we choose - The possible consequences of using undocumented commands.

Program, which we choose - About noticed irregularities in some programs and suggestions for future versions.

Program, which we choose - A proposal to all the authors of software, printers, memory dump. Programmers protect discs from being copied.

Program, which we choose - A few suggestions to improve the assembly.

Program, which we choose - Suggestions for refining ZX Word v2.5.

Program, which we choose - The "Spectrum emulator" v1.2.

Program, which we choose - What could want in a perfect assembly.

Retro - 40 best procedures: Copying data in memory.

Retro - 40 best procedures: Exchange token.

Retro - 40 best procedures: Determination addresses BASIC string.

Retro - 40 best procedures: Determination of the length of BASIC programs.

Retro - 40 best procedures: Determination of the amount of free memory.

Retro - 40 best procedures for: Search and replace strings.

Retro - 40 best procedure: Find the string.

Retro - 40 best procedures: Search for the string.

Retro - 40 best procedures: the list of variables.

Retro - 40 best procedures: an increase and up the screen.

Retro - 40 best treatments: Removal of REM-strings.

Retro - 40 best procedures: Remove the block of the program.

Expert Tips - Game Fredloader.

Expert Tips - Game Robin of Sherwood: The Touchstones of Rhianon.

Expert Tips - Game Scorpions: Die Machines.

Expert Tips - Game Terropods.

page iS-DOS - Description of system restarts IS DOS.

Forum - An algorithm for recognizing characters.

Forum - Time undocumented command processor Z80.

Forum - The concept of a high-color screen resolution.

Forum - A few Pokes to a game. Program Hacman96.

Forum - As for the new DOS and BIOS settings for the Spectrum.

Forum - Multicolor program on any computer model. Using the 2 nd screen Multicolor'a. Demonstration of the text. Electronic journals.

Forum - Project ZX Config.

Forum - Improve Art Studio. Ideas on file compression.

Forum - ZX Spectrum emulator for IBM. About the hexadecimal system. Program ZX-Stars. Oddities in the Elita

Forum - The effects on the curb and Multicolor.

reader-reader - ZX Spectrum 128 - new opportunities, new challenges.

reader-reader - With 'Light'. Spectrum and expert system.

reader-reader - The printer driver for the Scorpion.

reader-reader - Print numbers in different number systems.

reader-reader - Programming arcade game with scrolling screen.

reader-reader - The procedure for printing labels assembler XAS to monitor debugger STS 4.3.

Studies - attribute scrolling text. "Gasilka" screen. A simplified version of the procedure, "Curtain". Procedure is enriched with pictures. Procedure display images on the points.

Studies - Graphic effect "color bars".

Studies - Driver screen printing 64 characters per line.

Studies - Set of protective boot.

Studies - Address to the drive mode IM 2. Working with non-standard disc format.

Studies - Print the character, magnified by 8 times. The program "pouring" screen. The procedure for screen-saver on the points. Clear screen in Terminator'e. Search strings in memory. System character set conversion.

Studies - Program - cataloger of disks.

Studies - Program the output values of the amplitude channel music. coprocessor on the curb.

Studies - Program the output image.

Studies - The program plugs sprite.

Studies - Cleanup of the specified window screen.

Studies - The program sort the array in ascending order. The procedure for filling the screen specified attribute. Procedure display pictures. The effect of moving towards the stars. "Shower", coming from the upper left corner of the screen. The procedure of "shedding" pictures on the pixel lines. The program of "pulling" the picture at an angle of 45 degrees. Three procedures "Scroll".

Studies - The printing of numbers.

Studies - The procedure for drawing a character with attributes.

Studies - The procedure for display pictures. Fade-OUT effect (picture goes beyond the edge of the screen). Visual effect "Fountain." Fade-OUT effect, mimicking the TV off. Procedure "Ignition" pictures. The program continuously drawing a picture.

Studies - The procedure for drawing a line.

Studies - The procedure for making optimal symbol table.

Studies - scrolling lines of text in the specified window. Attribute scroller. Diagonal scrolling.

Studies - sprite scroller. Procedure display screen.

Studies - Short procedure indicating the amplitude channel music. coprocessor. Way to subtract a constant from a register pair HL.

Studies - The formula for calculating the day of the week.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Editor - Hpistos voskpes, dopogie readers!
Birthday - congratulations spektrumistov with the birthdays.
Discussion - dismantling of Maxim and Dennis Letts Tokarchuk on "OS on the ZX Spectrum".
ZX-Net - A list of the owners of modems in Minsk, Bobruisk, Brest.

В этот день...   2 May