mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
Limitations :
- Bochs must be installed on the system. This is not checked as a prerequisite by the Builder.
- You will find a GuessForBochs Cosmos project under BlueSkeye user project folder that can be used to launch the Guess project under Bochs.
- You may have to fix manually the path for the following properties in Cosmos.bxrc file copied to the CosmosForBochs\Bin\Debug folder
* romimage
* vgaromimage
- The Cosmos project UI is not yet Bochs aware. If you do not use the GuessForBochs project you must manually edit your Cosmos project file to modify the following property in both the Debug and Release property group from the project file :
<Launch>Bochs</Launch>
You must also add the following properties in both the Debug and Release property group from the project file :
<BochsConfig>Cosmos.bxrc</BochsConfig>
<Bochs_Deployment>ISO</Bochs_Deployment>
<Bochs_Launch>Bochs</Bochs_Launch>
<Bochs_DebugEnabled>True</Bochs_DebugEnabled>
<Bochs_DebugMode>Source</Bochs_DebugMode>
<Bochs_IgnoreDebugStubAttribute />
<Bochs_VMwareEdition>Player</Bochs_VMwareEdition>
<Bochs_OutputPath>bin\Debug\</Bochs_OutputPath>
<Bochs_Framework>MicrosoftNET</Bochs_Framework>
<Bochs_UseInternalAssembler>False</Bochs_UseInternalAssembler>
<Bochs_TraceAssemblies />
<Bochs_EnableGDB>False</Bochs_EnableGDB>
<Bochs_StartCosmosGDB>false</Bochs_StartCosmosGDB>
<Bochs_Name>GuessForBochs</Bochs_Name>
<Bochs_Description>Use Bochs emulator to deploy and debug.</Bochs_Description>
<Bochs_VisualStudioDebugPort>Pipe: Cosmos\Serial</Bochs_VisualStudioDebugPort>
<Bochs_PxeInterface>192.168.43.1</Bochs_PxeInterface>
<Bochs_SlavePort>Serial: COM3</Bochs_SlavePort>
<Bochs_ShowLaunchConsole>False</Bochs_ShowLaunchConsole>
30 lines
No EOL
1.1 KiB
C#
30 lines
No EOL
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.IO.Pipes;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
|
|
namespace Cosmos.Debug.Common {
|
|
/// <summary>Use a named pipe server to implement wire transfer protocol between a Debug Stub
|
|
/// hosted in a debugged Cosmos Kernel and our Debug Engine hosted in Visual Studio.
|
|
/// Both VMware and Bochs use a pipe to expose guest serial ports to the host.</summary>
|
|
public class DebugConnectorPipeServer : DebugConnectorStream {
|
|
// private AutoResetEvent mWaitConnectEvent = new AutoResetEvent(false);
|
|
private NamedPipeServerStream mPipe;
|
|
|
|
public DebugConnectorPipeServer(string aName) {
|
|
mPipe = new NamedPipeServerStream(aName, PipeDirection.InOut, 1, PipeTransmissionMode.Byte,
|
|
PipeOptions.Asynchronous);
|
|
mPipe.BeginWaitForConnection(new AsyncCallback(DoWaitForConnection), mPipe);
|
|
}
|
|
|
|
public void DoWaitForConnection(IAsyncResult aResult) {
|
|
var xPipe = (NamedPipeServerStream)aResult.AsyncState;
|
|
xPipe.EndWaitForConnection(aResult);
|
|
// mWaitConnectEvent.Set();
|
|
Start(xPipe);
|
|
}
|
|
}
|
|
} |