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
01174b63dd
The data in objstore_data was not in the correct order.
...
See also the change in tools/store-data; the system rom was first, when
the disk2 rom should have been first.
2018-01-08 16:19:41 -06:00
Peter Evans
3f59db311b
Allow us to ignore some docblock errors
2018-01-07 20:08:46 -06:00
Peter Evans
62035d03b8
Remove test (which is now done from vm_area.c)
2018-01-07 20:08:27 -06:00
Peter Evans
b2add9c3de
Move vm_area logic into its own file
2018-01-07 20:05:02 -06:00
Peter Evans
143a2b176c
Add missing tests and note missing ones
2018-01-07 20:00:28 -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
db6dde7757
Note intentionally missing tests
2018-01-07 19:42:03 -06:00
Peter Evans
bc563b8aca
Note intentionally missing tests; add test for flag
2018-01-07 19:39:16 -06:00
Peter Evans
087c424d2f
Rename test suite
2018-01-07 16:31:00 -06:00
Peter Evans
a3dff9193b
Add missing tests
2018-01-07 16:30:52 -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
c3d35dca72
Move address resolver test
2018-01-07 15:50:06 -06:00
Peter Evans
2c3503e752
Clarify test conditions; allow docblock on line above
2018-01-07 15:48:43 -06:00
Peter Evans
0fa930b548
Fix incorrect test name
2018-01-07 15:48:19 -06:00
Peter Evans
cccf6df354
Move address resolver
2018-01-07 15:47:57 -06:00
Peter Evans
7b2450131e
Add tests for would_jump, flash_memory
2018-01-07 15:47:26 -06:00
Peter Evans
366f10efcb
Don't count main.c
2018-01-07 15:08:03 -06:00
Peter Evans
55cb80162c
Add missing tests
2018-01-07 15:06:07 -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
d8431828a8
Add missing tests for sys/disk2 rom
2018-01-07 14:46:29 -06:00
Peter Evans
216ad72d4c
Add comment for free function (handled in teardown)
2018-01-07 14:45:59 -06:00
Peter Evans
d71a5c83ca
Change test suite to expected name
2018-01-07 14:38:51 -06:00
Peter Evans
32f0ba21f4
Add comments for tests that we will not write at this time
2018-01-07 13:46:12 -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
419b82faf1
Add missing tests for reset, set_memory
...
This also consciously ignores tests for free() (handled implicitly in
all teardowns) and run_loop (for which I don't have a good notion to
test right now).
2018-01-07 13:43:09 -06:00
Peter Evans
6011580a99
Add source code inspector
2018-01-06 22:42:45 -06:00
Peter Evans
8ad1311536
Add set_memory function
2018-01-06 21:37:15 -06:00
Peter Evans
62af6ef606
Add missing files for tests
...
They're empty, which is ok for the moment.
2018-01-06 21:35:32 -06:00
Peter Evans
610068cb8b
Add missing decl for apple2_reset()
2018-01-05 16:20:13 -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