Materion Posted March 7, 2021 Share Posted March 7, 2021 (edited) Hello, could someone explain why we poke value 130 when we wanna do DLI in this example ? Why when I try to use GRAPHICS 18 instead of GRAPHICS 0 in this example don't work? What should I do if I want use this example with GRAPHICS 18 ? ' Define the DLI: set background 2 ' color to $24 = dark red. 3 DLI SET d1 = $24 INTO $D01A 4 ' Setups screen 5 GRAPHICS 0 6 ' Alter the Display List, adds 7 ' a DLI at line 11 on the screen 8 POKE DPEEK(560) + 16, 130 9 ' Activate DLI 10 DLI d1 11 ' Wait for any keyu 12 ? "Press a Key" : GET K 13 ' Disable the DLI 14 DLI Edited March 7, 2021 by Materion Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted March 7, 2021 Share Posted March 7, 2021 28 minutes ago, Materion said: Hello, could someone explain why we poke value 130 when we wanna do DLI in this example ? Why when I try to use GRAPHICS 18 instead of GRAPHICS 0 in this example don't work? What should I do if I want use this example with GRAPHICS 18 ? Graphics 0 is Antic mode 2, and 128 + 2 = 130, i.e. the topmost bit enables the DLI. A better way would be to write the following, which works independent of the source mode to modify. POKE DPEEK(560) + 16, PEEK(DPEEK(560) + 16) + 128 2 Quote Link to comment Share on other sites More sharing options...
Materion Posted March 7, 2021 Author Share Posted March 7, 2021 Wow, thank You very much for explanation @thorfdbg !! Now I get it ;). I have another question - maybe @dmsc will know. Is Fast Basic fast enough to do vertical or horizontal scrolling well ? I'm wondering if should I start learning about scrolling but I don't know if Fast Basic can handle it. Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted March 7, 2021 Share Posted March 7, 2021 The Atari does not need a lot of performance for scrolling. Look there for a very good tutorial on this : 1 Quote Link to comment Share on other sites More sharing options...
Materion Posted March 7, 2021 Author Share Posted March 7, 2021 (edited) Thanks for link I will for sure read this tutorial. Another question - what if I want to have 3 different DLIs at 3 different lines of screen? I understand that I define 3 DLIs, set DLI on 3 lines but how to tell which line will do specific DLI? For example line 11 do DLI2, line 13 DLI1, line 16 DLI3 etc. Edited March 7, 2021 by Materion Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 7, 2021 Share Posted March 7, 2021 (edited) You would either have a flag set by each DLI so you know which code in the DLI need processing or each DLI would change the DLI address to point to the next DLI to be processed, bear in mind DLI processing needs to be short. Have a look at section 5 in De-Re Atari, there's a good explanation on DLI timing. Also section 6 covers scrolling Edited March 7, 2021 by TGB1718 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted March 7, 2021 Share Posted March 7, 2021 55 minutes ago, Materion said: what if I want to have 3 different DLIs at 3 different lines of screen? Rob has done one more tutorial: DLIs. It is of similar high quality as the one about fine scrolling. Direct link: http://playermissile.com/dli_tutorial/index.html Quote Link to comment Share on other sites More sharing options...
vitoco Posted March 7, 2021 Share Posted March 7, 2021 1 hour ago, Materion said: Is Fast Basic fast enough to do vertical or horizontal scrolling well ? I'm wondering if should I start learning about scrolling but I don't know if Fast Basic can handle it. About a year ago I wrote a small horizontal scrolling demo in Fastbasic and included a video in a post: That demo was extended to a full minigame for this year's tenliners contest: The source code will be available after the deadline (in about a month). 1 Quote Link to comment Share on other sites More sharing options...
Materion Posted March 7, 2021 Author Share Posted March 7, 2021 (edited) Wow so now I see what FastBasic is really capable of. Incredible. Now would be good to have all that knowledge that is needed to do such things lol :D. It's overwhelming when I try to learn more advanced stuff ... I only coded in Python or C# at intermediate level so I don't have any experience with such low level stuff. Do You have any tips for me that would help me overcome this overwhelm feeling ? Maybe some book, or article that are easy enough for such fledgling programmer as me ;). Edited March 7, 2021 by Materion Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 7, 2021 Share Posted March 7, 2021 Have a look here, there's lots to choose from, from beginner to advanced, choose something with examples, try them and then examine what/how they do stuff, then change things to see what happens, there's really no better way to learn than to try by example, don't feel overwhelmed, take it a step at a time and it will soon come to you. http://www.atarimania.com/documents-atari-400-800-xl-xe-books_1_8.html Quote Link to comment Share on other sites More sharing options...
atarilux Posted March 7, 2021 Share Posted March 7, 2021 9 hours ago, Materion said: Hello, could someone explain why we poke value 130 when we wanna do DLI in this example ? Why when I try to use GRAPHICS 18 instead of GRAPHICS 0 in this example don't work? What should I do if I want use this example with GRAPHICS 18 ? ' Define the DLI: set background 2 ' color to $24 = dark red. 3 DLI SET d1 = $24 INTO $D01A 4 ' Setups screen 5 GRAPHICS 0 6 ' Alter the Display List, adds 7 ' a DLI at line 11 on the screen 8 POKE DPEEK(560) + 16, 130 9 ' Activate DLI 10 DLI d1 11 ' Wait for any keyu 12 ? "Press a Key" : GET K 13 ' Disable the DLI 14 DLI I would be very interested in your beginner's experiences with Fastbasic and graphics, Materion. I have returned to the Atari after about 30 years and recently tried the Fasbasic stuff, but also found it a little confusing. That said, it looks like it has great potential. The question is though if in the end it is just a stepping stone to doing the same things in Assembler? Which may be needed for certain games. But not being an Atari graphics expert, I will leave the performance debate to those who know. Quote Link to comment Share on other sites More sharing options...
Materion Posted March 7, 2021 Author Share Posted March 7, 2021 (edited) @atarilux Yeah I think You need same knowledge about Atari hardware but it offers You much more human friendly syntax and some amenities over assembler. It's like Python but without object oriented programming ;). Now that it supports passing arguments to procedures it's really friendly to me but knowledge about graphics etc. still remain hard to learn but I think in baby steps and help of kind people here it can be achieved on some level ;). Today I learned basics of displaylists so its one step closer to goal ;). Edited March 7, 2021 by Materion Quote Link to comment Share on other sites More sharing options...
atarilux Posted March 7, 2021 Share Posted March 7, 2021 5 minutes ago, Materion said: @atarilux Yeah I think You need same knowledge about Atari hardware but it offers You more human friendly syntax and some amenities over assembler. It's like Python but without object oriented programming ;). Now that it supports passing arguments to procedures it's really friendly to me but knowledge about graphics etc. still remain hard to learn but I think in baby steps and help of kind people here it can be achieved on some level ;). Today I learned basics of displaylists so its one step closer to goal ;). Yes, it would be nice to have an 8-bit Python, but I guess that is a bit ambitious. Fastbasic I quite liked in terms of syntax, it was more the explanations of things such as DLIs which I found a bit confusing, that said DLIs are listed as advanced.. so it is perhaps ambitious to dive straight into that topic after 30 years. I had played with Turbobasic as a kid, but will stick to Fastbasic I think now. Quote Link to comment Share on other sites More sharing options...
Materion Posted March 7, 2021 Author Share Posted March 7, 2021 (edited) @atarilux Simple DLI's are kinda simple so that's good. More complex ones ... well they're not so easy ;). Good start is get to know displaylists at all - this video explains them good. https://www.youtube.com/watch?v=io4AZmT9Bnw. Sticking to FastBasic is good idea - it's faster, more modern and actively developed so I think going back to Turbo Basic XL would be a bad move. Edited March 7, 2021 by Materion 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.