Exemplo n.º 1
0
        public void Init(byte[] _BASICROM, byte[] _KERNALROM, byte[] _CHARENROM, byte[] _C1541ROM, Keyboard _keyboard)
        {
            MPU  = new PLA(this, _BASICROM, _KERNALROM, _CHARENROM);
            CPU  = new CPU_6502("C64", MPU);
            SID  = new SID_NullDevice();    //
            IEC  = new IECBus();
            VIC  = new VIC_II(this);
            CIA1 = new CIA1(_keyboard);
            CIA2 = new CIA2();

            CIA1.SetJoystick(1, Joystick1);
            CIA1.SetJoystick(2, Joystick2);

            Datasette = new DatasetteTAP();
            // Floppy = new C1541();

            Reset();

            ClockActive = false;
        }
Exemplo n.º 2
0
        public static void Start(RendererSDL r, Network n)
        {
            string appDir =
                Path.GetDirectoryName(Assembly.GetCallingAssembly().Location) +
                Path.DirectorySeparatorChar.ToString();

            renderer = r;
            renderer.ResetDrawState();
            network = n;
            kernal  = new Kernal(appDir + KERNALROM);
            basic   = new BASIC(appDir + BASICROM);
            charset = new Char(appDir + CHARROM);
            palette = new Palette();
            ram     = new Memory();
            vic     = new VIC();
            sid     = new SID();
            cia1    = new CIA1();
            cia2    = new CIA2();
            io      = new IO();
            cpu     = new CPU6510();

            cpu.Start();
        }
Exemplo n.º 3
0
        public static void Dispose()
        {
            if (cpu != null)
            {
                cpu.Stop();

                while (!cpu.ThreadExited)
                {
                    Thread.Sleep(20);
                }
            }

            kernal  = null;
            basic   = null;
            charset = null;
            palette = null;
            ram     = null;
            vic     = null;
            sid     = null;
            cia1    = null;
            cia2    = null;
            io      = null;
            cpu     = null;
        }