Giter Club home page Giter Club logo

Comments (4)

Klaus2m5 avatar Klaus2m5 commented on July 20, 2024

Remember, that in the 6502 world borrow = -carry (borrow is the complement of carry). Besides the routine has worked for many users for thousands of times now.
So if you get garbled output it is definitely not in this routine.

from 6502_65c02_functional_tests.

dragonbytes avatar dragonbytes commented on July 20, 2024

wow my bad, you were right of course :) I apologize for that. I come from a 6809 background so that borrow inversion tricked me. I am pretty close to having a successful test but I seem to be stuck in the "tadd" loop which keeps calling "chkadd" over and over and doesn't throw a trap as usual. any tips on what might be wrong? theres alot of nested increments/decrements so i can't quite figure out what the test it trying to do.

from 6502_65c02_functional_tests.

Klaus2m5 avatar Klaus2m5 commented on July 20, 2024

The loop at "tadd" iterates through all possible operands for an add instruction and calls "chkadd" twice, first with C clear and second with C set. This is 256 * 256 *2 iterations and may take a long time. "tadd" exits when "inc ad2" overflows to 0 again. So the best approach is to find the operands "ad1" and "ad2" in memory and see, wether they increment and wether "ad2" actually gets back to 0 to stop the loop.

from 6502_65c02_functional_tests.

dragonbytes avatar dragonbytes commented on July 20, 2024

yes! that was it exactly. I started to monitor ad2 and saw how slowly it was incrementing, so I let it run. took about 30 mins to complete, but when it did, my emulator passed all your tests! (I am emulating a 6502 on a 6309 CPU (another 8-bit cpu with a larger instruction set) so I expected it wouldn't be the fastest in the world :) your tool was super useful, thanks alot for making it!

from 6502_65c02_functional_tests.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.