Vertical Scroll (in Basic)

Page 1/2
| 2

By Oscar

Champion (462)

Oscar's picture

06-01-2012, 20:19

Hi!

I am trying to make a verticall scroll using hardware (vdp24) and I have a problem. There is a empty area (from 212-255 I think) that always appear when I scroll. I can´t draw in this zone. What could I do to avoid this? I am using 212 vertical pixels mode. 

Thank you!

Login or register to post comments

By wolf_

Ambassador (9120)

wolf_'s picture

06-01-2012, 20:45

Well, you do have 256 lines per screen, so scrolling will reveal them.

Getting content there means you have to copy. E.g. "copy(0,0)-(255,127) to (0,128)" will copy the upper half of the screen to the lower half.

 

 

 

By Google

By d-fader

Champion (265)

d-fader's picture

06-01-2012, 21:14

IIRC I might not be possible in BASIC due to sprites? In any case you have to change the sprite definition tables anyway, because else you'll probably see all kinds of artifacts. 

By Latok

msx guru (3022)

Latok's picture

06-01-2012, 21:49

In Basic you can clear that area from sprites with DEFUSR=&H69:A=USR(0). And like wolf said, just copy (0,0)-(255,43) to (0,212) Smile

 

By wolf_

Ambassador (9120)

wolf_'s picture

06-01-2012, 23:02

10 COLOR,0,0:SCREEN12
    20 DEFUSR=&H69:A=USR(0)  ' w0t?
    30 FOR T=0 TO 31
    40 LINE(0,T)-(255,T),T*8+7
    50 LINE(0,64+T)-(255,64+T),T*8+6
    60 LINE(0,63-T)-(255,63-T),T*8+7
    70 LINE(0,127-T)-(255,127-T),T*8+6
    80 NEXT
    90 COPY(0,0)-(255,127)TO(0,128)
    100 A$=INPUT$(1)

By Lord_Zett

Master (178)

Lord_Zett's picture

06-01-2012, 23:24

that way you cant use the sprites so when relocating the spritelocation tabel

By d-fader

Champion (265)

d-fader's picture

07-01-2012, 00:04

Ah yeah, it's starting to bubble up again somewhat Smile Disabling sprites, of course! Been too long, for real.

[ot]I viewed some of my code a few weeks ago and to be honest I could't make jack sh*t of it anymore, lol[/ot]

By syn

Master (158)

syn's picture

07-01-2012, 01:04

Hah thats funny, I had this same problem maybe 20 years ago on my MSX 2+.. I used the hardware scrol and I got that border when scrolling the screen vertically. I thought my MSX was broken because it didnt appear when using horizontal scrolling... so I brought it back to MSX Center or whatever that shop was called in witte de witstraat in Amsterdam.. the guy said "dude.. thats normal... next time ... call before you come over "

By Oscar

Champion (462)

Oscar's picture

07-01-2012, 02:10

Thank you for your answers but I still have problems. Well, I have relocated sprite table using Artrag example (see RADX-8 post). But trying with wolf_ example I have noticed that it works when you copy a complete area from first upper part to lower part but if you try to copy a single line you can´t draw over this disturbing black area. My program just move up and down the scroll with vdp(24) and draws a line in the same vertical position as the variable of vdp(24), when position is more than 212 no line appear.  What I am doing bad? thank you for you patience Big smile

By NYYRIKKI

Prophet (2771)

NYYRIKKI's picture

07-01-2012, 06:55

If you don't need sprites, you can just disable them:
VDP(9)=10

Thank you for your answers but I still have problems. Well, I have relocated sprite table using Artrag example (see RADX-8 post). But trying with wolf_ example I have noticed that it works when you copy a complete area from first upper part to lower part but if you try to copy a single line you can´t draw over this disturbing black area. My program just move up and down the scroll with vdp(24) and draws a line in the same vertical position as the variable of vdp(24), when position is more than 212 no line appear.  What I am doing bad? thank you for you patience

If you use X-BASIC then you can disable this stupid clipping by adding " '#C-" inside turbo block, but if you use only pure MSX-BASIC then you are out of luck... MSX-BASIC will always "fix" line numbers greater than 211 to be 211. Sorry.
 

By Eugeny_Brychkov

Champion (457)

Eugeny_Brychkov's picture

10-01-2012, 21:27

As NYYRIKKI said BASIC drawing stops at physical (not logical) line 191/211. I have just checked it. "PSET(10,212),1" does nothing to VRAM. Why not creating small assembly program which moves data from RAM to VRAM, or from VRAM to VRAM (there're nice vertical block move hardware accelerated commands)?

Page 1/2
| 2
My MSX profile