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

Studies - Graphic effect "Plasma 2.

<b>Studies</b> - Graphic effect
   And now - the following effect.
According to the logic of it is similar to
the previous one, but it looks completely different. There is 
no change in attributes, and change in hatching familiarity.

It is used as a Screen Saver'a in this issue
"Revue" (click CS + S to invoke it, and press C Switch
color).
140.
;--------------------------;
3; (c) Ivan Roshchin, 1997;
; EFFECT "PLASMA-2";
;--------------------------;

BUF EQU # 8000; Address Buffer

; Setting attributes:


        LD HL, # 5800

        LD (HL),% 00101111

        LD DE, # 5801

        LD BC, # 2FF

        LDIR

; Clear the buffer area
, (# 640 bytes from the address BUF):


        LD HL, BUF

        LD (HL), 0

        LD DE, BUF +1

        LD BC, # 63F

        LDIR

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

M2 LD HL, BUF +32

        LD DE, BUF + # 300 32

        LD BC, 32

        LDIR

        LD HL, BUF + # 300

        LD DE, BUF

        LD BC, 32

        LDIR

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


        LD IX, BUF +32
M1 LD A, (IX +1)

        ADD A, (IX-1)

        ADD A, (IX +32)

        ADD A, (IX-32)


        SRL A

        DEC A

        SRL A


        LD (IX), A

        CALL TO_SCR

        INC IX

        LD A, XL

        CP BUF + # 320 - ((BUF + # 320) / 256 * 256)

        JP NZ, M1

        LD A, XH

        CP (BUF + # 320) / 256

        JP NZ, M1

; Upgraded the entire buffer:


        XOR A

        IN A, (254)

        CPL

        AND 31

        JR Z, M2

        RET

;-------------------------------------; Procedure TO_SCR stroke 
current ; Familiarity.

;
; Log: A - the value of the buffer
, Determines the type of shading
; IX - the current address in the buffer

TO_SCR AND% 00111000

        RRCA

        LD L, A

        LD H, 0

        LD DE, TAB-4

        ADD HL, DE

        LD B, H

        LD C, L

; BC - address hatching


        PUSH IX

        POP HL

        LD DE, # 320

        ADD HL, DE

; HL - address in the auxiliary buffer
, Which stores the value of past
; Shading for this familiarity


        CP (HL); values ​​match?

        RET Z; if yes - go


        PUSH AF

        LD (HL), A

        LD DE,-BUF-# 340

        ADD HL, DE

; HL - offset in the main buffer, find out
; On it the coordinates of familiarity:


        LD A, L

        AND 31

        LD D, A; X

        RL L

        RL H

        RL L

        RL H

        RL L

        RL H

        LD A, H

        AND 31

        LD E, A; Y


        AND # 18

        OR # 40

        LD H, A

        LD A, E

        AND # 7

        RRA

        RRA

        RRA

        RRA

        ADD A, D

        LD L, A

; HL - address on the screen


        POP AF;, if A = 0,

        AND A; easy to clean

        JP Z, TO_CL; familiarity


        LD D, H

        LD E, L

        INC D

        INC D

        INC D

        INC D

; HL points to the upper line of familiarity,
, And DE - four lines below


        LD A, (BC)

        LD (HL), A

        LD (DE), A

        INC H

        INC D

        INC BC

        LD A, (BC)

        LD (HL), A

        LD (DE), A

        INC H

        INC D

        INC BC

        LD A, (BC)

        LD (HL), A

        LD (DE), A

        INC H

        INC D

        INC BC

        LD A, (BC)

        LD (HL), A

        LD (DE), A

        RET

; If you just want to clear familiarity:

TO_CL LD (HL), A

        INC H

        LD (HL), A

        INC H

        LD (HL), A

        INC H

        LD (HL), A

        INC H

        LD (HL), A

        INC H

        LD (HL), A

        INC H

        LD (HL), A

        INC H

        LD (HL), A

        RET

; Table that defines the different types of
; Hatches:

TAB DB% 01000100

        DB% 00000000

        DB% 00010001

        DB% 00000000


        DB% 01000100

        DB% 00010001

        DB% 01000100

        DB% 00010001


        DB% 01010101

        DB% 10101010

        DB% 01010101

        DB% 10101010


        DB% 11011101

        DB% 10101010

        DB% 01110111

        DB% 10101010


        DB% 01010101

        DB% 10101010

        DB% 01010101

        DB% 10101010


        DB% 01000100

        DB% 00010001

        DB% 01000100

        DB% 00010001


        DB% 01000100

        DB% 00000000

        DB% 00010001

        DB% 00000000





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:
attempt at writing - An excerpt from the novel: Labyrinth of Reflections.
reader-reader - The printer driver for the Scorpion.

В этот день...   21 November