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 > Moving sprite pointers addresses
2019-12-06 09:05
Digger

Registered: Mar 2005
Posts: 421
Moving sprite pointers addresses

Is it possible to shift sprite pointers locations by fiddling with DMA delay or in any other way?
2019-12-06 09:34
Krill

Registered: Apr 2002
Posts: 2845
They are hardwired to $03f8..$03ff within the current screen area and can't be moved elsewhere.

What you can do is move them into the visible screen area using linecrunch, but this is usually a big nuisance with linecrunch.

You can within certain limits counter this by switching screen areas around sprite fetch, so that the offending sprite pointers aren't displayed as chars, but your desired chars are displayed instead.

What do you want to achieve by moving sprite pointers?
2019-12-06 11:45
Oswald

Registered: Apr 2002
Posts: 5017
once I had the weird idea to change screen pointer right before after char gfx fetches, so that onscreen sprite pointers doesnt matter :)
2019-12-06 11:56
Krill

Registered: Apr 2002
Posts: 2845
Quoting Oswald
once I had the weird idea to change screen pointer right before after char gfx fetches, so that onscreen sprite pointers doesnt matter :)
That's basically the same as

Quoting Krill
switching screen areas around sprite fetch, so that the offending sprite pointers aren't displayed as chars, but your desired chars are displayed instead
=)
2019-12-06 12:04
Oswald

Registered: Apr 2002
Posts: 5017
ah cool, I thought its something else.

my guess is digger working on some kind of demopart so his best bet is to try and hide it, maybe keep sprite pointers const and animate sprite data, etc.
2019-12-06 13:33
Krill

Registered: Apr 2002
Posts: 2845
Whatever he's doing, asking this kind of overly specific question always reeks like an XY problem.
2019-12-06 13:38
Digger

Registered: Mar 2005
Posts: 421
Thanks, I was wondering if I could update them in any other way that would give me more options than $d018/$dd00 (16 screens * 4 banks = almost 64 combinations). I have routine that switches all 8 pointers per line but still, thought maybe there's a holy grail somewhere :)
2019-12-06 14:07
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: Thanks, I was wondering if I could update them in any other way that would give me more options than $d018/$dd00 (16 screens * 4 banks = almost 64 combinations). I have routine that switches all 8 pointers per line but still, thought maybe there's a holy grail somewhere :)

If you do it per line, like in a twister you place the sprites with 1 line separation in y. Thus the first 0..23 bytes will be rendered into the sprites per line and a simply.

lda #$xx
sta $x3f8
sta $x3f9
sta $x3fa
sta $x3fb
sta $x3fc
sta $x3fd
sta $x3fe
sta $x3ff
2019-12-06 14:22
Krill

Registered: Apr 2002
Posts: 2845
I would recommend setting them apart by 2 lines. Then not stretching sprites for a line will give you a whole new 256 unique sprite patterns for all 8 sprites. :) This may be helpful in some scenarios.
2019-12-06 14:23
Digger

Registered: Mar 2005
Posts: 421
@JA: Yeah, I am already doing it (1 line apart), but I was thinking if this could be abused even further ;-)

@Krill: Nice, I saw that being used but never understood it! What's the max offset, thus number of 256 line combinations?
2019-12-06 14:34
Krill

Registered: Apr 2002
Posts: 2845
Quoting Digger
@Krill: Nice, I saw that being used but never understood it! What's the max offset, thus number of 256 line combinations?
floor(21 / numsprites). So 2 for 8 sprites, 3 for 7 sprites, etc. - Note that this is for one VIC bank, so you can still switch back and forth between sprite sets using $dd00 (but then must write the pointers to a location depending on the used VIC bank, of course).
2019-12-06 15:07
JackAsser

Registered: Jun 2002
Posts: 1989
I usually just move the sprites 8 lines up and start stretch on offset 24 in the sprite
2019-12-06 15:08
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: I usually just move the sprites 8 lines up and start stretch on offset 24 in the sprite

Ahh WITHIN a frame. Sorry nm me!
2019-12-06 17:03
Oswald

Registered: Apr 2002
Posts: 5017
the 2 line offset is nice, didnt know about that.

" if this could be abused even further ;-)"

how about spritecrunch with the Y offsetted sprites :P or just any combination of these to make more then 256 lines happen just a wild idea, might work out in some special cases or might not.
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
iAN CooG/HVSC
A3/AFL
Guests online: 58
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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