Iron - circuit and INT corrections.

Oberon #02
ALK'96                                    
                                          
           HOW TO FIX INT?            
                                          
══════════════ ════════════════════════════
Today in the section "IRON" we will touch on
one painful topic concerning (again-
after all!) imperfections of our domestic
ny schemesSPECTRUMa.                       
 I will briefly describe the essence of the problem: every user
caller"Leningradov", "Pentagon", "Eng-
Stremov",etc., being in good health
and a clear mind, I have repeatedly noticed some
Some "glitches" in programs such as VENOM
STRIKES BACK, MONTE CARLO CASINO,   SHOCK
MEGADEMO (MULTICOLOR, GREETINGS), CHASE
H.Q.128...  - the list goes on
a bunch of trainers for various games.       
                                          
In some programs you can observe periodic
wild disappearance or "trembling" of the moving
xy sprites, in others they turn out to be displaced
various stripes on BORDERe facing up,
although                                      
logically, they need to be
a little lower.                              
...All this like go- external niy effect
Now I'll tryexplain why "this" is happening. All glitchy effects “they” (i.e. abroad) are written as For example, on branded SPECTRUMax. Such effects are performed synchronously with vertical scanning of a television signal - this technique is necessary for implementation "smoothness" and "uniformity" movements sprites, tickers, etc. Synchronization- tion of programs for redrawing objects from frame- howl scanning in SPECTRUMax is achieved by placing these programs in a handler maskable interrupts, or by using them execution in a loop after a microprogram command processorHALT (which, in fact, does not change essence). Maskable interrupts occur synchronously with vertical scanning at a frequency 50 hertz - to the input INT microprocessor Short pulses with this frequency become dull. The following is known: maskable interrupt- development in PENTAGONe occurs simultaneously with a personnel impulse, i.e. processing of pre- tearing begins simultaneously with construction introduction of a new frame. In proprietary SPECCY the interrupt signal is "delayed" relative to regarding the personnel pulse for a time, approx. but equal to the construction of sixteen raster lines. Programs developed using proprietary "computers", "configured" to "shifted" relative to relative to frames INT, therefore, being launched puppies on non-standard SPECTRUMax, will "show" the observer a picture while moments of time at which the change occurs drawing a sprite (meaning program Many redrawings that do not match the appa- military redrawing ofTV-frame). And this is from- fermented in the form of a partially "disappearing" or “collapsed” image on one line niya. If the program provides all sorts of BORDER-type effects MONTE-CARLO, then on "bad" computers can still tolerate this - just think, the stripes are at the top, but it works, but if MULTICOLORs ?
-------------------------- Lyrical digression... For those who don't know, what is MULTICOLOR , Let me explain: this is a technique to obtain- multiple colors - more than two simultaneously in one acquaintance. This ef- fect is achieved by FULL synchronization of com- puter with lowercase size- twist of the TV signal, and this is is achieved in turn synchronization with frame by signals INT interruptions - another method in SPEC- TRUMesimply not.
Naturally, if your computer non-standard phase INT signal, then you will see instead of stunning splendor, what
-wide color stripes- skis, flickering almost randomly- tea way. By and large account, normal work MULTICOLOR-effects depends not only from the correct fa- size of INT signal, but also from
schemes for forming raster lines in a computer tere - I’ll come back to this problem in a moment later...
------------------------------------------ When I first met BORDER-effect fect in the program VENOM STRIKES BACK, which, as you guessed, did not work correctly - ok, I came to terms with it, but when I saw (or rather, I didn’t see it normally!) SHOCK MEGA- DEMO, namely MULTICOLOR in the form it is perceived by abstract artists nists, andGREETINGS, which I do not I could see on the screen that my patience It burst...
A month of searching for the optimal solution resulted in in a small diagram given a little below. The essence of the operation of this device is in the delay of requests for masked interrupts signals coming from the computer circuit to input INT of the microprocessor to a strictly specified new value. Time delay value can be adjusted. The scheme includes- in the gap between the input INT microprocess litter and the rest of the computer circuit. Chips: DD1 - K5SSTM2, DD2 - K5SSЛН1 or К5SSЛН2, DDЗ - K555LAZ, DDCH, DDS - K5SSUE7, DDb - K5SSLA2, you can use both 155- and 1533 series of microcircuits. Diodes: VD1,VD2 - KDS22B. Capacitors: C1 - 10n, (may change during us- triples), C2 - 1n, C3 - 10n. Resistors: R1, R2 - 180 Ohm, R3,R4 - 1 Com. Supply voltage layout: +5 volts to 14output DD1,DD2,DDЗ,DDb,k 16 output DDЧ,DDS, "body" to pin 7 DD1,DD2,DDЗ,DDb,k 8 output DDЧ, DDS. ------------------------------------------ Circuit setup. You can manage to concoct a circuit using plate of one-sided textolite sized rum 25x75 mm. It’s not at all necessary to conduct printed wiring - all connections can be carried out with stranded wireMGTF. For ease of setup, connect the outputs counters DDCh, DDS with m/s DDb long pro- vodka, to unused (according to the scheme) outlets ladies counters also need to be soldered wires - you may need them. Its baud (and used too) m/s inputs DDb must be connected to +5V via re- resistors 1Kom. All DDb inputs are also connected solder the wires. All these preparations do not touch the connection of the 3rd pin of the DDCH with 1st DDb is a connection
can be done immediately without extension wires - in pro- You won’t have to tear it apart during the setup process. It is advisable to install capacitor C1 on some distance from the chip housings, to reduce the influence of temperature changes air tours, at the same time there is no need difficulty in removing it too far away yanie - you will have to look for a reasonable company promise After setting up the circuit, the entire board must be shielded with some kind of meta- llical housing, connect the housing to negative (case) terminal of the power supply nia. However, the board can not be shielded carry out - but this will affect the stability delay time. Having assembled the circuit, it is connected (observing polarity!) to the computer power buses. Contact pad leading topin 16 Z-80 (INT) is cut into the resulting the gap includes the circuit. You can proceed else - if your computerZ-80installed linen on the panel, then carefully removing it from there, bend back the same 16th pin, and put the processor onlocation, connection diagram in this case we involve soldering the input of the circuit to the contact pad, and the output yes to the free 16th processor leg. If you (happy?) owner PENTAGONa or "Leningrad"with musical co-process rum, which was “increased” on top of the main one fees, then consider yourself very lucky - you don’t need to “mock” yourself at all processor and computer board, just take out the coprocessor board and bend the 16th expansion connector leg, solder to it the output of the circuit, the input is connected, as in the previous in the previous case, then install the board coprocessor in place. ------------------------------------------ Scheme settings. After the “implementation” of the circuit in the computer is complete, make sure everything is connected dines are carried out in accordance with the diagram my, that switch SA1 is located in top (according to the diagram) position. For the first launchit is advisable to connect the outputs of the counter kov DDCh, DDS with inputs DDb as before - is shown in the diagram. Before starting the computer, stock up on dis- kets with "suspicious" programs, in which, in your opinion, are observed "glitches". Pick up at least five of these programs and feel free to turn on your computer. If after turning on the computer responds on your button presses, then you can we can confidently say that the functional scheme works fine. If, on the contrary, the keyboard If you don't listen, then try clicking toggle switch SA1, if after that the keyboard "comes to life", then you will have to look for errors in connections of the assembled circuit, otherwise - you "burned" something inside computer - Please accept my condolences in this case. So, you download some program mu, it is desirable that it be used someBORDERnyeffect. Click toggle switch and watch BORDERom, if after turning the toggle switch to the “upper” position, If the stripes move downwards, then you can it is even more certain that the scheme Ma not only functions normally, but also copes with its direct responsibilities mi. Adjusting the delay time comes down to setting the optimal amount of re- bridges between the outputs of the counters DDЧ, DDS (3, 2,6,7) with inputs of the element 8I-NOT(DDb - 2, 3,4,5,6,11,12). Each installed re- the sliver has its own “weight coefficient” time delays, so for each below- standing jumper (according to the diagram) delay weight increases approximately twice as compared disagreement with superiors. After "playing" with the jumpers, you will notice those that add each new jumper increases the delay (shifts BORDER-effect fect down) and vice versa, and the “lower” pe- straps have a greater influence on the charging time holders If the result isexperiments with jumpers you just can’t set the exact value due to the delay, it makes sense to “play” capacitor C1, changing its capacitance to pre- cases from 8 to 20 nanofarads - in this case You can set the delay very precisely. ... Here we come to the most important thing. Having configured the circuit for the first program, and Having put another, you notice with surprise, that BORDER effect in the new program chickpeas This is especially noticeable if you configured the scheme using the Academy program (Tau Ceti II), and then loaded VENOM STRIKES BACK (who hasn’t seen these programs (???) - in them BORDER-effects are in opposite places on BORDERE - on top and below). Looks very good this is on PENTAGONe, which, as they say, Xia, “there are no brakes at all.” Here we are back to the lowercase problemscans... __________________________________________ Horizontal problem... It turns out that our homegrown SPECTRUMs have another implicit "glitch". So, during the construction of one line, the tra hardware circuit of the video controller (in original ULA) number of microprocessor cycles processor for "Soviet" and "branded"SPEC- TRUMob various. So, PENTAGONs have time perform more operations than SPECCY,a SCORPIONs, for example, vice versa. This is influenced by factors such as real high clock frequency of the microprocessor, so and hardware circuit solution vi- deocontroller. Real clock speed depends on the degree of "WAIT"-nesscom- pewter, i.e. from hardware delays you are the processor. Such delays, in general undesirable, but paradoxically,in present SPECTRUMe these process delays Sora exist. They arise when tea, when the processor and ULA try to simultaneously to directly access video memory - process garbage in accordance with the action program, ULA to read the video memory byte for output to the screen. Preference in such a system situation is given ULA, processor "slow down- lives." The same thing happens if the program mma is in the screen area - its speed The interaction is reduced on average by 25% compared to the “regular” program. Pov- I'm careful, this refers to the standardSPEC- TRUMy and to some domestic models ("Leningrad","SCORPION")... Rejoice, happy cool (!) owners of PENTAGONob !!! All these lines said above do not apply to you sit down. "Pentagon" is devoid of these "brakes". Programs on "Pentagon" work the same way - in all memory, and WAIT-leg process litter is not involved at all. However, for everything has to be paid... at least because "branded" MULTICOLORs even with the scheme published here will work only in one part of the screen (about 12 acquaintance). "Leningraders", corresponding surely, the picture will look better for countWAIT-processor stops, but also not will be perfect. ------------------------------------------ Continuation of settings. If you understand what I was trying to explain in the last "insert", then you probably... realized that it was impossible to film by any means press "Pentagon" work as it is currentSPECTRUM. You can only bring the phase closer INT-signal so that at least partial"imported" MULTICOLORs and BORDER -SCROLLERS. Therefore, it is better to configure the scheme in the middle of the screen (MONTE CARLO) or by the first line of the screen, i.e. on the first line in screen area (SHOCK MEGADEMO, MULTICO- LOR). There is another “criterion” for setting INT-phases - by the absence of sprite "jitter" com in CHASE H.Q.128 (main menu), or by "presence" of the ticker in SHOCK MEGA- DEMO, part GREETINGS. So, having configured the scheme to your liking, you can you need to solder short jumpers instead debug, unused wires are unsoldered. Inputs to m/s DDb, which will be connected only to +5V through resistors, you can combine with each other and connect to those the same +5V through one resistor. ------------------------------------------ Schema improvements. The operation of the delay circuit can be stabilized wat, if you put it instead of a capacitor C1 quartz resonator at frequency 100-200 kilohertz But in this case, “typing” for- Holding is possible only by “playing” with jumpers. Accuracy and delay dosage range can be increased if, in addition to jumpers, you use use additional inverters (LN1, LN2) including them between the outputs of the counters and the inputs dami 8I-NOT DDb. ------------------------------------------ ... ------------------------------------------ Syndrome of domestic MEGADEMO construction. Everything said below is in no way offensive "our" coderob, take everything as a fact - tion of the fact... It’s no secret to anyone in our country, that quantity branded, real SPECTRUMob for domesticusers literally drowning in an ocean of mutants, collected deep underground, stamped in serial execution at various production facilities national associations. Palm in the number of different “perversions” occupied no (still!) "Pentagon". Exists a lot of domestic MEGADEM,which are PRIN- CYPIALbNO can only work correctly on PENTAGONe. Let's drop the theme of "mythical" #FD-port is a separate global pro- problem. Examples of this are darkness: ZY-ZY,INSULT, SATISFACTION,PSG-WINS,MENTAL MASTURBATION, ECSTASY,... What can you do,PENTAGONhas become peculiar standard for "binding" MULTICOLORob. Some may find it strange, why is this here? the author began to talk about our MEGADE- Machwhen the article is not at all from that opera. And I’m leading to the fact that it’s not without reason that the scheme meINT-delay is a small toggle switch SA1,which disconnects the circuit from the processor. This is done just so that it was possible to watch normally MULTICOLOR, let's say in SATISFACTION,and inSHOCKe. So, actually, we have come to the end. ══════════════ ════════════════════════════ * * * __________________________________________ Instead of postscript: For those who are not tired of reading this nonsense, I can explain in detail how the described one works scheme. You should stock up on a copy of this diagrams on a piece of paper and turn over page... ------------------------------------------ How "it" works... The entire scheme can be divided into four re large blocks: 1. Trigger block (DD2.1,DD1.1, DD2.4, DD2.5,DD2.6,C2,R3,VD1): 2. Clock generator (DDЗ.1-DDЗ.3,C1,R1, R2): 3. Counting scheme (DDCH, DDS, DDb): 4. Output INT signal generator (DD2.2,DD2.3,C3,R4,VD2). When an “abnormal” request arrives, jerking to input DD2.1 trigger state DD1.1 is set to logical one. This will entail the launch of a clock generator torus (5n.DDЗ.2=1) and unlocking the state a counter with an initial zero state niya (14n.DDЧ,DDS=0). Generator connected to the accumulation input (+1) of the DDCH counter. So, the counting process begins - at the output dakh counters DDCh, DDS "sort out" code- high combinations in binary eight-bit code. This process will continue until until the matching circuit assembled on m/s DDb and jumpers supplied by you, will not “catch” the last extreme combination units. If, in addition to jumpers, you use shafts and additional inverters (which is more correct) then the edge codeword (and therefore the magnitude of the delay) will will be determined not only by the first “meetings” "valued" one bits, but also zero bits. If there has not yet been a match, then the output DDb will be log.1 - “no match”. When coincidence of the required and current combination Log.0 will be generated at the output. The fact of the transition Yes, the output of DDb from 1 to 0 is registered short pulse transmitter on the element max DD2.2,DD2.3,C3,R4,VD2 - onoutput DD2.3 is formed "delayed" INT-for- request, which arrives at the input INT pro- processor. It should be noted here that this formation vator completely repeats scheme in PENTAGONe, so no reason to worry about the length of a short pulse - it will be kim (one must assume normal), as well as before. After generation output signal the clock generator continues to work properly work with his next tact at the exits counters, another code combination appears nation one unit larger than necessary May. In this case, the matching circuit (8n.DDb) again it displays log.1 - “no match”. The fact of transition of the coincidence circuit from 0 to 1 "caught" by another co-former short pulses (DD2.4-DD2.6, C2, R3, VD1), at the output of which a pulse is formed log.0. This pulse drives trigger DD1.1 to the initial state - at the output Q(5n.) log.0 is set, which stops clock generator, output non-Q(6n.) log.1 is set, which resets counters DDЧ, DDS to zero state. Pos- After this, the circuit is ready to accept a new request millet... That's all. It should be noted that in this scheme there is one drawback - the amount of delay will "float" for a period of time equal to one period of the clock generator. Therefore, it is advisable to set the maximum possible frequency of the generator, and the delays are use older jumpers. If Instead of capacitor C1, a quartz new resonator, then there are no problems with “swimming” there will be. ------------------------------------------ Goodbye again! ══════════════ ════════════════════════════ * * *

Share your thoughts about the article