Help with Terminal

Jun 5, 2012 at 12:02 AM

We are on Build 8000, we have decided to start adding some basic programs or in this case a terminal into the OS. Now, we are having difficulty with this because we don't know how we are supposed to incorporate this into the OS. What we need is for a "Icon" or a "Button" to open this Terminal/Program. We would like some insight on what we should do in order to make the Terminal and make the OS open it on the click of a button. Any help would be great!

Jun 5, 2012 at 12:19 AM

I have found that Python will help making a Terminal. But, the problem is, how do we create a "Window" or something that will open on the OS and run that specific program. Would we have to write file types or at least write our OS to open .PY files so that the OS can open the Program and run it?

Developer
Jun 5, 2012 at 12:20 AM

You have to implement this all yourself...

Send from my Toaster

Jun 5, 2012 at 12:22 AM

Ok, were should we start to do so? We are using C#.

Developer
Jun 5, 2012 at 12:26 AM

Well, if you're new to this, you should take it down a notch. Try starting with just a simple terminal based OS until you are more skilled with cosmos. Look at other sources to learn things. (pearos.codeplex.com)

Send from my Toaster

Coordinator
Jun 5, 2012 at 12:27 AM
On 6/4/2012 7:22 PM, yumadhd wrote:
> From: yumadhd
>
> Ok, were should we start to do so? We are using C#.

You could start by helping with some core issues on our to do list that
will allow all parts to advance better :)
Jun 5, 2012 at 12:38 AM
joshbeitler wrote:

Well, if you're new to this, you should take it down a notch. Try starting with just a simple terminal based OS until you are more skilled with cosmos. Look at other sources to learn things. (pearos.codeplex.com)

Send from my Toaster

We have an advanced OS. http://trasonos.codeplex.com Of course it doesn't look very fancy or anything. But we are getting to the point to where we want to start incorporating programs into the OS as a test. We don't want to start anything official, but have the ability to read and write programs without spending the time later.

Jun 5, 2012 at 12:50 AM
I haven't used COSMOS too much, but I think a good way to implement windows in general would be to have a List<Window>, and have each Window run part of it's Python script each frame. When you're drawing, use a Z variable on each Window to determine the draw order (you'll have to draw each pixel separately). Draw the top-most window first, and use a bool[,] or bool[][] to store if a pixel has been written to, and before drawing a pixel for a Window, check if the bool is true (I assume this is faster than drawing the bottom Window first then overwriting it, since Doom uses the "already-drawn-to?" method). Note that bools will probably take up a full byte of memory instead of a bit like you would expect, and that there's no garbage collector yet, so your program will eventually crash.

Again, I haven't used COSMOS to much, so this is mainly from a theoretical standpoint, not from an "I've done this myself" standpoint.