public int Read(int addr) { switch (addr & 0xFC00) { case 0x1800: return(Via0.Read(addr)); case 0x1C00: return(Via1.Read(addr)); } if ((addr & 0x8000) != 0) { return(DriveRom.Read(addr & 0x3FFF)); } if ((addr & 0x1F00) < 0x800) { return(_ram[addr & 0x7FF]); } return((addr >> 8) & 0xFF); }