Operating Systems

2009 Fall, Project Three

Mouse Simulation

Due Time:

    2010 Jan. 7th 23:59

 

Demo Time:

    2010 Jan. 11th and Jan. 12th 13:00 - 17:00

 

Problem:

    In computing, a mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface [5]. It is a simple device with many varieties. Many people use it daily; however, we do not really know how it works and how the device driver works. Such as how the application can get and use the information from mouse, the 3 bytes (or multiple bytes) of status and movement? How the mouse click, double click, and mouse movement are detected by the mouse driver? How to design an efficient device driver? For a new mouse such as magic mouse or new features like multi-touch zooming, how do we simulate using traditional mouse devices?  Can we run with more than one mouse independently as in the MS Windows program (plug in two mice first)?

 

Project:

    You, 2 to 3 classmates as a team, are to design an application program(s) that can simulate as many as possbile the new mouse features above using traditional mice so that your program(s) can help us understand how a mouse works. You need to use a makefile to compile all your programs and use a shell script to run your program(s). Make your source codes self-documented.

  
Output:

   An X-windows application with the mouse features you design and show how they work as possible.


 

Platform:

    OS:

Linux, kernel version: 2.6.x

    Programming Language:

C,C++

    Machine:

try to find one by yourself

 

 

Grading:

    Completeness to simulate multiple mice.

35%

    Report

30%

    Teamwork

20%

    Coding style

5%

    Demo Q&A

10%

    Bonus: Your special design.

10%

Late penalty is 10% per day. E.g. if 2 days late and with grade 90, the final grade will be 90 * 90% * 90% = 72.9

 

Handing in:

1.

Turn in a 10-page most report in demo-time showing how you did it and how good it is.

2.

Upload your source codes, shell script and executable file, including Makefile, *.c, *.h, *.sh, to FTP server.
Host: 140.112.90.169, Port:53, User/Password: OS2009/project3
You should create your own directory named by your team for your files. Note that the initial should be capital.

 

Hints:

1.

You can survey and trace the source "mousedev.c" in Linux source for mouse input subsystem [7].

2.

You can survey and trace the source of your mouse drivers in Linux source [8].

3.

Try to modify from an X-windows application [9].

 

 

Reference:

1.

http://rswiki.csie.org/phpbb/viewforum.php?f=15   (the OS forum)

2.

Understand the Linux Kernel 3rd Edition  

            Daniel P. Bovet & Macro Cesati, O'REILLY

3.

Linux Device Driver 3rd Edition  

            Jonathan Corbet, Alessandro, Rubini & Greg Kroah-Hartman, O'REILLY

4.

The other references will be announced later in the OS wiki and forum.

5.

Mouse Computing, http://en.wikipedia.org/wiki/Computer_mouse

6.

Alan Cox Documents, http://0rz.tw/1f5cC

7.

Mouse Input Subsystem Source File, in $(LINUX_SOURCE)/drivers/input/mousedev.c

8.

Mouse Drivers, in $(LINUX_SOURCE)/drivers/input/mouse/$(YOUR_MOUSE_DRIVER),

e.g. psmouse-base.c for PS/2 mouse

9.

http://www.t2-project.org/packages/xeyes.html