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 > 4x4 char smooth Scroll
2006-07-16 18:26
Richard

Registered: Dec 2001
Posts: 621
4x4 char smooth Scroll

Please can anyone help?

I know how to do 1x1 scroll text, 1x2 scrolltext, but I don't have a clue how to code a 4x4 charset scroll and how a 4x4 char actually works.

I want to do a 4x4 scrolling routine, for a demo.

Thanx

RB!
 
... 10 posts hidden. Click here to view all posts....
 
2006-07-18 19:18
cadaver

Registered: Feb 2002
Posts: 1160
Yes, that's actually much simpler and ninjasweeter than what I posted, if you have 64 chars max in your charset.
So it'd be like..

lda (textptr),y ;scrolltext letter ranging from 0 to 63
asl
asl ;now multiplied by 4
ora column ;column counter value from 0 to 3
tax
lda row1tbl,x
sta $0400+21*40+39
lda row2tbl,x
sta $0400+22*40+39
lda row3tbl,x
sta $0400+23*40+39
lda row4tbl,x
sta $0400+24*40+39
2006-07-18 19:27
Tch
Account closed

Registered: Sep 2004
Posts: 512
You can have more than 64..

Usually the: !.,I etc. are not 4 wide. ;)
2006-07-19 04:36
Honesty

Registered: Jan 2003
Posts: 121
Yeah sure you can had more then 64 chars, but this will need some extra tabs with the startposition from the map and another for the length of char.(more memory) and when having an I or a 1 that can be checked from scroll routine and replace the spaceholder for x amount of chars.

2008-09-18 18:43
Warnock

Registered: Sep 2007
Posts: 28
I know this is old....but

4x4 Scroll Routine By: Warnock/Style

This is just the routine. You'll need a start address for
this to work. Can be inserted in existing page...provided
you have four rows available on the screen.
Good Luck!!

This scroll routine uses four char locations.
For Example:
Part 1 $2000
Part 2 $2800
Part 3 $3000
Part 4 $3800



spos .byte $ff
;---------------------------------------
scroll dec sp+1
dec sp+1
dec sp+1
dec sp+1
ora #$07
cmp #$fd
lda sp+1
cmp #$cf
beq px
jmp end
px lda #$d7
sta sp+1

ldx #$00
move lda $0400+761,x
sta $0400+760,x ;row 1
lda $0400+801,x
sta $0400+800,x ;row 2
lda $0400+841,x
sta $0400+840,x ;row 3
lda $0400+881,x
sta $0400+880,x ;row 4
inx
cpx #$27
bne move

read lda text
bne sidepick

lda #<text
sta read+1
lda #>text
sta read+2
jmp read

sidepick ldy #$03 ;values for which char to print
cpy #$01 ;to the screen 4, 3, 2, 1
beq left1
cpy #$02
beq left2
cpy #$03
beq right1
cpy #$04
beq right2
jmp end

left1
sta $0400+760+39 ;row 1 cset1
sta $0400+800+39 ;row 2
sta $0400+840+39 ;row 3
sta $0400+880+39 ;row 4

lda #$02
sta sidepick+1
jmp end ;jmp $73c6

left2
clc
adc #$40
sta $0400+760+39 ;row1 cset2
sta $0400+800+39 ;row2
sta $0400+840+39 ;row3
sta $0400+880+39 ;row4

lda #$03
sta sidepick+1
jmp end
right1
clc
adc #$80
sta $0400+760+39 ;row1 cset3
sta $0400+800+39 ;row2
sta $0400+840+39 ;row3
sta $0400+880+39 ;row4

lda #$04
sta sidepick+1
jmp end

right2
clc
adc #$c0
sta $0400+760+39 ;row1 cset4
sta $0400+800+39 ;row2
sta $0400+840+39 ;row3
sta $0400+880+39 ;row4


lda #$01
sta sidepick+1

inc read+1
bne end
inc read+2
jmp end

end rts
;---------------------------------------
text .byte $20,$14,$05,$13,$14,$09
.byte $0e,$07,$20,$14,$08,$09
.byte $13,$20,$13,$03,$12,$0f
.byte $0c,$0c,$05,$12,$2e,$20
.byte $20,$20,$20,$20,$20,$20
.byte $20,$20,$20,$20,$20,$20
.byte $00

Previous - 1 | 2 - 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
E$G/HF ⭐ 7
Guests online: 153
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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