Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user tubesockor ! (Registered 2024-05-12) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > DISPLAY ENABLE switching at raster pos?
2006-03-26 22:34
Trifox
Account closed

Registered: Mar 2006
Posts: 108
DISPLAY ENABLE switching at raster pos?

i want to switch the DISPLAY ENABLE flag on a certain raster line, and activate it on another, i am trying, but i just can switch it on and off in raster lines < 50 or something ... what can i do ... just use sprites in the area out of my 'copper' bars ?
2006-03-26 22:37
Krill

Registered: Apr 2002
Posts: 2853
What do you want to achieve? Disable the bad lines?
2006-03-26 22:55
Trifox
Account closed

Registered: Mar 2006
Posts: 108
yes, i want to disable the bad lines when doing my rasterbars, and before and after i want to display normal text graphics... because those raster bars are really hard to maintain .. ;(
2006-03-26 23:08
Style

Registered: Jun 2004
Posts: 498
It doesnt work like that.

The DEN bit is only checked in one position. The screen is either blanked in entirety or it isnt.

2006-03-26 23:10
Krill

Registered: Apr 2002
Posts: 2853
Simply do FLD then. That's basically setting $d011 each line so that the lowmost 3 bits of $d012 and $d011 never match, thus no bad line being produced - read, you have a 0..7 cycle on the lowmost 3 $d011 bits.
2006-03-27 01:19
Wanderer
Account closed

Registered: Apr 2003
Posts: 478
This routine works well under PAL and NTSC

LDX #$00
loop LDY COLORS,X
LDA $D012
AA CMP $D012
BNE AA
AND #$07
ORA #$10
STA $D011
**
STY $d020
STY $d021
inx
cpx #$08 (# of colours)
bne loop
rts

** may need bit $ff for timing purposes

colours .byte 9,8,7,1,7,8,9,0

===================

In SOME cases you can skip the whole FLD and use

LDA $d012
ss CMP $d012
BEQ ss
and then store the Y value

*if* you are using a very small number of raster lines, say 2-3 colours.
2006-03-27 01:32
Trifox
Account closed

Registered: Mar 2006
Posts: 108
hm, and all that for avoiding the bad lines ? what if i modify my waiting routine ( at this time it is only NOPing and waiting for passing 63 cycles ) so that it does count the stuff correctly on each line ?
2006-03-27 01:41
Wanderer
Account closed

Registered: Apr 2003
Posts: 478
The routine above works well for instances where you're using a lot of colours. It saves having a lot of NOP's, that's for certain.

The downside is, using the above method won't allow you to put text where the colours are.

The LDA $d012:cmp $d012:BEQ method will allow you to put text there, but it's not as stable.
2006-03-27 08:26
MRT
Account closed

Registered: Sep 2005
Posts: 149
If you don't use any sprites, you could also just keep those badlines and write your routine around them.
That way you're still able to do anything with your text.

Just remember, a badline occurs once in eight rasterlines (on a normal text screen), a badline without sprites takes 40 cycles off, so you have 23 cycles left (on a PAL system) on a badline to do your tricks.
2006-03-27 09:15
Oswald

Registered: Apr 2002
Posts: 5025
rasterbars from the top of my head (tm)

ldx #$00
rasterloop
lda colortab,x
sta $d020
sta $d021
ldy delaytab,x
dey
bne *-1
inx
cpx #numberoflines
bne rasterloop

colortab
.byte 0,6,0,6,6,14,6,14,14,3,14,3,3,1,3,1,1
.byte ,3,1,3,3,14,3,14,14,6,14,6,6,0,6,0,0

delaytab
.byte 1,8,8,8,8,8,8,8
.byte 1,8,8,8,8,8,8,8
.byte 1,8,8,8,8,8,8,8
.byte 1,8,8,8,8,8,8,8
.byte 1,8,8,8,8,8,8,8

a) you have to start this routine on the left side of a badline

b) colortab&delaytab must not cross a page boundary

c) my memory is rusty maybe you need 7 or 9 for the 8s in t he delaytab
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
t0m3000/ibex-crew
Genius/Xenon
bepp/ΤRIΛD
Majikeyric
mutetus/Ald ^ Ons
psych
The Human Co../Maste..
zscs
Fulgore/Excess
Dr. Doom/RAD
BYB/Hokuto Force
Magic/Nah-Kolor
chesser/Nigaz
cg/Censor Design
pcollins/Quantum
WVL/Xenon
Mibri/ATL^MSL^PRX
dillof
Honcho
Valsary/BD/ESM
Guests online: 113
Top Demos
1 13:37  (9.8)
2 Next Level  (9.8)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Multiverse 100%  (9.6)
8 No Bounds  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Layers  (9.6)
5 Copper Booze  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Nostalgia  (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.039 sec.