Exemplo n.º 1
0
        public C64Bus(Cia1 cia, Cia2 cia2, VicIi vic) : base(0x10000)
        {
            //_memory.FillWithRandomData();

            // Intialize processor addressing mode with default values
            // http://sta.c64.org/cbm64mem.html
            _memory[0] = C64MemoryValues.PROCESSOR_PORT_DIRECTION_REGISTER_DEFAULT;
            _memory[1] = C64MemoryValues.PROCESSOR_PORT_REGISTER_DEFAULT;

            _romBasic = new MemoryBase <byte>(File.ReadAllBytes("basic.rom"))
            {
                IsReadOnly = true
            };
            _romCharacter = new MemoryBase <byte>(File.ReadAllBytes("char.rom"))
            {
                IsReadOnly = true
            };
            _romKernal = new MemoryBase <byte>(File.ReadAllBytes("kernal.rom"))
            {
                IsReadOnly = true
            };

            _cia  = cia;
            _cia2 = cia2;
            _vic  = vic;
        }
Exemplo n.º 2
0
        public void Initialize()
        {
            RemoveEventHandlers();

            Cia  = new Cia1();
            Cia2 = new Cia2();
            Vic  = new VicIi(TvSystem.PAL)
            {
                C64 = this
            };
            Memory = new C64Bus(Cia, Cia2, Vic);
            Cpu    = new Cpu(Memory);

            if (Cartridge != null)
            {
                Memory.InsertCartridge(Cartridge);
            }

            AddEventHandlers();
        }