ZX Format #06
29 июля 1997 |
|
Programmers - the exchange of experience: programming Multicolor effects.
Manufacturing multicolor music by DNK (C) MIK. VIRT GROUP. _______________________________ This article is a direct logical continuation of the previous dedicated to curb the effects. Therefore, for the best understanding set out below, I advise you read the previous article. Part of the first and only. Multicolor can be defined as such presentation graphics, and which with the help of software tools achieved in obtaining a familiarity more than two colors. Note: Please note that receipt of more than two colors within the byte owned by familiarity, nevozmozhmo by the following type of technology. Now it's time to move to a description of the technical side of multicolor. As I noted earlier, the principles of the curb-effects and multicolor similar. The most problematic is fixing them in time. The very existence is based multicolor on the fact that the construction of each line the main screen, ULA (group Chipset Responsible for graphics output) re- reads the information from the attributes and If, after the construction of a fragment of the screen, before the start of construction of the next line replace the data describing these lines, then the next line will be constructed in accordance with new data about the attributes. So, in order to obtain multicolor, you need to make the following steps: 1. Wait for the signal INT. 2. Pause before the start of construction of region of interest (on actually lower at the time that you necessary to transfer the necessary information In the Attributes). , 3. Wait until you have replaced the attributes will be built. 4. Throw in their place the new data. 5. If necessary, pause = When you build a single line - the time spent on items 3 and 4. 6. Cheerfully proceed to step 3. 7. Do something useful. By tradition, will not clog your head empty writings, and immediately move on to the suit. Arrange in a multicolor line of zero ,0-5 familiarity. ORG # 8000 DI LD HL, # BE00 LD DE, # BE01 LD BC, 256 LD A, H LD (HL), # BF LDIR LD I, A LD A, # C9; Processor LD (# BFBF), A; interrupt IM 2; command RET MAIN EI HALT DI LD A, 63;! LOOP1 DS 52, 0;! DEC A JR NZ, LOOP1 ; Loop waiting for constructing ; Border, the time depends ; The type of computer LD HL, DATA LD A, 8 LOOP2 LD DE, # 5800 LDI; 16 LDI; 16 LDI; 16 LDI; 16 LDI; 16 LDI; 16 ; Transfer attributes LD DE, 0 ; No significant team ; Needed something to spend ; Time DS 23, 0;! , Waiting up to 224 cycles (for , So most Comper ; Building line. DEC A JR NZ, LOOP2 LD A, # 7F IN A, # FE RRA JP C, MAIN IM 1 RET DATA DB ...... ; Data about the attributes. All time delay in this example made under the Scorpion. If you have another type of computer you'll have to choose the numbers in the rows marked with (!). Actually, that's all you can say this issue and I hope that you will be able to apply this knowledge. _______________________________
Other articles:
Similar articles:
В этот день... 21 November