Adventurer #12
31 января 2001

Programming - Procedures for obtaining the values necessary for creating something on the boarder or multicolor.

<b>Programming</b> - Procedures for obtaining the values  necessary for creating something on the boarder or multicolor.
     (C) Deadie / HorrorSoft / CPU


     Generally I say the following. While I kodil,
as if he were going HorrorFasTest, my
seditious thought crept into my head about
autoconfig'e for everyone there multicolor'ov
and border'nyh effects. For me so
remains a mystery why demomaker'y
such fixed effects only (mostly)
under two models of the Spectrum (Pentagon and
Scorpion). As many know, for creating something on the boarder 
or multicolor need to know the number of rows (lines) of the 
screen / tpl / and the number of cycles per line (line) / lps 
/. Naturally, based on of these values ​​and constants are 
defined for procedures to display. Here are the most

values ​​can be obtained by using protsedurki stated below. I 
note that the true value you will get only if off turbo mode. 
For a start, give procedure that determines enabled

or off turbo mode:


               ATTENTION!!

  On the authorship of the following procedures

              Do not pretend!

, Identification of the state turbo mode
; Input: -
; O: A = 0 - disabled, A = 1 - on
TURBO CALL INT_TRB

        LD A, B

        CP # 00

        JR Z, TURBOFF

        CP # 02

        JR NC, TURBON

        LD A, C

        CP # 41

        JR NC, TURBON
TURBOFF XOR A

        RET
TURBON LD A, 1

        RET
TRB_INT DI

        LD A, # C3

        LD (# BCBC), A

        LD HL, INT_TR1

        LD (# BCBD), HL

        LD A, # BA

        LD I, A

        IM 2

        LD DE, # 0000

        EI

        HALT

        LD HL, INT_TR2

        LD (# BCBD), HL
TRB_IN3 INC DE

        LD B, # 0F

        DJNZ $

        LD A, R

        JR INT_TR3
TRB_IN1 EI

        RET
TRB_IN2 POP HL

        LD C, E

        LD B, D

        IM 1

        EI

        RET


     And now the most important thing - the procedure
calculation of lps and tpl:

; Calculating count of rows of the raster
, (The lines in the screen)
; Input: -
; O: DE - lps
CLC_LPS CALL IM2SET

        LD A, # C3

        LD (# FEFE), A

        LD HL, LPS2

        LD (# FEFF), HL

        LD DE, 0

        EI

        HALT

        LD HL, LPS3

        LD (# FEFF), HL
LPS1 INC DE

        LD B, # 0F

        DJNZ $

        LD A, R

        JR LPS1
LPS2 EI

        RET
LPS3 POP HL

        CALL IM1SET

        EI

        RET


     Almost all done with Spectrum 312
or 320 lines (for example: in the company
312, at the Pentagon - 320). Extend:

; Calculating count cycles in a row ruling
, (Line screen)
; Input: -
; O: A - tpl
CLC_TPL CALL IM2SET

        LD A, # C3

        LD (# FEFE), A

        LD HL, TPL1

        LD (# FEFF), HL

        LD DE, 0

        LD HL, TPL2

        EI

        HALT
TPL1 LD (# FEFF), HL

        LD HL, TPL3

        EI

        HALT
TPL2 LD (# FEFF), HL

        NOP

        NOP

        NOP

        INC HL

        EI

        INC DE

        JP $ -1
TPL3 POP HL

        POP HL

        EX DE, HL

        ADD HL, HL

        ADD HL, HL

        ADD HL, HL

        LD A, N; N = 0 -312, N <> 0 -320 lines

        OR A; ^ here puts the number of

        LD BC, 156

        JR Z, TPL4; 156 (312) and 160 (320)

        LD BC, 160

        XOR A
TPL4 OR A

        SBC HL, BC

        INC A

        JR NC, TPL4

        CALL IM1SET

        EI

        RET

; Protsedurki install interrupt
IM2SET DI

        LD HL, # FE00

        LD A, H

        LD B, L
IM2SETL LD (HL), A

        DEC HL

        DJNZ IM2SETL

        LD (HL), A

        LD A, H

        LD I, A

        IM 2

        RET

IM1SET DI

        LD A, # 3F

        LD I, A

        IM 1

        RET



     A length INT'a in measures calculated even simpler: tpl * 
lps (only noWAIT SPEC) and all!




       lps 312 320 tpl tpl


       216 67392 69120

       220 68640 70400

       224 69888 71680

       228 71136 72960

       232 72384 74240



     Actually, for the set up
INT'a know the position with respect to the
frame, but more on that in the next episode ...


     Instead, PS: I'm not a coder, so my
speculation about the need autoconfig'a
taken as a theorem, which must still be proved. I hope that my 
guesses all the same and become an axiom, and this information

you are somehow going to help.





Other articles:

From the authors - Opening remarks. Proceedings of the journal BORN DEAD.

Programming - Procedures for obtaining the values necessary for creating something on the boarder or multicolor.

Events - A report by visiting the St. Petersburg party CHAOS CONSTRUCTION'2000 from Programmer & GreenPix.

Events - Hurtman Joe reveals organizational jambs on CHAOS CONSTRUCTION'2000.

Events - A report by visiting the St. Petersburg party CHAOS CONSTRUCTION'2000 from the Paparazzi.

Events - A report by visiting the St. Petersburg party CHAOS CONSTRUCTION'2000 from n00tr0pil.

Events - A report by visiting the St. Petersburg party CHAOS CONSTRUCTION'2000 from Andy Harchenko.

Events - A report by visiting the St. Petersburg party CHAOS CONSTRUCTION'2000 from weIrd.

Events - A list of visitors CHAOS CONSTRUCTION'2000.

Events - A report by visiting the St. Petersburg party CHAOS CONSTRUCTION'2000 from Tangerine / T-Rex / The SandS / Looker House.

Events - FAQ on CHAOS CONSTRUCTION'2000.

Events - Opinion Editor of the CHAOS CONSTRUCTION'2000 (UnBEL! EVER).

Events - Report the main organizer of CHAOS CONSTRUCTION'2000 - Random ^ CC.

Events - CHAOS CONSTRUCTION'2000 as an indicator of prosperity spektrumskoy scene.

Games - Cheats Times of Lore.

Story - Time Learning.

Iron - Plans for a HD FDD drives and discs on the Spectrum.

Ottyag - Entered from the editor.

Ottyag - Why did the sheep better than women.

Ottyag - 10 things you can do .. if ...

Ottyag - A list of useful things about sex.

Ottyag - A useful about sex.

Events - Report on CC'000 (Elf / CPU).

Events - On the shortcomings and deficiencies CC'000.

Letters - Letters to the Editor: Prog Master, Kristoph.

People - info on creative group Studio Stall.

Programs - The presentation of a text editor HorrorWord.

Games - Game Description LUNAR WIND.

Programs - Description of the Music Player MMC Player.

Games - Game Description Mechanic Wars.

Authors - The authors of the journal and photos.

Authors - The list of authors and journal editorial office.

Programs - HEWLE PECKER - home video studio in your home.

Interview - An Interview with CC'000. Editor in Chief ZX Format - Ruster / XL-Design.

Interview - An Interview with CC'000. MADCAT / THE MAD MAILMEN LEAGUE.

Interview - An Interview with CC'000. FREE ART (EX-FATALITY).

Interview - An Interview with CC'000. Vyacheslav Mednonogov / COPPER FEET.

Interview - An Interview with CC'000. Belarusian hangouts.

Interview - An Interview with CC'000. VOLGA SOFT AND OTHERS.

Interview - An Interview with CC'000. MINISOFT / ASCENDANCY.

Interview - An Interview with CC'000. VIRUS / THE HOT HEADS.

Events - Announcement of results CC'000.

Interview - An Interview with CC'000. BRAIN WAVE.

Interview - An Interview with CC'000. RANDOM / CONCERN CHAOS.

Interview - An Interview with CC'000. 4TH DIMENSION.

Interview - An Interview with CC'000. PLACEBO (EX-ETERNITY INDUSTRY).

Interview - An Interview with CC'000. EX-LIGHT FUTURE GROUP.

Interview - An Interview with CC'000. LEGENDARY BORN DEAD CREW.


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

Similar articles:
Kaleidoscope - Overview of Game Software: FENDISH FREDDY-S, BIG TOP 10 FUN, MYSTICAL + 12 levels, WORD LIFE, SQUARDS DENIZEN, ELOPEMENT (BACK TO THE EARTH), MARGO PUZZLE, jackass.
12 secret books - RPG based on the legends and bylyah Ancient Rus.
Entry - the contents of rooms.

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