1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-30 14:29:27 +00:00
Commit Graph

50 Commits

Author SHA1 Message Date
Peter Evans
d4bf5da480 Draw text in 40 column mode 2018-01-18 16:21:25 -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
6670df930b Remove unnecessary functions and tests 2018-01-17 14:02:37 -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
2db5c791ba Remove peripheral rom init 2018-01-15 17:42:27 -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
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
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
Peter Evans
04854d903c Add aux memory field 2018-01-10 20:36:44 -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
343d870399 Add missing mach parameter to set_video/set_memory 2018-01-10 16:59:02 -06:00
Peter Evans
aa486656b3 Set the reset vector to the applesoft interpreter address 2018-01-10 16:47:18 -06:00
Peter Evans
6af0ae85a4 Also force bank switch mode back to ROM 2018-01-10 15:16:12 -06:00
Peter Evans
c9188a288d Reset should change the video mode to 40 column text 2018-01-10 15:14:07 -06:00
Peter Evans
e3ab043aee We no longer need to pass the opcode here 2018-01-09 20:58:53 -06:00
Peter Evans
8201117223 Change init routine to use peripheral function 2018-01-09 15:56:48 -06:00
Peter Evans
7c899122ad We should advance to the next byte in execution 2018-01-08 21:15:56 -06:00
Peter Evans
5da65e0a9e Change apple2dd -> apple2_dd 2018-01-07 14:46:54 -06:00
Peter Evans
8ad1311536 Add set_memory function 2018-01-06 21:37:15 -06:00
Peter Evans
d9527db033 Retrieve the 16-bit PC address.
This fixes a bug where we only got an 8-bit address from $FFFC and
ignored the LSB at $FFFD.
2018-01-05 16:15:13 -06:00
Peter Evans
c6799db689 Separate reset logic from boot function 2018-01-05 16:04:01 -06:00
Peter Evans
d5b6205713 Actually execute some opcodes 2018-01-05 14:55:33 -06:00
Peter Evans
fd8f36b34e We need to use the mach cpu 2018-01-05 14:19:13 -06:00
Peter Evans
2da613f7aa Provisional state upon reboot 2018-01-04 20:09:53 -06:00
Peter Evans
565dd1b34b Make sure the object store got built 2018-01-03 21:50:01 -06:00
Peter Evans
fac6b4f574 Initialize system and disk2 rom 2018-01-03 15:20:48 -06:00
Peter Evans
9a1e51fec3 We need to pass the machine, not memory 2018-01-02 23:49:29 -06:00
Peter Evans
73f7d8f63a Actually map memory when we create an apple2 2018-01-02 16:30:21 -06:00
Peter Evans
834959c10a Add rom, ram2 bank memory; modify read/write sig
The signature for read/write map functions now accepts a void pointer so
that we can pass in the machine that those functions may need to know
about. This is a bit hairy, but allows us to avoid the need for a
yet-uglier global variable.
2018-01-02 16:24:51 -06:00
Peter Evans
78aab1bd13 Fix potential memory leaks in create() 2018-01-01 17:11:03 -06:00
Peter Evans
f70f21789b Add flash memory, disassemble options 2017-12-31 15:50:59 -06:00
Peter Evans
f8ce9ae1d1 Documentation 2017-12-26 17:13:34 -06:00
Peter Evans
f5af03786d Reorganize 2017-12-26 16:39:23 -06:00
Peter Evans
f50d599545 Beginnings of lo-res graphics 2017-12-24 15:07:24 -06:00
Peter Evans
29652b2368 Implement draw text functionality 2017-12-22 15:48:48 -06:00
Peter Evans
b2c1bd9e6d Hello world, in rendered text; use nearest pixel sampling
The scale change removes some blurriness that we saw when copying pixels
from the bitmap font into the renderer.
2017-12-22 12:56:22 -06:00
Peter Evans
979ca65f43 Add bitmap font to apple2, remove rectangle draw 2017-12-21 23:33:04 -06:00
Peter Evans
adac6346e8 Add color mode, text video modes 2017-12-21 11:52:56 -06:00
Peter Evans
87b67216b0 Default to lo-res mode 2017-12-20 21:54:54 -06:00
Peter Evans
23e113e72a Add video mode switcher to handle logical sizes 2017-12-20 21:52:28 -06:00
Peter Evans
f55b608bee Move screen run logic into apple run_loop and create 2017-12-20 20:45:26 -06:00
Peter Evans
294fab76aa Add boot function; modify main to use apple2 boot 2017-12-15 22:22:40 -06:00
Peter Evans
0336fe7366 Documentation for files 2017-12-08 22:12:31 -06:00
Peter Evans
98f70e0a9a Add functions for pressing/releasing keys 2017-12-06 15:21:39 -06:00
Peter Evans
0e02fb8a1a Add struct, initial create function for apple2 2017-12-06 14:36:14 -06:00