OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 4:08 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: 2 questions...VGA and Shift scancodes
PostPosted: Wed Feb 06, 2002 12:00 am 
Hey, y'all...2 questions for you.

1) IS there any way for me to get VGA (erhm...any graphics, for that matter)
in PMode (ie, no interrupts)? Like, can I just write to a certain spot of memory
and out pops a pretty pixel...? or no?

2) Does holding shift while hitting another key produce it's own scancode? If so, do you know of a list of them?
If not, how do you tell if the suer is holding shift...? I'm using inportb(0x60) to get the scancodes...

Thanks for any help,
Ken


Top
  
 
 Post subject: RE:2 questions...VGA and Shift scancodes
PostPosted: Wed Feb 06, 2002 12:00 am 
>On 2002-02-06 20:03:05, -KEN- wrote:
>Hey, y'all...2 questions for you.
>
>1) IS there any way for me to get VGA (erhm...any graphics, for that matter)
>in PMode (ie, no interrupts)? Like, can I just write to a certain spot of memory
>and out pops a pretty pixel...? or no?

Uhm... simply because you're in pmode doesn't mean you
no longer have access to interrupts. Unless you mean
that you've entered pmode and intend to leave interrupts
off (which I would _not_ reccomend). In any event,
interrupts wont get you anywhere video-wise... the video
bios is real mode, and so is vesa, for the most
part. You're either going to have to run the bios
in a vm, or access the video card directly through
its ports.

Ever read vgadoc? Search for it on the internet, and
look through it... that's about the only way you're
gonna get graphics in pmode.

One alternative (quick-fix-kludge!): switch into
graphics mode before entering pmode, and then
write to 0x000A0000 (assuming VGA, of course)

>2) Does holding shift while hitting another key produce it's own scancode? If so, do you know of a list of them?
>If not, how do you tell if the suer is holding shift...? I'm using inportb(0x60) to get the scancodes...

Well then you can probably take a look at those scan
codes and figure it out, couldn't you? :)

Jeff


Top
  
 
 Post subject: RE:2 questions...VGA and Shift scancodes
PostPosted: Wed Feb 06, 2002 12:00 am 
>Does holding shift while hitting another key produce it's own scancode?<

I don't think it does.


Top
  
 
 Post subject: RE:2 questions...VGA and Shift scancodes
PostPosted: Thu Feb 07, 2002 12:00 am 
>On 2002-02-06 20:03:05, -KEN- wrote:
> Like, can I just write to a certain spot of
> memory and out pops a pretty pixel...? or no?
If you have VGA, your video buffer is at physical address 0xA0000. Write to that memory to set pixels.

>2) Does holding shift while hitting another key
> produce it's own scancode? If so, do you know
> of a list of them?
Every button you press produces one scancode,
every time the button is released, it produces
the same scancode with bit 7 set. (E.g., when
Escape is pressed, you get scancode 1, when it's
released you get 0x81.) But if you have
interrupts disabled, are you gonna poll the
keyboard port?


Top
  
 
 Post subject: RE:2 questions...VGA and Shift scancodes
PostPosted: Thu Feb 07, 2002 12:00 am 
>On 2002-02-06 20:03:05, -KEN- wrote:

>2) Does holding shift while hitting another key produce it's own scancode?

No. But the keyboard maintains in internal Num
Lock state that can change some of the scancodes.

>If so, do you know of a list of them?

http://www.execpc.com/~geezer/osd/kbd/index.htm#scan

Usually, the 8048 chip in the keyboard is set to
produce set 2 scancodes but the 8042 keyboard
ontroller is set to convert them to set 1.

>If not, how do you tell if the suer is holding shift...?

Watch the scancodes go by; keep track of make and
break codes for the shift keys.

>I'm using inportb(0x60) to get the scancodes...

Good.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], JustVic, Majestic-12 [Bot], SemrushBot [Bot] and 100 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group