Commit Graph

55 Commits

Author SHA1 Message Date
Adrian Conlon
d4782a66db Some small changes for NES support: hopefully not broken anything!
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-12-26 22:46:16 +00:00
Adrian Conlon
1edabd79f3 More pinout oriented method of executing instructions (especially interrupts)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-12-10 21:41:48 +00:00
Adrian Conlon
7e3957d4db Rewrite i8080 interrupts to be more closely related to the hardware.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-12-02 23:50:59 +00:00
Adrian Conlon
c2de6a2659 More clang warning corrected.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-30 23:21:48 +00:00
Adrian Conlon
033969bbe3 Add profile guided optimisation to build configuration (profile/profiled)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-30 14:59:24 +00:00
Adrian Conlon
11062607e6 Start sharing parts of the linux build system.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-26 22:10:17 +00:00
Adrian Conlon
92919b0440 Correct a few GCC build issues. TBC
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-20 20:47:00 +00:00
Adrian Conlon
c513f0cab1 GSL was too problematic when used with GCC. Removed.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-20 19:17:49 +00:00
Adrian Conlon
67c27d4a3e GSL + CPP core guidelines changes.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-18 14:29:30 +00:00
Adrian Conlon
dea1847280 Unify more VS2017 build configurations
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-12 10:38:05 +00:00
Adrian Conlon
d010e3ca2f Start incorporating CPP core guidelines (as an experiment!)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-10 22:41:50 +00:00
Adrian Conlon
8143f8a506 Try to correct "one definition rule" problems:
1) No forward declarations
2) No virtual methods defined inline.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-05 12:47:42 +00:00
Adrian Conlon
437cc4ce89 LTO in gcc
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-04 23:52:15 +00:00
Adrian Conlon
926ac48224 Move to VS2017
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-04 23:15:55 +00:00
Adrian Conlon
d408bfe022 Updated build to C++ 14
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-04 12:44:38 +00:00
Adrian Conlon
c292fb552e A whole bunch of consistency changes. No functional changes.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-11-03 22:05:01 +00:00
Adrian Conlon
a22e59546b Tidy the gameboy core a little. Mainly by moving the execution loops into the bus class.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-10-24 00:04:13 +01:00
Adrian Conlon
fa03e8dc55 Simplify I/O port event handling.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-10-22 21:31:20 +01:00
Adrian.Conlon
a77e57e5fc Add pre/post read/write memory events.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-13 23:12:47 +01:00
Adrian.Conlon
c5c842a70b Correct some rom initialisation/loading issues. 2017-09-07 12:23:06 +01:00
Adrian.Conlon
0665de5951 Make the base BUS architecture a little easier to work with.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-07 00:53:22 +01:00
Adrian.Conlon
64b7335a79 Attempted move to a "BUS" oriented memory architecture (TBC!)
Signed-off-by: Adrian.Conlon <adrian.conlon@arup.com>
2017-09-06 13:22:23 +01:00
Adrian.Conlon
ef766fd626 Correct some linux warnings.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-03 22:40:45 +01:00
Adrian.Conlon
da806bddcb Tidy some more Windows/Linux compatibility issues.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-03 21:30:46 +01:00
Adrian.Conlon
c55bba5d2b Correct a couple of Makefile issues.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-03 12:40:11 +01:00
Adrian.Conlon
6f8cf74c36 Add linux makefiles for parts of the EightBit library
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-03 12:11:47 +01:00
Adrian.Conlon
640b2be670 Parts of the EightBit library become linux compatible (TBC!)
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-03 12:11:14 +01:00
Adrian.Conlon
57cfd79c44 Tidy header file usage a little.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-01 16:41:50 +01:00
Adrian.Conlon
9b43b74c28 Rationalise some of the reset/initialise logic across pProcessor implementations.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-09-01 16:01:40 +01:00
Adrian.Conlon
406e651c66 Whoops: The processor should only execute instructions while it is powered. Otherwise, it'll get into an infinite loop.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-31 17:19:32 +01:00
Adrian.Conlon
1eb127ed72 Add power support to processor base class.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-31 12:13:00 +01:00
Adrian.Conlon
e70686c5de Some more rationalisation of processor execution/stepping strategies.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-30 23:17:34 +01:00
Adrian.Conlon
91c8855183 Share i8080 and Z80 I/O implementations.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-28 21:41:10 +01:00
Adrian.Conlon
9964070b85 Refactor to allow peek/poke/reference to share a common implementation as much as possible.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-24 11:28:01 +01:00
Adrian.Conlon
448ee2f09f Refactor the MBC implementation to allow a single point of definition.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-24 10:28:31 +01:00
Adrian.Conlon
2c7e32aa78 First stab at implementing MBC1 support for LR35902. Not complete, but all old tests still work.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-08-23 23:17:45 +01:00
Adrian.Conlon
beca76d733 Share instruction decoding mechanism between Intel derived processors.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-07-21 13:33:17 +01:00
Adrian.Conlon
99e3454527 Memory locking is dependent on the GB hardware, not the size of the program, so allow lock ranges to be manually specified.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-07-18 21:40:29 +01:00
Adrian.Conlon
4f491f110e Make the 6502 a little more compatible with other processor implementations.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-07-17 13:46:06 +01:00
Adrian.Conlon
3c0a1697fd Fetching bytes/words and stack access are more processor specific than I thought.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-07-07 09:27:06 +01:00
Adrian.Conlon
88d3e4fd47 Initial stab at getting MOS6502 imported to the EightBit library.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-07-02 22:03:33 +01:00
Adrian.Conlon
8927f412d4 Use a shared test harness.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-06-21 23:55:25 +01:00
Adrian.Conlon
052df61250 Remove get/getWord and set/setWord from memory class. Just use address and data lines on the memory.
Signed-off-by: Adrian.Conlon <adrian.conlon@arup.com>
2017-06-20 14:09:44 +01:00
Adrian.Conlon
c7e65f5447 Consistency changes to the projects.
Signed-off-by: Adrian.Conlon <adrian.conlon@arup.com>
2017-06-19 13:53:37 +01:00
Adrian.Conlon
c9bf24d1fa Tidy up register and static method access.
Signed-off-by: Adrian.Conlon <adrian.conlon@arup.com>
2017-06-19 13:53:00 +01:00
Adrian.Conlon
23108a8536 Bring performance back to par by: inlining and static flag register access, where possible.
Signed-off-by: Adrian.Conlon <adrian.conlon@arup.com>
2017-06-18 18:14:39 +01:00
Adrian.Conlon
0291970427 Further work on uniting the 8080 family processor family.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-06-11 21:08:40 +01:00
Adrian.Conlon
627e41bf35 Introduce an IntelProcessor base class to allow known good implementation to be shared.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-06-11 09:45:34 +01:00
Adrian.Conlon
b1aa523dcc Small simplifications to base Processor class.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-06-10 12:42:55 +01:00
Adrian.Conlon
d8977d32d3 More MEMPTR clarifications.
This time to avoid temporary variables, in a similar manner to Z80 hardware.

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
2017-06-07 22:54:55 +01:00