1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-28 11:51:06 +00:00
Commit Graph

15 Commits

Author SHA1 Message Date
Peter Evans
8d0cf264d7 Add missing NZ checks in INC and DEC 2018-02-28 21:34:58 -06:00
Peter Evans
49199eac84 Rewrite status checks with macros
This also forces the result of operations to be considered purely as
8-bit results in _some_ cases, but not in others. We were missing some
times when an overflow is the expected behavior; because SET_RESULT()
and mos6502_modify_status() use ints, this overflow was not properly
observed.
2018-02-28 21:16:39 -06:00
Peter Evans
30c07df9cb When carry is set, subtract one fewer, not one more
A subtle misunderstanding... which led to bizarre and unexpected
behavior elsewhere.
2018-02-26 18:59:25 -06:00
Peter Evans
0d1e22a348 Add support for decimal mode ADC/SBC.
This also corrects a bug where SBC set carry incorrectly in binary mode.
2018-02-23 00:46:07 -06:00
Peter Evans
8623945bbf Add the ability to INC or DEC the accumulator
This is an oversight from the 6502 processor that was rectified in the
65c02 model.
2018-02-21 21:20:05 -06:00
Peter Evans
f9a95827f5 Change carry flag strategy according to docs 2018-01-21 12:47:36 -06:00
Peter Evans
2f777ce881 Several core changes to status, soft switches
Regarding soft switches, we had several we should have been listening
for on both reads and writes, but were only doing so on writes; this is
now fixed.

Regarding statuses, we were incorrectly calculating both carry and
overflow. This should now be fixed, although some quick examinations of
disassembly output suggest there is something else amiss. Debugging will
continue shortly.
2018-01-20 21:01:26 -06:00
Peter Evans
7d6886a3a8 Change last_addr field to eff_addr 2018-01-12 13:57:48 -06:00
Peter Evans
8d9b48912e Add memory injection to 6502; main memory in apple2
Note that memory _is_ now managed in apple2, and _not_ in mos6502.
2018-01-10 21:28:05 -06:00
Peter Evans
1de1e7788a Rename status flags to MOS_ 2018-01-05 14:18:39 -06:00
Peter Evans
3954b1647f Missing status modifications in a number of instructions 2017-12-08 23:26:46 -06:00
Peter Evans
0336fe7366 Documentation for files 2017-12-08 22:12:31 -06:00
Peter Evans
12d0e5403a Add documentation for the arith instructions 2017-12-06 17:03:37 -06:00
Peter Evans
87de0a877a Add all our tests, plus other fixes 2017-12-03 20:19:17 -06:00
Peter Evans
3cebed2377 Adding all of the instruction files 2017-12-02 13:05:53 -06:00