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

274 Commits

Author SHA1 Message Date
Peter Evans
256e0cf1d6 Don't write to the log stream if null
This prevents a somewhat vexing crash condition from happening.
2017-12-15 16:28:14 -06:00
Peter Evans
7811f4da44 No, use actual zero bytes
Forgot the ol' backslash in the script I wrote to make this file
2017-12-15 14:39:57 -06:00
Peter Evans
9689d984bc Add data directory, image file with all zeroes 2017-12-14 23:22:10 -06:00
Peter Evans
a48bc05bd0 Further testing 2017-12-14 23:09:32 -06:00
Peter Evans
e84b79819b Allow position function to be globally visible 2017-12-14 23:08:50 -06:00
Peter Evans
4dffea1dda Make position non-static; add case for NULL data 2017-12-14 23:08:33 -06:00
Peter Evans
cebdedeff0 Add initial test suite for apple2dd 2017-12-14 22:47:11 -06:00
Peter Evans
f629b350fa We can't have a negative track pos; zero is the lowest 2017-12-14 22:46:50 -06:00
Peter Evans
a82348ff9a Missing header files, esp. stdbool 2017-12-14 22:30:09 -06:00
Peter Evans
a81f422d2d Add apple2.dd.c to source file list 2017-12-14 22:28:24 -06:00
Peter Evans
82d22c8fab Change name of header file in #include 2017-12-14 22:27:45 -06:00
Peter Evans
091939b06b Renaming files 2017-12-14 22:24:30 -06:00
Peter Evans
24e599a8fd Rename to apple2dd; add read/write functions 2017-12-14 22:14:55 -06:00
Peter Evans
58137cb2a0 Remove io_byte field; rename to apple2dd 2017-12-14 22:13:39 -06:00
Peter Evans
0162544fa6 Add initial struct and drive code 2017-12-13 20:30:32 -06:00
Peter Evans
577e92de9e Documentation is good. Write documentation. 2017-12-12 15:10:42 -06:00
Peter Evans
060b7000de Add tests to prove read/write mappers are used 2017-12-12 15:07:26 -06:00
Peter Evans
7da3c2ec20 Make use of our read/write mappers 2017-12-12 15:00:47 -06:00
Peter Evans
e019b6daee A warning to the concerned 2017-12-12 14:59:00 -06:00
Peter Evans
7da2f9e791 Add support for setting read/write map functions 2017-12-12 14:58:06 -06:00
Peter Evans
ca7e576266 Use a setup and teardown function 2017-12-12 14:53:45 -06:00
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
0bcf9e006d Explicit test that memory (plus others) are zeroed 2017-12-12 14:45:06 -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
b36bb78a12 Add read/write map functions to vm_segment 2017-12-12 14:31:44 -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
c4a6f77bcd We should be using the rts handler function
Oops!
2017-12-09 14:53:18 -06:00
Peter Evans
a720246e26 We need to account for the P register on the stack 2017-12-09 14:52:55 -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
96b2542ea6 CARRY should be set if oper > 0
This error became apparent once we added the missing modify_status
function to some instructions.
2017-12-09 14:47:49 -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
ccf16dd970 Documented some goals for the project 2017-12-08 22:34:09 -06:00
Peter Evans
0336fe7366 Documentation for files 2017-12-08 22:12:31 -06:00
Peter Evans
8a261f6600 We need to include the max disk slot
Tiny comparison logic error. :grimace:
2017-12-08 17:10:13 -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
dccf80be5d More documentation 2017-12-06 21:37:14 -06:00
Peter Evans
ea2b68dc8c Documentation, and reorganizing macro definitions 2017-12-06 21:29:03 -06:00
Peter Evans
4af7e4444c This macro was no longer needed 2017-12-06 21:26:09 -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
46fedccce1
Use the MIT license 2017-12-06 17:08:09 -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
eb865243bb We have to pass NULL into log_open now 2017-12-06 16:53:15 -06:00