summaryrefslogtreecommitdiff
path: root/Emulator/Chip/RamDevice.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-17 20:49:22 +1000
commit18868128e18d38b706e7df14e8e683e1a9739c17 (patch)
tree6f0e0e5eee646f10cbad9c0c89c24d330bc58cc6 /Emulator/Chip/RamDevice.cs
parentd87ab8af4c86a3fc6ee237444e372d87e536e3ef (diff)
chore: Initial commit
Diffstat (limited to 'Emulator/Chip/RamDevice.cs')
-rw-r--r--Emulator/Chip/RamDevice.cs33
1 files changed, 0 insertions, 33 deletions
diff --git a/Emulator/Chip/RamDevice.cs b/Emulator/Chip/RamDevice.cs
deleted file mode 100644
index a40713a..0000000
--- a/Emulator/Chip/RamDevice.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-namespace Q1.Emulator.Chip;
-
-public class RamDevice : BusDevice
-{
- public u8[] Memory;
-
- public RamDevice(u16 start, u16 size) : base(start, (u16) (start + size))
- {
- this.Memory = new u8[size];
- }
-
- public override void Reset()
- {
- this.Memory = new u8[this.AddressableEnd - this.AddressableStart];
- }
-
- public override void Clock()
- {
- // No clocking needed for RAM
- }
-
- public override u8 Read(u16 address)
- {
- u16 relativeAddress = this.GetRelativeAddress(address);
- return this.Memory[relativeAddress];
- }
-
- public override void Write(u16 address, u8 value)
- {
- u16 relativeAddress = this.GetRelativeAddress(address);
- this.Memory[relativeAddress] = value;
- }
-} \ No newline at end of file