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 > Stable Raster routine
2014-10-22 18:40
xIII

Registered: Nov 2008
Posts: 210
Stable Raster routine

A long time ago I coded a small routine which shows some rasterbars moving on the screen (Transparent Rasterbars). I got some help from my mates in WOW with this stable raster routine.
I know that the NOPs are there for cycle timing but I don't understand how it works :(
Can someone explain me how this works?

;--------------------------------------------------
; stable raster routine ?
;--------------------------------------------------

irq INC $D019 ; 6 cycles
LDY #$19 ; 2 cycles
INY ; 2 cycles
INY ; 2 cycles
STY $D011 ; 4 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles

LDY #$00 ; 2 cycles
jump01 LDX #$F8 ; 2 cycles
LDA rastertable,Y ; 4+ cycles
jump03 STA $D020 ; 4 cycles
STA $D021 ; 4 cycles
INY ; 2 cycles
INX ; 2 cycles
BEQ jump01 ; 2++ cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
LDA rastertable,Y ; 4+ cycles
CPY #$80 ; 2 cycles
BCS clearrastertbl ; 2++ cycles
NOP ; 2 cycles
NOP ; 2 cycles
CLC ; 2 cycles
BCC jump03 ; 2++ cycles

; ---------------
; 94-102 cycles
 
... 10 posts hidden. Click here to view all posts....
 
2014-10-23 13:10
Dr.j

Registered: Feb 2003
Posts: 277
@xIII/WOW: for simple rasterbars effect you don't need stable rasters. you can use delay table or better
a compact raster routine which take 63 cycles for
normal line/21 cycles for bad line. good luck
2014-10-24 08:29
xIII

Registered: Nov 2008
Posts: 210
Dr J.: I usually use a delay table, at least I understand how that works ;)

Thanks everyone for the replies and especially for the links and the PDF !
2014-10-27 00:25
HCL

Registered: Feb 2003
Posts: 728
Checkout Uncensored for a stable raster routine.. even rotating :) Haha, i just couldn't resist :P.
2014-10-27 15:37
Pantaloon

Registered: Aug 2003
Posts: 124
hcl, haha
2014-10-27 21:52
Smasher

Registered: Feb 2003
Posts: 520
that part with rotating rasters caused the biggest "WOOOOOW!" in the whole democompo! :) (ok, offtopic & I dont care)
2014-10-27 21:54
chatGPZ

Registered: Dec 2001
Posts: 11386
despite that i wouldnt call this drunken mess exactly stable at all! =P
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
LDX#40
Chesser/Blazon
MCM/ONSLAUGHT
Nith/TRIÉ…D
t0m3000/hf^boom!^ibx
HOL2001/Quantum
Guests online: 79
Top Demos
1 The Lethal Christmas..  (9.7)
2 Next Level  (9.7)
3 13:37  (9.7)
4 Mojo  (9.7)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 The Demo Coder  (9.6)
9 Uncensored  (9.6)
10 Comaland 100%  (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 Triad  (9.3)
5 Censor Design  (9.3)
Top Webmasters
1 Slaygon  (9.6)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

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