Exemplo n.º 1
0
        private byte RDPORT(ushort addr)
        {
            var result  = m_cpu.BUS;
            var handler = m_mapReadPort[addr];

            if (handler != null)
            {
                var handled = false;
                handler(addr, ref result, ref handled);
            }
            //if (m_rzx == null)
            //{
            //    return result;
            //}
            if (m_rzx.IsPlayback)
            {
                return(m_rzx.GetInput());
            }
            else if (m_rzx.IsRecording)
            {
                m_rzx.SetInput(result);
            }

#if PORTDEBUG
            Logger.Debug($"Port {addr:X4} -> {result:X2}");
#endif
            return(result);
        }
Exemplo n.º 2
0
        private byte RDPORT(ushort addr)
        {
            var result  = m_cpu.BUS;
            var handler = m_mapReadPort[addr];

            if (handler != null)
            {
                var handled = false;
                handler(addr, ref result, ref handled);
            }
            //if (m_rzx == null)
            //{
            //    return result;
            //}
            if (m_rzx.IsPlayback)
            {
                return(m_rzx.GetInput());
            }
            else if (m_rzx.IsRecording)
            {
                m_rzx.SetInput(result);
            }
            return(result);
        }