eflake Posted March 14, 2021 Share Posted March 14, 2021 When I run this test, the first top two lines of gr.0 is the normal background, it seems the first line starts at 6 - dpeek(560)+6, 130.. when I try line 5, nothing is displayed not even the print statement. What am I not understanding? Thanks. Running the .atr version 4.5 and altirra 3.90 XL/XE mode DATA COLORS() BYTE = $FF DLI SET D2 = COLORS INTO $D01A, DLI = $00 WSYNC INTO $D018, DLI = $BA WSYNC INTO $D018, DLI = $BB WSYNC INTO $D018, DLI = $BC WSYNC INTO $D018, DLI = $BD WSYNC INTO $D018, DLI = $BE WSYNC INTO $D018, DLI = $BF WSYNC INTO $D018 ' SETUPS SCREEN GRAPHICS 0 ' ADDS DLI AT THREE LINES: POKE DPEEK(560) + 6, 130 ' ACTIVATE DLI DLI D2 'WAIT KEY GET K DLI .. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 14, 2021 Share Posted March 14, 2021 (edited) 45 minutes ago, eflake said: when I try line 5, nothing is displayed not even the print statement. Display List, first 6 bytes are $70 8 Blank Lines $70 8 Blank lines $70 8 Blank line $42 LMS Mode 2 $40 Low byte of screen address $BC High Byte of screen address $02 etc. . so when you poke into line 5 you are changing the high byte of the screen address if you wanted the DLI on the first line you need to POKE PEEK(560)+3,$C2 $C2=mode 2 line+LMS+DLI The print statement is going the the screen @560/561 but the display list is now showing some other area of memory, thats why you don't see anything Edited March 14, 2021 by TGB1718 Quote Link to comment Share on other sites More sharing options...
dmsc Posted March 14, 2021 Share Posted March 14, 2021 (edited) Hi! Quote When I run this test, the first top two lines of gr.0 is the normal background, it seems the first line starts at 6 - dpeek(560)+6, 130.. when I try line 5, nothing is displayed not even the print statement. What am I not understanding? Thanks. Running the .atr version 4.5 and altirra 3.90 XL/XE mode You need to understand how Display-Lists work. The DLI fires in the next line of the display-list where it is maked. So, to have a DLI in line two, you need to mark line 1. But line 1 is special, it is a LMS (load-memory-scan-counter) operation so it takes 3 bytes instead of one, and has a value of 64 more than the standard. This means that you need to use POKE DPEEK(560) + 3, 130+64 There are a lot of o online resources that explain display-lists in the Atari. Have Fun! Edited March 14, 2021 by dmsc fixed example Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 14, 2021 Share Posted March 14, 2021 27 minutes ago, dmsc said: This means that you need to use POKE DPEEK(560) + 6, 130+64 no, that location is the 7th line of the display list, the first display line instruction starts at byte 4 if you poke $C2 into byte 7, it will need an address following it as I have shown in my explanation $C2=mode 2 line+LMS+DLI Quote Link to comment Share on other sites More sharing options...
dmsc Posted March 14, 2021 Share Posted March 14, 2021 Hi! 33 minutes ago, TGB1718 said: no, that location is the 7th line of the display list, the first display line instruction starts at byte 4 if you poke $C2 into byte 7, it will need an address following it as I have shown in my explanation $C2=mode 2 line+LMS+DLI You are right, of course, a copy-paste problem it was: POKE DPEEK(560) + 3, 130+64 Have Fun! Quote Link to comment Share on other sites More sharing options...
eflake Posted March 14, 2021 Author Share Posted March 14, 2021 My main question is, why do i get this at the very top? I want to color the top of the display - or is that the point of all of this 'continue on my google pilgrimage?' Doing this I still see the same image as the below link: POKE PEEK(560)+3,$C2 POKE PEEK(560)+3,$C2 DLI - Image on Pasteboard Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 14, 2021 Share Posted March 14, 2021 (edited) There's an excellent technical description for all things ANTIC and CTIA/GTIA in the 400-800 Technical Reference Notes Section II (Pages 483 onwards) Edited March 14, 2021 by TGB1718 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 14, 2021 Share Posted March 14, 2021 You are using the DLI on the first display line, so it takes effect on next line, so the line the DLI acts on will not change you could just change the last blank line to $F0 POKE 560+2,$f0 Quote Link to comment Share on other sites More sharing options...
eflake Posted March 15, 2021 Author Share Posted March 15, 2021 Thanks, it helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.