Example #1
0
        public PCEngine(CoreComm comm, GameInfo game, Disc disc, object Settings, object syncSettings)
        {
            CoreComm          = comm;
            Tracer            = new TraceBuffer();
            MemoryCallbacks   = new MemoryCallbackSystem();
            DriveLightEnabled = true;
            systemid          = "PCECD";
            Type           = NecSystemType.TurboCD;
            this.disc      = disc;
            this._settings = (PCESettings)Settings ?? new PCESettings();
            _syncSettings  = (PCESyncSettings)syncSettings ?? new PCESyncSettings();

            GameInfo biosInfo;

            byte[] rom = CoreComm.CoreFileProvider.GetFirmwareWithGameInfo("PCECD", "Bios", true, out biosInfo,
                                                                           "PCE-CD System Card not found. Please check the BIOS settings in Config->Firmwares.");

            if (biosInfo.Status == RomStatus.BadDump)
            {
                CoreComm.ShowMessage(
                    "The PCE-CD System Card you have selected is known to be a bad dump. This may cause problems playing PCE-CD games.\n\n"
                    + "It is recommended that you find a good dump of the system card. Sorry to be the bearer of bad news!");
            }
            else if (biosInfo.NotInDatabase)
            {
                CoreComm.ShowMessage(
                    "The PCE-CD System Card you have selected is not recognized in our database. That might mean it's a bad dump, or isn't the correct rom.");
            }
            else if (biosInfo["BIOS"] == false)
            {
                //zeromus says: someone please write a note about how this could possibly happen.
                //it seems like this is a relic of using gameDB for storing whether something is a bios? firmwareDB should be handling it now.
                CoreComm.ShowMessage(
                    "The PCE-CD System Card you have selected is not a BIOS image. You may have selected the wrong rom. FYI-Please report this to developers, I don't think this error message should happen.");
            }

            if (biosInfo["SuperSysCard"])
            {
                game.AddOption("SuperSysCard");
            }

            if (game["NeedSuperSysCard"] && game["SuperSysCard"] == false)
            {
                CoreComm.ShowMessage(
                    "This game requires a version 3.0 System card and won't run with the system card you've selected. Try selecting a 3.0 System Card in the firmware configuration.");
                throw new Exception();
            }

            game.FirmwareHash = rom.HashSHA1();

            Init(game, rom);
            // the default RomStatusDetails don't do anything with Disc
            CoreComm.RomStatusDetails = string.Format("{0}\r\nDisk partial hash:{1}", game.Name, new DiscSystem.DiscHasher(disc).OldHash());
            SetControllerButtons();
        }
Example #2
0
		public HuC6280(IMemoryCallbackSystem callbacks)
		{
			Reset();
			MemoryCallbacks = callbacks;
		}
Example #3
0
 public HuC6280(IMemoryCallbackSystem callbacks)
 {
     Reset();
     MemoryCallbacks = callbacks;
 }