Commit Graph

22 Commits

Author SHA1 Message Date
David Buchanan
64df2291fc Static-ify instruction arrays 2020-12-11 16:18:42 +00:00
Rob McMullen
4303c7276d Marked read_addr & write_addr as extern in 6502.h 2018-05-17 13:49:33 -07:00
Rob McMullen
b664db7406 Changed header to define external vars to prevent multiple symbol definitions if included in multiple C files
* space is reserved for the variables in 6502.c
2018-05-17 09:51:33 -07:00
Rob McMullen
60a354d64c Removed commented out DEBUG define since it's not used anywhere 2017-12-19 18:36:34 -08:00
Rob McMullen
20d6e48c9f Added decimal mode for ADC and SBC 2017-12-19 17:25:35 -08:00
Rob McMullen
138531960f Added -l command line argument to specify load address 2017-12-19 11:44:17 -08:00
Rob McMullen
2ae87bf12e Fixed cycle timing for multi-byte NOP instructions 2017-12-19 09:20:27 -08:00
Rob McMullen
454e33269a Fixed STA; it's the only operation that doesn't have extra cycles for crossing page boundaries 2017-12-19 09:20:27 -08:00
Rob McMullen
75bb592753 Added extra cycles when crossing page boundaries and for branches taken 2017-12-19 09:18:36 -08:00
Rob McMullen
b6542017bd Updated instruction cycle timing for each opcode
* Opcode timings are without page crossing or branch taken extra cycles
2017-12-18 21:19:51 -08:00
Rob McMullen
d4f85001dc Added multi-byte NOP instructions
* fixes line #5010: C6C7  08        PHP
2017-12-18 12:19:59 -08:00
Rob McMullen
15287322f1 Handle zero page wraparound in ($xx),Y
* fixes line #3065: D95B  C9 12     CMP
2017-12-18 12:01:18 -08:00
Rob McMullen
986a9f33b6 Handle zero page wraparound in ($xx,X)
* fixes line #1100: CFF4  C9 5D     CMP
2017-12-18 11:58:03 -08:00
Rob McMullen
44dfdfaca5 Handle JMP ($xxFF) bug 2017-12-18 11:27:17 -08:00
Rob McMullen
145de40872 Fixed PLP to always clear B flag
* line #103: C826  D0 09     BNE
2017-12-18 10:37:23 -08:00
Rob McMullen
3471e9aa3a Fixed PHP to only modify B flag in byte written, status reg itself is unchanged
* line #71: C7E8  68        PLA
* see http://visual6502.org/wiki/index.php?title=6502_BRK_and_B_bit
2017-12-18 10:11:25 -08:00
Rob McMullen
4bfc5655b6 Removed DECIMAL message to allow comparisons to NES log 2017-12-18 09:52:50 -08:00
Rob McMullen
c5e9cf084e Added command line args to set initial machine state
* changed debug print to match a validation run found on nesdev.com
2017-12-18 09:15:02 -08:00
DavidBuchanan314
622a2dda85 Add framework for cycle counting 2017-01-08 16:28:32 +00:00
DavidBuchanan314
04e228bfef Fixed memory wrapping in address-mode decoders 2017-01-03 21:51:21 +00:00
DavidBuchanan314
1da995b11a Made variable names slightly more consistent 2017-01-03 20:19:58 +00:00
DavidBuchanan314
378169d56b Initial commit 2017-01-03 19:39:48 +00:00