| |
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!
|
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Possible with C128 or REU if "every" trick is allowed. :D |
| |
Monte Carlos
Registered: Jun 2004 Posts: 359 |
Reu is really cool, but only C64 allowed.
Thanks Monte
|
| |
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. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
put $3fff on zp, then it can be done :D |
| |
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?
|
| |
Street Tuff
Registered: Feb 2002 Posts: 88 |
putting $3fff to zp is only possible on c64 dtv. |
| |
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?
|
| |
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
|
| |
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."
;) |
| |
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... |
| |
Ninja
Registered: Jan 2002 Posts: 411 |
Tuffi: The 65816 (SCPU) can do this as well. And a C128, too, IIRC. |
| |
Skate
Registered: Jul 2003 Posts: 494 |
@Oswald: consider $3fff at ZP. What is your solution for this? Will you be able to change $3fff (at ZP) each cycle? I don't think so. So, what kind of sprite + $3fff combination you planned? |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
yeah, I was hoping no1 will notice I have made a mistake by that statement. I was still sleepy, so no idea how I thought it would work :D |
| |
WVL
Registered: Mar 2002 Posts: 902 |
I think you should forget about this, and modify the picture instead :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
i think skates proposal will work :) |
| |
assiduous Account closed
Registered: Jun 2007 Posts: 343 |
Quote: i think skates proposal will work :)
it wont. there are both 0->1 and 1->0 bit transitions so you need a MC sprite to cover the ghost byte pattern correctly and for this kind of transition pattern(0->1 between 1->0 and 1->1 & 1->0 between 0>1 and 1->1) MC sprites are out of question:
11011011->
01101101->
10110110->
11011011->
...
not even Crossbow will do it unless he can display something else than the ghost byte and sprites in the vertical borders. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
looking at the above ascii art gave me an idea:
bb0aa0bb
0bb0aa0b
a0bb0aa0
aa0bb0aa
sprites are X stretched, aa is made of sprite '1', bb is made of sprite '2', 0 is background, change the X coords each line to get the tilt effect, and you're done!! :D
edit: oh, I do realize the above is not the wanted pattern :) ok how about then:
aa0bb0aa0bb
aa0bb0aa0bb
aa0bb0aa0bb
aa0bb0aa0bb
aa0bb0aa0bb
tech teching is not needed, even simpler, tho full width is not possible... :/
edit2: ok case SOLVED!!!!
aa is made of X stretched sprites, and bb is made of $3fff. the bb pattern is 8 bits: bb0000bb, and the aa pattern is 8 bits aswell aa0000aa, only the sprite X coords are used to push them in place.
I is teh win! :) |
| |
Hein
Registered: Apr 2004 Posts: 954 |
wow, was that your dream, Oswald? I'm affraid bb will shine through.. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
oswald, what have you been using? :D
Think about your patterns again, and then draw how it should work for > 1 char please.. ;) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
oh shit >1 char case is wrong indeed :D |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
You can extend the correct pattern 7 or 8 lines into the lower border if you like. :) No further though. |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
12345678123456781234567812345678
aa0000aa0000aa0000aa0000aa
bb0000bb0000bb0000bb0000bb
12345678
aa0bb0aa0bb0aa0bb0aa0bb0aa0bb
needed patterns:
aa0000
bb0000
:/ |
| |
Monte Carlos
Registered: Jun 2004 Posts: 359 |
Oh wow, i'm really overwhelmed by all those replies.
Thought i have to repeat, that all the pixels are meant to be in a single rasterline. Anyway, a x size of 243 pixels would be enough instead of full width.
I make a short summary:
Skate: Use unexpanded hires sprites, leave 8 pixel gaps between sprites. -> The $3fff pattern is always black, the sprites are white or black. In any case, some pixels of the $3fff pattern must be anulled, some pixels in white must be added. As the sprite is single color, this does not work.
Monte Carlos: Use expanded single color sprites over $3fff -> If the sprites are white, the double pixels of the sprites cannot be half hidden by the $3fff raster at all positions.
If the sprites are black, no white pixels can be added -> failed
Oswald: Use shifted expanded single color sprites over $3fff pattern. Leave 4 pixel gaps and fill then in the middle -> The x size is not large enough. The intended $3fff pattern has a period of six instead of eight and is therefore not possible.
|
| |
Skate
Registered: Jul 2003 Posts: 494 |
@Monte Carlos: Thanks for the nice puzzle. You can have this pattern by using some kind of an interlace mode (toggling X position of expanded sprites by 3 pixel each frame). But that would look awful of course :) |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
I am not really a VIC coder, so I probably miss something, but couldn't you use unexpanded sprites and then 16 pixel gaps between the sprites, which shows two instances of the $3fff byte.
...and then you change the pattern of $3fff exactly at the cycle where the second $3fff byte in each pair of $3fff bytes would be shown, in order to make the first byte different from the second, in each pair. I think that would be each 5:th cycle (the sprite is 3 chars wide, and then there are 2 chars width of 3fff bytes = 5 chars = 5 cycles), so you should be able to do it in time. Yeah?
If so, then you would have 8*24 pixels from the sprite, and for each sprite there would also be 8*2*8 pixels from the 3ffff bytes:
(8*24)+(8*16) = 320 pixels
Perhaps someone said this already, or perhaps I did indeed miss something. I didn't really think hard now... |
| |
Skate
Registered: Jul 2003 Posts: 494 |
@Frantic: Your approach is the better version of mine but fails for the same reason. $3fff will be visible on sprite areas as well. So you cannot get that pattern correctly even if you can get the correct pattern for the gaps.
Btw, changing $3fff every 5th cycle is trickier than every 4th cycle.
lda #%11011011
ldx #%01101101
ldy #%10110110
sta $3fff-%01101101,x ; 5 cycles
stx $3fff ; 4 cycles
sty $3fff ; 4 cycles
It can be possible but harder. Illegal opcodes should help I guess. |