V9990 command with NX>image size

Par Metalion

Paragon (1596)

Portrait de Metalion

25-09-2022, 21:13


I'm making a LMMM command with SX>0 and NX>256.

What pixels are transferred when the end of the line is reached ?
Does it go and fetch the pixels from the next line ?
Or does it go around and fetch pixel from the same line, starting at zero ?

And how do you understand this phrase from the V9990 manual:
NX : The number of pixels in X direction of the image coordinate space is specified and rolling to "0" occurs when the specified range exceeds the image size

What do they mean by "rolling to zero" ?

!login ou Inscrivez-vous pour poster

Par PingPong

Prophet (3997)

Portrait de PingPong

25-09-2022, 21:30

rolling to 0 means reset to 0

Par Metalion

Paragon (1596)

Portrait de Metalion

26-09-2022, 07:53

What I'm observing (both on OpenMSX and real hardware) is that a copy of a line wraps around on the same line. So let's say you make, in P1 mode, this LMMM command (basically copying one line):
. SX=32
. NX=256
. NY=1
. DX=0
It will copy the first 256-32=224 pixels from the source line and then the remaining 32 pixels from the start of it.

I thought it was going to fetch the 32 last pixels from the next line.

Par Grauw

Ascended (10639)

Portrait de Grauw

26-09-2022, 22:37

Seems to match (one interpretation of) the manual description.

You could probably use the BMXL command if you want it to wrap to the next line?

Par Metalion

Paragon (1596)

Portrait de Metalion

27-09-2022, 09:15

I thought of that, but LMMM works at the pixel level, while BMXL works at the byte level.

EDIT: Wait ... Does BMXL works at the byte level at source but pixel level at destination ?
That would be perfect !

Par aoineko

Paladin (706)

Portrait de aoineko

27-09-2022, 13:55

That's also what I undestood.
Bytes to bytes is handle by BMLL.