xzerix Posted May 29, 2014 Share Posted May 29, 2014 Hi all, I'm back to messing around with DLIs again, and trying to figure out how to change colour on every scanline. Say for a graphics 1 screen you can set each line of text to be a different colour, but not every scanline *within* that line of text - I'm thinking something like the "tiger attack" title screen. I guess one way would be to have a graphics mode where you can change every scanline and draw the characters in but is there a simpler way I'm missing? I hope this makes sense! Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 29, 2014 Share Posted May 29, 2014 Graphics mode just puts constraints on how often a DLI can occur. In some cases it's not desirable for a DLI every line anyway because the overhead is such that you're not left with much time left to do stuff. In Gr. 1 it's easy enough - just use a store to WSYNC to skip ahead to the end of the visible display. So for striped text you'd just setup a table with the colour values then read them in a loop. e.g. dli pha tya pha ldy #7 docolour lda ctable,y sta wsync sta colpf1 dey bpl docolour pla tay pla rti ctable .byte $a4,$a6,$a8,$aa,$aa,$a8,$a6,$a4 Note in this case the colours should be stored in reverse order that they appear. This should work OK - you have to be careful with the amount of stuff that goes on before the first WSYNC otherwise you miss a line. 1 Quote Link to comment Share on other sites More sharing options...
xzerix Posted May 29, 2014 Author Share Posted May 29, 2014 Thanks Rybags - I'd almost had it after all. I'd done the sta wsync before the lda ctable,y which seems to be ok, but the bpl i'd screwed up when I hand-assembled the routine and it was jumping to the wrong place, but not crashing! I think I understand now - Thanks a million -Peter. 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.