Jump to content
IGNORED

DLI to add one color


Philsan

Recommended Posts

You don't change the shadows, they're only copied at VBlank.

 

Change the GTIA register directly.  This will generate a DLI which will put the colour stored at dec 203 into COLPF1.

 


10 TRAP 30:A=1536:RESTORE 9000
20 READ D:POKE A,D:A=A+1:GOTO 20
30 POKE 203,8:REM COLOUR HERE
40 GRAPHICS 0:DL=PEEK(560)+PEEK(561)*256

50 POKE 54286,64:POKE 512,0:POKE 513,6:P
OKE 54286,192
60 POKE DL+15,130
998 LIST
999 END
9000 DATA 72,165,203,141,10,212,141,23,2
08,104,64,-1

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Rybags said:

You don't change the shadows, they're only copied at VBlank.

 

Change the GTIA register directly.  This will generate a DLI which will put the colour stored at dec 203 into COLPF1.

 

 


10 TRAP 30:A=1536:RESTORE 9000
20 READ D:POKE A,D:A=A+1:GOTO 20
30 POKE 203,8:REM COLOUR HERE
40 GRAPHICS 0:DL=PEEK(560)+PEEK(561)*256

50 POKE 54286,64:POKE 512,0:POKE 513,6:P
OKE 54286,192
60 POKE DL+15,130
998 LIST
999 END
9000 DATA 72,165,203,141,10,212,141,23,2
08,104,64,-1

 

Thanks.

 

I need it for graphics 7+16, but it doesn't work.

Link to comment
Share on other sites

using similar DLI routine as  @Rybags I'm switching COLBK and you can see it working

I'm poking the colour in the byte of the DLI itself (1538)

 

10 A=1536:RESTORE 10000
20 READ D:IF D=-1 THEN 40
30 POKE A,D:A=A+1:GOTO 20
40 GRAPHICS 7+16:DL=PEEK(560)+PEEK(561)*256
50 POKE 54286,64:POKE 512,0:POKE 513,6:POKE 54286,192
60 POKE DL+40,130
998 FOR I=0 TO 255:POKE 1538,I:NEXT I
999 GOTO 998
10000 DATA 72,169,55,141,10,212,141,26
,208,104,64,-1

 

MAC/65 listing of the DLI

0100     .INCLUDE #D:\MAC65\HEADER.M65
0110     *=  $0600
0120     PHA
0130     LDA #55     ; COLOUR
0140     STA WSYNC
0150     STA COLBK   ; BACKGROUND
0160     PLA
0170     RTI
0180     .OPT NO LIST

  • Like 2
Link to comment
Share on other sites

1 minute ago, Mrshoujo said:

Aren't Display List Interrupts relocatable code? It could be stored in a string.

As always, it depends on the contained code... But you must be sure that the string won't move as it will lock the machine if you press, for instance, BREAK and enter some immediate statement.

Link to comment
Share on other sites

@Rybags

 

DLI1.png.78576d68b7ee3d56ac134d0f967466f1.png

 

10 TRAP 30:A=1536:RESTORE 9000
20 READ D:POKE A,D:A=A+1:GOTO 20
30 POKE 203,8:REM COLOUR HERE
40 GRAPHICS 7+16:DL=PEEK(560)+PEEK(561)*256
50 POKE 54286,64:POKE 512,0:POKE 513,6:POKE 54286,192
60 POKE DL+15,130
70 COLOR 1:PLOT 0,0:DRAWTO 159,95
80 GOTO 80
9000 DATA 72,165,203,141,10,212,141,23,208,104,64,-1

 

  • Like 1
  • Haha 1
Link to comment
Share on other sites

1 hour ago, Philsan said:

@Rybags

 

DLI1.png.78576d68b7ee3d56ac134d0f967466f1.png

 


10 TRAP 30:A=1536:RESTORE 9000
20 READ D:POKE A,D:A=A+1:GOTO 20
30 POKE 203,8:REM COLOUR HERE
40 GRAPHICS 7+16:DL=PEEK(560)+PEEK(561)*256
50 POKE 54286,64:POKE 512,0:POKE 513,6:POKE 54286,192
60 POKE DL+15,130
70 COLOR 1:PLOT 0,0:DRAWTO 159,95
80 GOTO 80
9000 DATA 72,165,203,141,10,212,141,23,208,104,64,-1

 

Fillippo, you have to change line no 60

130 (decimal) := $82 (hexadecimal)

This is mode 2 or gfx 0 line plus DLI.

Gfx 7 line is $D if I remember correct (no time to look into a reference atm), so DLI+Gfx 7 would be $8D or 141 (decimal) 

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, pps said:

Fillippo, you have to change line no 60

130 (decimal) := $82 (hexadecimal)

This is mode 2 or gfx 0 line plus DLI.

Gfx 7 line is $D if I remember correct (no time to look into a reference atm), so DLI+Gfx 7 would be $8D or 141 (decimal) 

Perfect, thanks Ralf. I think you can imagine why I need this DLI... 

 

DLI1-2.png.570061b1e2b5194449533c2f010e64b4.png

 

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...