....

ZXNet echo conference «real.speccy»

From Ivan Pirog To All 10 October 2000

Greetings, All!

Someone! Tell me, a poor lamer, how to make the sprite
move out from the right edge of the screen?
I can’t move in at all. From below, this is clear: we display a line of the sprite, scroll
up, then the next line, then scroll again.
But what if it moves to the left from the right border?
Currently, plz, don’t write in the answers about what kind of LMD I am. :-)))
After all, everyone has to start sometime...


With respect, Ivan.
Valtron/Complete Failure Hackers Group/Freedom
[ZX] [Alasm] [Beer] [Girls]


From Ivan Mak To All 11 October 2000


Greetings, Ivan!

<20:19> Ivan Pirog wrоte to All:

IP> Someone! Tell me, a poor lamer, how to make the
IP> sprite move out from the right edge of the screen? I can't get in at all. From below
IP> this is clear: we display the sprite line, scroll up, then
IP> the next line, then scroll again. But what if it moves
IP> to the left from the right border? Now, plz, don’t write in your answers about what
IP> I am LMD. :-))) After all, everyone has to start sometime...

Similar to the vertical one, only use the RL (HL) command - shift left -
for scrolling to the left. Then insert the 0th pixel into the last byte (the one on the right). However, you need to insert it right away. Before the first RL (HL) in
flag C, set the desired pixel with the same sprite shift, but somewhere behind the
screen.

The protoss escaped. The Zerlings took off. It's time for me to call it a day. Ivan.

- Divorce the scheme, big and small... [Sprinter-II] [Forth-CPU] [ZX]

... ivan...@mail.ru * http://st-rektal.chat.ru * http://www.atlant.ru/peters

From Ivan Pirog To All 11 October 2000

Somehow on Wed 11 Oct 2000 at 12:07:01
Ivan Mak and Ivan Pirog stirred up this kind of chacha:
-- .... --

[Skip]
IM> Similar to the vertical one, only use the command RL
IM> (HL) - shift left - for scrolling to the left. Then
IM> insert the 0th pixel into the last byte (the one that is
IM> the rightmost one). However, you need to insert it right away. Before the first
IM> RL (HL), place the required pixel in the C flag with the same
IM> sprite shift, but somewhere behind the screen.
Well, this is a no brainer. I've already made fancy scrollers, albeit in one
familiar place.
But I'm interested in the practical side of the issue.
Let's say we have a 5x10 sprite in the same place. It is stored in memory linearly (not acquainted). How to quickly calculate the next line in a sprite, while selecting the 7th bit from a byte, shifting the byte, and then remembering the state of this byte in the buffer, also shifting all the other bytes in the sprite line. That’s it, I’ve already
loaded myself :-))

Can you tell me more about scrolling? With a regular scroll like a creeping line 8X8
there are no problems. And with larger sprites...

From Konstantin Samoylov To All 11 October 2000

Hello Ivan!

10 Oct 00 20:19, Ivan Pirog -> All:

IP> Someone! Tell me, poor lame, how to make the
IP> sprite move out from the right edge of the screen? I can't get in at all. This
IP> is clear from below: we display the sprite line, scroll up, then the next
IP> line, then scroll again. But what if he moves to the left from
IP> the right border? Now, plz, don’t write in your answers about what kind of LMD I am.
IP> :-))) After all, everyone has to start sometime...
See rl (hl); rl h; rl l; rla; rlca;
Sincerely, SP.

From Ivan Mak To All 12 October 2000


Greetings, Ivan!

<19:28> Ivan Pirog wrоte to Ivan Mak:

IP> Well, this is a no brainer. I've already made fancy scrollers, although the
IP> has one familiar place. But I'm interested in the practical side of the IP issue. Let's say we have a 5x10 sprite with different spaces. It is stored in
IP> memory linearly (not acquainted). How to quickly calculate the next
IP> line in a sprite, while selecting the 7th bit from a byte, shifting the byte, and
IP> then remembering the state of this byte in the buffer, also shifting all the
IP> remaining bytes in the sprite line. That's it, I've already loaded myself :-))

The easiest way, IMHO, is to make an off-screen buffer, output a sprite into it, and then
shift it to the side so that the seventh bit would fit into the C flag. The buffer
is sufficiently one byte wide and the height of the sprite. After the 8
bit has come out, put the next part of the sprite into it.

You can also experiment directly on the screen by closing one familiar place on the right,
for example, with a zero attribute and using it as a buffer.

IP> Can you tell me more about scrolling? With a regular scroll like a creeping line
IP> 8X8 there are no problems. And with larger sprites...

Everything is the same as with the ticker. There are just more of these lines in height. Well, they are limited due to the fact that the sprite is not full screen.

P.S. If underThe picture should also be a sprite, then it’s better not to ask me.

From George Valnin To All 12 October 2000

Hello, Ivan!

Oct 11 00 19:28, Ivan Pirog -> Ivan Mak:

IP> Let's say we have a 5x10 sprite. It is stored in
IP> memory
IP> linearly (not acquainted). How to quickly calculate the next line in an
IP> sprite, while selecting the 7th bit from a byte, shifting the byte, and then
IP> remembering the state of this byte in the buffer, also shifting all the other
IP> bytes in the sprite line. That's it, I've already uploaded myself
IP> :-))

From Nickolay Vorobyev To All 13 October 2000

IP> question. Let's say we have a 5x10 sprite with different spaces. It is stored in
IP> memory linearly (not acquainted). How to quickly calculate the next one
How to quickly calculate it? You store it linearly. So add to
the address of the sprite its horizontal length
IP> line in the sprite, at the same time select the 7th bit from the byte, shift the byte,
Why put it in the buffer? Scroll directly in the body of the sprite with the command
in hl the address in the sprite is equal to the familiar place that is not yet visible, but it is already
moving
rlc (hl) -left or
rrc (hl) -right
with 7 bits moving to 0 and also copied to the flag transfer
here is this transfer flag and bring it to the screen with the command
in hl the address on the screen in one of the extreme positions
rl (hl) to the left
rr (hl) to the right
IP> a
IP> then remember the state of this byte in the buffer, further shifting all
IP> the remaining bytes in the sprite line. That's it, I've already loaded myself :-))

IP> Can you tell me more about scrolling? With a regular scrolling type creeping line

From Kirill Frolov To All 14 October 2000

Press RESET immediately, Ivan!

11 Oct 00 13:07, Ivan Mak wrote to Ivan Pirog:

IM> Similar to the vertical one, only use the RL (HL) command - shift
IM> left - to scroll to the left. Then insert the 0th
IM> pixel (the one that is rightmost) into the last byte. However, you need to insert it right away.
IM> Before the first RL (HL) in the C flag, insert the desired pixel with the same

From Ivan Mak To All 14 October 2000

The Protoss have fled. The Zerlings took off. It's time for me to call it a day. Ivan.

- Divorce the scheme, big and small... [Sprinter-II] [Forth-CPU] [ZX]

... ivan...@mail.ru * http://st-rektal.chat.ru * http://www.atlant.ru/peters

From Yuri Voynalovich To All 17 October 2000


Hio *Ivan*!

And it all started on 11-Oct-00 at 18:28:26, when Ivan Pirog
talked with Ivan Mak about ....

IP> But I'm interested in the practical side of the issue.
IP> Let's say we have a 5x10 sprite in regular places. It is stored in memory linearly

In fact, if you want to scroll bytes in real time, then “rl (hl)”
is a pretty good method. The main thing is not to make a loop for each byte, but to expand the procedure for at least one or several lines. I once scrolled quite large sprites (more than 5x10) without any problems. But in real practice, the main sprites are usually not scrolled, especially if they should be displayed in arbitrary pixel coordinates of the screen, and not scrolled one pixel at a time (after all, you also need to apply a mask, etc.). The main thing is not to do byte-by-byte loops.

Always yours Combin8or/PHT