Skip to content

Get Klaus Dormann's test suite passing#4

Draft
olefriis wants to merge 3 commits intomasterfrom
get-klaus-dormanns-test-suite-passing
Draft

Get Klaus Dormann's test suite passing#4
olefriis wants to merge 3 commits intomasterfrom
get-klaus-dormanns-test-suite-passing

Conversation

@olefriis
Copy link
Copy Markdown
Owner

@olefriis olefriis commented Dec 31, 2022

Trying to get these functional tests passing: https://github.com/Klaus2m5/6502_65C02_functional_tests

Currently, you have to manually copy bin_files/6502_functional_test.bin from that repo to the spec folder in this repo.

Running rake spec then produces a lot of output. Currently I am comparing this to the output of running the specs from https://github.com/hainesr/mos6502, where Mos6502::Cpu#inspect has been modified to

    def inspect
      format(
        'a: 0x%02x, x: 0x%02x, y: 0x%02x, sp: 0x%02x, ' \
        'pc: 0x%04x, op: 0x%02x, status: 0b%08b, memory: %i',
        @a, @x, @y, @sp, @pc, @memory.get(@pc), @status.encode, @memory.sum
      )
    end

...to reflect changes to the memory.

However, I think getting these functional tests passing requires us to implement BCD logic. I'm not sure I'm up for that. But let's see how far we can get.

This is a very nice (though somewhat brief) overview of all the MOS 6502 instructions: https://www.masswerk.at/6502/6502_instruction_set.html#SBC

@olefriis olefriis self-assigned this Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant