/// <summary> /// Reads the port with the specified address /// </summary> /// <param name="addr">Port address</param> /// <returns>Byte read from the port</returns> public override byte ReadPort(ushort addr) { // --- Handle contention + 0xFE port var result = base.ReadPort(addr); return(addr == 0xFFFD ? SoundDevice.GetRegisterValue() : result); }
/// <summary> /// Handles the read from the port /// </summary> /// <param name="addr">Full port address</param> /// <param name="readValue">The value read from the port</param> /// <returns>True, if read handled; otherwise, false</returns> public override bool HandleRead(ushort addr, out byte readValue) { readValue = _soundDevice.GetRegisterValue(); return(true); }