diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-06 22:36:34 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-06 22:36:34 +1000 |
| commit | 7a8d2bcd75d88a5429937bf551878c55e1dcf0fd (patch) | |
| tree | 81bc1f259fb8678513aa8b214df4ef72720bb585 /Chip/RamDevice.cs | |
| parent | 16f3cb74564cf7c19da6e13666c98aca36094716 (diff) | |
moved everything to seperate projects, and started compiler work + push and pop instructions added
Diffstat (limited to 'Chip/RamDevice.cs')
| -rw-r--r-- | Chip/RamDevice.cs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Chip/RamDevice.cs b/Chip/RamDevice.cs deleted file mode 100644 index 509a2df..0000000 --- a/Chip/RamDevice.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace Q1Emu.Chip; - -using System; -using System.Runtime.CompilerServices; - -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 |
