go6502/docs/log.org

2.3 KiB

2013-02 - Building a 6502 emulator

  1. Download the latest copy of Klaus Dormann's amazing 6502 functional tests.
  1. Figure out how to compile them using as65
  1. Create a skeleton CPU, memory interface, etc. and write a loop that loads and interprets instructions.
  • No need to implement any instructions yet: just make it fail on unknown instructions.
  • Also, make it exit if it gets stuck on the same instruction, since that's how Klaus' tests signal errors.
  • Except for when that's how the test signals success: better notice that special address. (Look at the assembler listing output.)
  1. Run it on the tests. When you hit a failure or unimplemented opcode, write code until it works.

Here are some references:

  1. Some things will creep through. eg. https://github.com/zellyn/go6502/commit/a0cb814c9ed8eedfd558627be24934af6c257d32

You'll find them later. :-)

2013-02-27 - Tracking down "PP" instead of PRINT in Applesoft Basic

Finally tracked it down to PLA of non-zero value not clearing the Z flag. Applesoft: D75D is a BNE that should always be taken, since GETCHR (D72C) does PLA of non-zero value.

2013-03-07 - Speeding up visual.go

Sped things up so that they take less than half as long as they did before. Replaced bitset.BitSet with direct array bitset to avoid checking for extensions, and to allow clearing by uint32.

Discrepancies

My ZP,x and ZP,y were doing 16-bit adds, able to go outside the zero page.