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


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

Registered: May 2011
Posts: 16
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)
 
... 28 posts hidden. Click here to view all posts....
 
2021-07-20 22:44
TheWarCriminal

Registered: May 2011
Posts: 16
Krill: I will try that but C^$ ASM ACME uses !byte instead of .byte

Groepaz: the adc 192 is for adding 192 to the screen code going out to 1024+ for reverse which is not working. Even turning it on at location 199 prior to and turning it off before exiting is not working. I know the adc is working cause adding 128 gives a completely different screen code character. 192 stays the same as the source which is below that.

I am going to figure this out. 30 years ago this would be a cinch but it takes time for me to readjust from an easy environment.
2021-07-20 22:50
Krill

Registered: Apr 2002
Posts: 1974
As Groepaz suggested, seems like you want to ADC #192 (the literal value) instead of ADC 192 (the value at address 192).
2021-07-20 22:56
TheWarCriminal

Registered: May 2011
Posts: 16
Krill: C64 Studio ASM did not allow .byte or !byte combo but I did get it to take !scr (character code) before the first line and last line. Will be importing it into my Vice work 1581 work disk later to see if it works. Currently reassembling my breadbin c64 into a custom AMI64 c6c case with new led and putting heatsinks onto the chips. Next week I plan on tightening up the power port some (kinda loose), remove the rf modulator & desolder all the chips for that can be easily replaced with zif sockets. I only have 1 non soldered chip which is the sid.

I do have an composite to hdmi upscaler but since the rf is still on the board there are bad vertical bars in the upscale but a straight composite to the component input on my hdtv (only using the stereo and Y inputs) it is clearer but still some bars. I am hoping it gets very clear when the rf is removed.
2021-07-20 23:13
Krill

Registered: Apr 2002
Posts: 1974
Quoting TheWarCriminal
C64 Studio ASM did not allow .byte or !byte combo but I did get it to take !scr (character code) before the first line and last line.
If the syntax is like ACME's, it should accept something like
!pet RVSON, "hello", RVSOFF
This should be printed via KERNAL, of course.
But it seems like you just want to write screen code characters to screen RAM directly, so yeah, defining the string via !scr is the way to go to, and then there should be no need to add a magic number to every character byte.
2021-07-21 00:25
Silver Dream !

Registered: Nov 2005
Posts: 73
Quoting TheWarCriminal
I know how to split screen and bank it but that would not work since it would require a 3rd line to hide the that line going up to 2.


? Why would it?
2021-07-21 00:44
Silver Dream !

Registered: Nov 2005
Posts: 73
Quoting Silver Dream !
Quoting TheWarCriminal
I know how to split screen and bank it but that would not work since it would require a 3rd line to hide the that line going up to 2.


? Why would it?


Yeah - just double-checked quickly myself (although I was pretty sure it would work). If you "know how to split screen and bank it then you can put your two top lines in another screen and do the split at lines 51 and 67. Done. Will cost you extra $50 bytes plus split-screen code though. May or may not be a problem, depending on your memory usage.
2021-07-21 00:53
Krill

Registered: Apr 2002
Posts: 1974
Quoting Silver Dream !
you can put your two top lines in another screen and do the split at lines 51 and 67. Done. Will cost you extra $50 bytes plus split-screen code though. May or may not be a problem, depending on your memory usage.
Hmm, what about KERNAL scrolling colours full-screen, then?
2021-07-21 01:07
Silver Dream !

Registered: Nov 2005
Posts: 73
Quoting Krill
Quoting Silver Dream !
you can put your two top lines in another screen and do the split at lines 51 and 67. Done. Will cost you extra $50 bytes plus split-screen code though. May or may not be a problem, depending on your memory usage.
Hmm, what about KERNAL scrolling colours full-screen, then?

Since OP is constantly "POKEing" his top two lines as screen-codes, he will have to take care of colour RAM too. Provided the colours on the content part vary. Since he probably has to handle colour RAM at least when setting the lines up, he should be able to use the same code. The check I mentioned (sorry for the shaky one-hand filming while trying to type with the other hand):

https://nc.silverdr.com/s/tJEGETP5xYy3ZMS/download
2021-07-21 07:47
ChristopherJam

Registered: Aug 2004
Posts: 1174
Quoting TheWarCriminal
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?


VICE emulates the original hardware, which only tracks the time and not a date, so no there is not.

If you're planning on running the BBS continuously, you do however have the option of having your 'get date' routine log what time you last called it, and on next call see if it's "earlier in the day" than the previous call, which you could then use as a cue to increment the date before you return.
2021-07-21 07:54
ChristopherJam

Registered: Aug 2004
Posts: 1174
As for the reverse not working, you can replace the inner loop
with

SHOWTEXT
    lda #$00
    sta TEXTP

GTEXT
    lda TEXTP
    cmp #$01+79
    beq EXITTEXT
    ldx TEXTP
    lda TEXTm,x
    clc
    adc #192
    sta TEXTOUTPUT,x
    inc TEXTP
    jmp GTEXT

EXITTEXT


Note the "#" before the 192, and the CLC on the line before.

You can also save a few instructions by doing this:
SHOWTEXT
    lda #$00
    sta TEXTP

GTEXT
    ldx TEXTP
    cpx #$01+79
    beq EXITTEXT
    lda TEXTm,x
    clc
    adc #192
    sta TEXTOUTPUT,x
    inc TEXTP
    jmp GTEXT

EXITTEXT


or, shorter again
SHOWTEXT
    ldx #$00
    stx TEXTP

GTEXT
    cpx #$01+79
    beq EXITTEXT
    lda TEXTm,x
    clc
    adc #192
    sta TEXTOUTPUT,x
    inx
    jmp GTEXT

EXITTEXT


then you can drop TEXTP altogether, and move the comparison to the end, and you can almost certainly replace the clc/adc with an EOR, cutting it down to
SHOWTEXT
    ldx #$00
GTEXT
    lda TEXTm,x
    eor #192
    sta TEXTOUTPUT,x
    inx
    cpx #80
    bne GTEXT


Hope that helps.
Previous - 1 | 2 | 3 | 4 | 5 - 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
Dymo/G★P
The Sarge/Fairlight
mkarcz
E$G/-/OKUTO FORCE
Peiselulli/tRSi
Fabs/HokutoForce/ONS
Guests online: 70
Top Demos
1 Edge of Disgrace  (9.6)
2 Bromance  (9.6)
3 Coma Light 13  (9.6)
4 Uncensored  (9.6)
5 Memento Mori  (9.5)
6 Comaland 100%  (9.5)
7 Lunatico  (9.5)
8 Unboxed  (9.5)
9 Christmas Megademo  (9.5)
10 Wonderland XII  (9.5)
Top onefile Demos
1 Copper Booze  (9.7)
2 Barry Boomer - Trapp..  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Dawnfall V1.1  (9.5)
5 To Norah  (9.5)
6 Lovecats  (9.5)
7 Elite Code Mechanics  (9.4)
8 Quadrants  (9.4)
9 For Your Sprites Only  (9.4)
10 Oldschool Sprite Demo  (9.4)
Top Groups
1 Booze Design  (9.4)
2 Oxyron  (9.4)
3 PriorArt  (9.3)
4 Crest  (9.3)
5 Triad  (9.3)
Top Cover Designers
1 Duce  (9.8)
2 Electric  (9.7)
3 Junkie  (9.6)
4 The Elegance  (9.4)
5 Mermaid  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2021
Page generated in: 0.04 sec.