Power #02
29 сентября 1996

Programming - how to adapt to the disc program with loadable levels.

<b>Programming</b> - how to adapt to the disc program with loadable levels.
                 TIPS NACHINAYUSCHEMY Hacker


(C) T.A.W.


   Hello Young Hacker! Today I'll show you how you can adapt 
the program to disk with loadable levels. 

   Suppose you have a cassette version of the game with two 
loadable levels. 

The structure of the game:

pic 16384,6912-figure toys
cod 23296,40000-main block toys

level 1 00001.25024
level 2 00002.25024

If you notice that the country-level address, it explains the 
fact that they konroliruetsya level number that is in the 
loader level from the tape is: 


    LD IX, 39488 (address boot block)

    LD DE, 25024 (length downloadable level)

    LD A, 1 or 2 (entered into the program)

    SCF

    CALL 1366 (this address is not obligatory, because it may 
have its own 

                 procedure)

    RET


I think you will find no problems with the debugger
boot level. (Assume it starts at address 64512.)


    Now we write a procedure for sector-based boot disk
without the use of system variables:


        ORG 64512

        LD A, 1 (entered into the program as the cassette zag
                      ruzchik.)

        CP 1

        JR NZ, LOAD If no level is the 1 st then just ship,

        LD HL, (LEVEL1) and if the 1 st then submit it TRSEC

        LD (TRSEC), HL
LOAD LD HL, 39488

        LD B, 98

        CALL LOADER

        RET

LOADER DI

        LD C, 5

        LD DE, (TRSEC)
M0 PUSH BC

        PUSH DE

        LD C, D

        SRL C
DRV LD A, 0 (drive A, B, C, D)

        JR NC, LO1

        OR # 2C

        JR M1
LO1 OR # 3C
M1 LD IX, 8179

        CALL DOS

        LD A, C

        LD C, 127

        LD IX, 10835

        CALL DOS

        LD A, 24

        LD IX, 12227

        CALL DOS

        POP DE

        POP BC
M3 PUSH BC

        PUSH DE

        LD IX, 12059

        CALL DOS

        POP DE

        INC H

        INC E

        BIT 4, E

        JR Z, M2

        LD E, 0

        INC D

        POP BC

        DJNZ M0

        JR EXIT
M2 POP BC

        DJNZ M3
EXIT LD (TRSEC), DE

        EI

        RET
DOS PUSH IX

        JP 15663

LEVEL1 DEFB # 00, # 00

TRSEC DEFB # 00, # 00


        DEFM "THIS TURBOLOADER WRITTEN BY T.A.W. 4 U!!!"



   Well, now we write to disk Fail in order, but
before starting the main unit do not forget to put on a variable
LEVEL1 value of 23,796, and in Pemene DRV +1 value of 23,798.
It is accordingly TRSEC first level and the number of working 
drive (A, B, C, D). 


   When using this driver, format the drives in the FAST
ADS 2.0i.

Well that's all, it's time proschatsya.Po All questions to the 
newspaper * POWER * marked FOR TAW ! 


                              27.09.96 pm: 12:45:39





Other articles:

Thoughts on - demostroenie promotes technologies Programming ZX.

Programming - how to adapt to the disc program with loadable levels.

News - Spectrum World of Tomsk city seems went into hibernation.

Attention! - call for help to everyone who reads this.

Presentation - Game "THE ROCKY HORROR SHOW".

Advertising - The newspaper POWER waiting for your letters.


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

Similar articles:
Ottyag - A useful about sex.
Interview - Interview with AIG - coder from the group MKHG.
Advertising - Advertisements and announcements ...
Toys - the game description The Crypt (Castle Master 2).

В этот день...   29 April