Implemented a load of Z80 OpCodes. Added SimpleIOBus.
This commit is contained in:
@@ -24,15 +24,14 @@ namespace Core.Memory
|
||||
|
||||
if (address < 0x4000)
|
||||
{
|
||||
// Attempted to write to the ROM area.
|
||||
// We simply ignore the write command, just like real hardware.
|
||||
// Cannot write to ROM - Do nothing - maybe throw an exception
|
||||
return;
|
||||
}
|
||||
|
||||
_memory[address] = value;
|
||||
}
|
||||
|
||||
// Helper method to load the original Sinclair ROM file
|
||||
// Load the ROM file
|
||||
public void LoadRom(byte[] romData)
|
||||
{
|
||||
if (romData.Length > 0x4000)
|
||||
@@ -40,7 +39,7 @@ namespace Core.Memory
|
||||
throw new ArgumentException("ROM file exceeds the 16KB capacity of Bank 0.");
|
||||
}
|
||||
|
||||
// Copy the ROM data into the very beginning of the memory array
|
||||
// Copy the ROM
|
||||
Array.Copy(romData, 0, _memory, 0, romData.Length);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user