WMLONG transparent value
TonyB
Posts: 73
in Propeller 2
"WMLONG writes longs, like WRLONG; however, it does not write any byte fields whose data are $FF. This is intended for things like sprite overlays, where $FF byte data represent transparent pixels."
Why FF instead of 00?
Why FF instead of 00?
Comments
Because $00 is probably more useful than $FF as a data value.
ie: $FE = white = $FF_FF_FF rgb
Is WMLONG only intended for writing data that's read from a LUT?
WMLONG can write data strings from cog registers (SETQ+WMLONG) or lut registers (SETQ2+WMLONG). Or, just one long at a time from a single cog register.
About $FF being the data pattern that is not written, it seems to me that you would not want to inhibit $00 values, since they are used for lots of purposes. $FF is at the other end of the spectrum for likely usefulness. Also, bytes are the low limit on hub memory granularity. To affect nibbles or bits, you would have to read, modify, and then write back bytes/words/longs, which are not atomic operations, all together. Byte writes are atomic, though.