Welcome Press #01
31 декабря 1995

Programmer's Reference - in search of eternal life.

<b>Programmer's Reference</b> - in search of eternal life.
CopyRight (c) 1992-95 by Max Iwamoto / Code Busters



    Beginning of this description has been put on the
when one of us had an idea
make a game that we could not pass
lifeless. This idea is a success, that
gave impetus to attempts to make the lifeless
other games and come to grips with their device,
specificity. In itobe we have made
practical techniques for working with games (under work
of the game here (and below) means
striving to make this game an immortal). These
techniques were divided into five groups, which are
presented below.

    All the reasons mentioned below were tested on
MSX2 computers and ZX-Spectrum with
programs such as: Debugger, Mons4, STS3.3 etc.
This version of the article is designed to islyuchitelno
users ZX-Spectrum.

    This guide is designed to
users, almost without even
minimum experience in Assembler Z80, but
know his basic commands.

    We offer for your consideration a few
methods by which we were able to remake
more than one hundred games.



                   METHOD 1


           Came to your mind itself



    Try to search the cell in which
stores the number of lives and increase their (at
It must be borne in mind that in some games
number of lives that appear on the screen at 1 and sometimes
even at 2, less than load), and another,
nikigda do not put 255 lives, because if you
suddenly add life, then life will become counter
equal to 0 and then comes Game Over. Most often,
NeuStar is a battery (hereinafter
Acc):

# 6000: 3E 03 A, # 03; living in Acc
# 6002: 32 00 C0 LD (# C000), A; Acc in cell # C000


    Change the number at # 6001, if
number of lives in the game increased, so
cell (# C000) contains a number of lives. Except
entry through a battery, there are many
others, here are some of them:

# 6000: 21 00 C0 LD HL, # C000; # C000 in HL
# 6003: 36 03 LD (HL), # 03; life # C000


    In this case, the cell with which to further
work - (# C000).

    Some firms have gone more artful ways.
They use a few more ways to load
lives in a cell:

# 6000: March 21, 2000 LD HL, # 0003; get 3 in HL
# 6003: 7D LD A, L; in Acc in L
# 6004: 32 00 C0 LD (# C000), A; Acc in cell # C000


# 6000: March 21, 2000 LD HL, # 0003; get 3 in HL
# 6003: 22 00 C0 LD (# C000), HL; HL in cell # C000


    HL can be used instead of DE, BC, IX,
IY, but the main thing for us to find the cell containing
life. If the cell is found, it is necessary to move
to stage search subtraction life, because if we
simply increase the value in the cell may
happen that even a large number of lives
not enough for the passing game. Search subtraction
life by the example game BUGGY RANGER:


   We have 3 lives. We find:

# B9EB: 3E 03 A, # 03; living in Acc
# B9ED: 32 38 A9 LD (# A938), A; Acc in cell # A938


   We are looking for treatment to a cell (# A938). We find:

# B959: 21 38 A9 LD HL, # A938;
# B95C: 35 DEC (HL); subtraction lives


    Once we remove the DEC (HL) (# 00 in
# B95C) the game becomes an immortal, but to pass it
practically impossible because the energy
subtracted too quickly. Therefore, we begin
search that is entered in the cell next to the cell
life, ie (A9??):

# B9FF: 3E FF A, # FF; energy in the Acc
# BA01: 32 39 A9 LD (# A939), A; Acc in cell # A939


   Further, we find:

# C72C: 3A 39 A9 LD A, (# A939); energy Acc
# C72F: 95 SUB L; subtraction Acc
# C730: 32 39 A9 LD (# A939), A; Acc to cell energy # C733: B7 
OR A; energy exposure # C734: CA 38 C7 JP Z, # C738; flags 
transition 

                              , If 0
# C737: C9 RET; return if not 0
# C738: AF XOR A; Reset
# C739: 32 39 A9 LD (# A939), A; cell energy
# C73C: C3 59 B9 JP # B959; transition to procedure
                              ; Fool subtraction

                              ; Life


    Similarly, we can find fuel and weapons:
cell (A93A) and (A941). They subtract the same
Subtract lives.


    The next way is that
cell is placed is not the number itself, and ASCII code
this number. For example, if a toy 3 lives, then
the corresponding cell will be placed instead of 3, and
# 33, that is code number 3. Respectively, and lives
in this toy can not be greater than 9, as well as
checking is not done on 0, and the ASCII code
code is 0, ie at # 30. Very fond of using this
way Bob Pape, who wrote the R-TYPE, DRAGON
BREED, TUSKER. Take for example TUSKER:


    In this game, 3 lives. Therefore, we begin
look for entry 3 in Acc, but found nothing.
Next, start looking for the entry of ASCII code number
3 - # 33. We find:

# 94D4: 3E 33 A, # 33, living in Acc
# 94D6: 32 21 FE LD (# FE21), A; Acc in cell # FE21


    Now start looking for treatment to
cell (# FE21):

# 96E0: 3A 21 FE LD A, (# FE21)
# 96E3: 3D DEC A
# 96E4: 32 21 FE LD (# FE21), A
# 96E7: FE 30 CP # 30
# 96E9: CA January 1984 JP Z, # 8401


    DEC A we have suspicious, they
reinforced when we see CP # 30 (check
code number 0). Now at # 96E3 put # 00 and
run the program.


    And finally, the most cunning and most often
greeted way. Data on the life, energy,
Segment Number stored in the body of the program and its
addresses are sent a team LDIR. Moreover,
more often they are stored after the subroutine
Shipping!

# 6000: 21 0C 60 LD HL, # 600C; Source
# 6003: November 2000 C0 LD DE, # C000; accepter
# 6006: March 1 2000 LD BC, # 0003, how many to send
# 6009: ED BO LDIR; send 3 bytes
# 600B: C9 RET; with # 600C at # C000
# 600C: 03 INC BC; sent
# 600D: 12 January 2000 LD BC, # 0012; data


    In this case, the cell where to look
life - this is (# C000). In (# C001) number is saved
phase, and (# C002) the amount of energy players.


    But there is another type of game. This is a game where
involves several players. They all made
through the index adressatsiyu, ie to subtract
lives, both players used the same
subprogram. But if the game is
fighting (eg Street Fighter), then removing
procedure of subtraction of energy (or lives) you
make immortal both players and the game
lose meaning. In this case it is necessary to remove
not command the subtraction, and recourse to
subtraction of one of the players.


    I must say one more often
encounters an error. If the number of toy
some things the same, entering into
cells is often in the same place.
For example, in the game Saigon Combat Unit 1, the number
lives exactly the number of grenades and recording is
nearby:

# A823: 3E 04 A, # 04; number 4 in the Acc
# A825: 32 20 B0 LD (# B020), A; in a cell lives
# A828: 32 21 B0 LD (# B021), A; grenades into the cell



    But in fact the most severe when
creators of the game stipulate that their game
someone will obessmerchivat. For example, it was
done in the game EQUINOX. Life in it are disabled
pretty simple, but if you reassign
keypad before the game or you do not have enough time
for passing a level, then started the game at first you
see that life is deducted. If such
occurs, then you need to search entry code
Team subtraction in memory. In this case, we
we find:


# 7006: 3E 35 A, # 35; command code

                              ; DEC (HL)
# 7008: 32 B1 9B LD (# 9BB1), A; And at # 9BB1,

                             ; Exactly is

                             ; Subtraction of lives!


    Therefore, if delivered, # 00 # 35 instead of
at # 7007, the game will be absolutely
infinite.



                   METHOD 2


             SEARCH checking to zero



    If the first method does not lead to positive
results, it should seek verification of cells on
zero, remove it and see what this
succeed. Next, I will bring some of the possible
options:

# 6000: 3A 00 C0 LD A, (# C000); in the Acc of the (# C000)
# 6003: B7 OR A; checkboxes
# 6004: CA 00 80 JP Z, # 8000; go, if A = 0


    Remove the jump to the address # 6004 and see
what will happen. If the screen number of lives = 0;
Game Over but the inscription has not yet appeared, it means
cell life, in this case - (# C000). Search
subtraction can not do, because Game Over and
so would never come, but we must remember that
check for 0 can be in several places.


   Consider a few examples:

# 6000: 21 00 C0 LD HL, # C000; # C000 in HL
# 6003: A6 AND (HL); checkboxes
# 6004: CA 00 80 JP Z, # 8000; go, if 0


   Remove the jump to the address # 6004.

# 6000: 3A 00 C0 LD A, (# C000); in the Acc of the (# C000)
# 6003: D6 00 SUB # 00; checkboxes
# 6005: CA 00 80 JP Z, # 8000; go, if A = 0


    Remove the jump to the address # 6005. Very often
instead of SUB # 00 meets SUB # 01 and so
2 killed as soon hare - deducted
life and verify the equality to zero. In this case,
need to put SUB # 00 instead of SUB # 01 and
life will be eternal.



                   METHOD 3


            SEARCH THE REDUCTION OF LIVES



    You can also search the subtraction of any
cells, among them may be and subtraction
life. Subtraction can be performed by any
teams subtraction, for example: DEC N, SUB N, where
N - A, B, C, D, E, H, L, (IX +??), (IY +??), HL,
DE, BC. But there are more perverted methods:

# 6000: 2A 00 C0 LD HL, (# C000); in HL from memory
# 6003: 11 January 2000 LD DE, # 0001; how much to take away
# 6006: ED 52 SBC HL, DE; decrease in HL DE
# 6008: 7C LD A, H; rather than 0 if we
# 6009: 5B OR L; in HL?
# 600A: CA 00 80 JP Z, # 8000; if 0, then

                              ; Game Over
# 600D: 22 00 C0 LD (# C000), HL; otherwise continue.


    Need to put # 00 at # 6004. A
some do more unusual:

# 6000: 3E FF LD A, # FF; life in the L, # FF

                              ; In Acc
# 6003: 85 ADD A, L; increase in L

                              ; A =- 1
# 6004: 32 00 C0 LD (# C000), A; return Acc

                              , In (# C000)

    In this case, you can put # 00 at
# 6001 or at # 6002.



                   Method 4


         USING THE FEATURES OF THE GAME



    Many games are added lives
for anything, so you can find them to add. A
if we know that life can not be greater than N,
we can find a test for this number to identify
cell from which it is taken and move on to the method
1, for example:

# 6000: 3A 00 C0 LD A, (# C000); in the Acc of the (# C000)
# 6003: FE 09 CP # 09; check = 9
# 6005: CA 00 80 JP Z, # 8000; leave if = 9


    The cell to which treatment should be sought -
(# C000).


    Often the number of lives (the number of weapons, shots and
etc.) represented by numbers. You can find a place in
program where they are printed. Consider
several options:

# 6000: 7E LD A, (HL); download of A (HL)
# 6001: D6 01 SUB # 01; reduced Acc 1
# 6003: 27 DAA; decimal korretsiya
# 6004: CD?? ? CALL PRINT; procedure call

                             ; Print
# 6000: 7E LD A, (HL); download of A (HL)
# 6001: C6 30 ADD A, # 30, # 30 add to Acc
# 6003: CD?? ? CALL PRINT; procedure call

                             ; Print


    In the second example, we add # 30 to the Acc and
obtain an equal number of ASCII code of the number and
print as plain text message. In this
case to look for numbers in the HL.


    The meaning of the following method is to find
places where the printed inscription Game Over (or any
another that indicates the end of
game). It is likely that somewhere near
is testing a cell to zero.
If not, then keep searching.



                   Method 5



    This method is the so-called shock therapy or
method of "educated bet" is used with success
our science for 73 years. It is used to
Digging games in which absolutely nothing to
catch. Most often this game with a graphical
indicator of life. This method is based on
your intuition and is the creation of
artificial clue: you "eat" in the monitor
Listing games and relying on intuition change
certain parts of the program, taking responsibility for
In your opinion, for life, the attempts, things, etc.



    It must be noted that the above listed
addresses and examples of purely conventional. In your game, 
these Address modut be different, there is more: these

examples may overlap in the most bizarre
combinations.



                     *


All rights to the publication of this article belong
Company `WELCOME ', St. Petersburg, 1996.





Other articles:

Turbo Assembler 3.0 - a full description.

FAQ.

Contest - a competition to "boot" of the year.

News - News from the firm WELCOME.

News - an overview of the computer press.

Ads - offer to lords programmers.

Editorial.

Guide - entry.

Guide - Game Academy (Academy).

Guide - Game Last Battle (The Last Stand)

Guide - Game Lords of Midnights (Lords of Midnight)

Guide - Game Stiflip & Company (Stifflip and company).

Guide - Game Where Time Stood Still (Where time stood still).

Spekutrum inside - logic elements.

Programmer's Reference - in search of eternal life.

Programmer's Reference - the entry point to the TR-DOS.

Directory - entry.

Big Brother - CD-ROM

photoscope - pictures of readers.

Humor - the fate of the resident, or a spider's web over the country.


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

Similar articles:
FAQ YOU! - We continue to acquaint you with the work of bourgeois artists.
Exam - the end of parsing the game "They Stole a Million".

В этот день...   6 May