V9990 command with NX>image size

By Metalion

Paragon (1596)

Metalion's picture

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 or register to post comments

By PingPong

Prophet (3995)

PingPong's picture

25-09-2022, 21:30

rolling to 0 means reset to 0

By Metalion

Paragon (1596)

Metalion's picture

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.

By Grauw

Ascended (10639)

Grauw's picture

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?

By Metalion

Paragon (1596)

Metalion's picture

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 !

By aoineko

Paladin (706)

aoineko's picture

27-09-2022, 13:55

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