triggering screen 0, from "c"

Get technical support from the community & developers with specific X16 programs if you can't find the solution elsewhere
(for general non-support related chat about programs please comment directly under the program in the software library)
Post Reply
CursorKeys
Posts: 82
Joined: Tue Jan 12, 2021 9:52 pm

triggering screen 0, from "c"

Post by CursorKeys »


Hi!

I am working on a little project in screen mode 0.

I can set the screen mode in basic. I can also set it in c.

But when I set it in c, I get incorrect scrolling.  It seems the scroll routing still thinks the screen is 60 characters high.  I can't find it in the manual. (I probably put my blind glasses on :))



Scrolling is done like this. Print lots of character until the lower end of screen is reached, will trigger scrolling. It's rough, but it works.



The screen setting is basically like this:



  *vera_video = 0x20 | 0x10 | *vera_video;

  *vera_hscale = 0x40;

  *vera_vscale = 0x40;

  *vl1_cfg = 96;

  *vl1_map = 0x00;



What am I missing?   I tried checking vera registers after doing a "manual" screen command, and the only thing I came to is the patter 0110 in the mapwidth, map heigh sections of the L1_CONFIG register. (hence    *vl1_cfg = 96; )



Thanks

CC

Elektron72
Posts: 137
Joined: Tue Jun 30, 2020 3:47 pm

triggering screen 0, from "c"

Post by Elektron72 »


In order to change to 40x30 mode, you should use the screen_set_mode kernal routine. In addition to changing the screen size, this routine sets some variables in the kernal that are used to determine when to scroll the screen.

CursorKeys
Posts: 82
Joined: Tue Jan 12, 2021 9:52 pm

triggering screen 0, from "c"

Post by CursorKeys »


Thanks!   I've been looking with my eyes closed it seems, the answer is so obvious when you see it ?

Post Reply