1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-12-19 10:32:06 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
Peter Evans
a3598ecd16 The stack pushes from the end of the page now 2018-01-23 16:21:43 -06:00
Peter Evans
8edf83f7ad Carry is set only if the result is > 0xFF 2018-01-23 16:20:33 -06:00
Peter Evans
8133781fd3 Use the address mode enum itself 2018-01-23 16:18:22 -06:00
Peter Evans
7a0ea50aa3 The stack now only works with 8bit values; disable carry 2018-01-23 16:16:59 -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
45eb7b5e58 Add zero page memory mapper functions
This also adds tests for those functions. We have, furthermore, removed
some redundant (and non-externed!) functions from apple2.mem.c which was
the old bank switching code that got moved to apple2.bank.c.
2018-01-13 00:38:29 -06:00
Peter Evans
7d6886a3a8 Change last_addr field to eff_addr 2018-01-12 13:57:48 -06:00
Peter Evans
6d21774e78 Add missing tests 2018-01-11 21:58:17 -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
7f6b8d3587 We can no longer assume PC increments during address handling
This change required a number of consequent changes to assumptions we'd
made, and I'm not 100% confident we have things right at this point in
time.
2018-01-09 20:59:14 -06:00
Peter Evans
4beff0bff8 Remember that we must obey little-endian order 2018-01-09 16:00:15 -06:00
Peter Evans
c3d35dca72 Move address resolver test 2018-01-07 15:50:06 -06:00
Peter Evans
7b2450131e Add tests for would_jump, flash_memory 2018-01-07 15:47:26 -06:00
Peter Evans
1de1e7788a Rename status flags to MOS_ 2018-01-05 14:18:39 -06:00
Peter Evans
00ff9f069d Vastly simplify unit tests for mos6502
Criterion's init and fini config options allow us to register setup and
teardown functions. We now use this to register the common cpu variable
for the mos6502 tests, albeit through the use of a global variable.

Doing so necessitated that each of the different test files have their
own suites, due to some implementation details in Criterion, but this is
No Big Deal.
2017-12-06 15:57:15 -06:00
Peter Evans
89ddd20658 Add read_byte function to return the next byte in memory 2017-12-05 20:40:35 -06:00
Peter Evans
8454d1a6c9 Add instruction handler function, handler table 2017-12-05 18:38:36 -06:00
Peter Evans
54473be302 Add functions for instructions, cycles, and address modes.
This also adds a new table for cycles, and adds unit test functions for
the work as well.
2017-12-04 23:30:18 -06:00
Peter Evans
87de0a877a Add all our tests, plus other fixes 2017-12-03 20:19:17 -06:00
Peter Evans
fe9ce3aca3 Tests for the new mos6502 functions 2017-12-02 13:27:30 -06:00
Peter Evans
3cebed2377 Adding all of the instruction files 2017-12-02 13:05:53 -06:00