Get some informations about devices

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Get some informations about devices

Post by Jeko »

I want to get some informations about devices. I want to know the CPU vendor and for example if it is a Pentium 4, a Pentium 3, or exc...
The most important thing for me is the resolution of the monitor, how can i get this?
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

Re: Get some informations about devices

Post by digo_rp »

you can take from intel source code of CPU ID
a-priori
Posts: 3
Joined: Wed May 10, 2006 11:00 pm

Re: Get some informations about devices

Post by a-priori »

MarkOS wrote:I want to get some informations about devices. I want to know the CPU vendor and for example if it is a Pentium 4, a Pentium 3, or exc...
What you want is the CPUID instruction. It's well documented at http://www.sandpile.org/ia32/cpuid.htm, and in the Intel Architecture Manual (Volume 2).
MarkOS wrote:The most important thing for me is the resolution of the monitor, how can i get this?
Look into VESA. It allows you to query for stuff like that. I suppose I cheat, because when I've been tinkering with graphics, I used GRUB with the VBE extensions (Google for it, it's a patch onto GRUB written by a guy at Waterloo), which takes care of that for you.
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

Re: Get some informations about devices

Post by digo_rp »

User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: Get some informations about devices

Post by Jeko »

for VESA i must use the BIOS. I don't want call any interrupt!
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: Get some informations about devices

Post by JAAman »

there is really no reliable way to get the monitor resolution, what you prob want is the current resolution, which is entirly dependant on what you set

newer LCDs will report the native resolution, but that is through BIOS interupts (afaik, there is no way around that -- unless there is a vbe3 call for it?)

but even many newer CRTs will not -- and older ones never will -- your best bet is to identify the monitor (assuming it supports the ID command) and then have a list of all monitor IDs and there maximum supported resolution


even windows cannot know what your maximum resolution is unless it has specific information on your particular monitor (which in my experience, is rare)
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

Re: Get some informations about devices

Post by digo_rp »

What kinda of multitasking are you using? hardware taskswitching or software taskswitching?
in case of hardware taskswitching I can share my code, I can change to graphic mode whatever you want.

now I?m looking for some information on how to display text strings in graphic mode
Post Reply