1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-12-21 08:30:55 +00:00
Commit Graph

23 Commits

Author SHA1 Message Date
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
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
af7dae6924 Advance PC by # of bytes consumed 2018-01-05 15:52:20 -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
1de1e7788a Rename status flags to MOS_ 2018-01-05 14:18:39 -06:00
Peter Evans
8f04deb642 Comment out unused cycles variable 2018-01-01 17:12:25 -06:00
Peter Evans
f70f21789b Add flash memory, disassemble options 2017-12-31 15:50:59 -06:00
Peter Evans
26529f77ab Implement jump table, labels in code 2017-12-29 17:08:25 -06:00
Peter Evans
d95572bd4a Move instruction strings to mos6502.dis.c 2017-12-27 21:21:33 -06:00
Peter Evans
253db81460 Comment out unused instruction string table 2017-12-26 16:45:24 -06:00
Peter Evans
daab8a7f58 Add instruction strings (mapped to enum symbols) 2017-12-11 21:03:16 -06:00
Peter Evans
0336fe7366 Documentation for files 2017-12-08 22:12:31 -06:00
Peter Evans
8cd9c5ffab Documentation, lacking 2017-12-06 21:25:47 -06:00
Peter Evans
89ddd20658 Add read_byte function to return the next byte in memory 2017-12-05 20:40:35 -06:00
Peter Evans
50a84b4099 Remove cycles field from mos6502 struct
It was both unused and not necessary, as we can simply compute the
number of cycles in the execute function.
2017-12-05 20:23:17 -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
eaaf63a069 Zero out last_addr and cycles
This fixes a super-annoying bug in the unit-test suite where we would
fail randomly because sometimes last_addr would have garbage in it.
2017-12-05 18:41:34 -06:00
Peter Evans
8454d1a6c9 Add instruction handler function, handler table 2017-12-05 18:38:36 -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
87de0a877a Add all our tests, plus other fixes 2017-12-03 20:19:17 -06:00
Peter Evans
fe9ce3aca3 Tests for the new mos6502 functions 2017-12-02 13:27:30 -06:00
Peter Evans
3cebed2377 Adding all of the instruction files 2017-12-02 13:05:53 -06:00