91SNESplayer Posted December 6, 2020 Share Posted December 6, 2020 Hello! I’m trying to create a custom display list on Atari Basic with 20 lines of Graphics 3 on top and 2 lines of Graphics 2 on the bottom, alas with no success. Can someone point me in the right direction on how I could do this? Quote Link to comment Share on other sites More sharing options...
vitoco Posted December 6, 2020 Share Posted December 6, 2020 What have you done so far? Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 6, 2020 Share Posted December 6, 2020 (edited) PEEK your actual DL (BASIC 0) address and start poking existing DL from that address. Edited December 6, 2020 by zbyti screenshot 1 Quote Link to comment Share on other sites More sharing options...
fenrock Posted December 6, 2020 Share Posted December 6, 2020 (edited) I use this site to help, it exports values (in many formats) and validates the list for you: https://bocianu.gitlab.io/fidl/ Here's an image for what I think you want: You can adjust blank lines at the bottom/top as required. Export of "BASIC" format is: 10000 DATA 70,70,70,48,40,9c,08,08,08,08 10010 DATA 08,08,08,08,08,08,08,08,08,08 10020 DATA 08,08,08,08,08,70,07,07,07,41 10030 DATA 20,9c Edited December 6, 2020 by fenrock Noticed it was basic needed 3 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 6, 2020 Share Posted December 6, 2020 Also have a look at De-Re-Atari, section 2 give a good description of Display Lists and how to make a custom one. There's also a good section later on if you need DLI's Quote Link to comment Share on other sites More sharing options...
+David_P Posted December 6, 2020 Share Posted December 6, 2020 When in doubt, cheat. Let BASIC do most of the hard work - call GRAPHICS 3. Then, using the display list BASIC so generously called from the OS routines for you, search for the first GRAPHICS 0 line in the DL. Replace it within the DL, and the following line as well, with GRAPHICS 2. There will be two more GRAPHICS 0 lines; you can replace them with blank scanlines. Or, my Sunday AM without enough coffee attempt at writing it in BASIC: 10 GRAPHICS 3 20 DL=PEEK(560)+256*PEEK(561) 30 FOR I=DL TO DL+40 40 IF PEEK(I)<>2 THEN 110 50 POKE I,7 60 POKE I+1,7 70 POKE I+2,0 80 POKE I+3,0 90 POP 100 GOTO 120 110 NEXT I 120 REM YOUR PROGRAM HERE Quote Link to comment Share on other sites More sharing options...
91SNESplayer Posted December 6, 2020 Author Share Posted December 6, 2020 That’s a really nifty program Fenrock! I tried it out to generate the display list numbers. However, instead of being greeted by black screen with a blue bar on top, I was greeted by this… Screenshot from Altirria emulator Here is the program that I used. 5 GRAPHICS 3+16 6 RESTORE 10 DL=PEEK(560)+PEEK(561)*256 20 LET A=0 30 DATA 112,112,112,72,64,156,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,112,7,65 ,32,156 40 FOR R=1 TO 30 50 READ B 60 POKE DL+A,B 70 LET A=A+1 80 NEXT R 90 POKE 87,3 100 COLOR 3 110 PLOT 0,0 120 DRAWTO 39,0 130 GOTO 130 Where did I go wrong? Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 7, 2020 Share Posted December 7, 2020 Just had a play with this, your problem is where the screen is, you need to tell the system where it is, here's your modded program, the main part is to poke the display list with the actual screen address. (I only put the DATA on 2 lines due to the copy/paste into Altirra) 5 GRAPHICS 3+16 6 RESTORE 30 10 DL=PEEK(560)+PEEK(561)*256 20 REM LET A=0 30 DATA 112,112,112,72,64,156,8,8,8,8 31 DATA 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,112,7,65,32,156 40 FOR R=DL TO DL+29 50 READ B 60 POKE DL,B 80 NEXT R 90 POKE 87,3:POKE DL+4,PEEK(88):POKE DL+5,PEEK(89) 100 COLOR 3 110 PLOT 0,0 120 DRAWTO 39,0 130 GOTO 130 Quote Link to comment Share on other sites More sharing options...
91SNESplayer Posted December 7, 2020 Author Share Posted December 7, 2020 Great! Now just one more thing, how to I properly position and print text in the Graphics 2 “window”? Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 7, 2020 Share Posted December 7, 2020 what you need to do (which I forgot) is before the mode 7 line is to put a new Load Memory Scan instruction to tell the system where the line is located in memory so you need to add something like 71,(low byte of line), (high byte of line) it can be anywhere in unused memory. 71 is the LMS instruction for a mode 7 line This is from the technical ref Notes 1 Quote Link to comment Share on other sites More sharing options...
Graham Dearsley Posted December 17, 2020 Share Posted December 17, 2020 One other thing about Atari BASIC, you don't need the LET. If your program line doesn't start with a keyword then LET is assumed so "10 A=5" will do. If you do use a LET then Atari BASIC will allow you to use a reserved keyword as a variable name but DON'T ? 1 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.