Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


Forums > C64 Coding > D017 stretch
2017-01-31 10:47
Trash

Registered: Jan 2002
Posts: 90
D017 stretch

I have a little while trying out som d017-stretching-code-magic-stuff. It seems impossible to stretch sprite 00 when it is alone a raster row.
Can anyone confirm it is possible or tell med where I am going wrong? I just cant get the timings right and I've tried all combinations (I think?).

I've put 1 -> d017 on all cycles after dec $d016 and then 0 on all cycles after that but for me it seems impossible...

Any help at all would be greatly appriciated!

lda #1
ldy #8
-		dec $d016		;  6 Removes the border
		cmp #$c9
		sta $d017		; Has been moved around
		cmp #$c9
		bit $ea
		sty $d017		; Has been moved around
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		cmp #$c9
		sty $d016		; Makes sure the border is removable
		inx
		cpx #15
		bne -
 
... 11 posts hidden. Click here to view all posts....
 
2017-01-31 20:44
Groepaz

Registered: Dec 2001
Posts: 8143
never put your thumb into the sideborder, girlfriend said
2017-01-31 23:38
ZeSmasher

Registered: Feb 2003
Posts: 211
let's make a demo about it.
2017-02-01 01:09
Trash

Registered: Jan 2002
Posts: 90
Sorry for my stupid question, of course it works to stretch a single sprite with d017 while removing the border (even S#00). You just have to stop being stupid and do it the right way :-(
2017-02-01 01:49
The Phantom

Registered: Jan 2004
Posts: 348
Meh. Whatever.

Good luck.
2017-02-01 08:42
Oswald

Registered: Apr 2002
Posts: 4065
NOS intro at DOTC 1 sided is having sideborder off + 8 sprites stretched differently ?

Defender of the Crown +9D
2017-02-01 09:32
HCL

Registered: Feb 2003
Posts: 663
..isn't that what i told you from the beginning Trash? Just do it the right way! :)
2017-02-01 09:44
Trash

Registered: Jan 2002
Posts: 90
Quote: ..isn't that what i told you from the beginning Trash? Just do it the right way! :)

According to you everything is easy, just some lda and sta's in the right place and the sky is the limit...
2017-02-01 11:05
Compyx

Registered: Jan 2005
Posts: 268
For some reason when doing an 8-sprite open border routine you have to use DEC $d016 + INC $d016.

This has something to do with sprite 0 DMA eating too many cycles from the CPU, so the $d016 writes don't happen at the right time, occupying the CPU with DEC/INC solves that.

I found this out the hard way, back when I still actively coded demos. The explanation might be a bit off, but I'm sure there's VIC-II guru's out here who can do a better job than I do.

But like others have mentioned, when you don't need all 8 sprites, avoid sprite 0.
2017-02-01 11:41
Graham

Registered: Dec 2002
Posts: 990
Explanation is easy: DEC $D016 has 2 write cycles at the end of it's execution, while STA $D016 has only one. The 6510 cannot be stopped on write cycles, so with the right timing you can skip 2 of the 3 bus allocate cycles of the sprite #0 DMA which gets you right to the exact cycle where $D016 has to be changed to open the side border.
2017-02-01 12:42
Compyx

Registered: Jan 2005
Posts: 268
Thanks Graham,

That explains the sprite 0 nastiness a lot better than I did :)
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
Knut Clausen/SHAPE
cba
Didi/Laxity
Røly/MYD^STHD^TSA
Guests online: 48
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Lunatico  (9.6)
6 Comaland 100%  (9.5)
7 Incoherent Nightmare  (9.5)
8 Quad Core 100%  (9.5)
9 Wonderland XII  (9.5)
10 Comaland  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.6)
2 Dawnfall V1.1  (9.5)
3 Daah, Those Acid Pil..  (9.5)
4 Treu Love [reu]  (9.4)
5 Dawnfall  (9.2)
6 Veterans of Style  (9.2)
7 KAOS 64  (9.2)
8 One-Der  (9.2)
9 Game of Thrones [2sid]  (9.2)
10 Tunnel Vision  (9.2)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.4)
3 Oxyron  (9.4)
4 Crest  (9.3)
5 Finnish Gold  (9.3)
Top Swappers
1 Jerry  (10)
2 Zyron  (10)
3 Derbyshire Ram  (10)
4 Splatterhead  (9.8)
5 Walker  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.495 sec.