1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-24 14:32:08 +00:00
Commit Graph

467 Commits

Author SHA1 Message Date
Peter Evans
a55fd2f71f Remove log message 2018-01-18 16:20:53 -06:00
Peter Evans
e77837ceed Reformat; add a bit more info on running 2018-01-17 16:07:42 -06:00
Peter Evans
818adb4f72 Add some updates! 2018-01-17 16:00:28 -06:00
Peter Evans
96b8b77f37 Use apple2.tests.h for setup/teardown 2018-01-17 15:31:12 -06:00
Peter Evans
37df8db225 Initiate last_key and key_pressed with default values 2018-01-17 15:28:23 -06:00
Peter Evans
c0ce4ec2f1 Set strobe to false by default
Otherwise we could get garbage values, and that was flagging some tests
as failed at random times
2018-01-17 15:16:25 -06:00
Peter Evans
c8dbf1c84c Add missing tests for new vm_screen functions 2018-01-17 15:16:12 -06:00
Peter Evans
53f40ff960 Add tests for apple2.kb.c 2018-01-17 14:58:42 -06:00
Peter Evans
6670df930b Remove unnecessary functions and tests 2018-01-17 14:02:37 -06:00
Peter Evans
bf529d6c9b Finish map, mapper handling for keyboard events
We still need to revise the test code we currently have for handling
keyboard functions; I imagine some code will need to be removed.
2018-01-17 01:07:31 -06:00
Peter Evans
8d4283b1dc Add first work on keyboard support
Mainly the switch_read function, which had necessitated some work done
in the vm_screen area
2018-01-16 23:50:02 -06:00
Peter Evans
2b688c7815 Add last key, strobe fields 2018-01-16 23:49:34 -06:00
Peter Evans
9d6869bfc4 Add missing decls for switch read/write 2018-01-16 23:49:14 -06:00
Peter Evans
9811bbe450 Add switch read/write for display buffer switches 2018-01-16 23:48:49 -06:00
Peter Evans
b1177784a0 Allow access to the last key pressed and key_pressed status 2018-01-16 23:42:10 -06:00
Peter Evans
05e95d7798 Use bitwise OR, not AND, to add flags.
This was a copy-n-paste oops. I swear I know how bitwise AND and OR
works. Pinky swear!
2018-01-16 20:51:14 -06:00
Peter Evans
603ad7a036 Begin adding support for memory soft switches 2018-01-16 16:34:38 -06:00
Peter Evans
2c39120098 Rename video_mode -> display_mode
This also changes the _kind_ of field from an incrementally enumerated
one to a collection of bit flags.
2018-01-16 16:13:50 -06:00
Peter Evans
bcf6b213a6 Account for changes to rom segment structure 2018-01-16 15:46:35 -06:00
Peter Evans
caea83f9c6 Add missing unit tests for pc mapper functions 2018-01-16 14:22:08 -06:00
Peter Evans
a0a5132099 Add pc file for peripheral card ROM 2018-01-15 23:50:33 -06:00
Peter Evans
2db5c791ba Remove peripheral rom init 2018-01-15 17:42:27 -06:00
Peter Evans
ac39349344 Reorganize ROM storage 2018-01-15 17:10:27 -06:00
Peter Evans
6cbcf0f9ab Increase the counter to see more ops running 2018-01-14 22:31:10 -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
208c909fc2 Memory is determined solely by BANK_ALTZP.
Previously, we just used whatever the segment was that got passed in.
But aside from switching the stack and zero page, ALTZP also changes
where bank-switchable memory is read from and written to; it's either
always aux memory (ALTZP is on) or always main memory (ALTZP is off).
2018-01-12 21:21:08 -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
ceccacfbc8 Rework bank switch and memory mode into their own fields.
This is to better define and respect the various modes that you can have
in Apple II memory access. This is a work in progress at the moment.
2018-01-12 16:21:49 -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
e56ed9ea43 Add missing docblocks 2018-01-11 22:48:40 -06:00
Peter Evans
a1435de0ad We weren't noting missing docblock comments.
Due to a very python-noob mistake.
2018-01-11 22:42:19 -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
21040898b3 Return, don't break in write mapper; log if we get to the end 2018-01-11 22:23:53 -06:00
Peter Evans
6d21774e78 Add missing tests 2018-01-11 21:58:17 -06:00
Peter Evans
d79bcba5ec Add missing docblocks 2018-01-11 21:58:05 -06:00
Peter Evans
9564f86a57 Remove flash_memory function 2018-01-11 21:57:52 -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
a17ad0596b Initialize cpu as NULL
Static analysis in clang caught this; we might try to free memory from a
garbage pointer value if the main segment malloc fails.
2018-01-11 13:25:22 -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
81b07361fb Wait less time for instructions 2018-01-10 21:49:52 -06:00
Peter Evans
fe0ed815a9 Move bank switch set up for the mem init functions.
This also changes bank_switch to mirror at boot what the reset function
does later on. Without doing so, our init memory routines will fail.
2018-01-10 21:48:55 -06:00
Peter Evans
24e6e0fd25 Properly free main/aux memory 2018-01-10 21:29:25 -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