Page 1 of 1

ROM Kernal routines that control inserting lines of characters?

Posted: Tue Feb 08, 2022 9:47 pm
by MadCommodore
I presume on the VIC20 going to the top of a screen and pressing the insert key will push down the entire screen by 1 character. The opposite of what happens when you do a print statement when the cursor is on the last row.

On the C64 you can use this as a simple hack to do a reverse scroll, the opposite of all those Ski-ing type in games, by two commands, off the top of my head it's this....

POKE 677,X (x=set cursor at row which you want to insert an entire row underneath to push the screen down)
SYS 59777 to actually make it happen.

Does anybody know if you can do this on the VIC-20 too? Quite a handy function because you can keep a line or two static at the top of the screen for scores and stats etc which you can do if you just keep printing to the screen like all those slalom type games use in BASIC.

Re: ROM Kernal routines that control inserting lines of characters?

Posted: Wed Feb 09, 2022 1:44 am
by Mike
On the VIC-20, the corresponding commands are POKE242,X and SYS59912.
I presume on the VIC20 going to the top of a screen and pressing the insert key will push down the entire screen by 1 character.
No, that is not how it happens. It is output in the rightmost column (also during screen edits) that 'opens' a new row and scrolls everything below that one line down. This action also combines two (or more) physical screen lines into one logical line.

An intricate PRINT sequence also does this from within a program. A POKE into the screen line line table then unlinks the two physical lines. I did this with Meteor Storn, see here.