Full screen output technology
images without interrupt attributes
(C) Mythos
A few years ago, before the coders of Spe-
I have encountered a problem with displaying full screen
of a new image for int. About her decision I
I haven’t heard anything, and now I’ll try to check
This is a brief analysis of several methods and
tell us about the subject :)
I'll start with the well-known methodsLDIR,
LDI.
The command LDIR throws a byte in 21 clock cycles
We only have time to throw the entire screen
21*6911+16=145147, yes, we’re a little behind on time
Using commandsLDI we throw a byte in 16 clock cycles
We can throw a screen for 16*6912=110592 t
without attributes 16*6144=98304 t, we brake and
here, and it’s a pity for the memory.
Then there is a method, the so-called “you-
water through the stack." The method is fast, but not
the best. Maximum effect when using
use other than the main registers and
alternative.
Stack a byte in 13.5 clock cycles
We throw the screen behind 13.5*6912=93312 t
without attributes 13.5*6144=82944 t
We fail here too.
If you dig even deeper you can find
a few more original ways about which
which II just don’t know, unfortunately.
And now, in my opinion, the most effective
obvious way.
I’ll say right away that we throw a byte for
10.5 cycles
Screen accordingly
10.5*6912=72576 t
In my opinion, even the Pentagon will not have time
without attributes 10.5*6144=64512 t
And here probably any computer can do it.
The essence of the method is that your picture
will be distributed in the program.
Write the code:
LD SP,#5В00
LD HL,#223A;YOUR GRAPHICS, ATTRIBUTES
PUSH HL
LDHL,#3AB3;MORE GRAPHICS
PUSH HL
...
Well, you need quite a few lines like this. In ito-
where your screen will occupy exactly two
times more memory.
What is another beauty of this method: if
you noticed, you can display a picture
storing it at the same time in a compressed state.
Let me explain: if there are buys in a row in a picture
you, say, #aоз,#аоз... it will be possible to-
write in the program:
LD HL,#AB03
PUSH HL
PUSH HL
...
At the same time, the image output speed
rising!
If you want to display sprites like this
screen, then if you think about it you can easily
write a sprite output procedure or maybe
even dots or lines. But in this case not
there should be compression.
Well, that seems to be all I wanted to talk about.
give. Frankly, I didn’t even think about writing
about this, thinking that everything is already known, but
when I started talking, they looked at me
trilled with big eyes and said that
this is cool.
------------------------------------------
Share your thoughts about the article