Assembly / Machine Code

Feb 9, 2012 at 7:10 PM
Edited Feb 9, 2012 at 7:15 PM

Would it be possible to run machine code / or assembly (I know that it would be slightly different per processor) through cosmos, the reason I am is asking is the idea of being able to dynamically recompile a program in a intermediate language to machine code, so that it would be possible to speed up the execution of a program made by a user?

Just that running a check for every command to see what it is and then running the function is not a very effective method when you need speed.

Thanks, Luke

Coordinator
Feb 10, 2012 at 8:02 AM
you mean dynamic loading of programs: it's planned, but longer-term: it takes quite a bit of work to make it work (loading stuff isn't that hard, but doing system calls etc..), and currently we have more important things to do....
Also, the way you describe you're saying it's slow? the check might be a little slow, but running the function depends on the funcitno: just moving to a different process or load it from disk isn't going to speed things up..


On Thu, Feb 9, 2012 at 8:10 PM, LukeTerry <notifications@codeplex.com> wrote:

From: LukeTerry

Would it be possible to run machine code through cosmos, the reason I am is asking is the idea of being able to dynamically recompile a program in a intermediate language to machine code, so that it would be possible to speed up the execution of a program made by a user?

Just that running a check for every command to see what it is and then running the function is not a very effective method when you need speed.

Thanks, Luke

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 10, 2012 at 6:45 PM
Would this dynamic loading of programs be according to a new standard or an old standard?
Coordinator
Feb 10, 2012 at 6:47 PM
On 2/10/2012 2:46 PM, EagleEyeSA wrote:
> Would this dynamic loading of programs be according to a new standard or
> an old standard?

Initially we may have our own, but at some point we will support ELF
most likely.
Feb 10, 2012 at 7:07 PM
I know the answer is probably no, but does that mean that when .ELF support is in, that we'd be able to run UNIX programs? (My excuse for my ridiculous ignorance of how this stuff works is that I'm porting over a video game to Cosmos so that it'll run on a computer that can run neither the original game or my normal XNA port).
Feb 10, 2012 at 9:53 PM
EagleEyeSA wrote:
I know the answer is probably no, but does that mean that when .ELF support is in, that we'd be able to run UNIX programs? (My excuse for my ridiculous ignorance of how this stuff works is that I'm porting over a video game to Cosmos so that it'll run on a computer that can run neither the original game or my normal XNA port).

The odds of running any game using Cosmos is so slim at the moment, first things first, to my knowledge there is no high res support quite yet, and second Cosmos isn't exactly super fast at the moment to handle it. Or maybe it is? I dont know, I just know there are a few things that seem slow at times. Anyways. Thanks - Matt

Feb 10, 2012 at 10:34 PM
Even if it is slow at the moment, I'm not exactly finished rewriting the game in XNA yet (I hate how the other remake strays so far from the original and doesn't even support the original files last I checked. And also I can see the vertical interrupts, and I have a dual-core 1.6 GHz computer. Old, yeah, but the original ran on a 356MHz CPU or similar). With how slow I am, you guys might be halfway through that Wii port mentioned on the codeplex page by the time I'm finished.

The real barriers would be lack of support for loading files off the disk from a COSMOS .iso, the inability to play sound, the lack of NTFS support, the lack of network support, and the lack of USB mouse, USB keyboard, USB gamepad, and laptop trackpad drivers, all of that as far as I know (ie. I haven't looked into seeing if any of that is supported yet).

I might do a quick proof-of-concept port of Dune 2 at some point, though. First, though, I'm going to have to determine which remake is the best, by my standards. Unfortunately, I think OpenDune still has a lot of pseudo-ASM in it.
Coordinator
Feb 11, 2012 at 9:28 AM
supporting ELF has nothing to do with running unix programs, just that binary formats are same. In the past ther ehave even been programs which allows running ELF programs on Windows, but those needed large compatibility libraries (depending on usage). One of these product was CrossKylix

On Fri, Feb 10, 2012 at 11:34 PM, EagleEyeSA <notifications@codeplex.com> wrote:

From: EagleEyeSA

Even if it is slow at the moment, I'm not exactly finished rewriting the game in XNA yet (I hate how the other remake strays so far from the original and doesn't even support the original files last I checked. And also I can see the vertical interrupts, and I have a dual-core 1.6 GHz computer. Old, yeah, but the original ran on a 356MHz CPU or similar). With how slow I am, you guys might be halfway through that Wii port mentioned on the codeplex page by the time I'm finished.

The real barriers would be lack of support for loading files off the disk from a COSMOS .iso, the inability to play sound, the lack of NTFS support, the lack of network support, and the lack of USB mouse, USB keyboard, USB gamepad, and laptop trackpad drivers, all of that as far as I know (ie. I haven't looked into seeing if any of that is supported yet).

I might do a quick proof-of-concept port of Dune 2 at some point, though. First, though, I'm going to have to determine which remake is the best, by my standards. Unfortunately, I think OpenDune still has a lot of pseudo-ASM in it.

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 11, 2012 at 3:53 PM
Thank you for explaining that to me. :) Just wondering: if I wanted to write a program for execution by a COSMOS-based OS, how would I create that program?
Coordinator
Feb 12, 2012 at 10:32 AM
Cosmos is not an operating system: it's a toolkit to make one. Right now there's no possible way to load programs, you can only write it in your kernel (c#/vb library)

On Sat, Feb 11, 2012 at 4:53 PM, EagleEyeSA <notifications@codeplex.com> wrote:

From: EagleEyeSA

Thank you for explaining that to me. :) Just wondering: if I wanted to write a program for execution by a COSMOS-based OS, how would I create that program?

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


Coordinator
Feb 12, 2012 at 3:27 PM
> Cosmos is not an operating system: it's a toolkit to make one. Right now
> there's no possible way to load programs, you can only write it in your
> kernel (c#/vb library)

ie your program gets compiled into the "OS".
Coordinator
Feb 12, 2012 at 3:38 PM
> supporting ELF has nothing to do with running unix programs, just that
> binary formats are same. In the past ther ehave even been programs which
> allows running ELF programs on Windows, but those needed large
> compatibility libraries (depending on usage). One of these product was
> CrossKylix

IIRC ELF is just a container format and the internal binary can be in
any format that you choose... x86, Motorola, and within each of them as
you wish to store it...
Coordinator
Feb 12, 2012 at 5:07 PM
Like for example COFF (on which windows .exe and .dll's are based, including .net assemblies), ELF is a format in which one can store multiple memory segments (code, data, etc). using these, operating systems can load the files as processes, and run them, but supporting a given format is the easy part..


On Sun, Feb 12, 2012 at 4:38 PM, kudzu <notifications@codeplex.com> wrote:

From: kudzu

> supporting ELF has nothing to do with running unix programs, just that
> binary formats are same. In the past ther ehave even been programs which
> allows running ELF programs on Windows, but those needed large
> compatibility libraries (depending on usage). One of these product was
> CrossKylix

IIRC ELF is just a container format and the internal binary can be in
any format that you choose... x86, Motorola, and within each of them as
you wish to store it...

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