eflake Posted March 24, 2022 Share Posted March 24, 2022 Following this simple example on antic modes on different lines, is it possible to set a different font for a readable line? this way I could have english text and fonts for the graphics. Adventures in Atari BASIC: Lesson Eight – Multiple Graphics Modes and Marquee Text (wearethemutants.com) 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 24, 2022 Share Posted March 24, 2022 Character sets are pointed to by CHBASE ($D409) Shadow $224 normally set to $E0 So if using a DLI you would need your code to change $D409, remembering that VBLANK will set it back to whatever value is at $224. Text modes use multiple lines to create the character on screen, So for text mode lines, you can change the font as many times as you like. Graphics modes are single lines, so you cant use the character sets in graphics mode directly you need to take each byte of the character you want to display on a graphics screen place it where you need it and then the next 7 lines with the rest of the characters remaining bytes. Hope that makes sense Quote Link to comment Share on other sites More sharing options...
Mrshoujo Posted March 24, 2022 Share Posted March 24, 2022 Graphics 1 and 2 are basically text modes but you can use a DLI to switch from your graphical font to the default font for whichever lines you need. I did that for my Push It! V1.7 game. I think that's the use you're thinking of. Quote Link to comment Share on other sites More sharing options...
eflake Posted March 24, 2022 Author Share Posted March 24, 2022 Using GR.12 antic 4, want to have antic 2 at bottom. I don't know how to do integrate it with this. GRAPHICS 12+16 DL=PEEK(560)+PEEK(561)*256+4 POKE DL-1,68:REM LMS = 64+ANTICMODE NUMBER FOR G=2 TO 19:POKE DL+G,4:NEXT G POKE DL+20,2 < graphics 0 POKE DL+21,65 < RTI POKE DL+22,PEEK(560):POKE DL+23,PEEK(561) Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 24, 2022 Share Posted March 24, 2022 1 hour ago, eflake said: Using GR.12 antic 4, want to have antic 2 at bottom. I don't know how to do integrate it with this. GRAPHICS 12+16 DL=PEEK(560)+PEEK(561)*256+4 POKE DL-1,68:REM LMS = 64+ANTICMODE NUMBER FOR G=2 TO 19:POKE DL+G,4:NEXT G POKE DL+20,2 < graphics 0 POKE DL+21,65 < RTI POKE DL+22,PEEK(560):POKE DL+23,PEEK(561) I think I know what you want to do, try this, it will write to that mode 2 line at the bottom. 10 Graphics 12+16 20 Dl=Peek(560)+Peek(561)*256+4 30 Poke Dl-1,68:Rem LMS = 64+ANTICMODE NUMBER 40 For G=2 To 19:Poke Dl+G,4:Next G 50 Poke Dl+20,2 60 Poke Dl+21,65 70 Poke Dl+22,Peek(560):Poke Dl+23,Peek(561) 75 A=Peek(88)+Peek(89)*256 80 St=40*19:Rem POINT AT MODE 2 LINE 90 I=0 100 Restore 200 110 Read B:If B=-1 Then 300 120 Poke A+St+I,B:I=I+1:Goto 110 200 Data 40,37,44,44,47,0,55,47,50,44,36,-1 300 Goto 300 Quote Link to comment Share on other sites More sharing options...
eflake Posted March 24, 2022 Author Share Posted March 24, 2022 Thanks, the other thing is changing the font at the bottom to either normal or another character set. Perhaps changing the background color of the bottom too. Could I have help with this? Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 24, 2022 Share Posted March 24, 2022 (edited) To do that you will need a DLI setting up in machine code, if your program is in BASIC, the DLI code can reside in Page 6 starting at $600 Here's an example of a DLI in Page 6 SETDLI LDA #DLI/256 ; DLI VECTOR HI STA VDSLST+1 LDA #DLI&255 ; DLI VECTOR LO STA VDSLST LDA #$C0 ; ENABLE INTERUPT STA NMIEN RTS DLI PHA ; DLI MUST SAVE ANY REGISTERS ON STACK LDA #55 ; COLOUR STA COLBK ; DIRECTLY INTO COLOUR REGISTER PLA ; RESTORE REGISTERS RTI ; RETURN FROM INTERUPT Edited March 24, 2022 by TGB1718 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted March 24, 2022 Share Posted March 24, 2022 (edited) If you want to change the font too, just add the code:- DLI PHA ; DLI MUST SAVE ANY REGISTERS ON STACK LDA #55 ; COLOUR STA COLBK ; DIRECTLY INTO COLOUR REGISTER LDA #NEWFONT/256 ; THIS IS THE HIGH BYTE OF THE NEW CHAR SET LOCATION STA $D409 PLA ; RESTORE REGISTERS RTI ; RETURN FROM INTERUPT Remember these changed values will be rest to their original values by the Vertical Blank Routine. (which is probably what you want) Edited March 24, 2022 by TGB1718 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.