NES2A03.h: http://pastebin.com/f3ca990b3
NES2A03.cpp: http://pastebin.com/f1cac6c93
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