Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Klaus Dormann's test suite passing #4

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

olefriis
Copy link
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