Beispiel #1
0
        public ATA()
        {
            foreach (DiskElement drive in SystemConfig.Machine.Disks)
            {
                ATADrive newDrive;

                if (drive.Type == DriveType.HardDisk)
                {
                    newDrive = new HardDisk();
                }
                else if (drive.Type == DriveType.CDROM)
                {
                    newDrive = new CDROM();
                }
                else
                {
                    break;
                }

                newDrive.LoadImage(drive.Image);

                diskDrives.Add(newDrive);
            }

            primarySelected = true;
        }
Beispiel #2
0
        public ProjectPSX(IHostWindow window, string diskFilename)
        {
            controller = new DigitalController();
            cdrom      = new CDROM(window, diskFilename);
            bus        = new BUS(window, controller, cdrom);
            cpu        = new CPU(bus);

            bus.loadBios();
        }
Beispiel #3
0
 public BUS(GPU gpu, CDROM cdrom, SPU spu, JOYPAD joypad, TIMERS timers, MDEC mdec) {
     interruptController = new InterruptController();
     dma = new DMA(this);
     this.gpu = gpu;
     this.cdrom = cdrom;
     this.timers = timers;
     this.mdec = mdec;
     this.spu = spu;
     this.joypad = joypad;
 }
Beispiel #4
0
 public BUS(IHostWindow window, Controller controller, CDROM cdrom)
 {
     interruptController = new InterruptController();
     dma        = new DMA(this);
     gpu        = new GPU(window);
     this.cdrom = cdrom;
     timers     = new TIMERS();
     joypad     = new JOYPAD(controller);
     mdec       = new MDEC();
     spu        = new SPU();
 }
Beispiel #5
0
        public BUS()
        {
            interruptController = new InterruptController(); //refactor this to interface and callbacks
            dma    = new DMA(this);
            gpu    = new GPU();
            cdrom  = new CDROM();
            timers = new TIMERS();
            joypad = new JOYPAD();
            mdec   = new MDEC();

            initMem();
        }
Beispiel #6
0
            public CDROM[] GetDevice()
            {
                List <CDROM>             arrayCDROM = new List <CDROM>();
                ManagementObjectSearcher searcher   = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_CDROMDrive");

                foreach (ManagementObject queryObj in searcher.Get())
                {
                    CDROM tempCDROM = new CDROM();
                    tempCDROM.CDROMID = queryObj["PNPDeviceID"] != null ? queryObj["PNPDeviceID"].ToString() : "Nodata";
                    tempCDROM.Name    = queryObj["Name"] != null ? queryObj["Name"].ToString() : "Nodata";
                    arrayCDROM.Add(tempCDROM);
                }
                return(arrayCDROM.ToArray());
            }
Beispiel #7
0
        public ProjectPSX(IHostWindow window, string diskFilename)
        {
            controller = new DigitalController();
            memoryCard = new MemoryCard();
            cd         = new CD(diskFilename);
            spu        = new SPU(window);
            gpu        = new GPU(window);
            cdrom      = new CDROM(cd, spu);
            joypad     = new JOYPAD(controller, memoryCard);
            timers     = new TIMERS();
            mdec       = new MDEC();
            bus        = new BUS(gpu, cdrom, spu, joypad, timers, mdec);
            cpu        = new CPU(bus);

            bus.loadBios();
        }
Beispiel #8
0
        public BUS()
        {
            interruptController = new InterruptController(); //refactor this to interface and callbacks
            dma    = new DMA();
            gpu    = new GPU();
            cdrom  = new CDROM();
            timers = new TIMERS();
            joypad = new JOYPAD();

            dma.setDMA_Transfer(this);

            try {
                initMem();
            } finally {
                ramHandle.Free();
            }
        }