OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Nov 19, 2019 4:53 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 729 posts ]  Go to page Previous  1 ... 40, 41, 42, 43, 44, 45, 46 ... 49  Next
Author Message
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 5:46 am 
Offline
Member
Member
User avatar

Joined: Fri Apr 03, 2015 9:41 am
Posts: 492
UPD: recorded a video.


_________________
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 6:21 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1055
osdeverr wrote:
Tried to implement double-buffering :D


That is what happens to me every single time I try to implement it. I couldn't fix it for months so I gave up. SSE memory copy is just too tough.

Old picture of mine:
Image

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 6:36 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 17, 2016 6:58 am
Posts: 101
Location: The Internet
octacone wrote:
osdeverr wrote:
Tried to implement double-buffering :D


That is what happens to me every single time I try to implement it. I couldn't fix it for months so I gave up. SSE memory copy is just too tough.

Old picture of mine:
Image

It looks quite cool though. Double mouse support anyone?

_________________
Everyone should know how to program a computer, because it teaches you how to think! -Steve Jobs
Code:
while ( ! ( succeed = try() ) );


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 6:41 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1065
osdeverr wrote:
UPD: recorded a video.


What is ironic is that you would probably have a pretty hard time writing code to do that, if you were doing it on purpose.

You guys should start with simple REPD copying until everything is stable, and then swap it out with a faster method after it has been tested.

Step 1: make it work.
Step 2: make it fast.
Step 3: make it bulletproof.

_________________
Project: OZone
Source: GitHub
Current Task: DOSBox Compatibility
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 10:48 am 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1055
MajickTek wrote:
octacone wrote:
osdeverr wrote:
Tried to implement double-buffering :D


That is what happens to me every single time I try to implement it. I couldn't fix it for months so I gave up. SSE memory copy is just too tough.

Old picture of mine:
[imgsnip]http://forum.osdev.org/download/file.php?id=3349&mode=view[/img]

It looks quite cool though. Double mouse support anyone?


Yeah it does look cool but not functional. It looks like that I am better at creating mosaics than coding. :P
Dual mouse support would be epic, just image that! Endless possibilities.

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 1:16 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 624
Image

I'm currently writing a native graphics mode setting driver (for the Intel G45 chipset) for my OS. This is what happens when you set a bad pixel clock :D. This imgur album (click me) has another funny fail and a picture of the working driver.

_________________
managarm: Microkernel-based OS that is capable of running a Wayland desktop
My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions]


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 3:11 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1055
Korona wrote:
Image

I'm currently writing a native graphics mode setting driver (for the Intel G45 chipset) for my OS. This is what happens when you set a bad pixel clock :D. This imgur album (click me) has another funny fail and a picture of the working driver.


That is actually impressive! Btw what do you mean by native graphics driver? Setting a bad pixel clock? What is your method, VESA or VGA?

_________________
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 3:47 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 624
octacone wrote:
That is actually impressive! Btw what do you mean by native graphics driver? Setting a bad pixel clock? What is your method, VESA or VGA?

I'm using neither VESA nor VGA. I manipulate the native registers of the graphics card (i.e. I set a pixel clock, display timings, program the framebuffer address and enable graphics output). The driver can set any mode (e.g. 1920x1080@32bpp) that is supported by the card and the monitor. I do not have to use the BIOS or any third party functionality. However keep in mind that the driver is tied to Intel G45 and similar chipsets.

It is easy to extend this to hardware double/triple/whatever buffering on VSYNC, hardware mouse cursors, hardware overlays (i.e. displaying a second framebuffer inside a window) and multiple monitors. My code does not support acceleration (BLTing or shaders) yet though.

_________________
managarm: Microkernel-based OS that is capable of running a Wayland desktop
My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions]


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Fri Feb 10, 2017 7:27 pm 
Offline
Member
Member
User avatar

Joined: Mon Feb 22, 2016 4:40 am
Posts: 58
Location: United Kingdom
Korona wrote:
octacone wrote:
That is actually impressive! Btw what do you mean by native graphics driver? Setting a bad pixel clock? What is your method, VESA or VGA?

I'm using neither VESA nor VGA. I manipulate the native registers of the graphics card (i.e. I set a pixel clock, display timings, program the framebuffer address and enable graphics output). The driver can set any mode (e.g. 1920x1080@32bpp) that is supported by the card and the monitor. I do not have to use the BIOS or any third party functionality. However keep in mind that the driver is tied to Intel G45 and similar chipsets.

It is easy to extend this to hardware double/triple/whatever buffering on VSYNC, hardware mouse cursors, hardware overlays (i.e. displaying a second framebuffer inside a window) and multiple monitors. My code does not support acceleration (BLTing or shaders) yet though.


Wow, that's incredible. Is your code open-source? I'd love to take a look at it in order to see what you're doing; Intel's documentation is a little overwhelming for someone without extensive experience of embedded systems like me. Given that it's the Intel G45, is this driver also compatible with most Intel HD integrated graphics chips?

_________________
Current developing Tupai, a monolithic x86 operating system
http://zesterer.homenet.org/projects.shtml


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Sat Feb 11, 2017 12:14 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 624
zesterer wrote:
Wow, that's incredible. Is your code open-source? I'd love to take a look at it in order to see what you're doing; Intel's documentation is a little overwhelming for someone without extensive experience of embedded systems like me. Given that it's the Intel G45, is this driver also compatible with most Intel HD integrated graphics chips?

Yes, my code is available here on github (beware of C++ operator overloading). I did not push the DDC code for getting EDID information without the BIOS yet (which is required to discover the video modes that a connected monitor supports). I also did not spend much time on cleaning up the code yet. I plan to write a wiki page that explains how to do the mode set.

About portability to other graphics chips: The driver as-is should work for all (non-mobile) third generation Intel graphics chips from this list (i.e. all card produced in 2006-2009). There would be minor changes required for generation 3 chips. I don't think it is worthwhile to support anything below generation 3.

For later generations: Regarding the display registers there are two notable overhauls in Intel HD graphics chips: The first is the introduction of Ironlake and the second the introduction of Haswell. All chips in between do not need many changes in the driver. The greatest difference between Ironlake and G45 is that Ironlake shares clock sources between different display pipelines so you need a mechanism to allocate clock sources (which is trivial if you only use one display pipe). I did not yet look into the changes introduced with Haswell.

That being said I do think that it is possible to support those generations if you want to. I do not think that writing a mode setting driver for the newer generations is much more complicated than writing a mode setting driver for the G45. The hardware might be a bit more complex but it is also much better documented. I did not choose G45 because it is easy; I just chose it because that is the hardware that I had available :D.

_________________
managarm: Microkernel-based OS that is capable of running a Wayland desktop
My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions]


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Sat Feb 11, 2017 5:40 pm 
Offline
Member
Member
User avatar

Joined: Mon Feb 22, 2016 4:40 am
Posts: 58
Location: United Kingdom
Korona wrote:
zesterer wrote:
Wow, that's incredible. Is your code open-source? I'd love to take a look at it in order to see what you're doing; Intel's documentation is a little overwhelming for someone without extensive experience of embedded systems like me. Given that it's the Intel G45, is this driver also compatible with most Intel HD integrated graphics chips?

Yes, my code is available here on github (beware of C++ operator overloading). I did not push the DDC code for getting EDID information without the BIOS yet (which is required to discover the video modes that a connected monitor supports). I also did not spend much time on cleaning up the code yet. I plan to write a wiki page that explains how to do the mode set.

...



Thanks a lot for this info, that's really helpful. I'd love to see a wiki page that gives a high-level explanation of it all: modesetting as run-time would be great.

_________________
Current developing Tupai, a monolithic x86 operating system
http://zesterer.homenet.org/projects.shtml


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Sun Feb 12, 2017 9:34 am 
Offline
Member
Member

Joined: Wed Aug 17, 2016 4:55 am
Posts: 236
My integer-to-text routine has a particular way to handle 0x80000000 (it was supposed to show -2147483648):

Image

It was fixed, the routine was going through 31 bits because I was stupid enough to assume the MSB would be clear after making the integer positive. Go figure. (no, division wouldn't do the job because I'm on a decades old CPU and that'd take ages, besides I only get 16-bit division which only makes it worse =P took a different approach by adding BCD numbers instead)

EDIT: if anybody is interested on the routine (without the bug, that is):
http://gendev.spritesmind.net/forum/vie ... f=2&t=2573


Last edited by Sik on Mon Feb 13, 2017 6:14 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Mon Feb 13, 2017 6:13 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 17, 2016 6:58 am
Posts: 101
Location: The Internet
Sik wrote:
My integer-to-text routine has a particular way to handle 0x80000000 (it was supposed to show -2147483648):

Image

It was fixed, the routine was going through 31 bits because I was stupid enough to assume the MSB would be clear after making the integer positive. Go figure. (no, division wouldn't do the job because I'm on a decades old CPU and that'd take ages, besides I only get 16-bit division which only makes it worse =P took a different approach by adding BCD numbers instead)

Is your OS public/open source? I love it's ideas (and the OS itself) and would love to study your code.
EDIT: if the source isn't available I would still like to test it in a VM.

_________________
Everyone should know how to program a computer, because it teaches you how to think! -Steve Jobs
Code:
while ( ! ( succeed = try() ) );


Last edited by MajickTek on Mon Feb 13, 2017 6:16 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Mon Feb 13, 2017 6:16 am 
Offline
Member
Member

Joined: Wed Aug 17, 2016 4:55 am
Posts: 236
Not yet, I want to finish the calculator first =/ (I need to come up with an easy division algorithm, I've been slacking off on that) Though yes I do intend to release the source code.


Top
 Profile  
 
 Post subject: Re: When your OS goes crazy - Screenshots
PostPosted: Mon Feb 13, 2017 6:17 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 17, 2016 6:58 am
Posts: 101
Location: The Internet
Sik wrote:
Not yet, I want to finish the calculator first =/ (I need to come up with an easy division algorithm, I've been slacking off on that) Though yes I do intend to release the source code.

Thanks for telling me! :D

_________________
Everyone should know how to program a computer, because it teaches you how to think! -Steve Jobs
Code:
while ( ! ( succeed = try() ) );


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 729 posts ]  Go to page Previous  1 ... 40, 41, 42, 43, 44, 45, 46 ... 49  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group