Commit Graph

48 Commits

Author SHA1 Message Date
David Buchanan
8905c49b98 Only try interpreting control sequences in interactive mode 2022-06-11 18:27:53 +01:00
David Buchanan
e9cdef2b48
Merge pull request #5 from FrankBuss/master
fixed some warnings and compiling errors, when compiling with G++ instead of GCC
2021-06-19 12:06:28 +01:00
Frank Buss
b81e3c9da7 fixed some warnings and compiling errors, when compiling with G++ instead of GCC 2021-06-19 08:26:49 +02:00
David Buchanan
8abf954b33 Add interactive mode exit instructions, fix 'make test' interactivity 2020-12-11 16:30:34 +00:00
David Buchanan
64df2291fc Static-ify instruction arrays 2020-12-11 16:18:42 +00:00
David Buchanan
c3674370ef Fix compile 2020-12-11 15:35:27 +00:00
David Buchanan
e000e95ffd
Merge pull request #4 from robmcmullen/extern_h
Missed 2 externs
2018-05-17 22:48:41 +01:00
Rob McMullen
4303c7276d Marked read_addr & write_addr as extern in 6502.h 2018-05-17 13:49:33 -07:00
David Buchanan
5790cbaf03
Merge pull request #3 from robmcmullen/extern_h
Changed header to define external vars to prevent multiple symbol def…
2018-05-17 20:33:30 +01: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
David Buchanan
7e3ef5bd78
Merge pull request #1 from robmcmullen/legal_instructions
Decimal mode & passes torture tests
2018-05-05 00:01:49 +01: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
db29c5cba6 default stack pointer value to 0xff 2017-12-19 18:35:06 -08:00
Rob McMullen
99aac0a85f Added usage statement 2017-12-19 18:33:13 -08:00
Rob McMullen
ff67a94658 Added tests from https://github.com/kingcons/cl-6502 2017-12-19 17:45:43 -08:00
Rob McMullen
20d6e48c9f Added decimal mode for ADC and SBC 2017-12-19 17:25:35 -08:00
Rob McMullen
a25ad398e8 Added -f flag to step through emulation at max possible speed (i.e. without the delay loop) 2017-12-19 14:59:28 -08:00
Rob McMullen
649b7f8349 Added break command to stop at address and save memory dump 2017-12-19 14:55:24 -08:00
Rob McMullen
138531960f Added -l command line argument to specify load address 2017-12-19 11:44:17 -08:00
Rob McMullen
aa189bc44a Fixed command line arg for cycle stop limit to use long int 2017-12-19 10:06:59 -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
53ca2a61d5 Reverted changes to Makefile to compile debug by default 2017-12-19 09:20:27 -08:00
Rob McMullen
7dfd24a3f3 Forgot to increase NUM_MODES for JMP_IND_BUG mode 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
1e52aaa154 Added -c flag to run for specified number of cycles and exit 2017-12-18 09:52:11 -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
b9d74c2a85 Fixed backspace, mostly 2017-02-08 15:37:31 +00:00
DavidBuchanan314
622a2dda85 Add framework for cycle counting 2017-01-08 16:28:32 +00:00
DavidBuchanan314
16dc57ba2b use scientific notation for big decimals 2017-01-08 16:28:13 +00:00
DavidBuchanan314
4d9a788f7f Make status bits bools 2017-01-07 21:25:34 +00:00
DavidBuchanan314
851ac5fe1e Make status structs unsigned 2017-01-07 21:12:27 +00:00
DavidBuchanan314
eb70f8a7c7 Added -Wpedantic 2017-01-03 22:02:00 +00:00
DavidBuchanan314
04e228bfef Fixed memory wrapping in address-mode decoders 2017-01-03 21:51:21 +00:00
DavidBuchanan314
09f394cc45 Adjust wording 2017-01-03 21:30:18 +00:00
DavidBuchanan314
10eeb1a503 Add TODO section 2017-01-03 21:07:58 +00:00
DavidBuchanan314
1da995b11a Made variable names slightly more consistent 2017-01-03 20:19:58 +00:00
DavidBuchanan314
12f80f409c Improve/simplify Makefile. main.c also renamed. 2017-01-03 20:01:18 +00:00
DavidBuchanan314
378169d56b Initial commit 2017-01-03 19:39:48 +00:00
David Buchanan
d085b5699c Initial commit 2017-01-03 19:29:36 +00:00