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 > Weird ghostbyte glitch (8 sprites+borders open)
2024-07-04 21:11
Starfox

Registered: Jul 2014
Posts: 45
Weird ghostbyte glitch (8 sprites+borders open)

Hello

I'm fiddling with some border sprites and ghostbyte patterns/colors.

I'm alternating the bit pattern $aa (10101010) and $55 (01010101) on each rasterline, but at two points there's like a glitch where the same pixel is repeated twice.

Ohh and, I have 8 sprites displayed on each rasterline,and the borders are all open (the sprites are blank to show the problem).

Here's a screenshot:

https://www.dropbox.com/scl/fi/g6nt8giewsfp2rdw5g4tl/weird-ghos..

EDIT: It's not a VICE bug. I suspect its because of the timing of the writes or something sinister?

Cheers!
 
... 22 posts hidden. Click here to view all posts....
 
2024-07-04 22:22
trident

Registered: May 2002
Posts: 101
i agree with hcl, definitely an effect of the scroll register being offset by one pixel.

one way to fix it could be to use the asl instruction to open the border, as it will set the scroll register to $d0, which won't have that pixel offset. but it will also set the multicolor mode, which will affect the ghostbyte too. (maybe lsr will work instead, since it will set the scroll register to $4, which won't affect this particular ghostbyte pattern.)
2024-07-04 22:31
Skate

Registered: Jul 2003
Posts: 506
just to make sure, you can try to change sty $d016 position by a few cycles back and forth and see if one of the glitch positions also change.
2024-07-04 22:35
Starfox

Registered: Jul 2014
Posts: 45
Quote: Sure its not just a scaling artefact?

Yeah, if I resize, it's still there.

Ahh it makes sense with the scroll register. Thanks! :) 👍

Like I'm seeing the aftereffects of the dec/sty cycles?
2024-07-04 23:09
Starfox

Registered: Jul 2014
Posts: 45
Quote: i agree with hcl, definitely an effect of the scroll register being offset by one pixel.

one way to fix it could be to use the asl instruction to open the border, as it will set the scroll register to $d0, which won't have that pixel offset. but it will also set the multicolor mode, which will affect the ghostbyte too. (maybe lsr will work instead, since it will set the scroll register to $4, which won't affect this particular ghostbyte pattern.)


I tried fiddling with asl/lsr, but I guess the timing on the write cycles are different from dec?

Skate: I tried, but it just pushes the glitch further to the right.

HCL: won't this be happening everywhere in effects of this type, but we don't notice it?
2024-07-04 23:38
HCL

Registered: Feb 2003
Posts: 731
@Starfox Either you have to set $d016 back during the sideborder where the ghost pattern is not visible, or you have to use an instruction that can open the sideborder without affecting the x-fine-scroll value.

I don't have the solution for you, and i also don't want to spoil the fun for you finding the solution yourself! :D
2024-07-04 23:41
Flavioweb

Registered: Nov 2011
Posts: 466
I'm simply guessing: couldn't it happen that the vic switches from hires to multicolor and vice versa showing a single pixel in multicolor (therefore doubled in width)?
2024-07-04 23:48
Starfox

Registered: Jul 2014
Posts: 45
Quote: @Starfox Either you have to set $d016 back during the sideborder where the ghost pattern is not visible, or you have to use an instruction that can open the sideborder without affecting the x-fine-scroll value.

I don't have the solution for you, and i also don't want to spoil the fun for you finding the solution yourself! :D


Haha, no spoiling it wouldn't be any fun =P

I can't do it with 8 sprites, but should be possible without/less of course :)

Flavioweb: Interesting. I don't know how to check this other than fiddling with scroll values to see what happens.
2024-07-05 05:57
Flavioweb

Registered: Nov 2011
Posts: 466
Quoting Starfox
Flavioweb: Interesting. I don't know how to check this other than fiddling with scroll values to see what happens.

If you leave the 4th bit of $D016 always at zero then i'm wrong.
But if you use inc/dec or some other opcodes that change the bit value you can try to avoid it and see what happens.
2024-07-05 09:45
Starfox

Registered: Jul 2014
Posts: 45
Quote: Quoting Starfox
Flavioweb: Interesting. I don't know how to check this other than fiddling with scroll values to see what happens.

If you leave the 4th bit of $D016 always at zero then i'm wrong.
But if you use inc/dec or some other opcodes that change the bit value you can try to avoid it and see what happens.


I tried fiddling a little bit. Somehow got $d016 set to $c0. whole screen went black, no interrupts, only jmp * was happening 😂
2024-07-05 11:24
Martin Piper

Registered: Nov 2007
Posts: 739
Does it behave differently on new and old VIC revisions?
Previous - 1 | 2 | 3 | 4 - 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
heavymett
Murphy/Exceed
theK/ATL
Mason/Unicess
Røly/Mayday!
Microtop/Starion
Pac
Guests online: 151
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Sabbi  (9.5)
4 Morpheus  (9.4)
5 CreaMD  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.079 sec.