|
Ok here's what I do exactly (sorry to insist on little things like this, but I think I misunderstand a detail in the doc somewhere, and I don't know where).
I have a variable "LinearCounter" and a boolean variable "LinearCounterMODE" (which can be "LOAD" or "COUNT")
WRITES TO $400B : * If bit 7 of $4008 is 1, do LinearCount = value in $4008 (bits 0-6) (Brad says "load" here, what does it mean exactly ?) * If bit 7 of $4008 is 0, on next linear counter clock, do : 1) LinearCount = value in $4008 (bits 0-6) 2) LinearCountMODE = COUNT
WRITES TO $4008 (before writing the value): * If bit 7 of $4008 (before the write) = 0, then, regardless of the new bit 7 being written, do : (Brad says "count", what does it mean exactly ?) 1) LinearCount = value in $4008 (bits 0-6) 2) LinearCountMODE = COUNT * If bit 7 of $4008 (before the write) = 1, then do absolutely nothing if the bit 7 being written is 1, if it is 0, do on next linear counter clock : 1) LinearCount = value in $4008 (bits 0-6) 2) LinearCountMODE = COUNT
Is that correct ? I do not do anything with the length counter (for the triangle channel) when writes are made to $4008 or $400B.
By the way, to decide whether I update the triangle step counter or not, to condition is : * if LinearCounterMODE == COUNT, the condition is LinearCount == 0 * if LinearCounterMODE == LOAD, the condition is (value in $4008 bits 0-6) == 0.
Is all this exactly correct ? With *exactly* this, if I do not touch the linear counter when writes are made to $4015, I get no triangle sound in the intro of zelda 2.
|