partial vertical scroll for msx2

Pagina 1/2
| 2

Door OrazioLC

Supporter (10)

afbeelding van OrazioLC

20-11-2020, 19:36

Good evening everybody. Sorry for the beginner question. I wanted to know if for vertical scrolling in basic MSX2, I can only move a part of the screen. I know that log # 23 does this, but it totally does. Instead I would like to scroll, for example, the first 200 vertical lines, leaving the remaining 55 still. Thanks

Aangemeld of registreer om reacties te plaatsen

Van Grauw

Ascended (10312)

afbeelding van Grauw

20-11-2020, 19:43

In assembly you can do it with a screen split using the line interrupt. In Basic it is not possible, the program execution it is not fast enough. What you could do is load a little helper routine in assembly in memory that installs a screen split interrupt handler, and do the rest in Basic.

p.s. The scroll area is 256 lines high, however it only displays 212 lines.

Van OrazioLC

Supporter (10)

afbeelding van OrazioLC

20-11-2020, 20:25

Yes, I know that. In fact I used the LM & H69 program call to clear the sprites area and then I copied the upper part of the page to clear it. Copy (0,0) - (255,43) TO (0,212). Unfortunately I don't know ASM. There are some such routines out there already prepared. Thank you so much for your reply.

Van Latok

msx guru (3857)

afbeelding van Latok

20-11-2020, 21:05

Grauw, he wants a vertical screensplit, not a horizontal screensplit... I only ever saw that in the Unknown Reality demo.....That equalizer part...

Van Grauw

Ascended (10312)

afbeelding van Grauw

20-11-2020, 21:53

Ow, a clean split of the screen in left and right parts is for sure not possible on the V9938 or V9958 VDP. Unknown Reality relies on exact timing and a large blank area separating the two halves for the unstable split to occur without visible artifacts. And even then it requires near 100% CPU usage, and, of course, assembly code.

The only way to do that on MSX is to make use of the V9990 VDP expansion which can do it at 64 pixel increments in the P1 pattern mode, and since it’s done by the hardware, it is in theory also usable from Basic. But that’s not standard MSX2 hardware of course.

Van mohai

Paladin (940)

afbeelding van mohai

21-11-2020, 11:30

Just an idea:
Use double buffer.
Show the actual screen.
Copy/move the score area (The still area).
Show the buffered screen but do hardware scroll.

This way, you will need to move the "small" area to adjust to the hardware scroll. This way, VDP has to move less data.

Van wolf_

Ambassador_ (9918)

afbeelding van wolf_

21-11-2020, 11:55

Another idea: change the concept.

Van MsxKun

Paragon (1042)

afbeelding van MsxKun

21-11-2020, 12:13

wolf_ wrote:

Another idea: change the concept.

Exactly. Accept limitations and act accordingly with them. As Kojima did with Metal Gear.

Van Manel46

Hero (630)

afbeelding van Manel46

21-11-2020, 14:48

Another option is with the HMMM fast transfer VDP command.
But if the area is very wide, it will be slow, and more with the basic.

Van Metalion

Paragon (1456)

afbeelding van Metalion

21-11-2020, 16:27

Manel46 wrote:

Another option is with the HMMM fast transfer VDP command

Yep, did that in a game a long time ago. You scroll the full screen but use a VDP command to move in the opposite direction the part you want to stay still.

You can use HMMM, or even better YMMM which will be faster. Using speed measures done by Grauw you can compute the maximum number of lines that you can move that way.

Van Manel46

Hero (630)

afbeelding van Manel46

21-11-2020, 16:44

Why this?
You can indicate the width you want to move, and the rest stay put.
Clarify that for the copy commands, the vram is considered a single unit of 256x256x4 pixels, in screen5. Pages don't count.

Pagina 1/2
| 2