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

457 Commits

Author SHA1 Message Date
Peter Evans
ec522f259e Add block comments to describe source files 2018-02-12 21:15:20 -06:00
Peter Evans
0822b2f4ba Use the correct file name 2018-02-12 21:11:50 -06:00
Peter Evans
5c0f65215b Use the correct file name 2018-02-12 20:18:17 -06:00
Peter Evans
1e3f2e5781 Use the correct name of the source file 2018-02-12 19:28:37 -06:00
Peter Evans
e63d7e5d72 The file is apple2.dd.c 2018-02-12 18:24:35 -06:00
Peter Evans
ba387c004f We should be dividing, not using modulus 2018-02-11 20:36:41 -06:00
Peter Evans
3e2d8acacf The same track/sector method works for all images
Particularly so as the data segment is now the 6-and-2 encoded form,
which we either encode from DOS 3.3/ProDOS, or use literally from NIB
files.
2018-02-11 20:25:44 -06:00
Peter Evans
9f60e61cfb Add missing docblock comments 2018-02-09 23:14:05 -06:00
Peter Evans
3223fe6110 Enable disassembly toggle (ALT+D) 2018-02-07 15:24:02 -06:00
Peter Evans
c1cbdb4a43 ALT+P will pause 2018-02-07 14:44:26 -06:00
Peter Evans
308a1070ae Add paused field, pause execution 2018-02-07 14:44:04 -06:00
Peter Evans
433d9a436f Add pause function, flesh out machine_info 2018-02-07 14:43:20 -06:00
Peter Evans
a84b4c12e9 Treat pause and disasm as toggle functions
This allows us to remove the resume and disasm_off functions. (The
disasm_on function is simply renamed to disasm.)
2018-02-07 14:41:44 -06:00
Peter Evans
91d2267625 Really print out something useful for cpu_info 2018-02-07 00:14:38 -06:00
Peter Evans
3c1709c9b1 Add alt+i (info) option 2018-02-07 00:02:53 -06:00
Peter Evans
97846f5c1a Configure the DI with all of the standard stuff 2018-02-07 00:02:35 -06:00
Peter Evans
360e9243f8 Use the DI container to get machine/cpu/etc 2018-02-07 00:02:20 -06:00
Peter Evans
09017aa171 Use DI to obtain the reflect struct 2018-02-07 00:01:27 -06:00
Peter Evans
5e7492abdf Allow mutability if in testing 2018-02-06 23:37:20 -06:00
Peter Evans
4e0892dc86 Add dependency injection container for vm 2018-02-06 23:24:48 -06:00
Peter Evans
524412039a Implement a dumb stub for cpu_info 2018-02-06 21:10:08 -06:00
Peter Evans
608b2259e5 Break keyboard event logic out into normal/special 2018-02-06 16:29:15 -06:00
Peter Evans
fa5bfe09ae Add better handling if selected_drive is NULL
(Discovered from static analysis)
2018-02-06 14:58:00 -06:00
Peter Evans
0dce7dbc58 Remove unnecessary assignment 2018-02-06 14:37:04 -06:00
Peter Evans
fbee851daf Add apple2 reflect code 2018-02-06 00:30:46 -06:00
Peter Evans
318107d18f Change macro name to REFLECT_HANDLER 2018-02-05 21:54:38 -06:00
Peter Evans
8c0b69668c Add docblocks for vm_event functions 2018-02-05 21:43:02 -06:00
Peter Evans
c6bbb46dfe Add ignores for docblocks 2018-02-05 20:44:11 -06:00
Peter Evans
c1c42834ed Add reflect system to virtual machine 2018-02-05 20:31:05 -06:00
Peter Evans
4ce79c785c Only read or write if a disk is in the drive 2018-02-05 12:42:19 -06:00
Peter Evans
a13be6c413 Disable opcode output 2018-02-05 12:29:00 -06:00
Peter Evans
92ee67c8d8 Allow us to signal that we should exit 2018-02-05 00:35:04 -06:00
Peter Evans
72c4111458 Add event system; move event code into vm_event.c 2018-02-05 00:28:22 -06:00
Peter Evans
247bafbcce We also need to move beyond the sector header 2018-02-04 15:44:41 -06:00
Peter Evans
e23a3e4b63 Use macro definitions for track/sector length 2018-02-04 14:19:40 -06:00
Peter Evans
64364d91ad Remove unnecessary for loop 2018-02-04 14:15:24 -06:00
Peter Evans
463a9ba268 Handle all phase cases (zero and non-zero) 2018-02-04 01:11:30 -06:00
Peter Evans
1245ddec55 Make encode/decode more testable with return codes 2018-02-04 00:21:39 -06:00
Peter Evans
8009a33bd4 Use int return for error code 2018-02-04 00:06:22 -06:00
Peter Evans
2bdc921b76 Add missing docblocks 2018-02-03 21:56:27 -06:00
Peter Evans
67f943d891 When encoded, the track size is larger than 4k 2018-02-03 21:18:07 -06:00
Peter Evans
a6c1564747 Add fwrite function, support for streams and types 2018-02-03 20:50:08 -06:00
Peter Evans
2dd21f1487 Add image type, image segment 2018-02-03 18:10:29 -06:00
Peter Evans
c010c10ce2 Add missing docblocks 2018-02-03 17:46:56 -06:00
Peter Evans
10d13f755c Document the pseudo-instruction "bad" 2018-02-03 17:44:41 -06:00
Peter Evans
5ac2fbdbee Add new decode functions, flesh out sector code 2018-02-03 00:23:57 -06:00
Peter Evans
d2e21b55c4 Implement the sector decode function
This was a bear to do, and the product being committed is probably my
third (or fourth?) try.
2018-02-02 17:19:38 -06:00
Peter Evans
fadf5a9782 Add decode...code 2018-02-01 18:41:01 -06:00
Peter Evans
323803866a Include better documentation of otherwise grumpy functions 2018-01-31 15:58:32 -06:00
Peter Evans
98c2ef16cc Add encode function for nib 2018-01-31 15:40:39 -06:00
Peter Evans
4943d66e8c Correct typo so it's clear this is a get OOB 2018-01-31 15:40:06 -06:00
Peter Evans
c031822063 Use nibbilized size for dest; allow offset to overflow 2018-01-31 14:28:29 -06:00
Peter Evans
8a53e02f00 Rename to enc.c, add header file 2018-01-31 00:09:07 -06:00
Peter Evans
b09ca2dae5 Reword comment 2018-01-30 18:55:23 -06:00
Peter Evans
5c7dbb4cfe My first crack at some code for nibblization 2018-01-30 16:30:23 -06:00
Peter Evans
b2bfee7f96 The SLOTCXROM switch seems to work opposite
Which seems weird, but I've verified this in some other places.
2018-01-29 00:30:12 -06:00
Peter Evans
418688cd15 Lock disk drives during disassembly 2018-01-28 18:06:14 -06:00
Peter Evans
33b44d1a70 selected_drive will now have a default value (of drive1) 2018-01-27 21:53:12 -06:00
Peter Evans
2c3d6a4dfa Reimplement idx and idy to use 16-bit addresses
While I have found some conflicting details on how this should be done,
it seems pretty clear to me that IDX and IDY work with 16-bit addresses,
not 8-bit. The inability to do so was preventing us from probing
peripheral ROM (e.g. at $C705, for the disk controller).
2018-01-27 19:54:55 -06:00
Peter Evans
4165c1cefc Make idx, idy clearer
I'm still not confident this is how it _should_ work, but I have found
conflicting accounts online for the behavior of these two modes. The
current code is what allows the Apple II to bootstrap as it should.
2018-01-27 13:04:19 -06:00
Peter Evans
76e4d3797f By default SLOTCXROM should be high 2018-01-26 22:01:46 -06:00
Peter Evans
ca5276cb6b It turns out we don't use carry for addr modes.
This fix actually corrects a rather irritating bug where the Apple ][
logo was displaying one-off--e.g., as "pple ][D".
2018-01-26 21:18:42 -06:00
Peter Evans
9c0e01ecd2 Add drive phases, switches for control and i/o 2018-01-26 19:49:19 -06:00
Peter Evans
e901bcf54d Add docblock comments 2018-01-25 14:12:49 -06:00
Peter Evans
217b27b040 Handle inversed text 2018-01-24 20:05:47 -06:00
Peter Evans
2ae272af3a Stop flickering issue by clearing before drawing 2018-01-24 20:04:53 -06:00
Peter Evans
d581194bbc Add apple text functions and refactor draw logic for text 2018-01-24 16:11:08 -06:00
Peter Evans
6069ab4d1b Add inverse font 2018-01-24 14:26:28 -06:00
Peter Evans
cfee8baf25 Refresh once every thirtieth of a second
And also refresh on keypress
2018-01-23 23:14:26 -06:00
Peter Evans
882cf2c166 Comment out cycles 2018-01-23 21:41:43 -06:00
Peter Evans
9f518d5141 We should not resolv the address a second time 2018-01-23 21:41:30 -06:00
Peter Evans
1751a7af1f Don't try to call resolv() if resolv is NULL 2018-01-23 21:18:42 -06:00
Peter Evans
9215600148 Don't attempt to render a glyph if render is NULL 2018-01-23 16:09:27 -06:00
Peter Evans
766aea9c96 Change dbuf switches to work off correct addresses 2018-01-23 15:51:06 -06:00
Peter Evans
8f516db42b Remove arbitrary counter and allow escape to exit 2018-01-23 15:04:11 -06:00
Peter Evans
775a145480 Rework screen display logic for more efficiency 2018-01-23 14:52:16 -06:00
Peter Evans
b5e1e09a35 Bump up counter by a ton 2018-01-22 21:43:18 -06:00
Peter Evans
b97af6cb16 Disable active refresh 2018-01-22 21:43:01 -06:00
Peter Evans
47d7483297 Disable usleep delay for now 2018-01-22 21:42:42 -06:00
Peter Evans
e0b4fd27e8 Better logging 2018-01-22 21:42:30 -06:00
Peter Evans
56433e2ebe Show nothing if no value is associated with an instruction 2018-01-22 12:31:19 -06:00
Peter Evans
945bf23f22 Use correct default status and memory mode 2018-01-21 21:33:12 -06:00
Peter Evans
c2debec4d3 Make output more compact 2018-01-21 21:32:43 -06:00
Peter Evans
ef7977c18b Only set or unset DHIRES if IOUDIS is on 2018-01-21 21:32:22 -06:00
Peter Evans
d119854631 Carry is set by left- or right-most bits
Don't rely on modify_status() to get it right.
2018-01-21 16:21:15 -06:00
Peter Evans
3206332a7d Set carry if the right-most bit is 1
Don't consider the left-most bit
2018-01-21 16:17:31 -06:00
Peter Evans
5d8403aaa7 Only set negative if operand has it set
That is, don't consider A & operand for negative.
2018-01-21 16:12:03 -06:00
Peter Evans
ecd8a7974a Add "BAD" instruction to crash when we hit an invalid opcode 2018-01-21 12:48:34 -06:00
Peter Evans
1334e34e76 Use A & oper here 2018-01-21 12:47:58 -06:00
Peter Evans
f9a95827f5 Change carry flag strategy according to docs 2018-01-21 12:47:36 -06:00
Peter Evans
5f93bdae25 Try to match technical behavior described for JSR/RTS 2018-01-21 01:17:04 -06:00
Peter Evans
0581ed6b44 Fix stack in several ways
1. The stack should descend, not ascend;
2. The stack should be pushed byte for byte; meaning, when pushing P or
A, those should consume one byte, not two;
3. The MSB should be pushed first when doing JSR and BRK, which makes
some sense if you were reading the stack from $0100 - $01FF.
2018-01-21 01:09:42 -06:00
Peter Evans
42c7fcbb47 XOR the orig and result bit 7 for overflow
We should have done this all along. We hadn't accounted for if orig >=
0x80 and result < 0x80, but at that point, it's kind of silly to have a
long complicated condition that we can satisfy simply with an XOR.
(Which is what the machine would do anyway.)
2018-01-21 00:05:49 -06:00
Peter Evans
809e6ca7c6 Overflow should simply be bit 6's value 2018-01-20 23:47:02 -06:00
Peter Evans
fcd25f6385 Use set16 to push items to the stack.
The previous method was not incorrect, but set16 already handles the
little-endian logic for us, and there's no need to do something bespoke
here that we then need to test for separately.
2018-01-20 23:43:58 -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
103a188faf Add an extra line break
Mostly for vim to make it easier to skip over blocks with '}'.
2018-01-19 19:14:59 -06:00
Peter Evans
a9cf25853d Show the individual flags of the P register 2018-01-19 13:14:02 -06:00
Peter Evans
6b160c6ca2 Show the dereferenced value for a given address 2018-01-19 12:18:24 -06:00
Peter Evans
2c319399d2 Change disassembly to add more info 2018-01-19 00:34:57 -06:00
Peter Evans
e286ba34f5 Greatly increase counter 2018-01-18 22:19:31 -06:00
Peter Evans
8d9a990997 Remove addresses that aren't handled in dbuf 2018-01-18 22:19:15 -06:00
Peter Evans
0ae4f041e5 Increase counter amount 2018-01-18 16:21:56 -06:00
Peter Evans
d4bf5da480 Draw text in 40 column mode 2018-01-18 16:21:25 -06:00
Peter Evans
a55fd2f71f Remove log message 2018-01-18 16:20:53 -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
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
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
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
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
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
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
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
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
Peter Evans
04854d903c Add aux memory field 2018-01-10 20:36:44 -06:00
Peter Evans
8898c3e59d Use macros to define segment read/write map functions 2018-01-10 20:12:48 -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
cb53c70cda We missed a doc-block for the new set16 func 2018-01-10 16:46:55 -06:00
Peter Evans
fcba14f91b Add set16 function 2018-01-10 16:43:14 -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
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
e3ab043aee We no longer need to pass the opcode here 2018-01-09 20:58:53 -06:00
Peter Evans
80a7671a19 Remove next_byte, read_byte; execute works without an opcode arg
This also adds RTS and RTI as instructions that "would jump".
2018-01-09 20:58:19 -06:00
Peter Evans
de859bcea8 We were not obeying little-endianness here 2018-01-09 16:24:25 -06:00
Peter Evans
d7148b88bf Relative address was not being calculated correctly.
The disassembler is using the correct approach, so I adapted it to the
execution code.
2018-01-09 15:57:37 -06:00
Peter Evans
a267065059 Include cycle information 2018-01-09 15:57:20 -06:00
Peter Evans
8201117223 Change init routine to use peripheral function 2018-01-09 15:56:48 -06:00
Peter Evans
0e0244162f Change objstore structure to contain all peripheral ROM 2018-01-09 15:56:21 -06:00
Peter Evans
3c46a41351 Fix little-endian issue with IND output
Also change the ADDR label to emit a hex code, not a decimal code.
2018-01-08 23:36:11 -06:00
Peter Evans
1abf0223c8 The value of PC by that point is correct.
Adding 2 skips us ahead farther than we should be going.
2018-01-08 22:25:37 -06:00
Peter Evans
f7b8740c2e Let the CPU run for longer before it dies 2018-01-08 22:24:30 -06:00
Peter Evans
b21b48cac0 Fix a couple of issues...
1. The execute function should not be incrementing the PC register, as
this happens in other places.
2. The push_ and pop_stack functions were not considering that the data
should be in little-endian order.
2018-01-08 21:22:29 -06:00
Peter Evans
e4049a6a11 Better info on each opcode sequence
Plus fix a display bug that showed the operand in the wrong order.
2018-01-08 21:21:09 -06:00
Peter Evans
7c899122ad We should advance to the next byte in execution 2018-01-08 21:15:56 -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
3f59db311b Allow us to ignore some docblock errors 2018-01-07 20:08:46 -06:00
Peter Evans
b2add9c3de Move vm_area logic into its own file 2018-01-07 20:05:02 -06:00
Peter Evans
95e57a8e19 Add get_map_machine function.
Mostly useless except for testing.
2018-01-07 20:00:09 -06:00
Peter Evans
ba47de0e4b Add objstore_clear(), tests for objstore 2018-01-07 16:30:33 -06:00
Peter Evans
1c36c4ea4d Add missing docblock comments 2018-01-07 16:07:29 -06:00
Peter Evans
cccf6df354 Move address resolver 2018-01-07 15:47:57 -06:00
Peter Evans
888eb25797 Refactor a bit for easier testing; add log_stream() 2018-01-07 15:05:20 -06:00
Peter Evans
5da65e0a9e Change apple2dd -> apple2_dd 2018-01-07 14:46:54 -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
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
70516a7f91 Add function to return 16-bit value from a segment address 2018-01-05 16:14:51 -06:00
Peter Evans
c6799db689 Separate reset logic from boot function 2018-01-05 16:04:01 -06:00
Peter Evans
af7dae6924 Advance PC by # of bytes consumed 2018-01-05 15:52:20 -06:00
Peter Evans
7ceee608b3 Stop delaying by 2 seconds 2018-01-05 15:52:04 -06:00
Peter Evans
c7aa9e9fc3 Resolver may be NULL; don't call if so
This change also registers a default value for operand (0).
2018-01-05 14:57:38 -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
1de1e7788a Rename status flags to MOS_ 2018-01-05 14:18:39 -06:00
Peter Evans
2da613f7aa Provisional state upon reboot 2018-01-04 20:09:53 -06:00
Peter Evans
3f0a091520 Use const pointers; fix function name typo 2018-01-04 19:59:04 -06:00
Peter Evans
700bc31465 Copy system rom into $C800..$CFFF; document.
Things are getting a little hairy...at least, as to my own
comprehension. Documentation is a must.
2018-01-04 19:53:12 -06:00
Peter Evans
e184304ec5 A little more documentation post-rwops changes 2018-01-04 14:21:05 -06:00
Peter Evans
171ff62551 Change create to use objstore vm_8bit data 2018-01-03 21:50:30 -06:00
Peter Evans
565dd1b34b Make sure the object store got built 2018-01-03 21:50:01 -06:00
Peter Evans
06d37d24d7 Allow us to call objstore_init more than once.
This also separates some code into objstore_ready().
2018-01-03 21:49:26 -06:00
Peter Evans
7182608473 Copy vm_8bit buffer into rom/memory directly 2018-01-03 21:10:46 -06:00
Peter Evans
90d6c637c5 Add function to copy a buffer into a segment 2018-01-03 21:10:25 -06:00
Peter Evans
4d07bd7640 Add objstore code, tests 2018-01-03 20:51:20 -06:00
Peter Evans
b1c2a2109e Just use stdout if we never opened a log file 2018-01-03 20:47:41 -06:00
Peter Evans
484a11e976 Pass in zero for an offset 2018-01-03 15:21:00 -06:00
Peter Evans
fac6b4f574 Initialize system and disk2 rom 2018-01-03 15:20:48 -06:00
Peter Evans
86dad129b6 Let us fread into a segment offset 2018-01-03 15:16:30 -06:00
Peter Evans
e7a404508e Add init functions for disk2, sys rom
Also move the defines for bank offset, rom size, etc. into apple2.mem.h
which makes a little more sense.
2018-01-03 15:07:19 -06:00
Peter Evans
5b2c376abc Prevent writes to the ROM bank 2018-01-03 14:27:55 -06:00
Peter Evans
9a1e51fec3 We need to pass the machine, not memory 2018-01-02 23:49:29 -06:00
Peter Evans
cb9a7d0fce Let the segment vm know about the machine 2018-01-02 21:12:21 -06:00