triggering screen 0, from "c"
-
- Posts: 82
- Joined: Tue Jan 12, 2021 9:52 pm
triggering screen 0, from "c"
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
-
- Posts: 137
- Joined: Tue Jun 30, 2020 3:47 pm
triggering screen 0, from "c"
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.
-
- Posts: 82
- Joined: Tue Jan 12, 2021 9:52 pm
triggering screen 0, from "c"
Thanks! I've been looking with my eyes closed it seems, the answer is so obvious when you see it ?