Thank you so much, nattou. Everything you posted is helpful. I haven't had a chance, yet, to read the zelda classic link, but I will read it.
The color 16 value that I was referring to is PPU memory $3F0D, so you were right. It is a background palette, not a sprite palette.
So, making the breakpoint at PPU memory $3F0D, I saw a bit of what the game is doing wrong. The colors found in PPU $3F00 to $3F1F are taken from CPU memory $6B81 to $6BA0, which are the main dungeon colors, loaded when you first enter the dungeon.
I think what I want it to do is load the colors for the lower dungeon instead of the main dungeon. I don't know how to do that yet. I'll doing some more reading and figuring and post more questions here when I figure out what I need to ask
April 25, 2020, 11:31:14 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I'm back again. I tried to insert my code by adding it to a random subroutine ($E640) that came after the colors were updated, but it was the wrong subroutine because the game wouldn't load!
My subroutine looks like this:
A2 08 LDX #$08
BD 1A 6C LDA $6C1A, X
9D 89 6B STA $6B89, X
D0 F7 BNE (backwards 7 bytes)
A9 00 LDA #$00
20 40 E6 JSR $E640
$6C1A to $6C21 are where the lower dungeon colors are located, so I just wanted to copy them into $6B89 to $6B90.
So my questions are: How do I know where I can add my code? Is there a better way of writing the subroutine? The A & X registers were zero before the subroutine, so I just made sure they were as I found them. Thanks!