Sam M W
8e797b70fa
implement BNE
2023-04-15 16:17:51 +01:00
Sam M W
18164c7abf
implement RTI as well
2023-04-15 15:36:53 +01:00
Sam M W
1b90243738
implementation of RTS
2023-04-15 15:36:43 +01:00
Sam M W
9f75d1a6b5
the get_byte method needs to take mutable reference to self
...
the reson for this is it's possible for external hardware to have some
side effect on a read.
2023-04-03 22:46:46 +01:00
Sam M W
d2043dc6fb
less verbosity, more expliciteness
2023-04-03 21:07:06 +01:00
Sam M W
7222388c5e
get rid of silly xextend function; just use the .into()
2023-04-03 21:00:17 +01:00
Sam M W
3accd8ce40
as clippy suggests, convert from bool to u8/i8
2023-04-03 07:39:30 +01:00
Sam M W
0708a1084c
fix the tests back up
2023-04-03 07:39:18 +01:00
Sam M W
12c901e8aa
generic argument for CPU represents memory
2023-04-03 07:02:32 +01:00
Sam M W
a8dac6e805
extract memory functionality into a trait
2023-04-03 06:59:40 +01:00
Sam M W
f3f15de8cc
remove memory.get_slice
...
real hardware won't have the ability to dive in and grab a slice from
memory
2023-04-03 05:50:13 +01:00
Sam M W
131b0f312d
remove get_byte_mut_ref method from Memory
...
This is the right thing to do, because the actual hardware will perform
a read and then perform a write. This could have observable side effects
on a real system
2023-04-03 05:50:06 +01:00
omarandlorraine
61b8dfe1f2
add single_step function ( #62 )
...
Co-authored-by: Sam M W <you@example.com>
2023-03-27 00:27:44 +02:00
Matthias Endler
c3438c14e7
Make code more idiomatic ( #61 )
2023-03-20 14:11:44 +01:00
Sam M W
c2e77b5f52
also test subtractions
2022-10-23 07:05:08 +01:00
Sam M W
2bcbfa63b5
fix panic
2022-10-23 07:05:04 +01:00
Sam M W
bf543e2fbe
add failing test
2022-10-23 07:04:52 +01:00
omarandlorraine
32f925feb2
Merge branch 'master' into incdec
2022-10-21 09:10:18 +01:00
Sam M W
f821dce70f
do increments in the same way
2022-10-21 06:45:40 +01:00
Sam M W
e4aebb9dfe
cargo fmt
2022-10-21 06:42:27 +01:00
Sam M W
4e057a2a94
remove unused function decrement_memory
2022-10-21 06:40:56 +01:00
Sam M W
1d0fd6aad0
remove unused function dec_x
2022-10-21 06:37:41 +01:00
Sam M W
7500e8816e
cargo clippy --fix
2022-10-21 06:34:42 +01:00
Sam M W
95731752ba
using the associated function decrement
2022-10-21 06:33:51 +01:00
Sam M W
665ee4193d
x and y are now unsigned and there's less casting all over
2022-10-20 09:42:17 +01:00
Sam M W
41b9b19be2
decrement_y_test passes
2022-10-20 09:32:51 +01:00
Sam M W
c406965560
decrement_x_test passes
2022-10-20 09:23:58 +01:00
Sam M W
1972a42adc
some failing tests
2022-10-20 09:04:44 +01:00
Sam M W
894e4304ea
test branch_across_end_of_address_space
2022-10-18 14:55:22 +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 Endler
24973d7fbd
Upgrade to Rust 2018 edition
2021-04-07 13:55:41 +02:00
Sam M W
34bbe55712
Add tests for stack over- and underflow
2021-01-30 15:10:41 +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
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