Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > keep top 2 rows of screen from vertical scrolling
2021-07-19 03:09
TheWarCriminal
Account closed

Registered: May 2011
Posts: 30
keep top 2 rows of screen from vertical scrolling

I lost my code from years ago that would keep the top 2 rows of the character screen (1024+80) from vertical scrolling with no flickering. I used it for the BBS I was creating back then. With recent devs in CBASE not performing how I would like it too I have started back recoding that BBS but I need 2 very important things. First off is a no vertical scroll on the top 2 rows. I know CBASE has one but it flickers and is compiled. Would like one in ML or someone point me in a starting direction. The 2nd one is a date ML routine. I know how to check the time and convert it into a readable format but the timer does not hold a date so it keeps resetting at 24hr. Since I am coding this BBS for WinVice is there a way to get the info from the emulated RTC?

I know this sounds like I have no clue what I am doing but when you have been away from c64 coding for 3 decades you loose the knowledge. Just getting reacquainted with BASIC V2 is a hazzle when you are so used to VB.NET behind code. One oh the things that constantly get me is the string setup: BASIC V2 is string$ where as VB.NET is $string. Which ever company decided to screw around with the context should have left it alone.

Any help would be appreciated in this. (I have searched the forums here, Google and Internet Archive c64 Books)
2021-07-19 07:09
TheWarCriminal
Account closed

Registered: May 2011
Posts: 30
33% the way there on the vertical scroll

2 issues:

-1- flickers when screen text scrolls up

-2- for some reason will not reverse the text



I am using C64 Studio 6502 assembly with ACME ops.

Here's the code:

* = 49152
TEXTOUTPUT = 1024

LDA TEXTFLAG
CMP #$01
BEQ SHOWTEXT
rts

SHOWTEXT
LDA #$00
STA TEXTP

GTEXT
LDA TEXTP
CMP #$01+79
BEQ EXITTEXT
LDX TEXTP
lda TEXTm,x
adc 192
STa TEXTOUTPUT,x
INC TEXTP
JMP GTEXT

EXITTEXT
lda #$00
sta TEXTP
RTS

TEXTP
!byte 0

TEXTFLAG
!BYTE 0

TEXTm
!scr "---uid: 000 date: 00:00am 00/00/00---"
!scr "-------location:------------------------"

Added the - in the !scr cause this text editor trims leading & trailing spaces in quotes.
2021-07-19 11:45
iAN CooG

Registered: May 2002
Posts: 3132
use bbcode to properly format your code, as hinted when you type your posts in here: https://csdb.dk/help.php?section=usage#9
[code]
your source code
[/code]
2021-07-19 14:53
Krill

Registered: Apr 2002
Posts: 2839
For scrolling the screen up while leaving the top two rows unchanged, try something like this:

- copy the KERNAL screen scroll routine at $e8ea-$e964 http://unusedino.de/ec64/technical/aay/c64/rome8ea.htm to some spare RAM.
- change the argument byte at the RAM equivalent of "E8F6: A2 FF LDX #$FF" to $01, so that it's ldx #$01.
- call the RAM subroutine whenever you need to scroll.

I'm not sure what you mean by "flickering", though.
2021-07-19 20:15
Silver Dream !

Registered: Nov 2005
Posts: 107
I am not sure whether you try to use the KERNAL scrolling or you want to scroll screen content yourself. In the first case you need to patch KERNAL, which is more tricky but surely possible. In the latter you just scroll your content starting (or ending - depending on the direction) at $0450 / $d850. I also assume that you're not trying to do this in CBM BASIC as this would be too slow to be of any real use.
2021-07-19 20:19
Silver Dream !

Registered: Nov 2005
Posts: 107
Quoting Krill
I'm not sure what you mean by "flickering", though.


Me neither. I'd guess he lets the KERNAL do the scrolling while constantly overwriting the top lines with desired stuff.
2021-07-19 20:21
chatGPZ

Registered: Dec 2001
Posts: 11108
yes, thats what the BBS things usually do. and considering how you size optimize those programs, its probably ok too :)
2021-07-19 20:34
Count Zero

Registered: Jan 2003
Posts: 1821
And for reversiness you need to of course put the reverse versions of the screencodes into !scr.

Likely you try to replace something originally starting with {Home}{RvsOn} and using CHROUT?
And wouldn't CHROUT be a good routine to replace to gain great speeds on RS232 output anyhow?
Leading to - why at all scroll the screen when looking at user actions (as its unlikely for the call waiting screen to flicker :) ) The output routine can handle suppressing it, no?

Keep us updated on your progress of outperforming recent CBASE devs.
2021-07-19 20:43
Krill

Registered: Apr 2002
Posts: 2839
Quoting Silver Dream !
I'd guess he lets the KERNAL do the scrolling while constantly overwriting the top lines with desired stuff.
Quoting Groepaz
yes, thats what the BBS things usually do. and considering how you size optimize those programs, its probably ok too :)
Oh well, that tweaked KERNAL scroll routine i suggested can be reduced to just copying and patching its head until the critical ldx #$01, then jumping to the rest of the code in KERNAL. Not very big.
2021-07-19 22:51
Silver Dream !

Registered: Nov 2005
Posts: 107
The potential issue I can think of is that in order to employ the call-scroll-when-needed approach one has to track when scrolling is required. Whereas just CHROUTing and letting KERNAL do the tracking work is surely easier (and shorter).
2021-07-19 23:41
chatGPZ

Registered: Dec 2001
Posts: 11108
I'd worry about all that once the rs232 things work and transfer protocolls are implemented :)
 
... 28 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Seppo Heavy
Guests online: 125
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.047 sec.