Commit Graph

204 Commits

Author SHA1 Message Date
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
cbcb2c5de1 Use the "<=>" operator in the register16_t class to give comparison operators for free. 2021-12-29 11:40:37 +00:00
Adrian Conlon
1f5dc54c40 Copy constructor and equality operations added. 2021-12-27 22:07:30 +00:00
Adrian Conlon
945fcefb36 Start adding comparison operations to EightBit classes 2021-12-27 14:24:38 +00:00
Adrian Conlon
af7679505c Add a span compatible ROM loader 2021-12-26 22:01:12 +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
927938560a Tidy the Bus reference definition a little 2021-12-08 19:45:07 +00: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
6e364ad774 Fix Linux/GCC compilation issue. 2021-10-21 22:58:52 +01:00
Adrian Conlon
6ffd8e5d0a Make the Rom class a little easier to use by allowing it to be copied around.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-08-23 09:45:40 +01:00
Adrian Conlon
6bf28f1480 Correct some virtual and constexpr expressions.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-08-23 09:44:48 +01:00
Adrian Conlon
bf1c7d0e37 Add a "flip" method to device to allow tone sequence generation.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-08-23 09:40:54 +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
502c554e84 Merge branch 'master' of https://github.com/MoleskiCoder/EightBit into master 2021-05-29 10:31:47 +01:00
Adrian Conlon
d199adb027 Tidy EightBit library header usage (avoids compilation error with latest VS2019, "Memory.h")
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-05-29 10:31:32 +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
4d2d1d214a Tidy up some C++ code (concentrating on the Z80 at the moment).
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-01-09 08:41:48 +00:00
Adrian Conlon
26cc613c66 Add a slightly simplified variant on signal firing.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-01-08 09:06:46 +00:00
Adrian Conlon
6261807344 More C++17 tidying up. Should be no user visible changes.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-01-06 15:30:26 +00:00
Adrian Conlon
b4f8c81a94 Use nodiscard, where appropriate and try not to inline virtual methods.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2021-01-02 11:49:34 +00:00
Adrian Conlon
5ddbd8a5e8 Correct a couple of small oddities in the IntelProcessor InputOutput class.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-12-27 15:46:05 +00:00
Adrian Conlon
efed7dae23 LR35902 Simplify timing mechanism (corrects some timing issues as well!)
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-11-12 18:21:51 +00:00
Adrian Conlon
f7da03d46b Bring the LR35902 code to be more like the Z80
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-11-09 11:48:59 +00:00
Adrian Conlon
759b4a9fa8 GameBoy: Correct a few (very minor C++) niggles in the implementation. No functional changes.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-11-07 09:41:12 +00:00
Adrian Conlon
23219734da Resurrect linux build (checked on Ubuntu 18.04)
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-06-07 11:49:57 +01:00
Adrian Conlon
17edcee715 Add a pin activator class to correctly handle "wrapped" pin transitions.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-05-03 20:45:01 +01:00
Adrian Conlon
de800fe9f1 Modify virtual default destructor specification to better match core guidelines.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-05-03 20:29:18 +01:00
Adrian Conlon
5eedbe1225 Make better use of modern c++
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2020-05-02 11:36:43 +01:00
Adrian Conlon
44c6a8c3d1 Correct some EightBit project analysis warnings.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-04-06 23:11:21 +01:00
Adrian Conlon
b89d2cf15c Start correcting Z80 T-cycle counts (DJNZ, JR cc, ADD HL,rp, INC/DEC rp, INC/DEC (HL))
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2020-02-16 09:18:34 +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
dc37d61797 Tidy up some shared code for the Z80 pushWord vs call timing.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-12-29 13:03:44 +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
cb502bd65d Halt is of course an "output" pin. (So that the halt instruction can work)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-11-19 23:05:27 +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
20ebbd4048 Start added more .net compatibility methods
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-11-03 09:23:28 +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
4f47f3fc4d Simplifying the Z80 halt implementation looks better.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-08-29 08:51:15 +01:00
Adrian Conlon
5ed01b61d1 Backport fixes from .Net EightBit library to C++
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-08-16 21:56:48 +01:00
Adrian Conlon
9d34d7ec3d Add a non-intrinsic version of findFirstSet to the EightBit library.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-07-21 11:25:06 +01:00
Adrian Conlon
36465ce1c8 Refactor the Intel hex file loader into it's own class.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-07-06 22:44:42 +01:00
Adrian Conlon
4734954932 Get the Linux port up and running again.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-07-05 21:42:19 +01:00
Adrian Conlon
dca2e1bb8e Bring the C++ code a little closer to the C# code.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-06-02 12:12:04 +01:00
Adrian Conlon
2c23289caa Expose the clock tick as an externally driven action.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-05-05 10:28:24 +01:00
Adrian Conlon
934a1f7025 Use the virtual methods, busRead and busWrite for all processor bus actions.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-03-02 21:58:34 +00:00
Adrian Conlon
382ae30d32 Correct a couple of minor mistakes found while working on the .net port.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-03 00:46:49 +00: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
92d23d82d6 Start big refactor of device/CPU pin usage (to allow pin events throughout).
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-01-14 02:10:17 +00:00
Adrian Conlon
9755a5fcd2 Add the concept of a clocked chip 2019-01-10 22:23:51 +00:00