Commit Graph

191 Commits

Author SHA1 Message Date
Andrew Keeton 82e2cac30c Fix build. 2015-02-12 17:13:13 -05:00
Andrew Keeton 404f8ba1e8 Fix build. 2015-01-29 16:28:53 -05:00
Andrew Keeton 6520983de4 Add range_incl.rs and use range_incl() in the tests. 2015-01-17 19:47:58 -05:00
Andrew Keeton 7210ee7d71 Fix range literal overflow. 2015-01-17 18:51:26 -05:00
Andrew Keeton fd68b8dc58 Fix range literal overflow. 2015-01-17 18:50:18 -05:00
Andrew Keeton 93b6356cbf Fix tests. 2015-01-17 18:41:28 -05:00
Andrew Keeton 5e4dc965bf Fix breaking changes. 2015-01-17 17:53:21 -05:00
Johannes Muenzel e4b3e64739 Reintroduce CheckedAddressDiff now that multidispatch works 2014-12-18 19:17:37 -05:00
Johannes Muenzel 94c67395a9 Merge pull request #34 from typelist/master
Fix the build
2014-12-18 18:06:40 -05:00
Johannes Muenzel 3355699a94 Fix the build 2014-12-18 17:57:42 -05:00
Andrew Keeton 4e75f50afd Add inclusive_or(). 2014-11-20 18:48:42 -05:00
Andrew Keeton 8698dc17f9 Add ORA to execute_instruction(). 2014-11-20 18:47:32 -05:00
Andrew Keeton 9c95ade3a3 Fix inclusive_or_test(). 2014-11-20 18:45:52 -05:00
Andrew Keeton d0c376ba90 Add inclusive_or_test(). 2014-11-20 18:42:57 -05:00
Johannes Muenzel c01995ba55 fix the build for namespaced enums 2014-11-20 18:33:23 -05:00
Andrew Keeton b7cc5cd234 Add exclusive_or(). 2014-11-16 21:20:42 -05:00
Andrew Keeton e4acd0575d Add EOR to execute_instruction(). 2014-11-16 21:14:23 -05:00
Andrew Keeton fab7ff5cf0 Add exclusive_or_test(). 2014-11-16 21:11:22 -05:00
Andrew Keeton 0eee2e659b Add CPX and CPY. 2014-11-13 21:17:59 -05:00
Andrew Keeton 99345e2b1f Make compare() take a variable register. 2014-11-13 20:58:56 -05:00
Andrew Keeton a05a5dfde7 Add CMP to execute_instruction(). 2014-11-13 20:15:40 -05:00
Andrew Keeton 8b962fd542 Add compare(). Add more cases to compare_test(). 2014-11-13 20:08:56 -05:00
Andrew Keeton 233c36ce7e Add compare_test(). 2014-11-13 19:52:10 -05:00
Andrew Keeton 448fc3f061 Add BVC to execute_instruction(). 2014-11-13 18:52:14 -05:00
Andrew Keeton 7e0a086a1d Add branch_if_overflow_set(). 2014-11-13 18:50:55 -05:00
Andrew Keeton c00e170285 Add branch_if_overflow_set_test(). 2014-11-13 18:49:43 -05:00
Andrew Keeton b050ac7d04 Add BVC to execute_instruction(). 2014-11-13 18:43:48 -05:00
Andrew Keeton 8b3c9f8ad2 Add branch_if_overflow_clear(). 2014-11-13 18:42:07 -05:00
Andrew Keeton 4ffae406d6 Add branch_if_overflow_clear_test(). 2014-11-13 18:27:58 -05:00
Andrew Keeton 83d303f878 Add BPL to execute_instruction(). 2014-11-06 20:04:03 -05:00
Andrew Keeton f3160e1bcc Add branch_if_positive(). 2014-11-06 20:02:40 -05:00
Andrew Keeton eb27595cd5 Add branch_if_positive_test(). 2014-11-06 20:00:09 -05:00
Andrew Keeton a0ad2d47be Add BEQ to execute_instruction(). 2014-11-06 19:50:35 -05:00
Andrew Keeton 8febc74788 Add branch_if_equal(). 2014-11-06 19:49:54 -05:00
Andrew Keeton c9ed9e1720 Add branch_if_equal_test(). 2014-11-06 19:48:48 -05:00
Andrew Keeton 59168cbbe4 Add BCS to execute_instruction(). 2014-11-06 19:42:08 -05:00
Andrew Keeton da6a28f639 Add branch_if_carry_set(). 2014-11-06 19:39:46 -05:00
Andrew Keeton eb5c3f3c2a Add branch_if_carry_set_test(). 2014-11-06 19:38:56 -05:00
Andrew Keeton 7a4515b375 Add BCC to execute_instruction. 2014-11-06 19:35:07 -05:00
Andrew Keeton be7539d6c9 Add branch_if_carry_clear(). 2014-11-06 19:32:15 -05:00
Andrew Keeton ecb3f07459 Add branch_if_carry_clear_test(). 2014-11-06 19:30:05 -05:00
Andrew Keeton c9f59dca60 Add AND to execute_instruction. 2014-11-06 19:17:38 -05:00
Andrew Keeton 198ddc3131 Fix and_test(). 2014-11-06 19:13:42 -05:00
Andrew Keeton 413d063f82 Add and(). 2014-11-06 19:07:54 -05:00
Andrew Keeton 5e0d151f12 Add and_test(). 2014-11-06 18:58:09 -05:00
Johannes Muenzel 99abf0aa53 Implement rest of shifts/rotates, and push/pull for accumulator and flags 2014-11-02 21:56:02 -05:00
Johannes Muenzel b7e4125fcd Implement LSR, INC, INX, INY 2014-11-02 15:40:34 -05:00
Johannes Muenzel 8545ea5597 Implement subtract-with-carry and flag setting and clearing instructions 2014-11-02 14:23:38 -05:00
Johannes Muenzel 32b1fa5f4b implement BIT 2014-10-25 19:39:36 -04:00
Johannes Muenzel a5534ac375 Implement transfer instructions. 2014-10-25 19:04:52 -04:00
Johannes Muenzel 5f20fb7442 Use debug! macro 2014-10-25 18:42:48 -04:00
Johannes Muenzel ec960dba40 Remove unneeded 'pub' directives 2014-10-25 18:40:20 -04:00
Johannes Muenzel 20abdc9ff6 Implement store instructions STA, STX, STY 2014-10-25 18:30:05 -04:00
Johannes Muenzel 85aa092944 Merge remote-tracking branch 'alex/ark-bmi' into jam-bmi
Conflicts:
	src/machine.rs
2014-10-25 17:13:40 -04:00
Johannes Muenzel 69371da03b Merge pull request #14 from amw-zero/ark-dec
Implement the DEC instruction
2014-10-25 17:07:11 -04:00
Andrew Keeton 1c1353127a Implement JMP instruction. 2014-10-19 21:37:43 -04:00
Andrew Keeton 2a78062b12 Implement the DEC instruction. 2014-10-19 21:20:19 -04:00
Andrew Keeton 6d7388c779 Merge pull request #11 from amw-zero/decrement-x
DEX instruction
2014-10-19 20:45:43 -04:00
Andrew Keeton 2f25c490da Fix build. 2014-10-16 22:12:43 -04:00
Andrew Keeton 96f5f15d82 Fix build. 2014-10-16 22:11:17 -04:00
Andrew Keeton 8759b15d9e branch_fi_minus_test() passes. 2014-10-16 22:11:17 -04:00
Andrew Keeton d70915ad0f Compile tests. 2014-10-16 22:11:16 -04:00
Andrew Keeton 71d15f9d08 Add BMI implementation. Untested 2014-10-16 22:11:16 -04:00
Andrew Keeton 6941a29352 Fix build. 2014-10-16 22:06:30 -04:00
Andrew Keeton bc1687c247 Make Address take i32 so relative addresses work. 2014-10-16 21:24:18 -04:00
Alex Weisberger 446c5ca3af Remove duplicate test from weird merge pull idk 2014-10-16 20:18:03 -04:00
Alex Weisberger 4fa49d4899 pull in the remote version of decrement-x branch? So I can push to it? I have no idea what I'm doing 2014-10-16 20:09:37 -04:00
Alex Weisberger dd1d52ae24 Rebase onto master to pick up compiler errors and use load_x_register to simplify impl of dec_x. Because load_x_register sets the zero and negative status flags already 2014-10-16 20:05:41 -04:00
Alex Weisberger 8fd38026aa beef up test 2014-10-16 19:54:31 -04:00
Alex Weisberger d132f040f2 DEX instruction and test 2014-10-16 19:54:31 -04:00
Alex Weisberger 34cd5edd44 compiler fixes, static -> const 2014-10-16 18:50:45 -04:00
Alex Weisberger 6321266179 Remove numerous warnings from bitflags! expanding to non-uppercase static constants. 2014-10-08 00:07:43 -04:00
Alex Weisberger 702129ddeb beef up test 2014-10-07 23:56:27 -04:00
Alex Weisberger 52280a9646 DEX instruction and test 2014-10-07 23:52:38 -04:00
Johannes Muenzel 70db1564a4 Change g_opcodes to OPCODES (style warning) 2014-10-07 00:07:09 -04:00
Johannes Muenzel 7556071edb Use log! macro instead of println! so we have the option of running without noise 2014-10-04 17:47:32 -04:00
Johannes Muenzel dae32caada Some cleanup. Enable experimental 'if let' Rust language feature 2014-10-04 16:47:42 -04:00
Johannes Muenzel 7adc2bbcb4 Use a table to look up the meaning of opcodes. Use common code for addressing modes. 2014-10-04 16:33:42 -04:00
Alex Weisberger 59132d0d8d Formatting 2014-10-01 18:43:57 -04:00
Alex Weisberger 9940517c3b program 2 adc instructions 2014-10-01 18:42:52 -04:00
Alex Weisberger 3563f6362c get immediate operand when opcode is ADC Immediate 2014-10-01 18:40:58 -04:00
Alex Weisberger 3e2fecec8f properly inc PC 2014-10-01 18:38:07 -04:00
Alex Weisberger f590b2d90c program loading 2014-10-01 18:19:28 -04:00
Alex Weisberger f2a47f4b00 Show impl for machine 2014-10-01 18:07:57 -04:00
Alex Weisberger be65550525 fetch, decode, execute loop 2014-10-01 18:02:45 -04:00
Johannes Muenzel 12f9b21bd0 Move files around to match the usual structure more 2014-10-01 00:17:33 -04:00
Andrew Keeton 97fa21380f Remove src directory. 2014-09-28 21:13:02 -04:00
Johannes Muenzel 3dc2647270 a bit more commenting for the Instruction enum, and Addr vs AddrDiff distinction 2014-09-26 09:25:06 -04:00
Johannes Muenzel e4c998ddfd Add just a bit of extra annotation to the Instruction chart 2014-09-26 03:37:13 -04:00
Johannes Muenzel 0b2c805a96 Shuffle things around a little. For now a library called machine6502 will be the main code base. 6502-rs is inconvenient to use in a rust context since it starts with a number. The test_exe is no longer the main cargo build target 2014-09-26 02:59:47 -04:00
Johannes Muenzel b22b36bc2a Get some basic definitions and module structure going. Not sure whether Cargo.lock should be in .gitignore 2014-09-26 02:29:27 -04:00