I've been toying around with the VDP FILL function, and especially, trying to trigger it again while already filling.
Here's my code:
Code: Select all
MOV.L !AUTOFILL,R4 ; $20004104
MOV #LINE_WIDTH,R0 ; 40 pixels
MOV.W R0,@R4 ; Set Length
MOV.L !FRAME_BUFFER2,R0 ; $24000200+128*FB_WIDTH
SHLR R0
MOV.W R0,@(2,R4) ; Set Start Address
MOV R1,R0 ; Red line
MOV.W R0,@(4,R4) ; Set Data
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOV #2,R0
!waitABit:
DT R0
BF !waitABit
MOV R2,R0 ; Green line
MOV.W R0,@(4,R4) ; Set Data
The second line is our test. I first draw a blue line, to clearly see things,
then I trigger a FILL with red,
then, during this red FILL, I trigger a green FILL.
What does this picture tell us?
- You can trigger a FILL while being already FILLing. Upon that, the current FILL is discarded while the new one starts.
- When you trigger a new FILL, the value of length register is read again. I deduce this from the fact that the green line is ~40 pixels long
- When you trigger a new FILL, the value of start register is NOT read again. I deduce this from the fact that the green line does NOT start from where the second red line started, that is, we can see some red pixels before the green ones.
Going further, we may imagine an image where the pixels would be put by FILLing, and changing length and data on the fly.
Pretty useless, but this reminds me of the oerg666 Blast Processing.