Talk:Programming with unofficial opcodes: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(→‎NOPs that discard reads: can't spell ignorance without IGN)
Line 18: Line 18:


Figured I'd format it. —[[User:Lidnariq|Lidnariq]] ([[User talk:Lidnariq|talk]]) 20:35, 24 August 2013 (MDT)
Figured I'd format it. —[[User:Lidnariq|Lidnariq]] ([[User talk:Lidnariq|talk]]) 20:35, 24 August 2013 (MDT)
:I'd call it IGN (ignore). --[[User:Tepples|Tepples]] ([[User talk:Tepples|talk]]) 21:04, 24 August 2013 (MDT)

Revision as of 03:04, 25 August 2013

Stability of ATX

The reference I'm using lists ATX as "unstable"; I made a point of leaving "unstable" instructions out of a reference for programmers. Furthermore, it states that its behavior might differ between machines. It cites two references agreeing with you but also cites Adam Vardy's document, which calls the instruction "OAL", claims that it includes ORA #$EE as one of the steps, and further claims that different machines use different values instead of $EE. It might actually be ORA <line noise> AND #i TAX, and predictable only if i = 0 (in which case it's no different from LAX #0). --Tepples 16:25, 8 February 2011 (UTC)

On IRC, kevtris reported that he has seen a constant $FF as the value in the ORA step, which would put ATX with the LAXs. The difference between $EE and $FF might arise from the lack of decimal mode in the 2A03's ALU. But I'd still recommend against using this instruction because different NES consoles may still interpret it differently. --Tepples 04:05, 11 April 2011 (UTC)

http://visual6502.org/wiki/index.php?title=6502_Opcode_8B_%28XAA,_ANE%29 strongly implies weirdness with the $10 and $01 bits on all unstable instructions are due to a different period of analog feedback inside the 6502. Lidnariq 18:59, 11 April 2011 (UTC)

NOPs that discard reads

This was a thread in the forum in the past, but maybe we might mention the side-effect reads (There, the monikers DLD (dummy load) and LDN (load no-op) were suggested, other random possibilities include "LoaD and Discard"). Could one use 'LDD $20FF,X' where X is some multiple of eight to discard two bytes from CHR-ROM, or would that tight of timing screw up the PPU's fetch FSM? —Lidnariq (talk) 15:41, 24 August 2013 (MDT)

LDD a ($0C aa aa; 4 cycles)
LDD a,X ($1C aa aa, $3C aa aa, $5C aa aa, $7C aa aa, $DC aa aa, $FC aa aa; 4 or 5 cycles)
LDD d ($04 dd, $44 dd, $64 dd; 3 cycles)
LDD d,X ($14 dd, $34 dd, $54 dd, $74 dd, $D4 dd, $F4 dd; 4 cycles)
Reads from memory at the specified address. Discards the result. Affects no register nor flags. Only useful for side effects (e.g. PPUADDR increment) so on the NES the zero-page versions are only useful for timing.
LDD d,X reads from both d and (d+X)&255. LDD a,X additionally reads from a+X-256 it crosses a page boundary (i.e. if ((a & 255) + X) > 255)
Sometimes called TOP (triple-byte no-op), SKW (skip word), DOP (double-byte no-op), or SKB (skip byte).

Figured I'd format it. —Lidnariq (talk) 20:35, 24 August 2013 (MDT)

I'd call it IGN (ignore). --Tepples (talk) 21:04, 24 August 2013 (MDT)