コード例 #1
0
        // only used for deserializing
        protected MOS6526(EventScheduler context, BinaryReader reader, EventList events)
        {
            event_context = context;

            LoadFromReader(reader);

            event_ta  = events.GetEventById(event_ta_id) as EventTa;
            event_tb  = events.GetEventById(event_tb_id) as EventTb;
            event_tod = events.GetEventById(event_tod_id) as EventTod;

#if DEBUG
            if (event_ta == null)
            {
                throw new Exception("MOS6526: EventTa not found");
            }
            if (event_tb == null)
            {
                throw new Exception("MOS6526: EventTb not found");
            }
            if (event_tod == null)
            {
                throw new Exception("MOS6526: EventTod not found");
            }
#endif

            event_ta.m_cia  = this;
            event_tb.m_cia  = this;
            event_tod.m_cia = this;
        }
コード例 #2
0
        // only used for deserializing
        public XSID(InternalPlayer player, BinaryReader reader, EventList events)
            : base()
        {
            this.events = events;

            this.m_player = player;

            LoadFromReader(player.m_scheduler, reader);

            if (xsidEvent_id == -1)
            {
                xsidEvent = null;
            }
            else
            {
                xsidEvent = events.GetEventById(xsidEvent_id) as xSIDEvent;

#if DEBUG
                if (xsidEvent == null)
                {
                    throw new Exception("XSID: xSIDEvent not found");
                }
#endif
            }
        }
コード例 #3
0
        // only used for deserializing
        internal Channel(EventScheduler context, XSID xsid, BinaryReader reader, EventList events)
        {
            m_context = context;
            m_xsid    = xsid;
            LoadFromReader(reader);

            sampleEvent = events.GetEventById(sampleEvent_id) as SampleEvent;
            galwayEvent = events.GetEventById(galwayEvent_id) as GalwayEvent;

#if DEBUG
            if (sampleEvent_id > -1 && sampleEvent == null)
            {
                throw new Exception("Channel: sampleEvent not found: " + sampleEvent_id.ToString());
            }
            if (galwayEvent_id > -1 && galwayEvent == null)
            {
                throw new Exception("Channel: galwayEvent not found: " + galwayEvent_id.ToString());
            }
#endif

            sampleEvent.m_ch = this;
            galwayEvent.m_ch = this;
        }
コード例 #4
0
        // only used for deserializing
        public SID6526(InternalPlayer player, BinaryReader reader, EventList events)
        {
            m_player       = player;
            m_eventContext = m_player.m_scheduler;

            LoadFromReader(reader);

            m_taEvent       = events.GetEventById(m_taEvent_id) as CiaEvent;
            m_taEvent.m_cia = this;

#if DEBUG
            if (m_taEvent == null)
            {
                throw new Exception("SID6526: CiaEvent not found");
            }
#endif
        }