[TESTCASE SCENARIO] Does ROS support dynamic LEDs?

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
wojo664
Posts: 320
Joined: Mon Jul 06, 2009 5:39 pm

[TESTCASE SCENARIO] Does ROS support dynamic LEDs?

Post by wojo664 »

Hello.
I've been thinking of it for some time now. Does the ROS support dynamic LEDs on Keyboard? There are some programs that uses them for showing for example data flow from network card, or in this case a visualisation responding to the music. I've tried this on VBox some time ago, but it didn't work (maybe VBox does not send the LED commands straight to the Keyboard?)

This is what I'm talking about (runs on XP):
http://www.youtube.com/watch?v=sOdkGu6uCrw

This is a plugin for Winamp called Visualisation KEYLED v.2.1

It basically changes the states of the Caps-Lock, Num-Lock and Scroll-Lock in such a way, that it blinks right with the beats of the music (not seen on the video because of small delay)
PurpleGurl
Posts: 1787
Joined: Fri Aug 07, 2009 5:11 am
Location: USA

Re: [TESTCASE SCENARIO] Does ROS support dynamic LEDs?

Post by PurpleGurl »

Hmmm....that looks interesting. It is not too hard to do either. All you have to do is to send the proper mask to the keyboard light port using AND and OR with the OUT instruction. Hey, I did that years ago in Quickbasic under MS-DOS. I wrote a program to strobe the screen and figured, what the heck, I could strobe the keyboard lights as well.

I don't know why it did't work for you. Maybe your emulator hid or filtered the address needed.
wojo664
Posts: 320
Joined: Mon Jul 06, 2009 5:39 pm

Re: [TESTCASE SCENARIO] Does ROS support dynamic LEDs?

Post by wojo664 »

To clear this up: This is NOT my program :P
Peterbjornx
Posts: 19
Joined: Fri Jun 04, 2010 2:48 pm

Re: [TESTCASE SCENARIO] Does ROS support dynamic LEDs?

Post by Peterbjornx »

@PurpleGurl: This wont work in any modern OS as the in and out instructions are restricted to privilege ring 0 (Kernel mode), in DOS, both user applications and the OS run in ring 0, in modern OSes (NTOS,ReactOS,Linux,etc...) only the kernel and some drivers run in ring 0, the user programs are kept in ring 3, which can only use math and program flow instructions, to interface with hardware (even KBD leds) it needs to call the OS kernel.
PurpleGurl
Posts: 1787
Joined: Fri Aug 07, 2009 5:11 am
Location: USA

Re: [TESTCASE SCENARIO] Does ROS support dynamic LEDs?

Post by PurpleGurl »

Peterbjornx wrote:@PurpleGurl: This wont work in any modern OS as the in and out instructions are restricted to privilege ring 0 (Kernel mode), in DOS, both user applications and the OS run in ring 0, in modern OSes (NTOS,ReactOS,Linux,etc...) only the kernel and some drivers run in ring 0, the user programs are kept in ring 3, which can only use math and program flow instructions, to interface with hardware (even KBD leds) it needs to call the OS kernel.
You can tell how long it was since I've coded! I am used to real mode, segment architecture, and direct hardware access. I've never coded for protected mode nor its modern cousins. As for how WinAmp can do it, or why ROS cannot do it, I have no idea.
jcalvarez
Posts: 27
Joined: Thu Apr 02, 2009 10:41 am

Re: [TESTCASE SCENARIO] Does ROS support dynamic LEDs?

Post by jcalvarez »

There is a keyboard driver IOCTL for that: IOCTL_KEYBOARD_SET_INDICATORS

Regards,

Jose
hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto »

wojo664 wrote: Does the ROS support dynamic LEDs on keyboard?
The above-mentioned IOCTL is implemented.
There are some programs that uses them for showing for example data flow from network card, or in this case a visualisation responding to the music. I've tried this on VBox some time ago, but it didn't work (maybe VBox does not send the LED commands straight to the Keyboard?)
Could you try it on real hardware? If it will not work, it's indeed a ReactOS bug. Please file a bug report then.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests