ZX Format #03
29 февраля 1996

Programmers - Matching games: the adaptation of programs to disk.

<b>Programmers</b> - Matching games: the adaptation of programs to disk.
   ADAPTATION OF PROGRAMS ON DISK


        FOR BEGINNERS.


(C) Aksenov, AM 1996

________________________________



   A small introduction.

   This work consists of two
parts. The first part will discuss disketirovanii most simple 
programs. In the second part I try to highlight some

complicated cases and will discuss 128
games. Furthermore, in addition
to "Adaptation Program ...", in
Section programmer has more
two articles - on private codes and
how to become immortal.


        ________________



          Part One


              ____



       Adapting programs


  with beysikovskim loader.



   I assume that the reader has
a glimpse of BASIC, so if some combinations of Latin letters in 
the text You seem unfamiliar - put this little article, and 
good enough to read the manual programming. For the motion

the path of least resistance, I would highly recommend you buy 
any copier ribbon - disk, for example, P. Copier or

L-COPY and program type DISK

DOCTOR (you could buy in
LOGROS'e, and as "doctor" - suggest using conver commander). If 
you do not none of the above, no

trouble, you can do without it.

   As you probably noticed
Almost all big programs consist of several separate parts. The 
first - a relatively small, always having kind of basic-file - 
the boot loader. Next, you may go to a file containing saver, 
or just the program codes. Code files can be few.


   All code files should be
written to disk. For convenience,
Work back and rewrite the boot loader. If you have a special
copyist, then this operation is not
cause problems. If the copyist is not, then you can overwrite
implemented as follows:

1. ship the tape copier.

2. download an adaptable program copyist.

3. write in a notebook the length and
load address (starting address) of each file.


   It should be noted that the load address contained in the 
header file, the same place where the name.

If the file has no header then
a slight problem with the
writing to the disc and a large boot with a remake - "headless" 
file always mean that loader is written in code.


   If everything is in order, then
produce the following items of:
rewind the tape to the beginning of the file;
type LOAD "name" CODE (name -
file name that you rewrite). I recall that the input
line must be terminated by pressing the "enter". Start the 
film. If you receive a message OK, then enter the



  RANDOMIZE USR 15619: REM:

   SAVE "name" CODE start, len

start - start address; len -
length of the file. If the file is
screensaver and the startup is displayed on the screen, then 
copy it with such programs from:


10 CLEAR 25000: LOAD "name" SCREEN $
20 RANDOMIZE USR 15619: REM:

   SAVE "name" CODE 16384,6912


   It should be noted that the name is not
should be no longer than 8 characters,
and work better in BASIC-48. If you are able to copy all
program files (you can assume
that you were lucky), then it's time to start the loader
(Which can cause problems, I'll describe later). Try
booting the team
MERGE "". There are several possible options, for example, the 
computer resets or freezes. A could and say "OK." If the latter 
does not happen, then do this: type LOAD ""; for booting and 
then stop the tape, then press BREAK. If this computer

do not hang or reset, then
maybe you will see a listing
program, which will look something like this:

10 BORDER 0: PAPER 0: INK 7: CLEAR

    24999: LOAD "name1" CODE
20 LOAD "name2" CODE
30 RANDOMIZE USR 55000


   Here we should pay attention to the commands relating to
loading, ie LOAD "...". When
work with the tape loading produces programs that are in
ROMs that are accessed by the command LOAD. To the disk you 
want to program located in another part of the ROM.

There is a transition team RANDOMIZE USR 15616. For
that after the transition to
part of the TR-DOS ROM immediately executed command, you must 
apply combination of the form:



  RANDOMIZE USR 15619: REM :...,

where, after REM is required
command (eg, load). So
way that the above
loader worked with the disc, its
should transform as follows:

10 BORDER 0: PAPER 0: INK7: CLEAR

    24999: RANDOMIZE USR 15619:

    REM: LOAD "name1" CODE
20 RANDOMIZE USR 15619: REM:

    LOAD "name2" CODE
30 RANDOMIZE USR 55000


   After that should come in
TR-DOS (RANDOMIZE USR 15616) and
type SAVE "name" LINE 10. It is important
remember that when referring to
drive after REM: could be
Only one team, which
should be the last in a string
otherwise the program will work
wrong.

   If all these steps
was carried out without difficulty, the work is finished and you
can safely run the game with
disc.


   Now - the problem that
can voznikut.

   You can not get the OS
thought-listing program. If this has happened due to the fact 
that program is not loaded by the command

MERGE "" or reset to
BREAK, you can try to do: enter the title of
long program, change
cassette and load the part
bootloader that comes after it
header (put it more simply - to replace the title on the title 
of a longer program). If

You do not have a longer program, do it yourself - for example, 
type a dozen lines of type: 

10 PRINT "(there are many tamp

     spaces) "

and ship the program to
tape command SAVE "name".

   After the download the computer will return "tape loading 
error". Do not worry, it should be.

You can then try
view listing. As a general rule, if you have to resort to
such harsh measures, the listing
will, at best, difficult to read. Porobuyte type LIST.
Maybe after that you do not
see text, but make sure
get some soobschenienaprimer "OK" or "invalid
color ". Then try to enter
LIST 1, or LIST (any number
more than the first row).
It is possible that you will see a normal listing. If you see a 
meaningful text, we can easily adapt it to the disk. 

   If any of the lines seen
only the number, and after - the emptiness, or a line that does 
not visible characters, then it is likely

likely means that the text
there are "control characters", ie
numbers that determine the parameters
print text on the screen (for example - the colors of ink and 
paper). Naturally, if the text is displayed in ink color of the 
paper, the it is impossible to read. Call the row for editing. 
If this machine will be humming thoughtfully, then enter the 
POKE 23608.1. Calling the string, you can

try to erase these insidious
codes as a simple character in the string. To do this, turn on 
the sound louder and move the cursor, listening to the clicks. 
When an "attack" on the control symbol, the cursor does not 
move on screen until the code is not passed, but each time the

on the cursor key clicks (this is the change of address, which 
indicates cursor). So, finding the code, make two "click" for 
him and then press DELETE.


   Zaterev code, you can see the text, and can not see, as is 
usually put a lot of codes and erase the need to everything.



   There are a few more simple
ways to get meaningful
listing.

   The simplest: to rewrite the boot disk, run disk
doctor, and then type open
file. And this team is usually given by pressing the buttons 
"O". Naturally, the query name file, enter the name under

which you copied the boot. File type - B (basic). Open the file 
type "B". As a rule, in response to the doctor gives you a 
listing that has meaning. Rewrite it in your

"Autopsy". If the listing of any number is a number in brackets 
(some doctors secrete a number of still and color), then 
overwrite the contents of the brackets. As an example, consider 
the following line: 

30 CLEAR 0 (24499): POKE 23874

    (23,874) 0 (0): LOAD "sw.1" CODE

    50,000 (16 384): RANDOMIZE USR

    60000 (16384)


   Your protocol should be
says:

30 CLEAR 24499: POKE 23874,0: LOAD

    "Sw.1" CODE 16384: RANDOMIZE

    USR 16384


   Another way: Use
copy-copy or any similar copyist. Get the boot in
him to erase the control codes and
ship program back on
tape. For such an operation is useful to know that the string is
the following structure:

NN.LL._______.13.


Here NN - two bytes that make up the line number; LL - two bytes
string length; ____ - actually
contents of the string and the number 13
(# 0D) - newline
(Enter). Control codes:

7 - ""

8 - Backspace

1916 - ink

17 - paper

18 - flash

19 - bright

20 - inverse

21 - over

22 - AT
23 - TAB



   By the way: and with the help of doctors, and using the 
copy-copy can be view the text of the program on

Codes teams, but here it is necessary
Prestressing little brains, so
as is necessary to distinguish - a
code is a command, and what
just the same meaning
thereof. For this it is useful to remember
structure of the line and one subtlety, which deals with 
representation of number in BASIC. I remind you what's salt: if 
the number of line indicated as follows:

CLEAR VAL "24999", it means
that the operator holds CLEAR
at 24,999, but if you can see, for example, CLEAR 24,999, this 
does not mean that in this If the operator has an argument

24999. When the number is not
operator VAL its codes appear
as follows:
_____.# 0E._____.


here the first few bytes -
this form of symbolic codes
(Ie what you see on the screen); # 0E = decimal 14 -
prefix that divides a character
form and five bytes of digital values, the last 5 bytes define 
the true meaning of the numbers. The third and fourth bytes 
after determine the module prefix number.

You can just say that if
this view did not find any LOAD, then the loader is implemented 
in the codes. On Code bootloaders I'll explain later. 

   Now turn to the problems
Copy files to disk. Such problems, perhaps only three:
very long file, invalid
byte parity and poor starting
address (with manual copying).
The latter is expressed in the fact that
After downloading the file, or reset the machine hangs. Avoid
this is very simple - just
upload a file from the LOAD "name"
CODE adr, previously running CLEAR "adr-1", where adr - the 
load address. Address can be taken not less than 24,400, or 
machine will take time off from work all

available to her means. When
This file may be too little space - a problem
number one - too long
file.

   Case with the wrong byte parity arises from the fact that
try to use the copier ready tape drive at the end
download you get mail
type of load error, but
program normally works with
tape. If the program does not work with tape, this means that
there's just a bad record. With this
You can only fight hardware methods.

   Record with bad byte parity used in almost all
cassettes studio "MASTER". Circumvent
this problem can be rewritten
program on the tape copiers
TF-Copy 2 (if all files have
headers) or OMNY COPY, or
use the copier ribbon -
drive TD-COPY. This copier
can not ignore
for errors, but makes files that are loaded slowly. Last resort 
- rewriting by hand, with the substitution of the title. Header 
is as follows: type SAVE "name" CODE 1,65535 and record only 
the header. Name can be anything, but when booting

File recommend doing so
this: score CLEAR 24499,
Further - LOAD "name" CODE 24500,
After the download you will see
"Tape loading error", then
dial


  RANDOMIZE USR 15619: REM:

   SAVE "name" CODE 24500, len

len - the length of you, of course, do not forget to write in 
the report. By the way, sometimes it can be copy and headless 
files. 

   Especially for those who are lazy to resort to the above
method of application included
My program that can
a little easier overwrite files uncomfortable. It's called
"-" Master "and may the following:

1. rewritten in normal form
files from the lost parity (sometimes not too good record
works, but does not go to copier)
2. overwrite the files from the tape
Studio Master (those on which
made the first attempt to protect against
copy, which prevents the rewrite their copiers tape drive)
3. sew headlines to headless files (all files will be
have a type "C")


   Programm works with single pieces of information, ie
downloading any part of you
will need to write it. Wrote
She, of course, only on tape. The controls are very simple -
First, determine the mode
work, and then - just click on "enter", not forgetting to swap 
tapes. For the synthesis of headlines on the issue HEADERLESS?

reply "Y", if you do not need hemming headlines, the "N". When
work with "secure" cassettes
The second question to answer "Y". In
the latter case will be cut
an extra byte (the last), which
and makes a mistake in the copyist work.

   I warn you, that this product has been written about
40 minutes, assuming you are debugging, so if it will give 
glitches - please do not swear. But this can programmke

train wash control codes.







Other articles:

IS-DOS - "IS-DOS - for beginners" No 3

IS-DOS - "Window System IS-DOS".

IS-DOS - "object module format *. obj IS-DOS assembly language."

IS-DOS - "The format of the table of local symbols IS-DOS assembly language."

Authors Journal - ZX-Format No.3

Iron - Bugfix TR-DOS.

Iron - a new sound card: General Sound.

Iron - a new model of the Spectrum: Scorpion ZS 256 Turbo +.

Iron - on turbirovanie Spectrum machines.

Iron - an overview of modems for the ZX Spectrum.

Iron - The bus architecture of the Spectrum (concept).

Toys - "Last battle" (The Last Stand) a detailed description.

Toys - 48 irons (second level).

Toys - a dozen of the most sold in St. Petersburg.

Toys - description of the game BATMAN-II.

Toys - What's new: The Light Corridor, Jonny Quest in Doctor Zins, Bedlam, Bubble Dizzy, Navy Seals, Pirates.

Contest - a competition for computer anecdote.

Lottery - a lottery for the readers.

From the authors - the third edition of the journal.

a rest - Hu, user, wait!

a rest - glyukodrom: Most ERRORS.

Help - Another treatise on ocherdnoy obolchka and beyond.

Mailbox - discussion.

Mailbox - Translator.

Mailbox - letters from readers.

Premiere - TASM 4.0 (Turbo ASseMbler for ZX-Spectrum 128k)

Premiere - The Adventures of Winnie the Pooh.

Programmers - Basic to all number 3.

Programmers - Matching games: the adaptation of programs to disk.

Programmers - Matching games: zykrytye codes.

Programmers - adapttsatsiya games: immortality.

Programmers - assembler: Excursion to the anatomy of the ZX

Miscellaneous - Amiga: questions and answers.

Miscellaneous - Amiga: news.

Miscellaneous - Prospects for P / O.


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

Similar articles:
System - program management of the "upper" memory.
Presentation - All programs: Inter Mode Player v1.1
Humor - Anecdotes.
Interface - Description of the game "Smagli-2.

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