Example #1
0
        public override void BusInit(IBusManager bmgr)
        {
            _cpu     = bmgr.CPU;
            _sandbox = bmgr.IsSandbox;
            _memory  = bmgr.FindDevice <IMemoryDevice>();

            bmgr.RegisterIcon(_iconRd);
            bmgr.RegisterIcon(_iconWr);
            bmgr.Events.SubscribeBeginFrame(BusBeginFrame);
            bmgr.Events.SubscribeEndFrame(BusEndFrame);

            bmgr.Events.SubscribeRdMemM1(0xFF00, 0x3D00, BusReadMem3D00_M1);
            bmgr.Events.SubscribeRdMemM1(0xC000, 0x4000, BusReadMemRam);
            bmgr.Events.SubscribeRdMemM1(0xC000, 0x8000, BusReadMemRam);
            bmgr.Events.SubscribeRdMemM1(0xC000, 0xC000, BusReadMemRam);

            OnSubscribeIo(bmgr);

            bmgr.Events.SubscribeReset(BusReset);
            bmgr.Events.SubscribeNmiRq(BusNmiRq);
            bmgr.Events.SubscribeNmiAck(BusNmiAck);

            foreach (var fs in LoadManager.GetSerializers())
            {
                bmgr.AddSerializer(fs);
            }
        }