Yeah, but the truth is that there isn't a single way to do this. Your code is slightly different from mine, but it's just as good. You also included the resetting of the $2006/$2005 latch, which I didn't because I'm very organized with my PPU operations and always use $2006/$2005 in pairs.Zepper wrote:Meh, Tokumaru was faster.
There are a thousand different ways to set the palettes, and if he keeps using the trial and error method of finding something that works he'll not find which of those thousand ways is best for him. He'll only find the best way if he understands what is going on in the code.
I remember that in high school and in college a lot of teachers just gave the students blocks of code without actually explaining why they did what they were supposed to do. This is a very poor way to teach programming, and the tests were basically cut&paste-fests, and if anything slightly different from what was seen in class was asked, the students weren't able to change a freaking variable in the code in order to adapt it to a new situation.
Some people on the internet end up doing the exact same thing. They just want a block of code to achieve a task, rather than deeply understand each step of that block of code. I just don't want Nathan to follow that route, or he won't get very far.