Deja Vu #07
31 декабря 1997
  TR-DOS  

CODING - Adapting programs to TR-DOS (load levels)

<b>CODING</b> - Adapting programs to TR-DOS (load levels)
AY-Track: (C) Mitchell / Mitchell House
__________________________________________


(C) Sergey Kolesnikov
__________________________________________



   His short note I want to fill the gap: Beginner or 
inexperienced sinkleristy often want to do something

on his favorite SPECCY, but just do not know, but how to do it 
... Literature on Spectrum is small, and in the province in 
general not there are only e-journals.


   I will focus on the problem of full disk versions of games, 
especially adventyurnyh. So how many walks in the country of 
so-called "Disk" version adventyur that are loaded with great 
drive and want to save the state, you get a slap in the form 
"START TAPE AND PRESS ANY KEY"! And especially resent the fact 
that the screen saver flaunts "DISKED BY ..."! - ((


   First of all, I warn you: if you consider yourself cool by 
the encoder or an experienced programmer, you can not read 
further. You do not need it and not interested. I address this

material inexperienced (like me) fans and fanatics SPECCY, and 
I encourage all take an active part in the exchange of 
experiences. I think it will be very, very interesting

many. Still, most spektrumistov
- It's not cool coders, and the ordinary nick ...

   I have repeatedly had occasion to do
full disc version, and I always
liked the game, made one beysikblokom with shipping status "in 
the body of the program." You can certainly make a shipment to 
different files with the given name before saving, but it's a 
bit complicated and requires more or less good knowledge of 
assembler (Because it will have to look at the program entry 
procedure for the line). 

   If someone does not know what exactly
begin, tell: have to begin search
program procedures to tape and tape loading. The procedure 
entry point record mostly CALL # 04C2, CALL # 04C6 or CALL # 
04D0. Thus, you have to drive by the doctor or shadow 
businesses Scorpion (If you have SCORPION), found in the program

a sequence of bytes:


     # CD # C2 # 04, or

     # CD # C6 # 04, or

     # CD # D0 # 04.



   If you find one of these sequences, you can define the 
parameters of the delivered code block. In the register IX will 
start shipping address, and in case DE - block length codes. 

   For LOAD is most commonly used point
entrance to the ROM CALL # 0556, is still CALL
# 0802, CALL # CALL # 0562 and 0761.

   Here the sequence to search for these:


     # CD # 56 # 05, or

     # CD # 02 # 08, or

     # CD # 62 # 05, or

     # CD # 61 # 07.



   Now that you have found the program procedures for storing 
and loading carefully review the program. If it loads and works 
with the addresses of at least 24,500, it's all right: you can 
use procedure ROM entry point # 3D13. If

The same program is loaded with a smaller address
or after loading throws himself on
lower address, you must use a special driver disk, because 
appeal to the system variables, using the entry point # 3D13, 
will be impossible. 

   They are quite a lot, but I usually use the driver Alekseeva 
(ZX-REVIEW 4 / 1995 city). And although it has a drawback (only 
works with a floppy drive "A"), it takes 131 bytes, and I take 
them a long time successfully. 

   You need to find a place in the program for
placement of the driver, write back its code block and remember 
the address for future reference. The procedure for recording 
on the disk will look like this: 


     LD HL, the load address

     LD BC, # NN06

     LD DE, (TREK / SEKTOR); to write

     CALL # 3D13; (or the address location

                  driver)

where NN - number of sectors, which will
         children saved or loaded.

   About TREK / SEKTOR: As you know,
when loading the program in the system variable # 5CF4 stored 
value of the first sector and a track on the disk from which 
loaded the program immediately follows the it.


   I do so. In a code loader program, just before its launch, I
build in such a construction:


     .......

     LD HL, (# 5CF4)

     LD (# nnnn), HL

     JP ... - Start the program.

where nnnn - the address where the stored value
            of the first free sector
            pa / track (so find a pair of

            bytes of free space where no-
            whether the program).

   Suppose you have stored on the
ROM 250 bytes, ie, 1 sector. Hence,
immediately after the program write a
code block length of 1 sector. Thus, when you write to disk
state of the game, its location on
drive you can always take a memory cell with address # nnnn. 
Just like all brilliant! -)) 

   The procedure for recording on a disc similar to the above, 
just in case BC should upload no # NN06, and # NN05.


   And now I want to tell a specific
case report. I did a disk version of the game "ADVENTURE B - 
INCA CURSE". That interesting: there remain two code block 
length of 49 and 41 bytes. I have written to the disk 
immediately after the program two code block length of 1 
sector. There was a theme for thought: Well, the address of the 
first block, I know of those cells that retained the boot

program, and how do you know the address of the second unit? 
The answer was simple. Here's how I save / load the second 
block: 


     ...........

     LD DE, (# 9900), the address of the cell, where

                   , The value stored

                   ; # 5CF4 for the first bl.

     INC DE; be increased by unity
                   , Zu, because block length

                   ; Codes 1 sector.

     LD HL, # 7724; address boot. 2 blocks.

     LD BC, # 0106, record 1 sector

     CALL DRIVER; appeal to driver

     ..........



   Well that's all! I wish all success and convey greetings to 
everyone who knows me! 


            Sergey Kolesnikov



          355042, Stavropol,

           ul.Dovatortsev 53/2-8




Other articles:

Aperativchik - On the control of the shell DEJA VU

Aperativchik - New Issue DEJA VU ...

Topic - The reality of the association AMAZING MAKING SOFT.

Topic - My Choice - PC.

Topic - Absentee virtual festival in Poland - Complex Compo.

Topic - Chronology of Spectrum in the USSR / CIS.

drop of solder - Reserves ZX-Spectrum.

drop of solder - Connecting the SMM to the ZX-Spectrum-y.

drop of solder - Wiring 1Mb pin SIMM to a computer such as the Pentagon.

drop of solder - More RAM: the cache.

drop of solder - The emulator ROMs for the computer ZX-Spectrum v1.0.

drop of solder - Finalization of the Pentagon to work with high-density disks.

SOFTWARE - New demoscene: ENTER the MIND, LOST MEMORY, PARANOIA, GARLIC RESPIRATION, CRAZY LOVE, MORBID VISION, AIR SPACE, REFRESH, TV-X, HIGHER STSTE.

SOFTWARE - New game programs: ADMIRAL demo, KOLOBOK ZOOM 2, HOMER SIMPSON IN RUSSIA, THE BLACK RAVEN 2, BOOVIE 2.

SOFTWARE - New System Software: UNIVERSAL VIEWER v1.0, MODERN WORD v1, GLOBAL COMMANDER v1.21, BEST VIEW v2.4, REFRESH OPTIMIZER.

SOFTWARE - Complete walkthrough "Mirror".

SOFTWARE - plans to build ELITE filled with graphics.

CODING - DITHERING - dithering as it is.

CODING - The printing of tektstovyh lines of BASIC.

CODING - Adapting programs to TR-DOS (load levels)

ANOTHER WORLD - PENTIUM II Xeon - high-speed version of the processor.

ANOTHER WORLD - wrangle (about the magazine AMIGA RULES).

ANOTHER WORLD - The case of Moscow Hacker.

Hall of Fame - Excerpts from a conversation on the second day of Fun Top-98: Alex (R), Kano, Boss, Mitchell, Daniel, Serzh.

Hall of Fame - An Interview with XPEh.

Hall of Fame - What is the creator of Tetris is engaged in MicroSoft.

Hall of Fame - Crime - a hit by Triumph: the history of the Spectrum in Chelyabinsk.

Hall of Fame - Presumption of innocence: the illegal distribution of the magazine.

Hall of Fame - Irish Stew (demos of programs).

Hall of Fame - VIRTUAL TR-DOS - what is it? (On the Internet site). News.

Hall of Fame - No comment.

Hall of Fame - On the intro and demah, etc., that you can not do cool.

Hall of Fame - On CD-ROM project from the city of Kemerovo.

Seven and 1 / 2 - Fun Russian radio.

Seven and 1 / 2 - Jokes about programmers.

Seven and 1 / 2 - VIRTUAL-but AMIG-LIMITED syndrome VI or Siberian nuggets: Adventures Kemerovo spektrumistov.

attempt at writing - An excerpt from the novel: Labyrinth of Reflections.

attempt at writing - Poems Bazhenova: pent, ponimaesh-sh-NIL ... reasons to rejoice a bit early October rain, cold ..., REMEMBER!, Loneliness, Waves splash over poop ... ozhdayas, we are here and die ... At perekretke two worlds.

attempt at writing - Notes by the Editor.

attempt at writing - The Nine Lives of Clare.

Advertising - Advertisements and announcements ...


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

Similar articles:
Fantasy - A Tale Strugatsky brothers' "The Way to Amalthea.
Notes programmer - univkrsalnaya library for working with graphics from Vyacheslav Mednonogova - Graphic Library v1.1
Events - Global Report: 4 th International Festival of Computer Art "Chaos Constructions 2004.

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