Search the Community
Showing results for tags 'DLI'.
Found 3 results
I have been working with some DLI code and can't figure out why the first two lines of Graphics 0 don't draw correctly. What am I doing wrong? I have tried a number of different variations. Here is the text file. The code and a screenshot from Altirra is below. Many thanks!!! 10 REM assembly code from https://www.atariarchives.org/alp/chapter_8.php 15 REM see listing 8.2 20 GRAPHICS 0:POKE 752,1 30 SETCOLOR 1,0,0 40 DL=PEEK(560)+PEEK(561)*256 45 REM read in assembly code 50 FOR I=0 TO 34:READ B:POKE 1536+I,B:NEXT I 60 DATA 72,152,72,172,0,4,185,2,4,141 70 DATA 10,212,141,24,208,238,0,4,173,0 80 DATA 4,205,1,4,144,5,169,0,141,0 90 DATA 4,104,168,104,64 95 REM modify diplay list for interrupt 100 FOR I=6 TO 29:POKE DL+I,PEEK(DL+I)+128:NEXT I 195 REM read in background color data 200 POKE 1024,0:POKE 1025,24 210 FOR I=0 TO 23:READ B:POKE 1026+I,B:NEXT I 220 DATA 25,20,25,20,25,20,25,20,25,20,25,20 230 DATA 25,20,25,20,25,20,25,20,25,20,25,20 235 REM point to DLI on page 6 and enable interrupt 240 POKE 512,0:POKE 513,6:POKE 54286,192 250 GOTO 250
I found this DLI ML routine that could suit my needs (e.g. more colors like my 2600 game L.E.M. or a beautiful sky). http://www.atariarch..._Interrupts.php (program 10 + program 12) There is a problem. As-is, cyclically artifacts appear (see yellow pixel on the right): If I completely remove the bar draw part (type 126 GOTO 240 in the program), I get those moving artifacts: To do tests, you can use the attached .atr and type ENTER "D:DLIST.LST". Filippo2012-TurboBasic.atr
I've been working with DLI's on the Atari 8-bit/5200 - a fascinating and powerful technology for doing really cool things with the display! I have decided to add them to the next release of Virtual World BASIC for the 2600! Here's a BASIC Display List Interrupt Demo for the Atari 2600, the program listing and the DLI chapter from the manual to discuss. DLI_Demo4.bin Display_List_Interrupt_demo4.txt The BASIC DLI demo is only 20 lines of code, easy to review (I reused code from 9LineBlitz). Note: This DLI code won't compile until the next version of vwB is released (soon, along with other enhancements). Draft of the new chapter on DLI's: Display List Interrupts ------------------------------- Display list interrupts run during the vertical blank and provide the ability to split the screen up into multiple horizontal sections, each of which can contain a vertically, horizontally or diagonally scrolling playfield with free floating or tile-mapped sprites. The DLI demo program (DLI_Demo.txt) demonstrates setting up display lists to scroll the top half of the screen vertically while scrolling the bottom half of the screen horizontally at different speeds. The demo actually uses 4 DLI calls to do this but arranges them to create two contiguous scroll zones. Syntax for calling the DLI is simple: "gosub DLI" two rows (1/5) of the screen will be updated based on the value you store in scrollvirtualworldtoggle (it's reused for DLI's; just don't use zero). Put in an 8, and the bottom two rows of the screen will be updated: 100 scrollvirtualworldtoggle=8:gosub DLI:scrollvirtualworldtoggle=0: rem call DLI, update tile rows 9 and 10. Put in a 1 and rows 2 and 3 will be updated near the top of the screen: 100 scrollvirtualworldtoggle=1:gosub DLI:scrollvirtualworldtoggle=0: rem call DLI, update tile rows 2 and 3. Trick to span three rows (about 1/3 of the screen) - use "3" as a prefix before the start row. Put in a 37 and the bottom three rows of the screen will be updated: 100 scrollvirtualworldtoggle=37:gosub DLI:scrollvirtualworldtoggle=0: rem call DLI, update tile rows 8,9 and 10. Put in a 30 and the top 3 rows will be updated. 100 scrollvirtualworldtoggle=30:gosub DLI:scrollvirtualworldtoggle=0: rem call DLI, update tile rows 1,2 and 3. It's no more complex than setting the x,y coordinates for the playfield camera to pan the view about the virtual world, you're just able to do that independantly for each section of the screen you define with a DLI! You can call a DLI from each gameloop with different camerea settings; each game loop runs on one of the vertical blanks so one of your DLI calls will happen "before" (called from the top blank) the display is drawn and one will happen after the display is drawn, the one called from the bottom blank (gameloop2). DLI Overhead: 3 row DLI's will occuply nearly the entire top blank, and cannot fit in the bottom blank while 2 row DLI's leave plenty of space for your own program code. Just like raising an event to scroll the entire screen, A DLI need be called only as frequently as you need to update it's target section of the screen (pan the camera). Exercises for setting up multiple DLI's and setting their animation rates: 1. Increase the scrolling speed of the top half of the screen to match the bottom, so they are both animated at 30 FPS (every other frame). 2. Change the demo to show three visible scroll zones; try to set up two zones scrolling horizontally in opposite directions or at different speeds, while the third "larger" zone (comprised of two zones) scrolls vertically or diagonally.