Jump to content
IGNORED

Fast Basic DLI question


Recommended Posts

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 by Materion
Link to comment
Share on other sites

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
  • Like 2
Link to comment
Share on other sites

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 by Materion
Link to comment
Share on other sites

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 by TGB1718
Link to comment
Share on other sites

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:

 

PATROL.PNG

 

The source code will be available after the deadline (in about a month).

 

 

 

  • Like 1
Link to comment
Share on other sites

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 by Materion
Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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 by Materion
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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 by Materion
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...