Exemplo n.º 1
0
        public Intellivision(CoreComm comm, GameInfo game, byte[] rom)
        {
            CoreComm = comm;

            Rom  = rom;
            Game = game;
            Cart = new Intellicart();
            if (Cart.Parse(Rom) == -1)
            {
                Cart = new Cartridge();
                Cart.Parse(Rom);
            }

            Cpu             = new CP1610();
            Cpu.ReadMemory  = ReadMemory;
            Cpu.WriteMemory = WriteMemory;
            Cpu.Reset();

            Stic             = new STIC();
            Stic.ReadMemory  = ReadMemory;
            Stic.WriteMemory = WriteMemory;
            Stic.Reset();

            Psg             = new PSG();
            Psg.ReadMemory  = ReadMemory;
            Psg.WriteMemory = WriteMemory;

            Connect();

            Cpu.LogData();

            LoadExecutiveRom(CoreComm.CoreFileProvider.GetFirmwarePath("INTV", "EROM", true, "Executive ROM is required."));
            LoadGraphicsRom(CoreComm.CoreFileProvider.GetFirmwarePath("INTV", "GROM", true, "Graphics ROM is required."));
        }
Exemplo n.º 2
0
 public void FrameAdvance(bool render, bool rendersound)
 {
     Frame++;
     Cpu.AddPendingCycles(14934);
     while (Cpu.GetPendingCycles() > 0)
     {
         int cycles = Cpu.Execute();
         Stic.Execute(cycles);
         Connect();
         Cpu.LogData();
     }
 }
Exemplo n.º 3
0
        public Intellivision(CoreComm comm, GameInfo game, byte[] rom)
        {
            ServiceProvider = new BasicServiceProvider(this);
            CoreComm        = comm;

            _rom      = rom;
            _gameInfo = game;
            _cart     = new Intellicart();
            if (_cart.Parse(_rom) == -1)
            {
                _cart = new Cartridge();
                _cart.Parse(_rom);
            }

            _cpu             = new CP1610();
            _cpu.ReadMemory  = ReadMemory;
            _cpu.WriteMemory = WriteMemory;
            _cpu.Reset();

            _stic             = new STIC();
            _stic.ReadMemory  = ReadMemory;
            _stic.WriteMemory = WriteMemory;
            _stic.Reset();
            (ServiceProvider as BasicServiceProvider).Register <IVideoProvider>(_stic);

            _psg             = new PSG();
            _psg.ReadMemory  = ReadMemory;
            _psg.WriteMemory = WriteMemory;

            Connect();

            _cpu.LogData();

            LoadExecutiveRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "EROM", true, "Executive ROM is required."));
            LoadGraphicsRom(CoreComm.CoreFileProvider.GetFirmware("INTV", "GROM", true, "Graphics ROM is required."));
        }