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

112 Commits

Author SHA1 Message Date
Peter Evans
a0a5132099 Add pc file for peripheral card ROM 2018-01-15 23:50:33 -06:00
Peter Evans
be23bb7166 Remove unneeded test stub 2018-01-13 15:57:02 -06:00
Peter Evans
cadc19b3e5 Add display buffer read/write mappers 2018-01-13 15:40:40 -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
3738d70a43 Switch bank code into its own file 2018-01-12 22:06:49 -06:00
Peter Evans
c953616a71 Finish refactor to separate bank_switch and memory_mode
There is one failing test, which I expect to fail at this point; that's
because we need to write a read/write map function for the stack and
zero page so that they use aux memory when BANK_ALTZP is on, and main
memory when not.
2018-01-12 21:04:21 -06:00
Peter Evans
647139924b Small comment 2018-01-12 14:51:00 -06:00
Peter Evans
f69454c965 Some soft switches now require consecutive reads
To allow this to work, we had to allow the CPU struct to record what the
last opcode/operand/address were, although in truth we only needed the
last address.
2018-01-12 14:49:27 -06:00
Peter Evans
7d6886a3a8 Change last_addr field to eff_addr 2018-01-12 13:57:48 -06:00
Peter Evans
1b2e9d952b Add missing test code for the aux bank switch 2018-01-11 22:35:23 -06:00
Peter Evans
c4c0312402 Add missing tests for read/write bank switches 2018-01-11 22:24:19 -06:00
Peter Evans
6d21774e78 Add missing tests 2018-01-11 21:58:17 -06:00
Peter Evans
578e0b291c Allow us to switch main/aux; write bank switch mappers 2018-01-11 19:52:13 -06:00
Peter Evans
9d2f9b6f60 Refactor to remove ram2
Both main and auxiliary memory need to keep an extra 4k of memory that
is bank-switchable, so we have changed to store that memory literally
within the main and aux segments.
2018-01-11 13:19:17 -06:00
Peter Evans
288b4a9e8d The boot procedure no longer defaults bank_switch to 0 2018-01-10 21:50:43 -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
3db536a83d Change memory_mode -> bank_switch
This also changes the concept of the field; bank_switch is a collection
of bit flags now.
2018-01-10 19:59:33 -06:00
Peter Evans
fcba14f91b Add set16 function 2018-01-10 16:43:14 -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
04aab568df Oh, little-endian issues; you are my bane 2018-01-09 16:28:14 -06:00
Peter Evans
68b1b79549 Added a "fix" to JSR test.
It's really wrong, because we _should_ be storing PC + 2 in the stack.
And software's definitely gonna bork when we try emulating them, because
they will invariably inspect the stack and assume that's what we have in
there.

But the proper fix is to not actually do next_byte(), and to never
advance PC outside of the execute function. But that's a bigger change
than I want to do at this specific moment.

So, in the meantime, you have me prattling on in a commit message. Lucky
you!
2018-01-09 16:26:21 -06:00
Peter Evans
b492b44e0c We have a raft of changes here...
1. In some cases we corrected little-endian issues.
2. In others, we need to correct expected output to account for PC,
cycles and hex dumps.
2018-01-09 16:24:51 -06:00
Peter Evans
7e51339b88 Account for incremented PC byte in rel tests 2018-01-09 16:06:41 -06:00
Peter Evans
4beff0bff8 Remember that we must obey little-endian order 2018-01-09 16:00:15 -06:00
Peter Evans
a8bba409c3 Change 16-bit references to respect little-endianness
As the Apple II (or rather the 6502 chip) is little-endian, meaning the
least significant byte is the first byte you read going forward, rather
than the last byte.
2018-01-08 17:10:26 -06:00
Peter Evans
62035d03b8 Remove test (which is now done from vm_area.c) 2018-01-07 20:08:27 -06:00
Peter Evans
b2add9c3de Move vm_area logic into its own file 2018-01-07 20:05:02 -06:00
Peter Evans
143a2b176c Add missing tests and note missing ones 2018-01-07 20:00:28 -06:00
Peter Evans
db6dde7757 Note intentionally missing tests 2018-01-07 19:42:03 -06:00
Peter Evans
bc563b8aca Note intentionally missing tests; add test for flag 2018-01-07 19:39:16 -06:00
Peter Evans
087c424d2f Rename test suite 2018-01-07 16:31:00 -06:00
Peter Evans
a3dff9193b Add missing tests 2018-01-07 16:30:52 -06:00
Peter Evans
ba47de0e4b Add objstore_clear(), tests for objstore 2018-01-07 16:30:33 -06:00
Peter Evans
c3d35dca72 Move address resolver test 2018-01-07 15:50:06 -06:00
Peter Evans
0fa930b548 Fix incorrect test name 2018-01-07 15:48:19 -06:00
Peter Evans
7b2450131e Add tests for would_jump, flash_memory 2018-01-07 15:47:26 -06:00
Peter Evans
55cb80162c Add missing tests 2018-01-07 15:06:07 -06:00
Peter Evans
d8431828a8 Add missing tests for sys/disk2 rom 2018-01-07 14:46:29 -06:00
Peter Evans
216ad72d4c Add comment for free function (handled in teardown) 2018-01-07 14:45:59 -06:00
Peter Evans
d71a5c83ca Change test suite to expected name 2018-01-07 14:38:51 -06:00
Peter Evans
32f0ba21f4 Add comments for tests that we will not write at this time 2018-01-07 13:46:12 -06:00
Peter Evans
665f7de37c Rename apple2dd_ to apple2_dd_
Except for the struct object (apple2dd).
2018-01-07 13:44:07 -06:00
Peter Evans
419b82faf1 Add missing tests for reset, set_memory
This also consciously ignores tests for free() (handled implicitly in
all teardowns) and run_loop (for which I don't have a good notion to
test right now).
2018-01-07 13:43:09 -06:00
Peter Evans
62af6ef606 Add missing files for tests
They're empty, which is ok for the moment.
2018-01-06 21:35:32 -06:00
Peter Evans
1de1e7788a Rename status flags to MOS_ 2018-01-05 14:18:39 -06:00
Peter Evans
45f5975cdf Add test for write_bank 2018-01-04 19:34:15 -06:00
Peter Evans
d7ea991127 Implement first crack at read_bank test 2018-01-04 15:14:32 -06:00
Peter Evans
171ff62551 Change create to use objstore vm_8bit data 2018-01-03 21:50:30 -06:00
Peter Evans
4d07bd7640 Add objstore code, tests 2018-01-03 20:51:20 -06:00
Peter Evans
14f2dcae1a Set the map machine on setup; revert to NULL on teardown 2018-01-03 15:21:24 -06:00