public void LoadBIN(string fileName, ushort segment, ushort offset) { //X8086.Notify("Loading: {fileName} @ {segment:X4}:{offset:X4}", NotificationReasons.Info, null); X8086.Notify($"Loading: {fileName} @ {segment:X4}:{offset:X4}", NotificationReasons.Info); fileName = X8086.FixPath(fileName); if (System.IO.File.Exists(fileName)) { CopyToMemory(System.IO.File.ReadAllBytes(fileName), segment, offset); } else { ThrowException(System.Convert.ToString("File Not Found: " + "\r\n" + fileName)); } }
public DiskImage(string fileName, bool mountInReadOnlyMode = false, bool isHardDisk = false) { mFileName = X8086.FixPath(fileName); mCylinders = (ushort)(0); mHeads = (ushort)(0); mSectors = (ushort)(0); mFileLength = 0; if (!System.IO.File.Exists(mFileName)) { mStatus = ImageStatus.DiskImageNotFound; } else { OpenImage(mountInReadOnlyMode, isHardDisk); } X8086.Notify("DiskImage '{0}': {1}", X8086.NotificationReasons.Info, mFileName, mStatus.ToString()); }