(2020-09-27, 11:07 PM)shazz Wrote: But thinking of effects I could achieve (mirroring, reversing, interlacing,...) I was wondering if a register which takes any pointer in local memory as a look-up table would not more generic and useful. Each value of the lut would be an address (or index) in the local bitmap data that the PBS would follow to select which byte to write.
Sure, you could do that, but then a) everyone would have to set up look-up tables in order to display an image, b) more memory bandwidth would be needed to handle an extra level of indirection, even if it is not used for anything.
Of course, if you really need the flexibility, it is there - that's what display lists are for:
MOV VREG_ADR0L, <ptr_table
MOV VREG_ADR0H, >ptr_table
MOV VREG_STEP0, 1
SETA ptr_count - 1
WAIT start_line, 0
loop:
XFER VREG_PBS_BASEL, (0)
XFER VREG_PBS_BASEH, (0)
DELAYV 1
DECA
BRA loop
This snippet will repeatedly read data from ''ptr_table'' and use it at the beginning of every line to initialize the bitmap pointer.