diff --git a/Build/VSIP/Cosmos.targets b/Build/VSIP/Cosmos.targets
index 8cd28f2f3f..ab03b06589 100644
--- a/Build/VSIP/Cosmos.targets
+++ b/Build/VSIP/Cosmos.targets
@@ -90,7 +90,7 @@
-
+
\ No newline at end of file
diff --git a/Build/VSIP/Cosmos.zip b/Build/VSIP/Cosmos.zip
index 2e20f3b2e3..a6c6dd613b 100644
Binary files a/Build/VSIP/Cosmos.zip and b/Build/VSIP/Cosmos.zip differ
diff --git a/Build/VSIP/CosmosKernel (C#).zip b/Build/VSIP/CosmosKernel (C#).zip
index 2be78b4ad3..7841867925 100644
Binary files a/Build/VSIP/CosmosKernel (C#).zip and b/Build/VSIP/CosmosKernel (C#).zip differ
diff --git a/Build/VSIP/CosmosKernel (VB).zip b/Build/VSIP/CosmosKernel (VB).zip
index c4b34fb7de..9b94a76f9e 100644
Binary files a/Build/VSIP/CosmosKernel (VB).zip and b/Build/VSIP/CosmosKernel (VB).zip differ
diff --git a/Build/VSIP/CosmosProject (C#).zip b/Build/VSIP/CosmosProject (C#).zip
index 68ed051186..e7f22446d6 100644
Binary files a/Build/VSIP/CosmosProject (C#).zip and b/Build/VSIP/CosmosProject (C#).zip differ
diff --git a/Build/VSIP/CosmosProject (F#).zip b/Build/VSIP/CosmosProject (F#).zip
index 8f07e88777..5de2f826eb 100644
Binary files a/Build/VSIP/CosmosProject (F#).zip and b/Build/VSIP/CosmosProject (F#).zip differ
diff --git a/Build/VSIP/CosmosProject (VB).zip b/Build/VSIP/CosmosProject (VB).zip
index 7928e86332..ae9c1f0b30 100644
Binary files a/Build/VSIP/CosmosProject (VB).zip and b/Build/VSIP/CosmosProject (VB).zip differ
diff --git a/Build/VSIP/ItemTemplates/Cosmos.zip b/Build/VSIP/ItemTemplates/Cosmos.zip
index 2e20f3b2e3..a6c6dd613b 100644
Binary files a/Build/VSIP/ItemTemplates/Cosmos.zip and b/Build/VSIP/ItemTemplates/Cosmos.zip differ
diff --git a/Build/VSIP/ItemTemplates/CosmosKernel (C#).zip b/Build/VSIP/ItemTemplates/CosmosKernel (C#).zip
index 2be78b4ad3..7841867925 100644
Binary files a/Build/VSIP/ItemTemplates/CosmosKernel (C#).zip and b/Build/VSIP/ItemTemplates/CosmosKernel (C#).zip differ
diff --git a/Build/VSIP/ItemTemplates/CosmosKernel (VB).zip b/Build/VSIP/ItemTemplates/CosmosKernel (VB).zip
index c4b34fb7de..9b94a76f9e 100644
Binary files a/Build/VSIP/ItemTemplates/CosmosKernel (VB).zip and b/Build/VSIP/ItemTemplates/CosmosKernel (VB).zip differ
diff --git a/Build/VSIP/ItemTemplates/CosmosProject (C#).zip b/Build/VSIP/ItemTemplates/CosmosProject (C#).zip
index 68ed051186..e7f22446d6 100644
Binary files a/Build/VSIP/ItemTemplates/CosmosProject (C#).zip and b/Build/VSIP/ItemTemplates/CosmosProject (C#).zip differ
diff --git a/Build/VSIP/ItemTemplates/CosmosProject (F#).zip b/Build/VSIP/ItemTemplates/CosmosProject (F#).zip
index 8f07e88777..5de2f826eb 100644
Binary files a/Build/VSIP/ItemTemplates/CosmosProject (F#).zip and b/Build/VSIP/ItemTemplates/CosmosProject (F#).zip differ
diff --git a/Build/VSIP/ItemTemplates/CosmosProject (VB).zip b/Build/VSIP/ItemTemplates/CosmosProject (VB).zip
index 7928e86332..ae9c1f0b30 100644
Binary files a/Build/VSIP/ItemTemplates/CosmosProject (VB).zip and b/Build/VSIP/ItemTemplates/CosmosProject (VB).zip differ
diff --git a/Build/VSIP/ItemTemplates/Projects.zip b/Build/VSIP/ItemTemplates/Projects.zip
index bd207c9fec..6d65e94096 100644
Binary files a/Build/VSIP/ItemTemplates/Projects.zip and b/Build/VSIP/ItemTemplates/Projects.zip differ
diff --git a/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs b/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs
index 1893f27205..0e02244914 100644
--- a/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs
+++ b/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs
@@ -26,7 +26,8 @@ public partial class MainWindow : Window {
protected List mTailLines = new List();
protected string mCosmosDir;
protected string mSetupPath;
- protected int mReleaseNo = 7;
+ //Needs updating with each new release.
+ protected int mReleaseNo = 105304;
public MainWindow() {
InitializeComponent();
diff --git a/source2/Build/Cosmos.Build.Common/CosmosPaths.cs b/source2/Build/Cosmos.Build.Common/CosmosPaths.cs
index 1a1562c212..04723fceea 100644
--- a/source2/Build/Cosmos.Build.Common/CosmosPaths.cs
+++ b/source2/Build/Cosmos.Build.Common/CosmosPaths.cs
@@ -33,7 +33,7 @@ static CosmosPaths() {
}
UserKit = (string)xReg.GetValue("UserKit");
if (null == UserKit) {
- throw new Exception(@"HKEY_LOCAL_MACHINE\SOFTWARE\Cosmos\@UserKit was not found.");
+ throw new Exception(@"HKEY_LOCAL_MACHINE\SOFTWARE\Cosmos\@UserKit was not found but UserKit must be installed!");
}
}
}
@@ -48,7 +48,7 @@ static CosmosPaths() {
if (xReg != null) {
DevKit = (string)xReg.GetValue("DevKit");
if (null == DevKit) {
- throw new Exception(@"HKEY_LOCAL_MACHINE\SOFTWARE\Cosmos\@DevKit was not found.");
+ throw new Exception(@"HKEY_CURRENT_USER\SOFTWARE\Cosmos\@DevKit was not found but DevKit is installed!");
}
try { DebugStubSrc = CheckPath(DevKit, @"source2\Compiler\Cosmos.Compiler.DebugStub"); }
// Not finding this one is not an issue. We will fallback to already retrieved stun from UserKit
diff --git a/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets b/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets
index 8cd28f2f3f..ab03b06589 100644
--- a/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets
+++ b/source2/Build/Cosmos.Build.MSBuild/Cosmos.targets
@@ -90,7 +90,7 @@
-
+
\ No newline at end of file
diff --git a/source2/Debug/Cosmos.Debug.Common/DebugConnector.cs b/source2/Debug/Cosmos.Debug.Common/DebugConnector.cs
index 59ec9a3a2e..8aafc89037 100644
--- a/source2/Debug/Cosmos.Debug.Common/DebugConnector.cs
+++ b/source2/Debug/Cosmos.Debug.Common/DebugConnector.cs
@@ -95,7 +95,7 @@ protected void SendCmd(byte aCmd, byte[] aData, bool aWait) {
//}
//System.Windows.Forms.MessageBox.Show(xSB.ToString());
DoDebugMsg("DC Send: " + aCmd.ToString());
-
+
if (aCmd == Vs2Ds.Noop) {
// Noops dont have any data.
// This is becuase Noops are used to clear out the
@@ -129,7 +129,7 @@ protected void SendCmd(byte aCmd, byte[] aData, bool aWait) {
// with an ACK. The ACK will set the event and allow us to proceed.
// This wait causes this method to wait on the ACK to be receive back from
// DebugStub.
- mCmdWait.WaitOne();
+ mCmdWait.WaitOne(60000);
}
}
}
@@ -190,7 +190,9 @@ public void Continue() {
}
public byte[] GetMemoryData(uint address, uint size, int dataElementSize = 1) {
- // from debugstub:
+ return new byte[size];
+
+ // from debugstub:
//// sends a stack value
//// Serial Params:
//// 1: x32 - offset relative to EBP
@@ -210,15 +212,18 @@ public byte[] GetMemoryData(uint address, uint size, int dataElementSize = 1) {
Array.Copy(BitConverter.GetBytes(address), 0, xData, 0, 4);
Array.Copy(BitConverter.GetBytes(size), 0, xData, 4, 4);
SendCmd(Vs2Ds.SendMemory, xData);
- var xResult = mData;
- mData = null;
+ var xResult = xData;
+ xData = null;
if (xResult.Length != size) {
throw new Exception("Retrieved a different size than requested!");
}
return xResult;
}
- public byte[] GetStackData(int offsetToEBP, uint size) {
+ public byte[] GetStackData(int offsetToEBP, uint size)
+ {
+ return new byte[size];
+
// from debugstub:
//// sends a stack value
//// Serial Params:
@@ -243,8 +248,8 @@ public byte[] GetStackData(int offsetToEBP, uint size) {
byte[] xResult;
- xResult = mData;
- mData = null;
+ xResult = xData;
+ xData = null;
return xResult;
}
@@ -266,6 +271,10 @@ protected UInt16 GetUInt16(byte[] aBytes, int aOffset) {
protected void PacketMsg(byte[] aPacket) {
mCurrentMsgType = aPacket[0];
+
+ System.Diagnostics.Debug.WriteLine(String.Format("DC - PacketMsg: {0}", DebugConnectorStream.BytesToString(aPacket, 0, aPacket.Length)));
+ System.Diagnostics.Debug.WriteLine("DC - " + mCurrentMsgType.ToString());
+
// Could change to an array, but really not much benefit
switch (mCurrentMsgType) {
case Ds2Vs.TracePoint:
diff --git a/source2/Debug/Cosmos.Debug.Common/DebugConnectorStream.cs b/source2/Debug/Cosmos.Debug.Common/DebugConnectorStream.cs
index f36ee8da68..c776a882d9 100644
--- a/source2/Debug/Cosmos.Debug.Common/DebugConnectorStream.cs
+++ b/source2/Debug/Cosmos.Debug.Common/DebugConnectorStream.cs
@@ -31,7 +31,7 @@ protected class Incoming {
public Action Completed;
}
- private static string BytesToString(byte[] bytes, int index, int count) {
+ internal static string BytesToString(byte[] bytes, int index, int count) {
if (count > 100) {
return String.Empty;
}
@@ -92,6 +92,9 @@ protected override void Next(int aPacketSize, Action aCompleted) {
}
xIncoming.Packet = new byte[aPacketSize];
xIncoming.Stream = mStream;
+
+ System.Diagnostics.Debug.WriteLine(String.Format("DC - Next: Expecting: {0}", aPacketSize));
+
#if TRACK_PENDING
try {
Interlocked.Increment(ref _pendingReadsCount);
@@ -134,7 +137,10 @@ protected void DoRead(IAsyncResult aResult) {
}
#endif
}
- else {
+ else
+ {
+ System.Diagnostics.Debug.WriteLine(String.Format("DC - Full packet received - Received: {0}", BytesToString(xIncoming.Packet, 0, xIncoming.Packet.Length)));
+
// Full packet received, process it
xIncoming.Completed(xIncoming.Packet);
}
diff --git a/source2/Debug/Cosmos.Debug.Common/Guess.mdf b/source2/Debug/Cosmos.Debug.Common/Guess.mdf
index dea6c8e741..2c135a2015 100644
Binary files a/source2/Debug/Cosmos.Debug.Common/Guess.mdf and b/source2/Debug/Cosmos.Debug.Common/Guess.mdf differ
diff --git a/source2/Debug/Cosmos.Debug.Common/Guess_log.ldf b/source2/Debug/Cosmos.Debug.Common/Guess_log.ldf
index 6f5fb63531..e236afe23d 100644
Binary files a/source2/Debug/Cosmos.Debug.Common/Guess_log.ldf and b/source2/Debug/Cosmos.Debug.Common/Guess_log.ldf differ
diff --git a/source2/Demos/Guess/Guess.Cosmos b/source2/Demos/Guess/Guess.Cosmos
index 8c010cd29e..732959b898 100644
--- a/source2/Demos/Guess/Guess.Cosmos
+++ b/source2/Demos/Guess/Guess.Cosmos
@@ -32,7 +32,7 @@
ISO
VMware
True
- All
+ User
PXE
None
False
@@ -66,7 +66,7 @@
bin\Debug\
MicrosoftNET
False
- All
+ User
False
False
ISO
@@ -148,7 +148,7 @@
ISO
VMware
True
- All
+ User
PXE
None
False
@@ -182,7 +182,7 @@
bin\Debug\
MicrosoftNET
False
- All
+ User
False
False
ISO
diff --git a/source2/IL2CPU/Cosmos.IL2CPU/AppAssembler.cs b/source2/IL2CPU/Cosmos.IL2CPU/AppAssembler.cs
index 3869515ceb..a4f39abddc 100644
--- a/source2/IL2CPU/Cosmos.IL2CPU/AppAssembler.cs
+++ b/source2/IL2CPU/Cosmos.IL2CPU/AppAssembler.cs
@@ -142,7 +142,7 @@ protected void MethodBegin(MethodInfo aMethod) {
var xLocalsOffset = mLocals_Arguments_Infos.Count;
foreach (var xLocal in xBody.LocalVariables) {
var xInfo = new LOCAL_ARGUMENT_INFO {
- METHODLABELNAME = mCurrentMethodLabel,
+ METHODLABELNAME = xMethodLabel,
IsArgument = false,
INDEXINMETHOD = xLocal.LocalIndex,
NAME = "Local" + xLocal.LocalIndex,
@@ -176,7 +176,7 @@ protected void MethodBegin(MethodInfo aMethod) {
var xIdxOffset = 0u;
if (!aMethod.MethodBase.IsStatic) {
mLocals_Arguments_Infos.Add(new LOCAL_ARGUMENT_INFO {
- METHODLABELNAME = mCurrentMethodLabel,
+ METHODLABELNAME = xMethodLabel,
IsArgument = true,
NAME = "this:" + X86.IL.Ldarg.GetArgumentDisplacement(aMethod, 0),
INDEXINMETHOD = 0,
@@ -195,7 +195,7 @@ protected void MethodBegin(MethodInfo aMethod) {
// if last argument is 8 byte long, we need to add 4, so that debugger could read all 8 bytes from this variable in positiv direction
xOffset -= (int)Cosmos.IL2CPU.ILOp.Align(ILOp.SizeOfType(xParams[i].ParameterType), 4) - 4;
mLocals_Arguments_Infos.Add(new LOCAL_ARGUMENT_INFO {
- METHODLABELNAME = mCurrentMethodLabel,
+ METHODLABELNAME = xMethodLabel,
IsArgument = true,
INDEXINMETHOD = (int)(i + xIdxOffset),
NAME = xParams[i].Name,
diff --git a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/Cosmos/Cosmos.vstemplate b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/Cosmos/Cosmos.vstemplate
index dc8cade7df..44186954a2 100644
--- a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/Cosmos/Cosmos.vstemplate
+++ b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/Cosmos/Cosmos.vstemplate
@@ -10,7 +10,7 @@
- Cosmos.bxrc
+
\ No newline at end of file
diff --git a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (C#)/CSharpProject.csproj b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (C#)/CSharpProject.csproj
index 2b35b5734a..da673562d6 100644
--- a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (C#)/CSharpProject.csproj
+++ b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (C#)/CSharpProject.csproj
@@ -11,6 +11,7 @@
$safeprojectname$
$safeprojectname$
512
+ v4.5
true
diff --git a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (VB)/VBProjKernel.vbproj b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (VB)/VBProjKernel.vbproj
index e1fb68538d..e6c833387e 100644
--- a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (VB)/VBProjKernel.vbproj
+++ b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosKernel (VB)/VBProjKernel.vbproj
@@ -15,6 +15,7 @@
Binary
Off
On
+ v4.5
true
diff --git a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/CSharpProject.csproj b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/CSharpProject.csproj
index baebfb21f1..c76088ec0d 100644
--- a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/CSharpProject.csproj
+++ b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/CSharpProject.csproj
@@ -11,6 +11,7 @@
$safeprojectname$
$safeprojectname$
512
+ v4.5
true
diff --git a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/Proj/CosmosProj.vstemplate b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/Proj/CosmosProj.vstemplate
index 812256e3db..36ec3cd55b 100644
--- a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/Proj/CosmosProj.vstemplate
+++ b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (C#)/Proj/CosmosProj.vstemplate
@@ -13,7 +13,7 @@
- Cosmos.bxrc
+
diff --git a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (F#)/FSharpProject.fsproj b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (F#)/FSharpProject.fsproj
index 7f7a415900..6f11d70086 100644
--- a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (F#)/FSharpProject.fsproj
+++ b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (F#)/FSharpProject.fsproj
@@ -11,6 +11,7 @@
$safeprojectname$
$safeprojectname$
512
+ v4.5
true
diff --git a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (VB)/VBProjKernel.vbproj b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (VB)/VBProjKernel.vbproj
index 53716faf1c..ee13511480 100644
--- a/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (VB)/VBProjKernel.vbproj
+++ b/source2/VSIP/Cosmos.VS.Package/Templates/Projects/CosmosProject (VB)/VBProjKernel.vbproj
@@ -15,6 +15,7 @@
Binary
Off
On
+ v4.5
true
diff --git a/source2/VSIP/Cosmos.VS.Wizards/CosmosProject.Cosmos b/source2/VSIP/Cosmos.VS.Wizards/CosmosProject.Cosmos
index b7944471fb..1764bdb113 100644
--- a/source2/VSIP/Cosmos.VS.Wizards/CosmosProject.Cosmos
+++ b/source2/VSIP/Cosmos.VS.Wizards/CosmosProject.Cosmos
@@ -38,10 +38,10 @@
-
+
\ No newline at end of file
diff --git a/source2/VSIP/Cosmos.VS.Wizards/GenerateCosmosProjectWizard.cs b/source2/VSIP/Cosmos.VS.Wizards/GenerateCosmosProjectWizard.cs
index 01663afcbd..a3f1130979 100644
--- a/source2/VSIP/Cosmos.VS.Wizards/GenerateCosmosProjectWizard.cs
+++ b/source2/VSIP/Cosmos.VS.Wizards/GenerateCosmosProjectWizard.cs
@@ -58,29 +58,37 @@ public void ProjectFinishedGenerating(EnvDTE.Project project) {
File.WriteAllText(xFilename, xInputString);
var xCosmosProject = project.DTE.Solution.AddFromFile(xFilename, false);
- // make .Cosmos project dependent on library project.
- var xEnu = project.DTE.Solution.SolutionBuild.BuildDependencies.GetEnumerator();
- dynamic xCosmosBootProjectObj = xCosmosProject.Object; // VSProjectNode
- var xCosmosBootGuid = xCosmosBootProjectObj.ProjectIDGuid;
- while (xEnu.MoveNext()) {
- EnvDTE.BuildDependency bd = (EnvDTE.BuildDependency)xEnu.Current;
-
- dynamic xDependencyGUID = bd.Project.Object;
- if (xDependencyGUID.ProjectIDGuid == xCosmosBootGuid) {
- bd.AddProject(project.UniqueName);
- break;
- }
- }
-
+ //This throws an error - ProjectIDGuid not found on xCosmosBootProjectObj
+ //Also this doesn't seem to do anything... and the reference from Boot proj to Library proj makes it dependant anyway...
+ //try
+ //{ // make .Cosmos project dependent on library project.
+ // var xEnu = project.DTE.Solution.SolutionBuild.BuildDependencies.GetEnumerator();
+ // dynamic xCosmosBootProjectObj = xCosmosProject.Object; // VSProjectNode
+ // var xCosmosBootGuid = xCosmosBootProjectObj.ProjectIDGuid;
+ // while (xEnu.MoveNext())
+ // {
+ // EnvDTE.BuildDependency bd = (EnvDTE.BuildDependency)xEnu.Current;
+
+ // dynamic xDependencyGUID = bd.Project.Object;
+ // if (xDependencyGUID.ProjectIDGuid == xCosmosBootGuid)
+ // {
+ // bd.AddProject(project.UniqueName);
+ // break;
+ // }
+ // }
+ //}
+ //catch { MessageBox.Show("Failed to make Boot project dependant on Library project."); }
+
+ //Bochs file removed...
// Copy Bochs configuration file.
- xInputString = GetBochsConfigurationFileTemplate();
- if (xInputString == null) {
- return;
- }
- xInputString = xInputString.Replace("$CosmosProjectName$", project.Name + "Boot");
- xFilename = Path.GetDirectoryName(project.FullName);
- xFilename = Path.Combine(xFilename, BochsConfigurationFileName);
- File.WriteAllText(xFilename, xInputString);
+ //xInputString = GetBochsConfigurationFileTemplate();
+ //if (xInputString == null) {
+ // return;
+ //}
+ //xInputString = xInputString.Replace("$CosmosProjectName$", project.Name + "Boot");
+ //xFilename = Path.GetDirectoryName(project.FullName);
+ //xFilename = Path.Combine(xFilename, BochsConfigurationFileName);
+ //File.WriteAllText(xFilename, xInputString);
// set Cosmos Boot as startup project
project.DTE.Windows.Item(EnvDTE.Constants.vsWindowKindSolutionExplorer).Activate();
diff --git a/userkit install.bat b/userkit install.bat
new file mode 100644
index 0000000000..aa15a663cb
--- /dev/null
+++ b/userkit install.bat
@@ -0,0 +1 @@
+install -USERKIT
\ No newline at end of file