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

131 Commits

Author SHA1 Message Date
Peter Evans
bb92162dba Zero, not NULL.
Not that there's a practical difference, but we should be clear that
we're zeroing out memory because its contents are vm_8bit values, not
pointers.
2017-12-12 14:45:48 -06:00
Peter Evans
da62ac4ca6 Use double-slash comments 2017-12-12 14:35:13 -06:00
Peter Evans
6f4627802f We should also NULL out segment memory.
Er... oops
2017-12-12 14:33:55 -06:00
Peter Evans
06705f21fc Add mallocs for read/write tables, NULL-out code 2017-12-12 14:32:32 -06:00
Peter Evans
daab8a7f58 Add instruction strings (mapped to enum symbols) 2017-12-11 21:03:16 -06:00
Peter Evans
850fdc55b5 Add error codes to segment functions 2017-12-09 15:16:56 -06:00
Peter Evans
f44b029083 We need to check P's value as well
This test broke once we began to (properly) push P onto the stack.
However, I'm not _clear_ on whether we should push P before or after we
set the INTERRUPT bit... We'll go with things as-is for now.
2017-12-09 14:50:33 -06:00
Peter Evans
3954b1647f Missing status modifications in a number of instructions 2017-12-08 23:26:46 -06:00
Peter Evans
b0aa6d400a We should be pushing and popping status 2017-12-08 23:24:58 -06:00
Peter Evans
0336fe7366 Documentation for files 2017-12-08 22:12:31 -06:00
Peter Evans
50563b44a2 Close any open files we have 2017-12-08 17:09:58 -06:00
Peter Evans
cf62694ef0 Add option parsing code, tests 2017-12-08 17:06:21 -06:00
Peter Evans
8cd9c5ffab Documentation, lacking 2017-12-06 21:25:47 -06:00
Peter Evans
ccd7a3f665 Moar documentation 2017-12-06 18:01:13 -06:00
Peter Evans
fca069d5de Documentation 2017-12-06 17:16:20 -06:00
Peter Evans
12d0e5403a Add documentation for the arith instructions 2017-12-06 17:03:37 -06:00
Peter Evans
d0dad61db8 Better documentation; use a macro to define modes 2017-12-06 16:54:14 -06:00
Peter Evans
102378640a Proper indentation 2017-12-06 16:45:16 -06:00
Peter Evans
ffd2550364 Better documentation; log to stdout 2017-12-06 16:43:30 -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
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
Peter Evans
237d5e3cb6 First commit 2017-11-21 23:24:51 -06:00