コード例 #1
0
ファイル: cFile.cs プロジェクト: Kelmoir/DCPU-floppy-editor
        internal void ReadFile(int Endian)
        {
            cBinLoader Loader = new cBinLoader();

            if (Loader.LoadBin(Endian, FileType.File))
            {
                this.SetFileData(Loader.GetReadOut());
            }
        }
コード例 #2
0
        private void btChangeKernel_Click(object sender, EventArgs e)
        {
            cBinLoader Loader = new cBinLoader();

            if (Loader.LoadBin(cbEndian.SelectedIndex, FileType.Kernel))
            {
                FileSystem.FAT.ReplaceKernel(Loader.GetFile(FileType.Kernel));
                UpdateDiskUsage();
            }
        }
コード例 #3
0
        private void btAddKernel_Click(object sender, EventArgs e)
        {
            cBinLoader Loader = new cBinLoader();

            if (Loader.LoadBin(Master.cbEndian.SelectedIndex, FileType.Kernel))
            {
                Kernel = Loader.GetFile(FileType.Kernel);
                lbKernelStatus.Text = "kernel status: kernel loaded";
                KernelAvaiable      = true;
                if (BooloaderAvaiable && KernelAvaiable)
                {
                    btCreateFloppy.Visible = true;
                }
            }
        }
コード例 #4
0
        private void btAddBootloader_Click(object sender, EventArgs e)
        {
            cBinLoader Loader = new cBinLoader();

            if (Loader.LoadBin(Master.cbEndian.SelectedIndex, FileType.Bootloader))
            {
                Bootloader = Loader.GetFile(FileType.Bootloader);
                lbBootloaderStatus.Text = "bootloader status: bootloader loaded";
                BooloaderAvaiable       = true;
                if (BooloaderAvaiable && KernelAvaiable)
                {
                    btCreateFloppy.Visible = true;
                }
            }
        }
コード例 #5
0
        private void openFloppyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            cBinLoader Loader = new cBinLoader();

            if (!Loader.LoadBin(cbEndian.SelectedIndex, FileType.fullFloppy))
            {
                return;
            }
            cBinReader Reader = new cBinReader(Loader.GetFloppy(512));

            if (!Reader.ReadBin())
            {
                return;
            }
            FileSystem = Reader.GetFileSystem();
            UpdateDirectoryView();
            UpdateDiskUsage();
        }