mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 04:48:53 +00:00
93 lines
3.1 KiB
C#
93 lines
3.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.IO;
|
|
using System.Diagnostics;
|
|
|
|
namespace Cosmos.Compiler.Builder
|
|
{
|
|
public class MakeBOCHSStep : BuilderStep
|
|
{
|
|
public MakeBOCHSStep(BuildOptions options)
|
|
: base(options)
|
|
{
|
|
BOCHSConfig = new string[]
|
|
{
|
|
"# configuration file generated by Cosmos",
|
|
"config_interface: win32config",
|
|
"display_library: win32",
|
|
"megs: 32",
|
|
"romimage: file=\"" + BuildPath + "Tools\\qemu\\bios.bin\"",
|
|
"vgaromimage: file=\"" + BuildPath + "Tools\\qemu\\vgabios.bin\"",
|
|
"boot: cdrom",
|
|
"floppy_bootsig_check: disabled=0",
|
|
"# no floppya",
|
|
"# no floppyb",
|
|
"ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14",
|
|
"ata0-master: type=cdrom, path=\"" + BuildPath + "cosmos.iso\", status=inserted, biosdetect=auto, model=\"Generic 1234\"",
|
|
"ata1: enabled=0",
|
|
"ata2: enabled=0",
|
|
"ata3: enabled=0",
|
|
"parport1: enabled=0",
|
|
"parport2: enabled=0",
|
|
"com1: enabled=0",
|
|
"com2: enabled=0",
|
|
"com3: enabled=0",
|
|
"com4: enabled=0",
|
|
"usb_uhci: enabled=0",
|
|
"usb_ohci: enabled=0",
|
|
"i440fxsupport: enabled=1",
|
|
"vga_update_interval: 2000000",
|
|
"vga: extension=vbe",
|
|
"cpu: count=1, ips=4000000, reset_on_triple_fault=1, cpuid_limit_winnt=0",
|
|
"print_timestamps: enabled=0",
|
|
"port_e9_hack: enabled=0",
|
|
"text_snapshot_check: enabled=0",
|
|
"private_colormap: enabled=0",
|
|
"clock: sync=none, time0=local",
|
|
"# no cmosimage",
|
|
"ne2k: enabled=0",
|
|
"pnic: enabled=0",
|
|
"sb16: enabled=0",
|
|
"# no loader",
|
|
"log: -",
|
|
"logprefix: %t%e%d",
|
|
"panic: action=ask",
|
|
"error: action=report",
|
|
"info: action=report",
|
|
"debug: action=ignore",
|
|
"pass: action=fatal",
|
|
"keyboard_type: mf",
|
|
"keyboard_serial_delay: 250",
|
|
"keyboard_paste_delay: 100000",
|
|
"keyboard_mapping: enabled=0, map=",
|
|
"user_shortcut: keys=none",
|
|
"mouse: enabled=0, type=ps2",
|
|
""
|
|
};
|
|
}
|
|
|
|
private string[] BOCHSConfig;
|
|
|
|
override public void Execute()
|
|
{
|
|
Init();
|
|
|
|
new MakeISOStep(options).Execute(); //TODO shouldnt builder make this ?
|
|
string xPath = BuildPath + @"BOCHS\";
|
|
string exePath = xPath + @"cosmos_iso.bxrc";
|
|
|
|
File.WriteAllLines(exePath, BOCHSConfig);
|
|
|
|
Process.Start(exePath);
|
|
|
|
Finish();
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|