summaryrefslogtreecommitdiff
path: root/cpu.c
AgeCommit message (Collapse)Author
2024-06-30fix incorrect argument for ASL and LSRvin
2024-06-30fix JSR, RTS, and RTIvin
JSR was pushing 1 too high PC and RTS was 1 too low RTI was only pulling the low byte of PC
2024-06-30change SBC to be ADC with one's complement instead of two'svin
It seems that is what was expected when run with nestest.
2024-06-29fix status flag ordering shenanigansvin
2024-06-29fix ADC bug where V is calculated with new A instead of old Avin
2024-06-28fix status register to match nestestvin
2024-06-28improve logging and JMP indirectvin
2024-06-28fix more bugsvin
2024-06-28fix JSR and RTS bugvin
The stack's PUSH and PULL weren't proper and JSR was reading wrong argument it seems.
2024-06-28start logging instructions as nestest.log has donevin
2024-06-17start fixing bugs with memory accessvin
So this is why tests should be written while writing the program and instructions instead of all at once later. If this were all to be rewritten (which it probably will), I should add tests for each opcode instead of waiting until the end for ROM loading support.
2024-06-17implement basic iNES and Mapper 0 ROM loadingvin
It seems like the test ROM loads fine but the instructions are not, but that's exactly what the test ROM is for I suppose.
2024-06-16replace bit comparisons with 0 from greater than to not equalvin
They're both the same and the compiler might have already optimized it away. It also conveys the message better in my opinion.
2024-06-11add memory mirroring for system and ppu memoryvin
2024-06-11add separate implied/accumulator functions for certain opcodesvin
2024-06-10add jsr, rti, rtsvin
2024-06-10implement untested most of stack-related opcodesvin
2024-06-10add lsr, rol, rorvin
2024-06-10implement tay, txa, tyavin
2024-06-10implement sta, stx, styvin
2024-06-10implement se?() opcodes and remove extra 65c02 opcodesvin
2024-06-09implement more instructionsvin
2024-06-09add opcode_mem() function to return memory address and not pre-peekvin
Of course all of these opcodes need to be tested later...
2024-06-09add memory writing functionsvin
2024-06-09implement some more instructions and branching?vin
2024-06-09fix potential adc overflow flag bugvin
2024-06-09add blank todo opcode functions based on opcode jsonvin
2024-06-09programmatically create switch cases for opcodes based on opcode jsonvin
The JSON is from https://github.com/ericTheEchidna/65C02-JSON/ and saved me a lot of time from writing the cases for each opcode by hand.
2024-06-08move addressing mode parsing into separate functionvin
2024-06-08add adc and actually fix peek/16vin
2024-06-04fix peekvin
2024-06-04shorten addressing mode enum namesvin
2024-06-04add peek(), peek16(), and finish lda()vin
2024-05-24load program rom into proper offset in memoryvin
2024-05-24implement tax and inx and print status each timevin
2024-05-24add lda immediate and brkvin
2024-05-20start working on 6502 cpuvin