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 > Three pixel period pattern on upper/lower border
2010-04-10 16:24
Monte Carlos

Registered: Jun 2004
Posts: 359
Three pixel period pattern on upper/lower border

Any idea, how to create a hires pattern like this:

110110110110110110110110110110110110...

on the upper/lower border over the full width. Every trick allowed.

Btw: $3fff trick does not work, because then the pattern has a period of eight instead of three. Sprites cover only a width of 192 pixels!

Thank you Monte!
2010-04-10 19:58
JackAsser

Registered: Jun 2002
Posts: 2014
Possible with C128 or REU if "every" trick is allowed. :D
2010-04-10 20:21
Monte Carlos

Registered: Jun 2004
Posts: 359
Reu is really cool, but only C64 allowed.

Thanks Monte
2010-04-11 01:40
Skate

Registered: Jul 2003
Posts: 494
I didn't think on it so long but first trick come to my mind allows 248 pixels instead of 192. leave 8 pixel gaps between unexpanded sprites. you need to change $3fff like a split every four cycles which shoudn't be so hard. all you need is 3 different $3fff combinations. so the code should look like this.

lda #%11011011
ldx #%01101101
ldy #%10110110
sta $3fff
stx $3fff
sty $3fff
sta $3fff
stx $3fff
sty $3fff
sta $3fff

this should fill the 8 pixel gaps between sprites which extends the pattern to 248 pixels but still you will need 72 pixels I know...

edit: actually with one more stx $3fff it is possible to have 256 pixels wide pattern like that. why did I miss that? :)

edit2: if you start placing sprites with a 8 pixel gap already and put the correct value to $3fff on the right border, you will have 264 pixels of correct pattern. 56 to go. :)

edit3: I just noticed that sprites wouldn't cover $3fff pattern completely. so, this method may not work at all.
2010-04-11 08:02
Oswald

Registered: Apr 2002
Posts: 5094
put $3fff on zp, then it can be done :D
2010-04-11 08:57
Monte Carlos

Registered: Jun 2004
Posts: 359
@Skate:

$d021 = White
Background is visible, when both $3fff and sprite bits are 0
x = resulting Pixel in white

%11011011%11011011%11011011%11011011 $3fff = Black
%10010010%01001001%00100100 Sprite = White

%00x00x00%x0xx0xx0%0xx0xx0x%00x00x00

Good idea, but it doesn't seem to work for the two bytes in the middle.

@Oswald: How can i put $3fff into zeropage??? Do you mean
lda zp, sta $3fff = 5 cycles ?? Or is there a way to place
the ghostbyte below $0100 which i do not know?
2010-04-11 09:10
Street Tuff

Registered: Feb 2002
Posts: 88
putting $3fff to zp is only possible on c64 dtv.
2010-04-11 09:49
Mace

Registered: May 2002
Posts: 1799
You are now asking to think about a solution you have already chosen: a pattern in the border.

There might be another solution for your problem.
What exactly is the reason you want this pattern in the first place?
2010-04-11 11:40
Monte Carlos

Registered: Jun 2004
Posts: 359
The pattern mentioned above is part of a two color hires bitmap i want to extend into the upper and lower border.
I was experimenting with sprites over ghostbyte pattern and
didn't find a way to create the pixel combination 1101101100..., because of the three pixel period. I thought, maybe someone comes to another result and finds away to create this pixel combination.
Important is, that the pattern should not be made of double, but single pixels.

Monte
2010-04-11 11:51
Skate

Registered: Jul 2003
Posts: 494
@Monte Carlos: I hate to use that trick but I think it's your last chance.

"It's impossible to do something like that. Even Crossbow cannot do it."

;)
2010-04-11 12:33
Jetboy

Registered: Jul 2006
Posts: 337
Interesting puzzle! I need to go to the tolet so i mihght come up with idea when i get back...
 
... 16 posts hidden. Click here to view all posts....
 
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
kbs/Pht/Lxt
MWR/Visdom
radius75
Impetigo/Crescent
Guests online: 115
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (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 Censor Design  (9.3)
5 Triad  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

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