Yet another spiral demo :)
pik33
Posts: 2,366
Yet another spiral demo. This time in Spin, using my HDMI driver
A demo code is now simple but compiles only with Flexprop. Propeller Tool doesn't like accessing another object's variables.
CON _clkfreq = 200000000 hdmipin = 8 obj v: "hng023" pub demo() |x,y,px,py,d v.start(512+256+192+48,hdmipin) repeat y from -248 to 247 repeat x from -448 to 447 px,py:=xypol(x,y) v.putpixel(x+448,y+248,(py+px<<20)>>24) repeat d:=long[v.palette_ptr+4*255] longmove(v.palette_ptr+4,v.palette_ptr,255) long[v.palette_ptr]:=d v.waitvbl(1)
zip
15K
Comments
Palette cheat! :P
Yes, good, old, vblank synchronized palette trick Setq2 allows reading all 256 color palette every frame in every vblank
Now, how to do this using a Propeller Tool? It also doesn't like to call putpixel, which is a variable (a method pointer) in the driver.
Huh, TV is telling me 896x496 resolution.
Can't help with anything Spin, sorry. I'm enjoying Pasm too much.
Yes, it is 896x496x60Hz, the maximum resolution at which the driver (or rather P2 memory) allows 8 bpp - 446400 bytes used by fb and display list, less than 100 kB left
A lot of pasm is used in the driver
You can also rotate a display list
Good idea to use the palette.