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

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

<b>Technology sprites</b> - Part 2: The hunt for sprites (search and pulling).
             HUNTING


   Let us go with you
hunting, and hunting it is ...
It was just that this is our hunting unusual: we will hunt you
for sprites. What do we
need? It's very simple.
Get the scoop on their old times
drive and locate the 1.2 software
that you moved from the tape, or you know exactly what they
not protected by our craftsmen.
Define "virgin" (unless
that MAGIC'om poporchenuyu) program is simple - it likely will 
not boot when jumping lines with greetings or labels such as 
"CRACKET BY ...". Other programs we do not fit, as they are 
compressed, protected, and we simply do not find them. 

   Now it is necessary to arm. I
for example, took a not very
new, but I tested and distributed Inforkomom Program File dump 
editor. This very useful program, and through her we can easily 
find sprites in your programs. If you have

do not have it, then look for
on the drive any other, capable of browsing and searching in
programs sprites. For those who have
who generally do not have any programs that I offer my own. You 
should assemble it in the area memory, which definitely will 
not be overwritten're viewing unit

(Best of 3 third of the screen,
as She deliberately did not use the program). Then you should 
download the program block and run the viewer.


   After starting the program you
will see the following keys:

 1 - Switch modes -

     character / sprite.
 Q - Reduces the address of view

     1 byte.
 A - Increases the address of view

     1.
 O - Reduces the size of the maps the
     emogo windows in length by 1.
 P - Increases the size of the map
     isplay window at 1.
 SPACE - Exit to BASIC.
 Q + SHIFT - Reduces the address space
     Despite the 256.
 A + SHIFT - Increases address

     viewing on the 256.


   Initially, the address set
A font ROM and the mode
view symbols. You will be able
find with this program
sprites almost all formats.
Program size is very small. You can also improve
its discretion by increasing the number of keys. The program is 
written to the assembler TASM, but its just a remake

for other assemblers.
140.

        ORG # 61A8; Address assemble.

        UNPHASE; Replacement ENT, but TASM'a.

        PHASE 20480; This team assembles everything that we find
                      ; Reduces her, the address that follows 
the 

                      ; It, in our case in the 3 third of the 
screen, but 

                      ; Code puts the address of ORG.

        EI; Enabling interrupts.

        XOR A; Making a Border black.

        OUT (# FE), A

        INC A; The variable FLAG output mode sprites

                      ; On the screen - 1 Print characters 0 - 
valid                       Thou.


        LD (FLAG), A

        LD A, # 20; In LEN fills the current window size in 
width                       ; Well.


        LD (LEN), A

        LD HL, # 3D00; now variable VRAM memory address

                      , From which we print on screen
                      ; Wounds.

        LD (VRAM), HL

        CALL SETSP; Draw on the screen the contents of memory.
KEY XOR A; In a variable key pressed enters 0.

        LD (# 5C08), A

        LD BC, # 0000 pause before pressing any key.

        CALL # 1F3D

        LD A, (# 5C08); Read the contents of the variable.

        CP # 31; if you press "1" - there is a switching

                      ; Output modes sprites.

        JR Z, SETFLAG

        CP # 71, if you press "q" (small) - reduces

                      'S address to the viewer 1.

        JR Z, UP1

        CP # 61; if you press "a" (small) - Increases

                      'S address to the viewer 1.

        JR Z, DOWN1

        CP # 51, if you press "Q" (large) - Reduces the hell
                      ; Res viewing at # 0100.

        JR Z, UP256

        CP # 41, if you press "A" (large) - Increases

                      'S address to the viewer # 0100.

        JR Z, DOWN256

        CP # 20; Pressing the space bar exits

                      ; Program.

        RET Z

        CP # 6F; if you press "o" (small) - reduces

                      , The size of the window.

        JR Z, DECR

        CP # 70, if you press "p" (tiny) - increase

                      , The window size.

        JR Z, INCR

        JR KEY; If reaped another transition to a survey of the 
keys. SETFLAG LD A, (FLAG); invert flag.


        XOR # 01

        LD (FLAG), A

        JR KEY-3
UP1 LD HL, (VRAM); following procedures increase /

                      ; Address view.

        DEC HL

        LD (VRAM), HL

        JR KEY-3
DOWN1 LD HL, (VRAM)

        INC HL

        JR UP1 +4
UP256 LD HL, (VRAM)

        LD DE, # 0100

        AND A

        SBC HL, DE

        JR UP1 +4
DOWN256 LD HL, (VRAM)

        LD DE, # 0100

        ADD HL, DE

        JR UP1 +4
DECR LD A, (LEN); following procedures increase /

                      , The size of the window.

        CP # 01

        JR Z, KEY

        DEC A

        LD (LEN), A

        JR KEY-3
INCR LD A, (LEN)

        CP # 20

        JR Z, KEY

        INC A

        LD (LEN), A

        JR KEY-3
SETSP CALL CLS; Call window cleaning.

        LD A, (FLAG)

        DEC A

        JR Z, CHR; If 1, print characters, otherwise - sprites.

        LD HL, # 4000; address of the beginning screen.

        LD DE, (VRAM); memory address.

        LD B, # 80, window size in the height of 128 pixels (16 
* 8). SPR1 PUSH HL


        LD A, (LEN); Writes in the C window size in length.

        LD C, A; then print the sprite.
SPR2 LD A, (DE)

        LD (HL), A

        INC DE

        INC HL

        DEC C

        JR NZ, SPR2

        POP HL

        CALL DOWN

        DJNZ SPR1

        RET
DOWN INC H; Go to the next pixel line

                      ; Below.

        LD A, H

        AND # 07

        RET NZ

        LD A, L

        ADD A, # 20

        LD L, A

        RET C

        LD A, H

        SUB # 08

        LD H, A

        RET
CHR LD HL, # 4000; Address 1 third of the screen.

        LD DE, (VRAM); In DE puts the address in memory.

        CALL CHRSET; Fill in the first third.

        LD HL, # 4800; address the second third.

        CALL CHRSET; fill it.

        RET
CHRSET LD B, # 08; This procedure fills a third of the screen 
Sim                       ; Oxen.

CHR1 PUSH HL

        LD A, (LEN)

        LD C, A
CHR2 PUSH BC

        PUSH HL

        LD B, # 08
CHR3 LD A, (DE)

        LD (HL), A

        INC H

        INC DE

        DJNZ CHR3

        POP HL

        POP BC

        INC HL

        DEC C

        JR NZ, CHR2

        POP HL

        PUSH DE

        LD DE, # 0020

        ADD HL, DE

        POP DE

        DJNZ CHR1

        RET
CLS LD HL, # 5800, First paint the entire screen color

                      ; INK 0, PAPER 0.

        PUSH HL

        LD DE, # 5801

        LD BC, # 02FF

        LD (HL), # 00

        LDIR

        POP HL; then makes the visible part of the screen to
                      ; Thoraya falls out the window.

        LD B, # 10
CLS1 PUSH HL

        LD A, (LEN)

        LD C, A
CLS2 LD (HL), # 0F

        INC HL

        DEC C

        JR NZ, CLS2

        POP HL

        LD DE, # 20

        ADD HL, DE

        DJNZ CLS1

        RET
FLAG NOP; variable that stores the index formula
                      ; Mat printing.
VRAM DEFW # 0000 variable that stores the memory address
LEN NOP; variable that stores the window size in

                      ; Length.
2

   Well, the weapon is chosen, and
we begin the hunt. What we
need to find? Sprites. Increasing or decreasing address view
and resizing the window, locate the
Playing pictures, pre-translated in the viewer
view sprites.

   To view I took a few programs from the collection: 3D BATMAN 
(OCEAN), ELEFANT1 (CODE MASTERS), JACK THE NIPPER-2, KRAKOUT. 
Let's see, what I had in them find. The first three sprite I 
found in a search mode, sprites, and sprite from the program 
was KRAKOUT found in the character display mode.


   Actually, on this our hunt is over and we gradually move to 
the next chapter, which explained to us what we found.







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:
attempt at writing - Fantasy and Science Fiction.
EI is dead - Kovrovskaya group Eternity Industry renamed Placebo.

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