Processor Source

OK guys, I took a 10 minute break and let the processor run, and there were no crashes so here's the source as it stands thus far.


Obviously it needs to be cleaned up a little, but once the entire emulator is done I will go through and do all of the major prettying up and optimizations. But this will do for now.

Remember this is the 2A03, not a true 6502 processor because it lacks support for decimal numbers (like the real 2A03). Also remember I have no tested this version of the processor with graphics enabled so I can't promise that it's currently bug free.

Feel free to look it over. I'm completely open to any suggestions you may have!

Back to the PPU now :)

** edit **
Yes I notice (and have already fixed) the bug in the adc logic (I needed to mask out the negative bit). I also removed the testVar incrementer. Also note that most ops still reference direct opcodes instead of an op param. This is because at that time, I didn't pass in the operand type. Once I get the chance I will go back and normalize all the functions to use the new logic.

0 comments:

Post a Comment