View Single Post
Old 20 November 2019, 21:24   #1
Registered User

Join Date: Jul 2018
Location: France
Posts: 536
Copper lists are hard

I'm trying to build a copper list that changes colour 0 at the start and end of each line, complicated by also changing bit depth part way through. It's nearly there, but in trying to fix one bit (circled in orange in the first picture, I end up with everything falling apart in a way that I just don't understand.

Could someone please fill this gap in my knowledge?

In the "before" picture things look like they're working, with colour changes before and after the rollover being taken care of, but with some stuff going wrong within the orange circle.

When trying to fix the orange circle by adding an extra wait:

        // I thought this would fix it
        COP_INSTR(0x80db, 0x80fe)
        COP_INSTR(COLOR00, 0xccf)
        // but it made it worse
All the stuff after the rollover stops happening, even though the bit I fixed was way before that.

I don't understand, and I don't know where to look apart from the HRM.

I've attached the code I use to generate the copper list and a hex dump of the results.
Attached Thumbnails
Click image for larger version

Name:	before.png
Views:	137
Size:	11.8 KB
ID:	65233   Click image for larger version

Name:	after.png
Views:	75
Size:	8.9 KB
ID:	65234  
Attached Files
File Type: txt code.txt (4.7 KB, 22 views)
File Type: txt broken-copper-list.txt (7.0 KB, 22 views)

Last edited by deimos; 20 November 2019 at 21:31.
deimos is offline  
Page generated in 0.04305 seconds with 12 queries