Cybergoth, on Fri Sep 22, 2006 9:12 AM, said:
If it helps any, its not your fault. TIA execution time I assume. This delay also differs for the missilies and the ball.
One thing I learned lately, is that any 6502 instruction can actually last 2 cycles longer than you think. You just never notice this, as the CPU already piplines the next instruction those 2 cycles earlier. Might be that this effect is responsible for 2 of those delay cycles already.
Hmmm...that actually makes sense, and is somewhat implied from
this document.
For example, check this out:
Zero page addressing
Read instructions (LDA, LDX, LDY, EOR, AND, ORA, ADC, SBC, CMP, BIT,
LAX, NOP)
# address R/W description
--- ------- --- ------------------------------------------
1 PC R fetch opcode, increment PC
2 PC R fetch address, increment PC
3 address R read from effective address
Read-Modify-Write instructions (ASL, LSR, ROL, ROR, INC, DEC,
SLO, SRE, RLA, RRA, ISB, DCP)
# address R/W description
--- ------- --- ------------------------------------------
1 PC R fetch opcode, increment PC
2 PC R fetch address, increment PC
3 address R read from effective address
4 address W write the value back to effective address,
and do the operation on it
5 address W write the new value to effective address
For example, note that ADC is grouped with "Read" instructions but it really should be a Read-Modify instruction - an ADC $80 instruction, according to this chart, first fetches the opcode, then fetches the address, then reads from the address and then...is done? Obviously, it needs to actually perform the addition at some point and then, according to that post on nesdev, transfer that result to the accumulator.
Interesting...just looking through that document, it looks like these instructions are pipelined:
EOR, AND, ORA, ADC, SBC, CMP, BIT, and all instructions that use implied addressing.
Assuming that
document is correct, this generally shouldn't have an effect when writing to the TIA since you generally don't use any of those instructions to write to TIA registers (since you can't read from them).
So I don't think this has any effect on the TIA delays.
EDIT: Just noticed this for the first time at the very bottom of that "Documentation for the NMOS 65xx/85xx Instruction Set":
Notes
See the MCS 6500 Microcomputer Family Programming Manual for less
information.
Edited by vdub_bobby, Mon Oct 2, 2006 2:45 PM.