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

14 Commits

Author SHA1 Message Date
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
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
7d6886a3a8 Change last_addr field to eff_addr 2018-01-12 13:57:48 -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
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
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
cccf6df354 Move address resolver 2018-01-07 15:47:57 -06:00
Peter Evans
1de1e7788a Rename status flags to MOS_ 2018-01-05 14:18:39 -06:00
Peter Evans
d0dad61db8 Better documentation; use a macro to define modes 2017-12-06 16:54:14 -06:00
Peter Evans
5ada987c83 Add the execute function for the 6502
This executes a single opcode. Note this also makes a change to the
get_address_resolver function such that accepts an opcode, not the
address mode itself.
2017-12-05 19:01:43 -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
3cebed2377 Adding all of the instruction files 2017-12-02 13:05:53 -06:00