diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-03-18 23:08:58 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-03-18 23:08:58 +1000 |
| commit | 7d20ff2a8e89e646fa79be69c8d07a512081daba (patch) | |
| tree | 67433c74d55f778065363010a593c44a0f65296b /Q1.tests/Core/ChipTestBase.cs | |
| parent | 0bb62fc65526a0981cd328dea1b09aba8ce0a576 (diff) | |
test: Add tests for all control instructions and base CPU implementation
Diffstat (limited to 'Q1.tests/Core/ChipTestBase.cs')
| -rw-r--r-- | Q1.tests/Core/ChipTestBase.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Q1.tests/Core/ChipTestBase.cs b/Q1.tests/Core/ChipTestBase.cs new file mode 100644 index 0000000..3540954 --- /dev/null +++ b/Q1.tests/Core/ChipTestBase.cs @@ -0,0 +1,20 @@ +namespace Q1.tests.Core; + +using Q1.core.Arch; +using Q1.core.Arch.Constants; +using Q1.core.Components; + +public abstract class ChipTestBase +{ + protected Chip CreateChip() + { + var chip = new Chip(); + + var memory = new Memory(ChipLayout.MEMORY_START, ChipLayout.MEMORY_SIZE); + var bus = new Bus(0x0, u16.MaxValue); + bus.MountDevice(memory); + + bus.AttachChip(chip); + return chip; + } +}
\ No newline at end of file |
