Esempio n. 1
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();
        }
Esempio n. 2
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;
        }