ZX Forum #04
19 ноября 1997

screen effects - "minimize" the screen from Comando Tracer.

<b>screen effects</b> -
         COMANDO TRACER


   Here, the original effect is interesting, "minimize" the 
screen after the download. Better to see once, so

look at the drawings. Screen,
folding, not just at the edges
shifted to the middle, but
This is still a smooth change in its shape from a rectangle to 
a rhombus, until finally, he will not decrease so much that 
becomes a dot in the center screen and will disappear 
altogether. 


   Here's listing of this procedure.
1420.
E3A1 210058 LD HL, # 5800
E3A4 110158 LD DE, # 5801
E3A7 01FF02 LD BC, # 02FF
E3AA 3647 LD (HL), # 47
E3AC EDB0 LDIR
E3AE CDFCE3 CALL # E3FC
E3B1 0600 LD B, # 00
E3B3 C5 PUSH BC
E3B4 DD2132E4 LD IX, # E432
E3B8 0600 LD B, # 00
E3BA 210040 LD HL, # 4000
E3BD DD7E01 LD A, (IX +1)
E3C0 DD8600 ADD A, (IX +0)
E3C3 DD7700 LD (IX +0), A
E3C6 DCDBE3 CALL C, # E3DB
E3C9 CD23E4 CALL # E423
E3CC DD23 INC IX
E3CE DD23 INC IX
E3D0 04 INC B
E3D1 78 LD A, B
E3D2 FEC0 CP # C0
E3D4 C2BDE3 JP NZ, # E3BD
E3D7 C1 POP BC
E3D8 10D9 DJNZ # E3B3
E3DA C9 RET
----------------------------- E3DB 1E0F LD E, # 0F
E3DD E5 PUSH HL
E3DE CB3E SRL (HL)
E3E0 2C INC L
E3E1 CB1E RR (HL)
E3E3 2C INC L
E3E4 1D DEC E
E3E5 C2E1E3 JP NZ, # E3E1
E3E8 E1 POP HL
E3E9 E5 PUSH HL
E3EA 7D LD A, L
E3EB C61F ADD A, # 1F
E3ED 6F LD L, A
E3EE 1E0F LD E, # 0F
E3F0 CB26 SLA (HL)
E3F2 2D DEC L
E3F3 CB16 RL (HL)
E3F5 2D DEC L
E3F6 1D DEC E
E3F7 C2F3E3 JP NZ, # E3F3
E3FA E1 POP HL
E3FB C9 RET
----------------------------- E3FC DD2132E4 LD IX, # E432
E400 0660 LD B, # 60
E402 2EFF LD L, # FF
E404 2600 LD H, # 2000
E406 DD7400 LD (IX +0), H
E409 DD7501 LD (IX +1), L
E40C 2D DEC L
E40D DD23 INC IX
E40F DD23 INC IX
E411 10F3 DJNZ # E406
E413 0660 LD B, # 60
E415 DD7400 LD (IX +0), H
E418 DD7501 LD (IX +1), L
E41B 2C INC L
E41C DD23 INC IX
E41E DD23 INC IX
E420 10F3 DJNZ # E415
E422 C9 RET
----------------------------- E423 24 INC H
E424 7C LD A, H
E425 E607 AND # 07
E427 C0 RET NZ
E428 7D LD A, L
E429 C620 ADD A, # 20
E42B 6F LD L, A
E42C D8 RET C
E42D 7C LD A, H
E42E D608 SUB # 08
E430 67 LD H, A
E431 C9 RET
2

   Since the screen is prone to rather complicated scrolling 
color attributes will only make more confusion, so immediately 
after the start of the procedure in its first teams, there is a 
change in file attributes: Set PAPER 0: INK 7: BRIGHT 1. After 
that, the actual scrolling (with addresses E3AEH.


   When operating procedure is used for auxiliary purposes
memory area with addresses E432H
(58,418). The length of the field 384
bytes. This must be taken into account when
embedding procedures in its
program. If desired, this service area can be transferred to
another location by changing the address in
commands, addresses and E3B4H
E3FCH.

   The procedure is not relotsiruema at
Change of address can be recommended to replace all the 
absolute conditional branches - relative (JP NZ, ADDR -> JR NZ, 
ADDR, with the need add another team NOP, so

as each such replacement is released one byte).
Then will not so much
branch instructions with absolute addressing, can be counted on
fingers and easy to change. This also applies to procedures,
which will be described below.

   To obtain the code block
"Minimize" the screen, you can use BASIC program:


   1 READ ram: CLEAR ram: READ f
$: READ st: READ len: FOR a = st T
O st + len-1: READ b: POKE a, b: NE
XT a: SAVE f $ CODE st, len

  1910 DATA 58272, "tr1", 58273,145
 100 DATA
033,000,088,017,001,088,001,255,
002,054,071,237,176,205,252,227,
006,000,197,221,033,050,228,006,
000,033,000,064,221,126,001,221
 110 DATA
134,000,221,119,000,220,219,227,
205,035,228,221,035,221,035,004,
120,254,192,194,189,227,193,016,
217,201,030,015,229,203,062,044
 120 DATA
203,030,044,029,194,225,227,225,
229,125,198,031,111,030,015,203,
038,045,203,022,045,029,194,243,
227,225,201,221,033,050,228,006
 130 DATA
096,046,255,038,000,221,116,000,
221,117,001,045,221,035,221,035,
016,243,006,096,221,116,000,221,
117,001,044,221,035,221,035,016
 140 DATA
243,201,036,124,230,007,192,125,
198,032,111,216,124,214,008,103,
201


   Work unit codes clearly
demonstrate such a program:


  10 BORDER 0: PAPER 0: INK 7: C
LEAR 58272

  20 LOAD "tr1" CODE

  30 LOAD "tracer $" CODE 16384

  1940 BEEP .1,26: BEEP .1,20: PAU
SE 0

  50 RANDOMIZE USR 58273


   Here, in line 30 loads the image from the game-saver COMANDO 
TRACER, but it can be any other image.



   The next point in the original program COMANDO TRACER
a print title text messages. The letters "collected" from the 
individual points, "dive" out of space at the bottom right of 
the screen. "Reaching is" and "landing" on a specific location, 
they form the text. It's not even "running" and kakayato 
"flock" line. 

   The procedure consists of two
parts. The caller -
relotsiruemaya and can be located at any convenient location. In
the game itself, it is located at E15CH.
1420.
E15C 260E LD H, # 0E
E15E 2E48 LD L, # 48
E160 1110E3 LD DE, # E310
E163 CDA9E1 CALL # E1A9
--------------------------- E166 261A LD H, # 1A
E168 2E58 LD L, # 58
E16A 1120E3 LD DE, # E320
E16D CDA9E1 CALL # E1A9
----------------------------- E170 2613 LD H, # 1913
E172 2E60 LD L, # 60
E174 113CE3 LD DE, # E33C
E177 CDA9E1 CALL # E1A9
----------------------------- E17A 2614 LD H, # 1914
E17C 2E70 LD L, # 70
E17E 1151E3 LD DE, # E351
E181 CDA9E1 CALL # E1A9
----------------------------- E184 2614 LD H, # 1914
E186 2E78 LD L, # 78
E188 1167E3 LD DE, # E367
E18B CDA9E1 CALL # E1A9
----------------------------- E18E C9 RET
2

   Calling procedure to print five lines of text, given above, 
consists of five equal parts. Before

proper procedure will be called the press, must be given
original settings.

   In case H is given by the parameter on which the print 
column (horizontal) Pos. It is Pos = (32-H) / 2. Hence

contents of the register H = 32-2 * Pos.

   In case L is given a place
print a text message to
vertical with a given distance from the top pixel line of the 
printed line to the top of the screen in pixels. Please 
consider this: You can print a line of text in increments of 
vertical position 1 pixel.


   In case the address given by DE
in memory, which is itself a line of text.

   After this procedure is called proper print E1A9H.
At the end of the caller in
Depending on the specific requirements can be either RET, or
JP.

   Listing procedures for printing:
1420.
E1A9 3E20 LD A, # 20
E1AB 94 SUB H
E1AC CB27 SLA A
E1AE CB27 SLA A
E1B0 67 LD H, A
E1B1 ED73E6E2 LD (# E2E6), SP
E1B5 1A LD A, (DE)
E1B6 32E2E2 LD (# E2E2), A
E1B9 13 INC DE
E1BA 1A LD A, (DE)
E1BB 32E3E2 LD (# E2E3), A
E1BE ED53E4E2 LD (# E2E4), DE
E1C2 3E06 LD A, # 06
E1C4 32DCE2 LD (# E2DC), A
E1C7 3E0C LD A, # 0C
E1C9 32DDE2 LD (# E2DD), A
E1CC 22DEE2 LD (# E2DE), HL
E1CF 7C LD A, H
E1D0 C608 ADD A, # 08
E1D2 67 LD H, A
E1D3 22E0E2 LD (# E2E0), HL
E1D6 CD63E2 CALL # E263
E1D9 CD75E2 CALL # E275
E1DC FB EI
E1DD 76 HALT
E1DE CDFEE1 CALL # E1FE
E1E1 3ADCE2 LD A, (# E2DC)
E1E4 3D DEC A
E1E5 32DCE2 LD (# E2DC), A
E1E8 3ADDE2 LD A, (# E2DD)
E1EB 3D DEC A
E1EC 32DDE2 LD (# E2DD), A
E1EF CDFEE1 CALL # E1FE
E1F2 01F401 LD BC, # 01F4
E1F5 0B DEC BC
E1F6 78 LD A, B
E1F7 B1 OR C
E1F8 C2F5E1 JP NZ, # E1F5
E1FB C3DCE1 JP # E1DC
----------------------------- E1FE 3ADCE2 LD A, (# E2DC)
E201 47 LD B, A
E202 3AE2E2 LD A, (# E2E2)
E205 2ADEE2 LD HL, (# E2DE)
E208 CD7FE2 CALL # E27F
E20B 3ADDE2 LD A, (# E2DD)
E20E 47 LD B, A
E20F 3AE3E2 LD A, (# E2E3)
E212 2AE0E2 LD HL, (# E2E0)
E215 CD7FE2 CALL # E27F
E218 3ADCE2 LD A, (# E2DC)
E21B 3D DEC A
E21C CA45E2 JP Z, # E245
E21F 3ADDE2 LD A, (# E2DD)
E222 3D DEC A
E223 C0 RET NZ
E224 ED5BE4E2 LD DE, (# E2E4)
E228 13 INC DE
E229 ED53E4E2 LD (# E2E4), DE
E22D 1A LD A, (DE)
E22E A7 AND A
E22F FA70E2 JP M, # E270
E232 32E3E2 LD (# E2E3), A
E235 3AE1E2 LD A, (# E2E1)
E238 C610 ADD A, # 10
E23A 32E1E2 LD (# E2E1), A
E23D 3E0C LD A, # 0C
E23F 32DDE2 LD (# E2DD), A
E242 C375E2 JP # E275
----------------------------- E245 ED5BE4E2 LD DE, (# E2E4)
E249 13 INC DE
E24A ED53E4E2 LD (# E2E4), DE
E24E 1A LD A, (DE)
E24F A7 AND A
E250 FA70E2 JP M, # E270
E253 32E2E2 LD (# E2E2), A
E256 3ADFE2 LD A, (# E2DF)
E259 C610 ADD A, # 10
E25B 32DFE2 LD (# E2DF), A
E25E 3E0C LD A, # 0C
E260 32DCE2 LD (# E2DC), A
E263 3ADCE2 LD A, (# E2DC)
E266 47 LD B, A
E267 3AE2E2 LD A, (# E2E2)
E26A 2ADEE2 LD HL, (# E2DE)
E26D C37FE2 JP # E27F
----------------------------- E270 ED7BE6E2 LD SP, (# E2E6)
E274 C9 RET
----------------------------- E275 3ADDE2 LD A, (# E2DD)
E278 47 LD B, A
E279 3AE3E2 LD A, (# E2E3)
E27C 2AE0E2 LD HL, (# E2E0)
E27F E5 PUSH HL
E280 6F LD L, A
E281 2600 LD H, # 2000
E283 29 ADD HL, HL
E284 29 ADD HL, HL
E285 29 ADD HL, HL
E286 1158FB LD DE, # FB58
E289 19 ADD HL, DE
E28A E5 PUSH HL
E28B DDE1 POP IX
E28D E1 POP HL
E28E 1E08 LD E, # 08
E290 7D LD A, L
E291 80 ADD A, B
E292 6F LD L, A
E293 FEB8 CP # B8
E295 D0 RET NC
E296 E5 PUSH HL
E297 1607 LD D, # 07
E299 7C LD A, H
E29A 80 ADD A, B
E29B 67 LD H, A
E29C DABCE2 JP C, # E2BC
E29F 7A LD A, D
E2A0 CB27 SLA A
E2A2 CB27 SLA A
E2A4 CB27 SLA A
E2A6 F646 OR # 46
E2A8 32B1E2 LD (# E2B1), A
E2AB C5 PUSH BC
E2AC D5 PUSH DE
E2AD E5 PUSH HL
E2AE DDCB0046 BIT 0, (IX +0)
E2B2 C4CAE2 CALL NZ, # E2CA
E2B5 E1 POP HL
E2B6 D1 POP DE
E2B7 C1 POP BC
E2B8 15 DEC D
E2B9 F299E2 JP P, # E299
E2BC E1 POP HL
E2BD DD23 INC IX
E2BF 7D LD A, L
E2C0 80 ADD A, B
E2C1 6F LD L, A
E2C2 FEB8 CP # B8
E2C4 D0 RET NC
E2C5 1D DEC E
E2C6 C296E2 JP NZ, # E296
E2C9 C9 RET
----------------------------- E2CA CDF0E2 CALL # E2F0
E2CD 5D LD E, L
E2CE 54 LD D, H
E2CF E607 AND # 07
E2D1 6F LD L, A
E2D2 2600 LD H, # 2000
E2D4 01E8E2 LD BC, # E2E8
E2D7 09 ADD HL, BC
E2D8 1A LD A, (DE)
E2D9 AE XOR (HL)
E2DA 12 LD (DE), A
E2DB C9 RET
----------------------------- E2DC
... system cells
E2EF
----------------------------- E2F0 C5 PUSH BC
E2F1 7D LD A, L
1420.E2F2 CB3F SRL A
E2F4 37 SCF
E2F5 1F RRA
E2F6 CB3F SRL A
E2F8 AD XOR L
E2F9 E6F8 AND # F8
E2FB AD XOR L
E2FC 47 LD B, A
E2FD 7D LD A, L
E2FE E638 AND # 38
E300 07 RLCA
E301 07 RLCA
E302 6F LD L, A
E303 7C LD A, H
E304 CB3F SRL A
E306 CB3F SRL A
E308 CB3F SRL A
E30A B5 OR L
E30B 6F LD L, A
E30C 7C LD A, H
E30D 60 LD H, B
E30E C1 POP BC
E30F C9 RET
2

   In a program uses
20 bytes for business purposes with
Address E2DCH at E2EFH
inclusive.

   With addresses E310H is
text messages. Note: Each line of text ends with two 
characters: space and code FFH. Gap needed to "air" is not

remained "dive" points.

   Pay attention to the team
at E286H. Here in the DE register is entered the system 
variable CHARS to character set that you

want to type text messages. It is equal to 64344. Himself
character set is a
address 64600. It should be noted
that the use of thickened stylized character set
It is in this program makes a much bigger impression
(Because the process is dynamic)
than the use of symbolic
a set of ROMs. Generally in the game "COMANDO TRACER" print 
text messaging is used part of a character set - only numbers 
and uppercase letters, and the image of the symbol "copyright" 
symbol with a fixed Code 40H - "@". You can also

take the whole character
set, so the text messages
Example changed to reflect this
circumstances.


   To obtain the code block
"Flock to the line" you can use the BASIC program:


   1 READ ram: CLEAR ram: READ f
$: READ st: READ len: FOR a = st T
O st + len-1: READ b: POKE a, b: NE
XT a: SAVE f $ CODE st, len

  1910 DATA 57691, "tr2", 57692,545
 100 DATA
038,014,046,072,017,016,227,205,
169,225,038,026,046,088,017,032,
227,205,169,225,038,019,046,096,
017,060,227,205,169,225,038,020
 110 DATA
046,112,017,081,227,205,169,225,
038,020,046,120,017,103,227,205,
169,225,201,000,000,000,000,000,
000,000,000,000,000,000,000,000
 120 DATA
000,000,000,000,000,000,000,000,
000,000,000,000,000,062,032,148,
203,039,203,039,103,237,115,230,
226,026,050,226,226,019,026,050
 130 DATA
227,226,237,083,228,226,062,006,
050,220,226,062,012,050,221,226,
034,222,226,124,198,008,103,034,
224,226,205,099,226,205,117,226
 140 DATA
251,118,205,254,225,058,220,226,
061,050,220,226,058,221,226,061,
050,221,226,205,254,225,001,244,
001,011,120,177,194,245,225,195
 150 DATA
220,225,058,220,226,071,058,226,
226,042,222,226,205,127,226,058,
221,226,071,058,227,226,042,224,
226,205,127,226,058,220,226,061
 160 DATA
202,069,226,058,221,226,061,192,
237,091,228,226,019,237,083,228,
226,026,167,250,112,226,050,227,
226,058,225,226,198,016,050,225
 170 DATA
226,062,012,050,221,226,195,117,
226,237,091,228,226,019,237,083,
228,226,026,167,250,112,226,050,
226,226,058,223,226,198,016,050
 180 DATA
223,226,062,012,050,220,226,058,
220,226,071,058,226,226,042,222,
226,195,127,226,237,123,230,226,
201,058,221,226,071,058,227,226
 190 DATA
042,224,226,229,111,038,000,041,
041,041,017,088,251,025,229,221,
225,225,030,008,125,128,111,254,
184,208,229,022,007,124,128,103
 200 DATA
218,188,226,122,203,039,203,039,
203,039,246,070,050,177,226,197,
213,229,221,203,000,070,196,202,
226,225,209,193,021,242,153,226
 210 DATA
225,221,035,125,128,111,254,184,
208,029,194,150,226,201,205,240,
226,093,084,230,007,111,038,000,
001,232,226,009,026,174,018,201
 220 DATA
006,001,120,208,120,200,032,056,
124,227,142,097,128,064,032,016,
008,004,002,001,197,125,203,063,
055,031,203,063,173,230,248,173
 230 DATA
071,125,230,056,007,007,111,124,
203,063,203,063,203,063,181,111,
124,096,193,201,067,079,077,065,
078,068,079,032,084,082,065,067
 240 DATA
069,082,032,255,069,083,067,082,
073,084,079,032,080,079,082,032,
082,073,067,065,082,068,079,032,
080,085,069,082,084,079,032,255
 250 DATA
071,082,065,070,073,067,079,083,
058,082,065,085,076,032,076,079,
080,069,090,032,255,127,032,090,
069,085,083,032,083,079,070,084
 260 DATA
087,065,082,069,032,049,057,056,
056,032,255,127,032,068,073,078,
065,077,073,067,032,083,079,070,
084,046,032,049,057,056,056,032,
255


   Below is a BASIC program that demonstrates "flock to the 
line." Line 20 is loaded, "Bold" character set.



  10 BORDER 0: PAPER 0: INK 7: C
LEAR 24999

  20 LOAD "chr" CODE 64600

  30 LOAD "tr2" CODE

  40 RANDOMIZE USR 57692






Other articles:

Help - Description of the shell of an electronic book "ZX-FORUM 4.

Secrets of Successful Design - Head for the book "Design your Programs

screen effects - Running a string of R-Type.

screen effects - clearing the screen of Zynaps.

screen effects - "minimize" the screen from Comando Tracer.

screen effects - smooth "decay" of the screen Sommando Tracer.

screen effects - changed the character set for the original stylized font from the game Rockstar.

screen effects - "running out the string" out of the game Rockstar.

screen effects - "pouring" the screen of the game Rockstar.

screen effects - a complex multi-effects from the game Bubbler.

New top 40 procedures - scrolling display, a fusion of two images, inverting screen, rotate characters, replacement of attributes, fill a closed loop, the calculation of addresses in the screen, copy of the screen, etc.

Technology sprites - Part 1: Introduction.

Technology sprites - Part 2: The hunt for sprites (search and pulling).

Technology sprites - Part 3: Format of sprites.

Technology sprites - Part 4: Format of sprites with a mask.

Technology sprites - Part 5: Structure sprite blocks (both co-exist in memory sprite and mask, what data to help us quickly find the address of the sprite in memory, and much more.)

Technology sprites - Part 6: preparation of data for publication.

Technology sprites - Part 8: Printing sprites (coordinates are given in familiarity).

Technology sprites - Part 9: Printing sprites (coordinates given in pixels).

Technology sprites - Part 10: a review of programs to work with sprites and graphics.

world of sound Spectrum - Chapter 1: The Physics of Sound.

world of sound Spectrum - Chapter 2: Operator BEEP, Creating effects on BEEPe, Making Music on BEEPe.

world of sound Spectrum - Chapter 3: How is the sound device (BEEP'ra and methods of sound production).

world of sound Spectrum - Chapter 4: Programming sound in assembler.

world of sound Spectrum - Chapter 4.1: Programming sound effects - Tone, Noise, Complexes effects.

world of sound Spectrum - Chapter 4.2: Programming Sound Effects - Volume Control.

world of sound Spectrum - chapter 4.3: Sound Effects - Management timbre.

world of sound Spectrum - Chapter 4.4: Programming sound effects - music programming.

world of sound Spectrum - Chapter 4.5: Programming sound effects - Polyphonic ringtones (polyphonic).

world of sound Spectrum - chapter 4.6: Treatment of external signals - digitization.

world of sound Spectrum - Chapter 4.7: Handling of external signals - Reverberation.

world of sound Spectrum - chapter 4.8: Synthesis of speech.

world of sound Spectrum - Chapter 4.9: audio playback interrupt.

world of sound Spectrum - Chapter 5: The operator PLAY for music coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 5.1: Creating effects operator PLAY.

world of sound Spectrum - Chapter 5.2: Making Music on PLAYe.

world of sound Spectrum - Chapter 6.1: Description of the coprocessor registers of the musical AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 6.2: Programming effects and music under the musical coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 7: Software Review ZX-Spectrum to create sounds and music.

world of sound Spectrum - chapter 7.1: Editor, Sound Effects SUPER SOUND.

world of sound Spectrum - Chapter 7.2: Music Editor Wham the Music Box.

world of sound Spectrum - Annex 1, 2: Listings sound effects SUPER SOUND'a, tips assembler.


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

Similar articles:
Advertising - advertising and announcements.

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