Commit Graph

313 Commits

Author SHA1 Message Date
Adrian Conlon
42afeb342f Merge branch 'master' of https://github.com/MoleskiCoder/EightBit 2023-05-17 12:48:20 +01:00
Adrian Conlon
fd36555585 Couple of small reference changes 2023-05-17 12:47:57 +01:00
Adrian Conlon
14af272d75 Update simdjson 2023-04-01 07:52:02 +01:00
Adrian Conlon
9e2c3e32b1 Fully switch to C++20 2022-07-01 09:30:38 +01:00
Adrian Conlon
4c65c22a85 Use latest SIMDJson library 2022-07-01 09:26:46 +01:00
Adrian Conlon
1a5df4c8a7 More "noexcept" specifiers added to M6502 class 2022-01-24 23:00:25 +00:00
Adrian Conlon
1796d62517 std::string_view rather than std::string reads a bit better for this use. 2022-01-21 22:49:22 +00:00
Adrian Conlon
8e0092ec9d Tidy up noexcept specification 2022-01-17 19:10:15 +00:00
Adrian Conlon
83b7efdd03 Use iterator, rather than index access for JSON data, if possible. Bit of a speed up! 2022-01-06 09:50:58 +00:00
Adrian Conlon
53ef92dbc4 So I can compare implementations, add a non-coroutine variant of the HarteTest suite. 2022-01-03 00:50:41 +00:00
Adrian Conlon
4efa66c44e Remind MSVC++ of its responsibilities as to properly define "__cplusplus" 2022-01-01 15:13:16 +00:00
Adrian Conlon
42e45ccdef Upgrade to boost 1.78, due to coroutine2 incompatibilities. 2022-01-01 13:30:41 +00:00
Adrian Conlon
bb75f98d5d Experimentation with C++17 compatibilty. Mainly an exercise in rewrting coroutine code in boost::coroutine2. Interesting! 2022-01-01 13:20:34 +00:00
Adrian Conlon
6b6ce71140 Remove unused includes 2022-01-01 11:13:28 +00:00
Adrian Conlon
d570be3f0e Prefer accessor methods, if available. 2022-01-01 11:12:51 +00:00
Adrian Conlon
6346ea9278 Switch to C++20 everywhere 2021-12-29 11:39:41 +00:00
Adrian Conlon
fa9c4ea3b3 Catch some missing [[nodiscard]] attributes. 2021-12-17 21:08:10 +00:00
Adrian Conlon
7af8a19e2f Coroutine generator becomes a part of the core EightBit library. 2021-12-17 09:19:16 +00:00
Adrian Conlon
3d5d4d889c Lots of C++20 and stability changes in 6502 HarteTest 2021-12-08 19:54:53 +00:00
Adrian Conlon
5522fde9a7 Make the flag manipulations in the 6502 implementatin a little more comprehensible 2021-12-08 19:47:35 +00:00
Adrian Conlon
61b7359505 cycles_t is better served as an array_t typedef 2021-12-08 19:43:40 +00:00
Adrian Conlon
72705e8dd0 Updated projects for VS2022 2021-12-08 19:42:34 +00:00
Adrian Conlon
8853e1157c Refactor the checking code into into it's own class.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-31 09:49:10 +00:00
Adrian Conlon
fed763a802 correct cycle inaccuracies (according to the Harteman tests) in "STA (indirect indexed Y)"
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-30 22:40:13 +01:00
Adrian Conlon
eeecb7c719 Correct BCD addition handling
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-30 21:25:56 +01:00
Adrian Conlon
04a9ffdcda Some visibility refactoring.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-28 16:56:54 +01:00
Adrian Conlon
9e9c15e289 Use C++20 co-routines as generators for opcode suite and test generation.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-27 09:53:58 +01:00
Adrian Conlon
45405d5624 Improve overall test speed by reusing test runners.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-25 18:40:21 +01:00
Adrian Conlon
75dd53f829 Const a few member variables.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-24 23:20:05 +01:00
Adrian Conlon
09cc616ee9 Whoops: revert accidental commenting of code.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-24 14:59:14 +01:00
Adrian Conlon
a37aaeba31 Unify the compilation options to what seems to be a sensible point.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-24 14:12:57 +01:00
Adrian Conlon
3158b2238a Refactor the JSON core parsing code a little
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-24 13:39:08 +01:00
Adrian Conlon
76c03bb4d4 Tidy up header usage.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-24 11:42:43 +01:00
Adrian Conlon
f8b5045f99 Use string_view from simdjson. Interesting speed up.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-24 11:15:10 +01:00
Adrian Conlon
03b536838b Some constexpr improvements in low level classes.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-24 11:12:23 +01:00
Adrian Conlon
f85fec3c81 Constify a few statements. Not much difference.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-23 17:46:59 +01:00
Adrian Conlon
17b71aafc3 Refactor to share JSON implementation details.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-22 13:10:23 +01:00
Adrian Conlon
8b7607f5e9 Make the code a little more like the JSON schema.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-22 11:24:45 +01:00
Adrian Conlon
e9df345577 More simplifications and faster yet!
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-22 10:51:36 +01:00
Adrian Conlon
e63ace34e9 Simplifications of json usage. No slow down.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-21 22:43:16 +01:00
Adrian Conlon
393fab2bbc Further simplifications and speedups to the json code.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-21 22:03:07 +01:00
Adrian Conlon
0adb60a0f4 Remove unneeded method from ram_t 2021-10-21 13:39:10 +01:00
Adrian Conlon
d59c72cf00 Make the test run output a little more comprehensible.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-21 13:38:44 +01:00
Adrian Conlon
0deb37ab19 More JSON code simplifications.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-20 23:06:42 +01:00
Adrian Conlon
c39178f9d1 Remove unnecessary json libraries from project.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-20 22:48:19 +01:00
Adrian Conlon
b70f24a581 Draw an end to my json experimentations. simdjson is king. long live simdjson!
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-20 21:44:43 +01:00
Adrian Conlon
47b7cb2a06 Add some more experimental json access modes.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-20 21:05:43 +01:00
Adrian Conlon
3a58bad0b0 Simplify json datatype conversions.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-20 14:28:00 +01:00
Adrian Conlon
5d66d1aac3 Remove fancy iterator shenigans from simdjson usage.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 16:53:10 +01:00
Adrian Conlon
0ef06ebbb2 Back to looking at the failing tests now! Add failure count and disassembly of failed opcodes.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 13:13:59 +01:00
Adrian Conlon
bb7de9d3e1 Prefer passing byte_t by value.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 11:44:58 +01:00
Adrian Conlon
16752474d9 Correct a casting issue in the rapidjson implementation
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 11:43:06 +01:00
Adrian Conlon
1943db6f20 rapidjson can use an std::string constructor.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 10:57:27 +01:00
Adrian Conlon
710c8fb883 Refactor the ram_t class to be a container of byte_t
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 09:28:13 +01:00
Adrian Conlon
2be190af19 Couple of small consistency changes in the rapidjson implementation.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 00:59:02 +01:00
Adrian Conlon
91bd04a278 Add support for rapidjson parsing
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-19 00:39:26 +01:00
Adrian Conlon
dc0fc262a2 More micro-optimisations. 2021-10-18 20:40:13 +01:00
Adrian Conlon
357e51c09a Clarify some (no) exception specifications.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-18 17:19:28 +01:00
Adrian Conlon
f62e8c30a2 Remove some unneeded default constructors.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-18 13:22:06 +01:00
Adrian Conlon
b56a2450a1 Couple of blank lines removed.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-18 13:13:43 +01:00
Adrian Conlon
1234aaf9d9 Refactor RAM test values.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-18 13:12:22 +01:00
Adrian Conlon
9cd317624e Couple of extra safety checks.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-18 12:28:15 +01:00
Adrian Conlon
fa50f74508 Tidy the previous cycle parsing refactor and reset to a simdjson pukka run.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-18 12:07:24 +01:00
Adrian Conlon
79f3e3ac6c Refactor the code to isolate the cycles parsing. Interesting speed up!
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-18 11:54:01 +01:00
Adrian Conlon
50cea1b81a Some JSON C++ library example code "levelling"
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-17 18:36:27 +01:00
Adrian Conlon
500e65b895 Tidy up the code a little (including removing some no longer needed code).
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-13 23:33:08 +01:00
Adrian Conlon
4892ea95d3 Split load/parse of opcode tests.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-12 17:07:45 +01:00
Adrian Conlon
dcba8efc83 All experimentation on the effect of JSON parser reuser.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-12 10:10:45 +01:00
Adrian Conlon
31c3a57485 If I've bothered to try and implement the failing test, show the actual and expected events.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 23:56:20 +01:00
Adrian Conlon
77a2c08c20 Remove some build warnings.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 23:23:59 +01:00
Adrian Conlon
91221aa975 Try simdjson: bloody hell, that's fast!!
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 22:09:03 +01:00
Adrian Conlon
b5074ac48c Create an overtly performance checking build.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 19:52:22 +01:00
Adrian Conlon
59d1e2789e Whoops: missed reference to RapidJson
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 19:39:37 +01:00
Adrian Conlon
7a7b0046cd Add an implementation that uses JsonCpp (pretty slow!)
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 19:13:05 +01:00
Adrian Conlon
f3f6452119 Add nlohmann json parser as an option to build.
1/2 speed, compared to boost.json

Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 14:59:23 +01:00
Adrian Conlon
db106b1719 Performance: speed up message handling in TestRunner.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 11:41:50 +01:00
Adrian Conlon
5686906583 Add nodiscard attributes, where needed
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 10:43:33 +01:00
Adrian Conlon
4be61a9d54 Separate concerns a little between low level classes and high level classes in terms of report generation.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-11 10:20:18 +01:00
Adrian Conlon
760f5d5aec Correct filler memoryRead accesses to use PC() rather than the last location read.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-10 21:35:26 +01:00
Adrian Conlon
6a59bfbcd8 First stab at using the Harte randomised processor tests. Some failures detected in the M6502 run.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-10 21:26:30 +01:00
Adrian Conlon
6c3ef821bf Update for latest boost v1.77
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-10-10 21:25:21 +01:00
Adrian Conlon
22506ea56c Extensive change warning: lots of "noexcept" and "constexpr" changes. Not sure if I'll keep all of them, but interesting...
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-07-18 14:28:40 +01:00
Adrian Conlon
2f76e901f9 More tidying of include files for VS2019 compatibility (plus more correct!)
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-05-29 12:18:13 +01:00
Adrian Conlon
cab29e3ce4 Tidy some code formatting. No functional changes. 2021-04-07 21:37:30 +01:00
Adrian Conlon
2992a0e78a Event fire: use default arguments, where possible.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-04-07 21:36:53 +01:00
Adrian Conlon
2fa9ffd1e3 Tidy up some C++ a little
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-04-07 21:36:09 +01:00
Adrian Conlon
b1ca06447f Ensure 6502 uses memory rather than bus read/write mechanism
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-03-08 16:44:09 +00:00
Adrian Conlon
6285a397ab Tidy 6502 whitespace
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2020-02-22 09:02:37 +00:00
Adrian Conlon
c8bdabf34f Reflect that the I/O for Intel style processors isn't part of the CPU, but attached to the Bus and access controlled by the CPU.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2020-02-09 11:51:58 +00:00
Adrian Conlon
d9466082ec M-Cycle accurate Z80 modifications.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-12-29 01:18:54 +00:00
Adrian Conlon
d0467421ff Improve compatibility with .net emulator code.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-11-09 18:58:23 +00:00
Adrian Conlon
ee3ecc682d Add R/W pins to the MC6809 and MOS6502 processors. Hoping it'll ease peripheral development.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-09-15 12:49:32 +01:00
Adrian Conlon
254cfbe342 Tidied up pin management to be synchronised with the .Net code.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-09-06 23:55:57 +01:00
Adrian Conlon
6940a54355 Update all EightBit projects to VS2019 (Latest SDK, C++17)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-08-17 11:04:29 +01:00
Adrian Conlon
5e9014997a Upgraded to VS2019, default SDK.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-08-06 13:16:38 +01:00
Adrian Conlon
def1c58e9d Tidy project settings across the EightBit library to be more consistent.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-07-06 22:45:16 +01:00
Adrian Conlon
f5582df402 Add some more M6502 documentation.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-05-05 10:30:33 +01:00
Adrian Conlon
1a0d3ad77a Go through all projects for configuration consistency.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-05-05 10:25:44 +01:00
Adrian Conlon
f0376fa81e Use macros to define our device pins.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-01-14 23:17:54 +00:00
Adrian Conlon
7f853ec73f Add missing 6502 pin events
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-01-14 08:26:27 +00:00