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 > Why does this work?
2005-03-03 07:44
Trash

Registered: Jan 2002
Posts: 122
Why does this work?

start
 sei
 lda #$50
 cmp $d012
 bne *-3
 ldx #128
loop
 lda $d012
 and #7
 ora #16
 sta $d011
 inc $d021
 dex
 bne loop
 jmp start

Feel free to add some sprites above the rasters and the colorbars will time themself. How and why does this work?
2005-03-03 08:03
HCL

Registered: Feb 2003
Posts: 728
Common Puntus, why do you have to show off your lack of skills this way? If you had a life you wouldn't need to ask this ;).

You're doing some sort of FLI-timing when you write to D011, which always results in a "stable raster". If you put moving sprites on top of it you'll see a rather unstable FLI-bugs on the left depending on how many sprites are on that particular line.
2005-03-03 08:04
trident

Registered: May 2002
Posts: 91
Doesn't writing to $d011 often result in timed code becuase of CPU delays? I seem to remember seeing similar things with FLI routines.
2005-03-03 08:36
Trash

Registered: Jan 2002
Posts: 122
Quote: Common Puntus, why do you have to show off your lack of skills this way? If you had a life you wouldn't need to ask this ;).

You're doing some sort of FLI-timing when you write to D011, which always results in a "stable raster". If you put moving sprites on top of it you'll see a rather unstable FLI-bugs on the left depending on how many sprites are on that particular line.


Ofcoz I've got to show my bad skills, especially when the cyclecount in the routine above can exceed the number of free cycles on a normal badline and still be timed in row for row.

BTW, 81% isn't enough you should work to get Tsunami to the 100% marker before answering dumb questions like mine.. ;-)
2005-03-03 08:44
Oxidy
Account closed

Registered: Mar 2003
Posts: 80
Trash: Next year you can't bail on Floppy! I was expecting some turkish pepper data, and had to settle with other less appealing alternatives.
2005-03-03 08:49
Trash

Registered: Jan 2002
Posts: 122
Quote: Trash: Next year you can't bail on Floppy! I was expecting some turkish pepper data, and had to settle with other less appealing alternatives.

No worrys, I'll bring the turks to LCP and I'll guess you'll be there and therefore I find the short-term problem solved, Floppy will be a long-term problem as I'm in the middle of buying a house (can you spell d-a-t-a-h-e-l-g or does Vodka have a monopoly on that?).
2005-03-03 10:27
Cybernator

Registered: Jun 2002
Posts: 154
Pretty simple. When you write to $d011, VIC takes over the bus until it finishes reading the chars. So no matter at which cycle you access $d011 (as long as it's at the cycles where VIC halts the CPU due to badline), DEX:BNE LOOP will always go after VIC has freed the bus.
2005-03-03 14:53
Oxidy
Account closed

Registered: Mar 2003
Posts: 80
Quote: No worrys, I'll bring the turks to LCP and I'll guess you'll be there and therefore I find the short-term problem solved, Floppy will be a long-term problem as I'm in the middle of buying a house (can you spell d-a-t-a-h-e-l-g or does Vodka have a monopoly on that?).

Don't forget Axis of Evil 2005, 3-4 weeks before LCP. As always at Björnön/Västerås. Until next time I'll prepare a bottle of my special brew.
2005-08-15 06:25
Sledge

Registered: Sep 2003
Posts: 102
Quote: No worrys, I'll bring the turks to LCP and I'll guess you'll be there and therefore I find the short-term problem solved, Floppy will be a long-term problem as I'm in the middle of buying a house (can you spell d-a-t-a-h-e-l-g or does Vodka have a monopoly on that?).

Datahelg is a fine way to meet up. It inspired me and Speedball to arrange Micromeeting ourselves. And a Micromeeting with Vodka through IRC, having a "one-man-datafylla", is perhaps even better ;)

If you own a house then it's obvious you have to arrange small meetings.. unavoidable.. totally :)
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
Andy/AEG
Mr. Lee
jicas/Patagonia
leonofsgr/Singular C..
Alakran_64
WVL/Xenon
MCM/ONSLAUGHT
Guests online: 108
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
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 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.047 sec.