Page 137 of 262

Re: What does your OS look like? (Screen Shots..)

Posted: Fri Jan 01, 2016 3:17 am
by osdever
U365 console. Still WIP with bugs.

Re: What does your OS look like? (Screen Shots..)

Posted: Fri Jan 01, 2016 3:56 am
by BrightLight
catnikita255 wrote:U365 console. Still WIP with bugs.
Looks rather nice. You should add a cursor, though.

Re: What does your OS look like? (Screen Shots..)

Posted: Fri Jan 01, 2016 6:42 am
by osdever
omarrx024 wrote:
catnikita255 wrote:U365 console. Still WIP with bugs.
Looks rather nice. You should add a cursor, though.
I know.

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 5:13 am
by mallardest
Image

It's not much yet.
Next I need to write a memory allocator.

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 5:19 am
by Techel
For your 12GB of ram :shock:

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 6:10 am
by mallardest
Roflo wrote:For your 12GB of ram :shock:
Yeah I was just testing. Normally it only runs with 1G.
I just count the size of all of the usable memory areas that grub gives to me and then print it out.

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 8:02 am
by BrightLight
Doesn't look like much, but I implemented a line-drawing algorithm:
line.png

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 8:41 am
by cheapskate01
omarrx024 wrote:Doesn't look like much, but I implemented a line-drawing algorithm:
line.png
What are the odds, I just got mine yesterday too!
but for some reason, mine only does diagonal lines...

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 10:03 am
by BrightLight
cheapskate01 wrote:but for some reason, mine only does diagonal lines...
You'll need a separate routine that draws horizontal line from a specified X/Y and width, and another that draws a vertical line from a specified X/Y and height. Then before actually drawing in your draw_line routine, you can arrange your values so that x2 > x1, and y2 > y1, then do something like this:

Code: Select all

if(x2 == x1)
{
	draw_horizontal_line(x1, y1, x2-x1, color);	// draw_horizontal_line(x,y,width,color)
} else if(y2 == y1)
{
	draw_vertical_line(x1, y1, y2-y1, color);	// draw_vertical_line(x,y,height,color)
} else
{
	// your real line-drawing code goes here...

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 10:57 am
by cheapskate01
omarrx024 wrote:
cheapskate01 wrote:but for some reason, mine only does diagonal lines...
You'll need a separate routine that draws horizontal line from a specified X/Y and width, and another that draws a vertical line from a specified X/Y and height. Then before actually drawing in your draw_line routine, you can arrange your values so that x2 > x1, and y2 > y1, then do something like this:

Code: Select all

if(x2 == x1)
{
	draw_horizontal_line(x1, y1, x2-x1, color);	// draw_horizontal_line(x,y,width,color)
} else if(y2 == y1)
{
	draw_vertical_line(x1, y1, y2-y1, color);	// draw_vertical_line(x,y,height,color)
} else
{
	// your real line-drawing code goes here...
Okay, thanks; but I meant: If the line isn't horizontal or vertical, it is perfectly diagonal. It refuses to draw lines at a slope like yours :?

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 11:05 am
by BrightLight
cheapskate01 wrote:Okay, thanks; but I meant: If the line isn't horizontal or vertical, it is perfectly diagonal. It refuses to draw lines at a slope like yours :?
I used the naive line-drawing algorithm from this Wikipedia page.

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 11:37 am
by Techel
Maybe you're using integer division.

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 11:41 am
by BrightLight
Roflo wrote:Maybe you're using integer division.
Actually, it works perfectly fine with integer division. I'm not using any floating point numbers in this routine.

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 11:52 am
by Techel
If cheapskate's using an other algorithm, he could have made the mistake of using integer divisions instead of floating/fixed point ones as required in the algorithm.

Re: What does your OS look like? (Screen Shots..)

Posted: Sat Jan 02, 2016 8:20 pm
by cheapskate01
Roflo wrote:If cheapskate's using an other algorithm, he could have made the mistake of using integer divisions instead of floating/fixed point ones as required in the algorithm.
I used Bresenham's, so It should've been alright, but idk...