ZX Review #11-12
26 ноября 1997

Studies - Graphic effect "Plasma 2.

<b>Studies</b> - Graphic effect
2



   And finally, the last effect (used as a Screen
Saver in the ZX-REVIEW 7-10 and ZX-FORUM
4):
140.
;--------------------------;
3; (c) Ivan Roshchin, 1997;
; EFFECT "PLASMA-3";
;--------------------------;

BUF EQU # 4000; address location

                     ; Buffer length # 410

                     ; Bytes (ml.bayt

                     , Address = 0!)
B_SCR EQU BUF + # 20; address of the first

                     ; Updated row

                     ; In buffer
B_UP EQU BUF; top line
B_DOWN EQU BUF + # 320; bottom line

SSAVER LD HL, (RND +1)
NEW_RND LD A, (HL)

        INC HL

        AND 7

        CP 6

        JR NC, NEW_RND


        AND A

        RLCA

        RLCA

        LD HL, TABL1

        LD D, 0

        LD E, A

        ADD HL, DE

        LD DE, BUF + # 400

        LD BC, 4

        LDIR


        LD HL, TABL2

        LD BC, 12

        LDIR

; In H 'captures the high byte address
; Palette:


        LD H, D

        EXX

; Transfers the contents of the upper row
; Buffer area down and vice versa,
, Ie screen as it is closed vertically:

M2 LD HL, B_SCR

        LD DE, B_DOWN

        LD BC, 32

        LDIR


        LD HL, B_SCR + # 2E0

        LD DE, B_UP

        LD BC, 32

        LDIR

; In the cycle of updating the attributes in the buffer:


        LD IX, B_SCR
M1 LD A, (IX-32)

        ADD A, (IX-1)

        ADD A, (IX +1)

        ADD A, (IX +32)

        SRL A

        SRL A

        LD (IX), A

;-------------------------------------; On value bytes from the 
buffer determine ; Its color and prints:



        EXX

        RRCA

        RRCA

        AND 15

        LD L, A

        LD A, (HL)

        EXX


        PUSH IX

        POP HL

        LD DE, # 5800-B_SCR

        ADD HL, DE

        EX AF, AF ';!

        LD A, (IX-1)!

        CP (IX);!

        JR C, TO_SCR1;!

        CP 16;!

        JR C, TO_SCR1;!

        DEC HL;!

        LD A, (HL);!

        INC HL;!

        LD (HL), A;!

        JR NO_CP;!

TO_SCR1 EX AF, AF ';!

        LD (HL), A
;-------------------------------------
NO_CP INC IX

        LD DE, 1 - # 5800 + B_SCR-B_DOWN

        ADD HL, DE

        LD A, H

        OR L

        JR NZ, M1

; Upgraded the entire buffer is now some
; Take on random bytes of buffer
; Values:


        LD B, 5
L23 PUSH BC

        CALL RND

        POP BC

        DJNZ L23

; On the keyboard is something clicked?


        LD A, (23560)

        AND A

        JR Z, M2

        RET

;=================================
; Procedure RND changes randomly
; It happened. selected number of
; Screen buffer (BUF.. BUF + # 400)

RND LD HL, 0

        LD A, H

        AND # 3F

        LD H, A

        LD D, (HL)

        INC HL

        LD E, (HL)

        INC HL

        LD A, (HL)

        XOR D

        XOR E

        SUB 16

        LD B, A

        LD A, D

        AND 3

        LD D, A

        LD E, B

        LD (RND +1), HL

        LD HL, BUF

        ADD HL, DE

        LD A, B

        AND% 01111111

        LD (HL), A

        DEC HL

        LD (HL), A

        DEC HL

        LD (HL), A

        RET

; Palette:

TABL1 DB% 00001001

        DB% 01001001

        DB% 00011011

        DB% 01011011


        DB% 00001001

        DB% 01001001

        DB% 00101101

        DB% 01101101


        DB% 00010010

        DB% 01010010

        DB% 00011011

        DB% 01011011


        DB% 00010010

        DB% 01010010

        DB% 00110110

        DB% 01110110


        DB% 00100100

        DB% 01100100

        DB% 00101101

        DB% 01101101


        DB% 00100100

        DB% 01100100

        DB% 00110110

        DB% 01110110

TABL2 DB% 00111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111

        DB% 01111111
2

   Line marked with "!" Originally absent in this
program (such as it was used in the ZX-REVIEW 7-10), but
then they were added to
improve the appearance of the effect and
make smoother transitions
colors.


           *







Other articles:

Authoring - S. Zonov, A. Larchenko. On the controller SMUC (HDD IBM and peripherals).

Computer novella - Warriors Stars (the game Shadowfire).

New Programs - Overview of Digital Studio v1.12, Digital Studio Compiler v1.01

New Programs - Xas Review editor-assembler 128K (v5.05).

New Programs - Review of Musical Instrument v3.01 editor

New Programs - Overview of programs and FASTzasm @-zasm.

New Programs - Overview of No Kempston.

professional approach - Algorithms for the construction and transmission of labyrinths.

laugh for no reason ... - Proceedings of the humor magazine SpectrofUn.

Expert Tips - Game FEUD.

Expert Tips - Game Killed Until Dead.

Expert Tips - Game War in Middle Earth.

Forum - Conversion of Spectrum color images at IBM. Conversion of B / W images from IBM's ZX Spectrum.

Forum - On the Russification of game programs.

Forum - The program detector emulator.

Forum - A procedure with colored stripes on the curb. " Noise Reduction FDD.

Forum - The transfer numbers in decimal form. Procedure - scanner password.

Forum - Unprotect Microprotector'a.

Forum - Emulators, which we choose: 'UKV Spectrum Debugger', 'Z80TRDOS'.

reader-reader - Driver input in serial mode and direct access from the files of TR-DOS.

Studies - Graphic effect "Plasma 2.

Studies - Graphic effect "Plasma 2.

Studies - Graphic effect "plasma".

Studies - Useful tips. Rapid transfer of your screen.

Studies - remake of the procedures in 1993.

Studies - The effect of "flame".


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

Similar articles:
News - The reasons for the failure of a project related to the issue of the journal ZX-MAGAZINE.
Interface - Analizing ZX Spectrum games in 2003 year.

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