09692f45f6
fix JSR and RTS bug
...
The stack's PUSH and PULL weren't proper and JSR was reading wrong
argument it seems.
2024-06-28 10:18:01 -04:00
3ebdeab784
start logging instructions as nestest.log has done
2024-06-28 10:17:37 -04:00
6a5b0b728e
start fixing bugs with memory access
...
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-17 15:11:45 +05:30
77d37dd455
implement basic iNES and Mapper 0 ROM loading
...
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-17 14:46:46 +05:30
1f6e3b054c
replace bit comparisons with 0 from greater than to not equal
...
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-16 17:11:51 +05:30
745496ccd1
add memory mirroring for system and ppu memory
2024-06-11 15:38:58 +05:30
44273e69b9
add separate implied/accumulator functions for certain opcodes
2024-06-11 15:08:53 +05:30
142e35ff69
remove opcode json converter helper scripts
...
They were only used to automate writing the boilerplate for each
instruction. They're not needed at the moment and they were using
65c02 instructions instead of 6502 anyways.
2024-06-11 14:43:41 +05:30
a3189d90af
add jsr, rti, rts
2024-06-10 23:27:14 +05:30
3412a03a5e
implement untested most of stack-related opcodes
2024-06-10 23:27:11 +05:30
dbb952a52b
add lsr, rol, ror
2024-06-10 14:33:12 +05:30
ebdf50cdf3
implement tay, txa, tya
2024-06-10 14:28:13 +05:30
454276a50c
implement sta, stx, sty
2024-06-10 14:28:13 +05:30
e07d5917a1
implement se?() opcodes and remove extra 65c02 opcodes
2024-06-10 14:28:07 +05:30
23008662ce
implement more instructions
2024-06-09 22:50:33 +05:30
68ecbce235
add opcode_mem() function to return memory address and not pre-peek
...
Of course all of these opcodes need to be tested later...
2024-06-09 22:15:21 +05:30
c417bf2276
add memory writing functions
2024-06-09 16:07:09 +05:30
4db0a8163e
implement some more instructions and branching?
2024-06-09 16:02:04 +05:30
858cbfba48
fix potential adc overflow flag bug
2024-06-09 15:35:31 +05:30
76b9059b2e
add blank todo opcode functions based on opcode json
2024-06-09 13:11:05 +05:30
207c6903f5
programmatically create switch cases for opcodes based on opcode json
...
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-09 13:08:31 +05:30
72e29b3d25
move addressing mode parsing into separate function
2024-06-08 22:08:51 +05:30
1ac30a026b
add adc and actually fix peek/16
2024-06-08 17:41:17 +05:30
bd85b80ba7
fix peek
2024-06-04 17:48:34 +05:30
36a8eefd00
shorten addressing mode enum names
2024-06-04 16:16:48 +05:30
7245191e86
add peek(), peek16(), and finish lda()
2024-06-04 15:54:09 +05:30
10567e0be8
load program rom into proper offset in memory
2024-05-24 12:55:44 +05:30
8493837ef9
implement tax and inx and print status each time
2024-05-24 12:20:04 +05:30
24ca08a83d
add lda immediate and brk
2024-05-24 11:50:08 +05:30
dd757c4324
start working on 6502 cpu
2024-05-20 19:39:23 +05:30
5fcf579ad4
initial commit
2024-05-20 18:51:56 +05:30