Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DL1 and DL2 - documentation not clear on a few things
#2
ytm Wrote:2. Where do I set memory bank for DL1, and where for DL2? Or is it common for both? The description of DL2STROBE says: "Writing to this register will start execution of Display List pointed to by DLIST2(LH) from the next cycle. If MSB is set, also the RAM bank used by the Display List will change based on bits 0-2". It is unclear whether this affects only DL2 or both. There's no such description next to DLSTROBE

There is one place where the programmer can set which memory bank the displaylist will be executed from => DL2STROBE. Three LSBs (0-2) set the bank number, bit 3 is a bank change trigger. IOW - when upon writing to DL2STROBE the value written has its bit 3 set, displaylist processing switches to the bank selected with the three LSBs of that value. Please note that there was an error in "VASYL registers" documenation - the trigger bit is NOT the MSB. It is bit #3 (well.. MSB of the lower nybble :-)). Already corrected. DLSTROBE register does not have this kind of description  - there is no such functionality there.

Now, there is a caveat. Imagine that we start displaylist in BANK 0 and at some point we jump to and continue in – say – BANK 1. Once we complete the frame, VASYL jumps to the address pointed by DLISTL/DLISTH in currently selected bank! This means that because we switched to another bank - there is a good chance that VASYL will run off the rails. Therefore – unless we keep the bank we switched to on purpose – we have to restore the "original" bank before the end of current frame. An adapted version of the BASIC program from previous post shows this:

Code:
10 RACER0:RACER2:BANK 0
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
160 VMOV$43,8 OR 1:REM DL2STROBE BANK1
170 VEND:REM NOW NEEDED HERE (OR ANYWHERE IN BANK 0)
180 BANK 1
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
980 VMOV$41,$12:VMOV$42,0:REM ADDR OF VEND IN BANK 0
990 VMOV$43,8 OR 0:REM DL2STROBE BANK0
999 REM VEND:REM NOT NEEED HERE NOW
1000 DLON
1999 END
READY.
Reply


Messages In This Thread
RE: Documentation not clear on a few things - by silverdr - 2021-06-05, 05:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)