Commit Graph

103 Commits

Author SHA1 Message Date
Adrian Conlon
3d2b861b56 Tidy the processor object a little.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-03-03 10:44:52 +00:00
Adrian Conlon
22cb8b142b Tidy the path to nuget packages, such that they can be used as git submodules.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-03-03 10:35:18 +00:00
Adrian Conlon
4799e097de Update stylecop (plus add stylecop packages to the Intel 8080 set).
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-03-02 08:59:20 +00:00
Adrian Conlon
9a1d5cc762 First commit of the Intel8080 processor core. Passes diagnostics. Runs at ~50% speed of unmanaged code.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-28 00:06:35 +00:00
Adrian Conlon
12969dbef6 Use intermediate values for HL2, if possible.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-23 10:38:29 +00:00
Adrian Conlon
03caba99dc Follow most of the guideline suggestions from VS2019 preview. Pretty good suggestions!
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-22 22:33:51 +00:00
Adrian Conlon
28b7a88f0f Use the correct virtual methods: BusRead and BusWrite to control bus access for Z80 a la M6502 implementation.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-22 19:59:42 +00:00
Adrian Conlon
726c3fe4cc More work on minimising the effect of creating garbage collected objects.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-21 22:52:46 +00:00
Adrian Conlon
968b1c6545 Correct Z80 disassembler format issue.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-21 22:51:42 +00:00
Adrian Conlon
27e1c5c9f8 Make Register16 a class, rather than struct. Tricky, but a bit faster than before.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-21 19:58:49 +00:00
Adrian Conlon
b7fbb80018 Add an extra couple of blank lines to separate the information messages in the test harness.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-21 01:11:07 +00:00
Adrian Conlon
c0aa7c5ff5 Correct a few small mistakes in the Z80 emulation.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-21 01:10:17 +00:00
Adrian Conlon
c7feb58815 Correct a Z80 compare mistake: the result of the implied subtraction shouldn't be applied to the flags register!
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-21 00:02:31 +00:00
Adrian Conlon
900ac02869 Tidy up a stylecop suggestion.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-21 00:01:36 +00:00
Adrian Conlon
42d7095dab Make the Z80 disassembly more compatible with the unmanaged disassembler.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-20 23:52:59 +00:00
Adrian Conlon
53cdc614a2 Mask the Z80 refresh register correctly
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-20 23:51:50 +00:00
Adrian Conlon
f0d5751949 Fix Z80 LDIR
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-20 22:35:22 +00:00
Adrian Conlon
46a12a2b7a Make the Z80 test harness mostly functional.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-20 22:23:58 +00:00
Adrian Conlon
1292163837 Improve the Z80 disassembler: now does mostly good disassemblies.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-20 22:23:29 +00:00
Adrian Conlon
28516bbc84 Rename the M6502 disassembler class to something a little better grammatically. 2019-02-20 22:21:14 +00:00
Adrian Conlon
4ee184eaf4 Improve the readability of branch instructions in the M6502 processor implementation.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-20 22:19:38 +00:00
Adrian Conlon
c400f37201 Improve the debugging visibility of the Register16 class.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-20 22:17:54 +00:00
Adrian Conlon
01ce926574 Start adding Z80 test harness and update package configurations.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-19 00:58:17 +00:00
Adrian Conlon
5714798756 Lots of stylecop encouraged changes.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-19 00:56:16 +00:00
Adrian Conlon
23489b7127 Interesting, makes pretty much no difference to just calculate 16 bit values, rather than relying on byte layout.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-18 22:28:20 +00:00
Adrian Conlon
9ac2c53685 The m6502 intermediate variable should really be of type Register16
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-18 22:14:11 +00:00
Adrian Conlon
999bdf71ff Add some basic runtime timings to the 6502 TestHarness class.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-18 00:54:02 +00:00
Adrian Conlon
a144cf19a1 Whoops: missed bus read/write clock ticks in the 6502 emulator.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-18 00:52:45 +00:00
Adrian Conlon
ea82c58777 Add Z80 processor (untested, but complete)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-16 21:32:34 +00:00
Adrian Conlon
3108a373d7 Interesting: in profiling, creating the mapping object was one of the major bottlenecks, when running the M6502 test suite.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-15 09:10:27 +00:00
Adrian Conlon
219d65a57a No need to use LowByte/HighByte methods in Register16 construction: that's what it's layout is for.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-15 09:08:44 +00:00
Adrian Conlon
c6a7003b8d Help out callers using Register16 arguments a little: Don't always require the ".Word" property to be passed.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-15 00:26:01 +00:00
Adrian Conlon
cf4e633034 Implement some suggestions from the code analysis.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-14 23:51:32 +00:00
Adrian Conlon
63db46a7bc Resurrect the Register16 class. This (or something *very* much like it) is going to be necessary to add a Z80 emulator (reference access to the high/low parts of 16-bit registers).
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-14 23:01:31 +00:00
Adrian Conlon
b61d884679 Correct unit test project configuration (due to movement of project...)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-07 00:34:21 +00:00
Adrian Conlon
ffa46188e3 Merge branch 'master' of https://github.com/MoleskiCoder/EightBitNet 2019-02-07 00:08:35 +00:00
Adrian Conlon
6d15b91054 Couple of small increment/decrement changes
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-07 00:08:23 +00:00
Adrian Conlon
cdfec1ac7e
Update README.md 2019-02-07 00:01:54 +00:00
Adrian Conlon
e66525e45f More analysis suggestions
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-06 23:50:25 +00:00
Adrian Conlon
0e8a530573 More analysis suggested tidy ups.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-06 23:41:56 +00:00
Adrian Conlon
d6d8c4e13c Move the EightBit (.Net) test projects to better locations.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-06 22:58:26 +00:00
Adrian Conlon
73863118d6 Start renaming the EightBit projects to be a little more meaningful.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-06 22:49:26 +00:00
Adrian Conlon
426670364c Correct layout issues in the 6502 implementation.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-05 00:02:22 +00:00
Adrian Conlon
224000c4c7 Not sure if this was a really good idea, but integrated StyleCop rules into the builds. Corrected all except documentation problems.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-04 23:52:21 +00:00
Adrian Conlon
30aa1b70bf Tidy up some layout issues.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-03 21:13:06 +00:00
Adrian Conlon
c4e613065b A few minor consistency corrections.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-03 20:49:07 +00:00
Adrian Conlon
d4a35c402c A few small consistency updates:
1) Drop Get/SetPagedByte in favour of normal BusRead/Write
2) Tidy some "using" statements
3) More "expression body" usage, if possible
4) Use field initialisation, rather than construction, if possible
5) Correct IntelProcessor register set/get methods (there were remnants of "copy pasta" code)

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-03 20:29:52 +00:00
Adrian Conlon
0ca57d8641 Correct some stuff spotted by the .net analysis tools (where I agree with them!)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-03 10:23:41 +00:00
Adrian Conlon
0564ee3d86 Correct a couple of build issues (C# 7.2 required)
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-03 09:46:32 +00:00
Adrian Conlon
d58b635626 Sort out: power, initialisation and relative branch offset calculation issues arising.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-02-03 09:32:59 +00:00