MULTICOLOR AND CHUNKS ON THE BORDER (C) Nikolay Vitenko (VNN) (C) Denis Tokarczuk (DWT) K.S.SoftWare ------------------------------------------------------- The beginning of the story One bright winter evening in 1999 yes, when there was a white snowball on the ground, I (DWT) was sitting in ZASM and preparing the next codes for a failed project called "ZX-Press #2". (Quit ZASM! Pe- go to ALASM, since you have increased your memory in computer Note. ed.)Yawning again and Having opened my eyes, I noticed how my dem LED - it meant that someone the other end of the line is calling me. Not for a long time I load the terminal MMD v2.20 and I observe several interesting phenomena in the process of docking and reading the catalog. B once again happy for us, "pro- advanced" computer scientists of the native Carlo- Marksovo (we have telephone linesterrible, therefore, happiness to communicate in real-time mode Not everyone has a me-terminal, but we have spektrumistov, a special line that we did it ourselves (!!!!), I typed the following - more: "Who's there?" To which they answered: "This is VNN. Hello, Denis! I'm here for something I made it, if you want, I’ll throw it off. You'll be surprised very much, I promise." “Another multicolor on the border?”, - Yawning again, I typed on the keyboard. "Almost, but this is something new!" I'm wary - if VNN says that new means it's really NEW! On it's worth watching. In short, VNN dropped I need MASM's source code... Get to the point After a short lyrical digression, Now let's start looking at the IDEAS of the effect in detail. And it's not that complicated - how they say: “the devil is not so terrible...”. It all comes down to the fact that different colors vye connections (color combinations) through each interrupt is switched (approx. the same as with two screens or jersey lore, though it’s more difficult to implement - ri- poking on the curb is not as easy as on normal screen).Naturally, the frequency Switching colors affects the frequency of measures zaniya, which, of course, is not very pleasant for the eyes :( Now let's do some math. Because on boron dur you can display colors from a palette of 8, then using the above method is very It's quite easy to get 64 colors using overlay in two color combinations. Name- but this is what we will consider (it should be said about side properties of this effect: shift nuv one of the color combinations for 2 so- ta (on the border, 1 tick is equal to 2 pixels) we “cut off” exactly 4 pixels and get a kind of chunk point that can be used call in chunk effects. Now, actually, about the algorithm. New Let's talk about the general scheme: +---------------------------------+ |Place in register pair NN| +->+block address color. combinations 1 | | +--------------+----------------+ | | | +----------+----------+ | |Displaying the block to the curb| | +----------+----------+ | | | +---+--+ | | HALT | | +---+--+ | | | +--------------+----------------+ | |Place in register pair NN| | |color block address. combinations 2 | | +--------------+----------------+ | | | +----------+----------+ | |Displaying the block to the curb| | +----------+----------+ | +---+--+ | | HALT | | +---+--+ +----------<-----------+ The algorithm was specially “deployed” for greater visibility. As you can see, you can obtain a larger palette of colors only by adding new links "***"+"***"+"Halt"... True, there will be a flickering - not in a fairy tale. shut up... Now let's move from theory to practice and let's look at the real code. I'll say right away that the procedure is tailored to the Pentagon - Chinese INT. It is not possible to modify it for your computer. will be difficult, I hope... ;Multicolors border & 4x4 cHunky op bor- ;der. Demo version for Pentagon INT. ;(C) Nickolas -VNN- Vitenko 1999;Listing for ALASM. ORG #8000 DEFS 257,#81 ;table IM 2 ;for unstable ;data buses ORG #8181 RET ;processing IM 2 ;we don't need it! ORG #8200 D.I. LD A,#80 LD I,A ;understood, right? IM 2 LOOP EI HALT ;can be removed for XOR A ;experiments OUT(#FE),A LD BC,403 ;delay until B1 DEC Sun ;started more or less LD A,B ;visible part OR From ;curb JR NZ,B1 LD A,7 ;white border OUT(#FE),A LD BC,6 ;outlined in white B2 DEC Sun; line for kra- LD A,B ;cells. On the brake - OR With ;nyh computers nothing- JR NZ, B2; it’s not visible :( DEFS 6;wasteful, ;but 24 clock cycles Wait LD C,#FE LD HL,DATA1;output program ADDT EQU $-2 ;on block curb DUP 32 ;measurement data NOP ;to address NOP ;in HL. In bars DUP 13; this will be 224. OUTI EDUP NOP NOP EDUP XOR A ;black border OUT (#FE),A ;we add the remaining JP EFF1 ;seating place. ADEF EQU $-2 ;variable ;address hypertransition ;move to EFF1/EFF2 EFF1 LD HL,EFF2 ;address replacement LD(ADEF),HL LD HL,DATA2 LD (ADDT),HL JP PROD EFF2 LD HL,EFF1 LD(ADEF),HL LD HL,DATA1 LD (ADDT),HL JP PROD PROD LD HL,0;cunning method for- LD DE,0 ;holds LD BC,2 IZ EQU $-2 LDIR LD A,#7F IN A,(#FE) RRA ;space - exit JR NC,Stop LD A,#DF IN A,(#FE) RRA ;"P" - increase JR C, KL1; delay LD HL,(IZ) INC HL LD (IZ),HL KL1 RRA ;"O" - decrease JR C,KL2 LD HL,(IZ) DEC HL LD (IZ),HL KL2 JP LOOP Stop DI LD A,#3F ;restore LD I,A ;normal mode IM 1 ;interrupts EI RET ;data of the 1st color combination DATA1 DUP 16 DUP4 DEFB 1,5,2,7,4,3,1,7,4,6,2,5,0 EDUP DUP 4 DEFB 1,2,3,4,5,6,7,1,3,4,6,0,7 EDUP EDUP ;2nd color combination data DATA2 DUP 16 DUP 4 DEFB 0,1,0,1,0,1,0,1,0,1,0,1,0 EDUP DUP 4 DEFB 2,0,6,0,3,0,5,0,1,0,4,0,6 EDUP EDUP And notes.Once you launch above program, you will see the developed stripes of different colors and tenkov, as well as cut-off chunks-points. B this way it’s not very beautiful, so they can be removed using the "O" and "P" keys. Fak- It's almost like manual adjustment of the clocks computer for effect. About another #1 At first it was planned to place it in "Cher- Noah Vorone" two more variants of this effect fect (with one moving vertically range of color combinations, as well as with two- me by moving vertical stripes, but this seemed to us unnecessary for now, and not will prevent you, readers, from experimenting yourself ment. GO FOR IT! VNN has been active and fruitful work on the invention of all kinds multicolor effects like on a border, and on the screen. So, recently he wrote for our new demo, which will be released soon - children (January-February 2001), several parts with border effects, where in one one of them says "ZX" on the curb without all sorts of “squares” and flickering (personally I after viewing this masterpiece for a long time dropped my jaw on the table :). Also un- dependent movement of six "color sprites" kov" along the border! Also in the "assortment" there are many other effects. For example measures, smoothly moving running line like on the border (it also has enough color run). If you are interested, then in the next issue of the magazine we will publish examples of these and other effects. About another #2 People!!! Who has extra (or extra) aligned printed circuit board(s) DMA-card - respond! We are pleased We will buy it (or them) for a reasonable price. Or at least there is a magazine "Radio- amateur Your computer" numbers 4-7 of this year (2000, naturally), where it was published The PCB layout is jubilant. Epilogue If you have any questions or you want to correspond, then write write to us at the following addresses: 86486 Denis Vasilievich Tokarchuk PO Box 1 Yenakievo=19 Donetsk region Ukraine or 86486 Nikolai Nikolaevich Vitenko house 5 apartment 16 st. Jubilee Yenakievo=19 Donetsk region Ukraine P.S. Speccy rulez forever!!! -----------------------------------------
Share your thoughts about the article