Cosmos Shutdown Command

Feb 26, 2012 at 2:11 AM

I am using visual c# 2010, and I cannot find the cosmos shutdown method, please reply with the command to shutdown cosmos.

Developer
Feb 26, 2012 at 4:03 AM

there is none

On Feb 25, 2012 7:11 PM, "idifyable" <notifications@codeplex.com> wrote:

From: idifyable

I am using visual c# 2010, and I cannot find the cosmos shutdown method, please reply with the command to shutdown cosmos.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Feb 26, 2012 at 3:42 PM

so, ill just break my computer to shut it down, thanks, bro

Developer
Feb 26, 2012 at 4:38 PM

If it were me, I would just display a message telling the user to press the power button.

Feb 26, 2012 at 6:16 PM

wasnt there a shutdown command in the last mile stone?

Feb 26, 2012 at 8:02 PM

Like the developer already said

there is none.

But there is a command , but it doesn't work yet

Feb 27, 2012 at 4:49 AM
Edited Feb 27, 2012 at 5:20 PM

I have a shutdown command that works. Just reference my ACPIManager file in both your project and your .cosmos project and the code to shutdown is ACPIManager.ACPI.Shutdown();

ACPIManager.dll

Feb 27, 2012 at 5:30 AM
msareedjr wrote:

I have a shutdown command that works. Just reference my ACPIManager file in your project and the code to shutdown is ACPIManager.ACPI.Shutdown();

ACPIManager.dll

Could I please have the source code to this dll? Thanks - Matt

Feb 27, 2012 at 5:36 AM

Sure, but I translated it straight from C and it's barely readable.

ACPI.cs

Feb 27, 2012 at 5:44 AM
msareedjr wrote:

Sure, but I translated it straight from C and it's barely readable.

ACPI.cs

Thats alright, I know how to code in C. Thanks.

Feb 27, 2012 at 2:02 PM

Hey guise,

I've tried to use the ACPI.dll file but an error occurred and the code is not working.

 

 

HELP PLEASE.

Feb 27, 2012 at 2:12 PM
Edited Feb 27, 2012 at 2:26 PM

I will check it out. But try using the ACPI.cs file in your project and compiling with /unsafe.

Developer
Feb 27, 2012 at 3:40 PM
msareedjr wrote:

I have a shutdown command that works. Just reference my ACPIManager file in your project and the code to shutdown is ACPIManager.ACPI.Shutdown();

ACPI.cs

 

EDIT:

It appears references do not work with IL2CPU and I did not realize this, so instead include the ACPI.cs file into your project and compile with /unsafe.


IL2CPU works with references just fine, but you have to reference the assembly that contains the plugs, in the .cosmos project, otherwise it won't know to look there for plugs. (unless you want it scanning every assembly in the .net framework for plug implementations?)

Feb 27, 2012 at 5:19 PM

Ok I see sorry. I have made my dll and pdb files public again.

Mar 1, 2012 at 10:55 AM

Hi,

When I included the ACPI.cs in my project the following error appeared:

"Error    1    Unsafe code may only appear if compiling with /unsafe"

 

What should I DO????????!!!

Coordinator
Mar 1, 2012 at 11:12 AM
compile with /unsafe: that's a project setting..


On Thu, Mar 1, 2012 at 11:55 AM, ahmedyosrihamdy <notifications@codeplex.com> wrote:

From: ahmedyosrihamdy

Hi,

When I included the ACPI.cs in my project the following error appeared:

"Error 1 Unsafe code may only appear if compiling with /unsafe"

What should I DO????????!!!

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 1, 2012 at 12:40 PM

How can I compile it with the unsafe, can you tell me, Please!!

 

Mar 1, 2012 at 12:44 PM

I've allowed the unsafe code compiling at VS and when i compiled the project I got this error:

 

Error    2    Cosmos.IL2CPU.x86->IL->Conv_U2.cs->The size 2 could not exist, because always is pushed Int32 or Int64!
   at Cosmos.IL2CPU.X86.IL.Conv_U2.Execute(MethodInfo aMethod, ILOpCode aOpCode) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU.X86\IL\Conv_U2.cs:line 45
   at Cosmos.IL2CPU.AppAssembler.ProcessMethod(MethodInfo aMethod, List`1 aOpCodes) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\AppAssembler.cs:line 155
   at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 427
   at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Data\Sources\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 249    C:\Program Files\MSBuild\Cosmos\Cosmos.targets    32    10    Tron OSBoot

Coordinator
Mar 1, 2012 at 12:45 PM
what cosmos version do you use?

On Thu, Mar 1, 2012 at 1:44 PM, ahmedyosrihamdy <notifications@codeplex.com> wrote:

From: ahmedyosrihamdy

I've allowed the unsafe code compiling at VS and when i compiled the project I got this error:

Error 2 Cosmos.IL2CPU.x86->IL->Conv_U2.cs->The size 2 could not exist, because always is pushed Int32 or Int64!
at Cosmos.IL2CPU.X86.IL.Conv_U2.Execute(MethodInfo aMethod, ILOpCode aOpCode) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU.X86\IL\Conv_U2.cs:line 45
at Cosmos.IL2CPU.AppAssembler.ProcessMethod(MethodInfo aMethod, List`1 aOpCodes) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\AppAssembler.cs:line 155
at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 427
at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Data\Sources\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 249 C:\Program Files\MSBuild\Cosmos\Cosmos.targets 32 10 Tron OSBoot

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Mar 1, 2012 at 1:43 PM
Edited Mar 1, 2012 at 1:51 PM

Also, more importantly, can we pinpoint the source that causes this error? I rember running into a similar issue at one point, but I couldn't isolate the issue down to a level that it would be possible to debug, so I ended up just disabling the exception in the compiler, and having the U1(byte), and U2(ushort) cases fall through to the U4(UInt32) case, because that's how they would be handled if they had to be.

A thought (not confirmed, nor even looked into), perhaps this is caused from loading a value from a field, and trying to convert that value for storage (such as into an array) imediately after loading? (I'll look into this and see if this could actually be the cause)

Edit:
Fields are tracked as their field types, but those should be getting aligned to 4 bytes, so I'm not sure that's the issue... Also, just noticed that LdInd.Ref doesn't adjust the IL2CPU stack when it loads a value. (it needs to, although LdInd.Ref wouldn't be causing this issue)

Coordinator
Mar 1, 2012 at 1:47 PM
orvid: we're still not sure on correctness here, but first step is to see what version of cosmos he's using. If that's not devkit, try his situatno with the devkit, and if it still crashes in the devkit, fx it..


On Thu, Mar 1, 2012 at 2:43 PM, blah38621 <notifications@codeplex.com> wrote:

From: blah38621

Also, more importantly, can we pinpoint the source that causes this error? I rember running into a similar issue at one point, but I couldn't isolate the issue down to a level that it would be possible to debug, so I ended up just disabling the exception in the compiler, and having the U1(byte), and U2(ushort) cases fall through to the U4(UInt32) case, because that's how they would be handled if they had to be.

A thought (not confirmed, nor even looked into), perhaps this is caused from loading a value from a field, and trying to convert that value for storage (such as into an array) imediately after loading? (I'll look into this and see if this could actually be the cause)

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 1, 2012 at 5:46 PM

I have used this same code since MS4 when I used the user kit, but I have changed only a few things to make it work with the current dev kit so I don't think the version should be much of an issue.

Mar 1, 2012 at 9:08 PM

Hi,

Thanks for help guise and I use the latest version of Cosmos

Developer
Jan 20, 2013 at 9:16 AM

Hi,

Thank you very much it works for me with /unsafe and Cosmos build 92560 !

Jul 19, 2013 at 7:07 PM
how to give reference..???