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 > DYCP and DYBP
2008-09-03 15:21
Warnock

Registered: Sep 2007
Posts: 28
DYCP and DYBP

Can someone post the sorce for these two routine? You can
explain how it works in theory all day and I still won't get the message. I need to see the routine in action. That's how I learned the various scrolling routines I have to date. I had a double dycp routine but my library was lost during my move to Va back in 1996.

Thanks,
Warnock/Style

P.S. - Seems my group is too busy to help me out.
Grrrrrrrrr.
2008-09-03 15:28
Shadow
Account closed

Registered: Apr 2002
Posts: 355
DYCP explanation and example source can be found here:
http://www.antimon.org/dl/c64/code/dycp.txt

DYBP I've never heard of, you sure you don't mean DYPP?
2008-09-03 15:45
Warnock

Registered: Sep 2007
Posts: 28
It's a modified version of the DYCP. Thanks for the info. I believe I tried this before, but I'll try it again.
2008-09-03 18:19
Testa
Account closed

Registered: Oct 2004
Posts: 197
are you really searching for a dycp routine? it is so easy

lda #1
jsr #e536

ldy #0 ;matrix
sty $0400
iny
sty $0428
iny
sty $0450
iny
sty $0478
iny
sty $04a0
iny
sty $04c8

sei ;set up interupt
lda #1
sta $d01a
lda #<irq
sta $0314
lda #>irq
sta $0315
lda #$7f
sta $dc0d
lda $dc0d
cli
jmp *

irq
lda #$30
sta $d012

lda #$80
cmp $d012
bne *-3

clear
ldx #0 ;clear before new position
lda #$00
sta $2000,y
sta $2001,y
sta $2002,y
sta $2003,y
sta $2004,y


sam
ldy sinus ;a sinus table lowest value #0 highest #42

char = $3800
store a charset at $3800!

sty clear+1
ldx #1*8 ;select char
lda char,x
sta $2000,y
lda char+1
sta $2001,y
lda char+2
sta $2002,y
lda char+3
sta $2003,y
lda char+4
sta $2004,y
inc sam+1

lda $dc01 ;hit space to end
cmp #$ef
beq assem

inc $d019
jmp $ea81

assem
jmp $9600

bye!
mcd
2008-09-03 18:25
Testa
Account closed

Registered: Oct 2004
Posts: 197
oh shit i forgot to set $d018 at $19 (screen at $0400 and charset at $2000) ...
later
2008-09-03 18:29
Cruzer

Registered: Dec 2001
Posts: 1048
DYCP = Different Y Char Pos
DYPP = Different Y Pixel Pos
DYSP = Different Y Sprite Pos
DYBP = Different Y Bob? Pos

As far as I recall, the group who came up wit the DYCP term did it as a joke, but it sure caught on.
2008-09-03 18:30
Oswald

Registered: Apr 2002
Posts: 5094


*= $1000

;dycp scroller in 256 bytes

;lousy coding & comments by:

;oswald of resource


;(cruzer: it wasnt hard at all
;but i ran out of mem when
;i wanted to add some cosmetics
;:)

freq = $04

sinmove = $f0

szoveg = $a1a0 ;text at rom
sin = $1f00
sinptrs = $1e00

cset = $3000

sei ;copy charset
lda #$33 ;from rom
sta $01
ldx #$00
copy lda $d800,x
sta $3000,x
dex
bne copy
lda #$37
sta $01

lda #$04 ;set up screen
sta $ff
stx $fe
txa

lp2 ldy #0
lp
sta ($fe),y

adc #6
iny
cpy #40
bne lp
lda #$28
jsr add
inx
txa
cmp #$06
bne lp2

lda #24
sta 53272

;---------------------------------------

again2 ldx #7
stx $fb
stx 53270
lda #0 ;clear @
mkspc sta cset,x ;to make it a
dex ;space
bpl mkspc

again lda #$00 ;reset counters
sta $fe
sta $fc
lda #$20
sta $ff

lda sinmove
sta $fa

mainloop
lda $fa
clc
adc #freq ;get sine offset
sta $fa
tay
lda sin,y
pha
tay

lda #$00 ;clear char
ldx #$0b
clr sta ($fe),y
iny
dex
bpl clr

pla
clc
adc #$02
tay
ldx $fc
text lda szoveg,x ;get text

asl a
asl a
asl a
tax

lda #$06
sta $fd

copychr lda cset,x ;draw char
sta ($fe),y
inx
iny
dec $fd
bpl copychr

lda #48 ;move 2 next
jsr add ;column
inc $fc
lda $fc
cmp #40
bne mainloop

lda #$68
cmp $d012
bne *-3

lda sinmove
clc
adc #$02
sta sinmove

ldx $fb
stx 53270
dec $fb
bpl again

;clc ;fix flicker
adc #freq ;when moving 8
sta sinmove ;pixel each char

inc text+1
bne *+5
inc text+2

jmp again2

add clc ;saves sum bytes
adc $fe
sta $fe
bcc *+4
inc $ff
rts

2008-09-03 18:36
Clarence

Registered: Mar 2004
Posts: 121
Cruzer, little correction, the 'S' in DYSP stands for 'Sideborder'.
Btw, never heard of a DYBP before.
2008-09-03 18:46
Fungus

Registered: Sep 2002
Posts: 686
he means DYPP.

DYBP = different Y bit plotter
2008-09-03 19:32
Cruzer

Registered: Dec 2001
Posts: 1048
Clarence: Different Y Sideborder Position? So the two sideborders have different Y positions? Wow :)
2008-09-03 20:04
Clarence

Registered: Mar 2004
Posts: 121
Cruzer, yes it's strange, but true. I thought S stands for Sprite for a long time as well, until I found that very old demo explaining it. If I find that demo again I will post a link, don't remember now.

Btw, the d.y.c.p. abbreviation was introduced by d.y.c.p./jewels demo.
 
... 16 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 - 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
JEZ
Freeze/Blazon
Paulko64
Nordischsound/Hokuto..
Mr. Mouse/XeNTaX/G*P
Guests online: 129
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 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (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 Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

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