Commit Graph

181 Commits

Author SHA1 Message Date
Preston Skupinski
898c16637a use read_word_long to clean up reading where the program counter should
point to when there is an interrupt
2012-01-05 21:02:57 -05:00
Preston Skupinski
12b352cfa5 Cleanup of SEP and REP 2012-01-05 19:49:35 -05:00
Preston Skupinski
0def76f12a Cleanup of the set and clear p flag instructions 2012-01-05 19:29:50 -05:00
Preston Skupinski
2d50806882 made the Direct_page_indexed_x template into Direct_page_indexed and
have it take the register it operates on
2012-01-05 01:02:23 -05:00
Preston Skupinski
cdf374dcd0 Cleanup of branch instructions 2012-01-05 00:50:49 -05:00
Preston Skupinski
577b47a497 cleanup of DEC instructions and started writing tests for them 2012-01-03 10:15:43 -05:00
Preston Skupinski
55f059b09c Cleaned up INC instructions 2012-01-02 20:43:48 -05:00
Preston Skupinski
2158ce0fb2 wrote a generic template for the increment instructions that work on
registers and used it for those instructions
2012-01-02 15:16:56 -05:00
Preston Skupinski
213398bc35 add some more checking of flags to the increment instruction tests 2012-01-02 01:12:38 -05:00
Preston Skupinski
76a50808ac added tests for INC just for when working on the accumulator, INX and
INY
2012-01-02 00:45:23 -05:00
Preston Skupinski
0539c5c5ff move zero checking from end of each if block to end of function 2012-01-01 23:53:31 -05:00
Preston Skupinski
e1f827b446 use cpu_lib.addressing.Absolute_indexed_x for LDY_absolute_indexed_x 2011-12-31 19:41:24 -05:00
Preston Skupinski
e6ce09016f move common addressing functionality for direct page indirect long indexed y to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 19:26:05 -05:00
Preston Skupinski
29a238b5bd move common addressing functionality for direct page indirect indexed y to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 19:12:39 -05:00
Preston Skupinski
10d0ee341b move common addressing functionality for direct page indirect long to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 18:52:52 -05:00
Preston Skupinski
664bf85268 move common addressing functionality for direct page indexed x indirect to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 18:38:08 -05:00
Preston Skupinski
23bedf5ce7 move common addressing functionality for absolute long indexed x to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 18:17:19 -05:00
Preston Skupinski
a29ee2fb7c move common addressing functionality for absolute long to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 18:01:06 -05:00
Preston Skupinski
9398885bc2 move common addressing functionality for direct page indirect to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 17:32:39 -05:00
Preston Skupinski
0f73c71a7e move common addressing functionality for stack relative indirect indexed y to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 17:21:24 -05:00
Preston Skupinski
1fd918801a move common addressing functionality for absolute indexed y to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 16:56:57 -05:00
Preston Skupinski
19e50d4bf7 move common addressing functionality for absolute indexed x to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 16:56:48 -05:00
Preston Skupinski
72508335ba move common addressing functionality for stack relative to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 15:52:45 -05:00
Preston Skupinski
539aaff3ce move common addressing functionality for direct page indexed x to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 15:26:41 -05:00
Preston Skupinski
65b7448052 move common addressing functionality for direct page and absolute to cpu_lib and use that as the basis for instructions that utilize that addressing mode 2011-12-31 15:26:29 -05:00
Preston Skupinski
4c5c5dc631 add unit tests for memory mapped io device support 2011-12-29 01:37:01 -05:00
Preston Skupinski
84472fab78 use read_byte_long rather than directly accessing bytes in the memory
array in the tests
2011-12-29 00:17:29 -05:00
Preston Skupinski
26ea82204f added the ability for the cpu to load in an array of bytes 2011-12-27 19:33:14 -05:00
Preston Skupinski
64fbd28610 remove trailing whitespace 2011-12-27 19:04:10 -05:00
Preston Skupinski
225755bfb2 added functions for reading and storing words and then refactored the
codebase to use that instead where useful
2011-12-27 18:55:44 -05:00
Preston Skupinski
cd3c112b00 change 'reg' to 'r' in cpu_lib to shorten up calls and have it look more
like using the normal cpu object
2011-12-27 16:00:54 -05:00
Preston Skupinski
5ca04694de started refactoring the codebase by turning zero checks to either set or clear the p status register z flag into a function in a helper library 2011-12-27 01:16:05 -05:00
Preston Skupinski
4106d81cdf use charAt for accessing characters in a string for IE compatibility, fixes #1 2011-12-23 18:04:06 -05:00
Preston Skupinski
95e5a75e92 move MMU and CPU_65816 to the bottom of the function 2011-12-22 00:53:51 -05:00
Preston Skupinski
1199bff3e1 further minor style changes 2011-12-22 00:10:36 -05:00
Preston Skupinski
188fc0e713 numerous style fixes and code cleanup 2011-12-21 23:36:00 -05:00
Preston Skupinski
6950345d03 use equal rather than equals as equals is deprecated 2011-12-16 00:45:03 -05:00
Preston Skupinski
ad4f9e3c76 use a self executing function to hide as much from global scope as possible 2011-12-15 00:00:20 -05:00
Preston Skupinski
3bbe3c9999 many numerous minor style fixes 2011-11-23 02:05:19 -05:00
Preston Skupinski
4e19f48383 move size checking to read_byte and store_byte functions and clean up
all calls to those functions that do that checking
2011-11-22 13:42:55 -05:00
Preston Skupinski
155a153a29 don't use "location" as a name for a variable, general cleanup and
added checks where necessary
2011-11-22 11:53:42 -05:00
Preston Skupinski
f7e6cdff02 have load_binary use store_byte_long rather than store_byte 2011-11-06 19:34:32 -05:00
Preston Skupinski
7b016f1abb updated the TODO 2011-11-06 10:15:42 -05:00
Preston Skupinski
135be106d9 Added executing only a set number of cycles per second and fixed the
problems firefox had with it
2011-11-06 00:20:31 -04:00
Preston Skupinski
a9b70c8ad0 Rework the way the cpu object loads and executes code 2011-11-05 21:45:36 -04:00
Preston Skupinski
798dd18835 use the correct p status register bit in DEC accumulator 2011-10-30 22:12:50 -04:00
Preston Skupinski
5f0424fd0b update the TODO now that cycle counting has been added to everything 2011-10-30 00:22:44 -04:00
Preston Skupinski
a1a337f3f6 finish adding cycle counting to the remaining instructions 2011-10-30 00:18:36 -04:00
Preston Skupinski
06d512a668 added cycle counting to even more instructions 2011-10-29 22:30:28 -04:00
Preston Skupinski
5a44410146 numerous more instructions now feature cycle counting 2011-10-29 20:53:32 -04:00