Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DL1 and DL2 - documentation not clear on a few things
ytm Wrote:I have a few questions - the documentation is not clear/explicit on those:

1. If I start the second displaylist (VREG_DL2STROBE) what happens at the end of the frame? Do we get back to the beginning of DL1 or the beginning of DL2? If DL2 - how do I get back to DL1?

I admit this might not be completely clear so I'll update the docs shortly.

OTOH it is quite easy to verify with a few lines of VBASIC:

100 VCFG 0,0,1
110 VWAIT 130,0
120 VMOV $20,0:VMOV$21,0
130 VDELAYV 10
140 VMOV$20,14:VMOV$21,6
150 VMOV$41,0:VMOV$42,1:REM DL2 $0100
200 VCFG 0,$100,1
210 VWAIT 150,0
220 VMOV $20,0:VMOV$21,0
230 VDELAYV 10
240 VMOV$20,14:VMOV$21,6
999 VEND
1000 DLON
1999 END
If we'd be returning to DL2, then we would have only one black bar stable on the screen. Since there are two - this means we get back to DL1 ;-) Every raster (frame) we first execute the part located at $0000 and then the part located at $0100. This allows adding extra blocks of VASYL code and "jumping" around them without a need to cache/save/restore the initial address. If we look at it this way, then the DL2 is a kind of JMP equivalent (in addition to existing BRA) rather than a separate DL entity. There is a small caveat, which we have to be aware of, if we jump across memory banks. I'll cover it answering the next question.

Messages In This Thread
DL1 and DL2 - documentation not clear on a few things - by silverdr - 2021-06-05, 12:17 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)