2. "Plasma"
This is a series of beautiful effects. Here is the first of
them, the simple:
140.
;--------------------------;
3; (c) Ivan Roshchin, 1997;
; EFFECT "PLASMA";
;--------------------------;
LD HL, # 4000; CLS
LD (HL), L
LD DE, # 4001
LD BC, # 1AFF
LDIR
; Transfers the contents of the upper row
; Down and vice versa, ie screen like
; Closed vertically:
M2 LD HL, # 5820
LD DE, # 5AE0
LD BC, 32
LDIR
LD HL, # 5AC0
LD DE, # 5800
LD BC, 32
LDIR
; In the cycle of updating the attributes # 5820 - # 5AE0:
LD IX, # 5820
M1 LD A, (IX +1)
ADD A, (IX-1)
ADD A, (IX +32)
ADD A, (IX-32)
DEC A;!
SRL A;!
SRL A;!
LD (IX), A
INC IX
LD A, XL
CP # E0
JR NZ, M1
LD A, XH
CP # 5A
JR NZ, M1
XOR A
IN A, (254)
CPL
AND 31
JR Z, M2
RET
2
You can experiment
with this program, changing it
region marked "!". Try these options:
a) DEC A b) SRL A in) SRL A
SRL A DEC A SRL A
SRL A SRL A DEC A
d) SRL A g) ADD A, 8
SRL A SRL A
INC A SRL A
DEC A
After this section you can add a command AND # 3F, or AND
# 7F - it also affects the type of effect.
You can change or other piece of software:
LD A, (IX +1)
ADD A, (IX-1)
ADD A, (IX +32)
ADD A, (IX-32)
He determines that the value of current attribute depends on
the values of attributes on the left, right, top and bottom
of it:
- The current attribute
- Contribute to it attributes
Interesting results were obtained when determining these
dependencies:
LD A, (IX +1) LD A, (IX)
ADD A, (IX) ADD A, (IX)
ADD A, (IX +32) ADD A, (IX +31)
ADD A, (IX-32) ADD A, (IX +32)
LD A, (IX-33) LD A, (IX)
ADD A, (IX-31) ADD A, (IX)
ADD A, (IX +31) ADD A, (IX +32)
ADD A, (IX +33) ADD A, (IX +33)