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

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

<b>screen effects</b> -
   Next time, borrowed a program ROCKSTAR -
"Running out the string." This is not exactly "running line" 
because she will not run away, but only

runs on the right and stops, having reached the middle of the 
screen. Exactly two lines are displayed,

you saw in the previous
Fig. The horizontal
scrolling - smooth, running
not familiarity, but in pixels.

   Listing of "running out" line:
1420.
622B D9 EXX
622C E5 PUSH HL
622D D9 EXX
----------------------------- 622E 21B262 LD HL, # 62B2
6231 CD3E62 CALL # 623E
----------------------------- 6234 21D562 LD HL, # 62D5
6237 CD3E62 CALL # 623E
----------------------------- 623A D9 EXX
623B E1 POP HL
623C D9 EXX
623D C9 RET
----------------------------- 623E 7D LD A, L
623F 32B062 LD (# 62B0), A
6242 7C LD A, H
6243 32B162 LD (# 62B1), A
6246 3E02 LD A, # 02
6248 CD0116 CALL # 1601
624B 2AB062 LD HL, (# 62B0)
624E 7E LD A, (HL)
624F 32AC62 LD (# 62AC), A
6252 23 INC HL
6253 7E LD A, (HL)
6254 32AD62 LD (# 62AD), A
6257 23 INC HL
6258 7E LD A, (HL)
6259 32AE62 LD (# 62AE), A
625C 23 INC HL
625D 3E1F LD A, # 1F
625F 32AF62 LD (# 62AF), A
6262 3E16 LD A, # 16
6264 D7 RST # 10
6265 3AAC62 LD A, (# 62AC)
6268 D7 RST # 10
6269 3E1F LD A, # 1F
626B D7 RST # 10
626C 7E LD A, (HL)
626D D7 RST # 10
626E CD7F62 CALL # 627F
6271 23 INC HL
6272 3AAF62 LD A, (# 62AF)
6275 3D DEC A
6276 32AF62 LD (# 62AF), A
6279 FE00 CP # 00
627B 2000 NOP
627C 20E4 JR NZ, # 6262
627E C9 RET
----------------------------- 627F 0608 LD B, # 08
6281 D9 EXX
6282 2AAD62 LD HL, (# 62AD)
6285 0608 LD B, # 08
6287 0E20 LD C, # 1920
6289 7E LD A, (HL)

1420.628A CB27 SLA A
628C 77 LD (HL), A
628D 23 INC HL
628E 0D DEC C
628F 7E LD A, (HL)
6290 CB27 SLA A
6292 1977 LD (HL), A
Six thousand two hundred ninety-three DCA562 CALL C, # 62A5
6296 23 INC HL
6297 0D DEC C
6298 2000 NOP
6299 20F4 JR NZ, # 628F
629B 11E000 LD DE, # 00E0
629E 19 ADD HL, DE
629F 10E6 DJNZ # 6287
62A1 D9 EXX
62A2 10DD DJNZ # 6281
62A4 C9 RET
----------------------------- 62A5 2B DEC HL
62A6 7E LD A, (HL)
62A7 CBC7 SET 0, A
62A9 1977 LD (HL), A
62AA 1923 INC HL
62AB C9 RET
2

   Starting procedure - with addresses
Download: RANDOMIZE USR 25131.

   Proper procedure for "running out the string" directly 
borrowed from the program ROCKSTAR, begins at address

623EH. However, when his work
it corrupts the alternative
Register HL, because it does not correctly completed
procedure when calling it from BASIC. To resolve this 
unpleasant phenomenon was foreseen preserving the value of 
alternative HL register on the stack and its restoration at the 
conclusion of the procedure. 

   The caller is located at address 622BH (25131).
Here the procedure is called twice to print two lines of text.
Before each procedure call in
HL register is given an address in memory where the information 
for "running out" line. The format of this information is as 
follows. First comes the number that defines the line on the 
screen to print "running out" line. Then should be two-byte 
address, he defines the file system on display

the top pixel line from which it is necessary to perform 
horizontal scrolling line. This is the top pixel line of the 
left-most familiarity given line. Further, the memory itself is 
located a text message length should be 32

bytes with blanks on the left and
right.

   Print the next character
text is done in the 31-th position of the screen, then executed
scroll to the left by 8 pixels,
after which there is printing
the next character. When working
procedure uses six official
cells in the addresses 62ACH ... 62B1H.


   To obtain the code block
"Running out the string, 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 25130, "ro2", 25131,205
 100 DATA
217,229,217,033,178,098,205,062,
098,033,213,098,205,062,098,217,
225,217,201,125,050,176,098,124,
050,177,098,062,002,205,001,022
 110 DATA
042,176,098,126,050,172,098,035,
126,050,173,098,035,126,050,174,
098,035,062,031,050,175,098,062,
022,215,058,172,098,215,062,031
 120 DATA
215,126,215,205,127,098,035,058,
175,098,061,050,175,098,254,000,
000,032,228,201,006,008,217,042,
173,098,006,008,014,032,126,203
 130 DATA
039,119,035,013,126,203,039,119,
220,165,098,035,013,000,032,244,
017,224,000,025,016,230,217,016,
221,201,043,126,203,199,119,035
 140 DATA
201,001,032,064,000,213,098,012,
128,072,032,032,032,032,082,079,
067,075,032,083,084,065,082,032,
065,084,069,032,077,089,032,072
 150 DATA
065,077,083,084,069,082,032,032,
032,032,001,032,064,032,068,073,
083,075,069,068,032,066,089,032,
086,065,076,069,078,084,073,078
 160 DATA
032,079,090,069,082,079,086,032,
049,057,057,050,032


   Below is a BASIC program that demonstrates "running out the 
string. 


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

  20 LOAD "ro1" CODE

  30 LOAD "ro2" CODE

  40 BRIGHT 1: CLS: RANDOMIZE U
SR 25012: RANDOMIZE USR 25131: B
RIGHT 0






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:
Credits - the authors of the paper.
Music - Nik-O said in my Mouzon no echo. I asked him to explain what it is?

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