Born Dead #05
06 января 1999

Coding - Ultra fast procedure chank'i to planar screen.

<b>Coding</b> - Ultra fast procedure chank'i to planar screen.

                   CODING. FAST C2P PROCEDURE


(C) Monster / Sage Group


  And again on chank'ah. You have probably noticed in the intro 
to the newspaper quite quickly (> 25 frm / sec) bump mapping on 
the entire screen. So a speed effect was achieved by

sly c2p protsedurki about which I tell you.

  I shall warn this protsedurka takes a minimum of page
memory, speed requires sacrifice :-)


Ultra fassst procedure chanky to planar screen (c2p):


  Bytes from the buffer for each c2p chank'a has the form - 
11xxxx00, where xxxx - Brightness chank'a, 11 - 2 bits of the 
address table jump'ov. 


  Table jump'ov looks like this:

# C0C0: JP ADR_ # 00 # C4C0: JP ADR_ # 10 ... # FCC0: JP ADR_ # 
F0 # C0C4: JP ADR_ # 01 # C4C4: JP ADR_ # 11 ... # FCC4: JP 
ADR_ # F1  ... ... ... ...

# C0FC: JP ADR_ # 0F # C4FC: JP ADR_ # 1F ... # FCFC: JP ADR_ # 
FF 


ADR_ # XX: LD H, D; # xx - 6 lines sprite pair chank'ov

         LD (HL), # xx; draw the line 0

         INC H

         LD (HL), # xx; 1

         INC H

         LD (HL), # xx; 2

         INC H

         LD (HL), # xx; 3

         INC H

         LD (HL), # xx; 4

         INC H

         LD (HL), # xx; 5

         INC L

         RET NZ; 99 +10 (jmp adr) = 109 cycles per couple


         LD A, D; for mezhsegmentogo screen transition

         ADD A, E

         LD D, A

         RET

                         , 83,712 cycles - full screen!

SP_ indicates the beginning of c2p screen buffer
HL_ # 4000 beginning of the screen or # C000 (if the table 
jump'ov to # 8080) DE_ see below



  The procedure for drawing buffer chank'ov on the screen:

C2P_DRW LD (C2P_RET +1), SP

         LD SP, C2P_BUF

         LD HL, # 4000

         LD D, H

         LD E, 8

         RET
C2P_RET LD SP, 0

         RET


  And do not forget to put the end of the buffer address 
C2P_RET udachvozvrata for the procedure. 




Other articles:

Coding - Ultra fast procedure chank'i to planar screen.

Coding - Glitches in emulators. Features emulation processor Z80.

Games - Game Description Homer Simpson in Russia.

Games - Guide for the passage of "The Mirror" - for those who are stuck, have not yet started to play.

Hihts - Fun with buttons in the demo: Shit 4 brains, Blame, Voyager 2.

Entry - The plans of the newspaper.

World Amiga - Amiga eyes RRA (Part 1).

News - new website - Virtual TR-DOS.

Application - Professional Tracker v3.4 remix.

Advertising - Advertising and announcements.


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

Similar articles:
& Support - Service & Support novelties.
piece of iron - A global scheme radiodatchika powered by batteries for electronic watches.
Editor - Today we tpidtsaty anniversary edition.
solid jokes - Tale of brave programmer king Megaflope and villain Polinorfe.

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