Skip to content

nes6502: LXA ($AB) Constant Adjustment #2

@L-Spiro

Description

@L-Spiro

In order to pass the JSON tests, 0xEE must be used as the constant, but in order to pass test ROM’s, 0xFF must be used.

A note on its instability:

Instability: CONST is chip- and/or temperature dependent (common values may be $ee, $00, $ff,
…). Some dependency on the RDY line. Bit 0 and Bit 4 are “weaker” than the other bits, and may
drop to 0 in the first cycle of DMA when RDY goes low.

So basically the JSON tests have a choice of 0x00, 0xEE, or 0xFF (Visual6502 uses 0x00).
As such, I recommend changing the JSON tests to use 0xFF so that the JSON tests align with test ROM’s.

This will eliminate the need for this:

#ifdef LSN_CPU_VERIFY
		m_rRegs.ui8A = m_rRegs.ui8X = (m_rRegs.ui8A | 0xEE) & m_ui8Operand;
#else
		m_rRegs.ui8A = m_rRegs.ui8X = (m_rRegs.ui8A | 0xFF) & m_ui8Operand;
#endif	// #ifdef LSN_CPU_VERIFY

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions