Completed stipple patterns, now thinking about relative versus absolute address pointers. My code works with relative so far, e.g. this just stores DOT element, x,y - coord, c - colour.
Code: Select all
210 REMark off - relative offsets, gfx - graphics memory store, top - last offset, ptr - address pointer
220 off=ALCHP(255*2): gfx=ALCHP(2*1024): top=0: POKE_W off+top,4
...
2330 DEFine PROCedure StoreD(x, y, c)
2340 LOCal ptr
2350 ptr=PEEK_W(off+top)+gfx
2360 POKE ptr,CODE('d')
2370 POKE ptr+1,x: POKE ptr+2,y
2380 POKE ptr+3,c: POKE ptr+4,-1
2390 POKE_W off+top+2,PEEK_W(off+top)+4: top=top+2
2400 END DEFine StoreD
So perhaps I may build up relative offsets only on load and save operations, while keeping absolute pointers internally for easy editing?
Tomas