diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-03-17 20:49:22 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-03-17 20:49:22 +1000 |
| commit | 18868128e18d38b706e7df14e8e683e1a9739c17 (patch) | |
| tree | 6f0e0e5eee646f10cbad9c0c89c24d330bc58cc6 /Q1.core/Memory.cs | |
| parent | d87ab8af4c86a3fc6ee237444e372d87e536e3ef (diff) | |
chore: Initial commit
Diffstat (limited to 'Q1.core/Memory.cs')
| -rw-r--r-- | Q1.core/Memory.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Q1.core/Memory.cs b/Q1.core/Memory.cs new file mode 100644 index 0000000..d140809 --- /dev/null +++ b/Q1.core/Memory.cs @@ -0,0 +1,15 @@ +namespace Q1.core; + +public class Memory : IAddressable +{ + private readonly u8[] _memory; + + public Memory(int size) + { + _memory = new u8[size]; + } + + public u8 Read(u16 address) => _memory[address]; + public void Write(u16 address, u8 value) => _memory[address] = value; + public void Clock() { /* No timing behavior for simple memory */ } +}
\ No newline at end of file |
