1
0
mirror of https://github.com/mre/mos6502.git synced 2024-12-03 08:51:41 +00:00
Commit Graph

179 Commits

Author SHA1 Message Date
Sam M W
8c6591f6a4 remove last of Address and AddressDiff 2022-10-18 10:10:38 +01:00
Sam M W
3de8f9158d move tests and README away from Address 2022-10-18 10:01:55 +01:00
Sam M W
a3c4a7689f the program counter should wrap as well 2022-10-18 09:42:51 +01:00
Sam M W
7328eb416a misc clippy fixes. 2022-10-18 09:38:05 +01:00
Sam M W
4b26e83529 remove Address and AddressDiff from equation 2022-10-18 06:57:59 +01:00
omarandlorraine
f3d3bf470f
add option to statically disable decimal mode (#47)
* add the decimal mode feature to `Cargo.toml`
* add tests for disabled decimal mode to github workflows
* don't run decimal mode tests if decimal mode disabled

Co-authored-by: Sam M W <you@example.com>
2022-08-11 15:42:34 +02:00
Matthias
d1b1c93fd4 Fix clippy warnings 2022-06-07 19:52:00 +02:00
Matthias
363dc47755 Format code 2022-06-07 19:30:29 +02:00
omarandlorraine
ef9a49ac8b
set carry flag if carry_in && value == "$ff" (#44) 2022-06-07 11:03:51 +02:00
Matthias
6fdd561b02
Remove unnecessary fixme comment (#37) 2021-05-16 17:21:56 +02:00
Matthias Endler
24973d7fbd Upgrade to Rust 2018 edition 2021-04-07 13:55:41 +02:00
Matthias
a6eae6f2b0
Merge pull request #32 from omarandlorraine/stackfix
Stackfix
2021-01-30 23:49:57 +01:00
Sam M W
b566265dbb Don't panic on stack over- and underflow 2021-01-30 15:11:02 +00:00
Sam M W
34bbe55712 Add tests for stack over- and underflow 2021-01-30 15:10:41 +00:00
Matthias Endler
93a39980e4 Add Default impls 2021-01-28 23:34:41 +01:00
Sam M W
b39a67b0a1 separate unit test for decimal sbc should set carry 2021-01-28 10:17:10 +00:00
Sam M W
ad40c72dfe separate unit test for decimal sbc 2021-01-28 10:13:44 +00:00
Sam M W
2d87640692 remove worthless comment 2021-01-28 08:58:04 +00:00
Sam M W
51775fbe95 Decimal mode for SBC 2021-01-27 22:44:20 +00:00
Sam M W
3844a730f0 whitespace 2021-01-27 20:31:36 +00:00
Sam M W
153f8e4bd7 Some unit testing for decimal mode 2021-01-26 20:58:09 +00:00
Sam M W
85dd92615d First stab at implementing decimal mode for ADC 2021-01-25 22:57:28 +00:00
GooseDB
8c70df142c new example 2019-10-13 00:07:53 +03:00
Andrey Kutejko
cb8800689f Make changes suggested by Clippy and few more 2019-10-06 23:23:38 +02:00
Andrey Kutejko
cb2658f3e3 update bitflags 2019-10-06 18:56:51 +02:00
Matthias Endler
8360aa4518 Merge branch 'master' of github.com:mre/mos6502 into no-std-base 2018-11-04 20:32:30 +01:00
Matthias Endler
5ee12bdbc0 Add no_std support 2018-11-04 20:26:51 +01:00
Stefano Probst
8239b298cb Simplify some expressions by using the assign op pattern.
See also https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#assign_op_pattern
2018-10-30 12:40:41 +01:00
Stefano Probst
7df3f75934 More stable future for this project. Change some casts from as to a TYPE::from(x) style so that the compile can warn us in the future for some things.
See also https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#cast_lossless
2018-10-30 12:32:36 +01:00
Matthias Endler
bba4ded34d
Merge branch 'master' into master 2018-10-27 14:53:13 +02:00
Stefano Probst
d041a62aac Sync binary example with the bin folder 2018-10-27 11:05:07 +02:00
Noppadet Vivatchotikul
7e8171487e fix syntax error 2018-10-26 09:50:43 +07:00
kzzt
ddfb3a3b29 ran clippy and renamed main.rs to mos6502.rs 2018-10-25 13:29:38 -05:00
Noppadet Vivatchotikul
c440637adb fix variable 2018-10-25 22:35:00 +07:00
Noppadet Vivatchotikul
a9697e6b79 remove warning 2018-10-25 22:07:16 +07:00
Matthias Endler
2737471819 Rename machine to cpu and the crate to mos6502 2017-11-13 23:37:32 +01:00
Matthias Endler
35b6ea6179 Switch back memory from vector to raw byte slice 2017-10-08 17:26:45 +02:00
Matthias Endler
0a3f628168 Fix compilation with latest rustc 2017-08-08 23:24:41 +02:00
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