Re: Foolish Me...

> After seeing what little information that became available and seeing how
> I wasn't doing anything on New Year's Eve anyway, I was smitten with the 
> urge to hack up a Linux QuickCam "snap shot" program in C++.
> I've gotten most of my framework down, its ready to go, it wants to 
> output PGM on stdout.  All that I need is some more specifics in those 
> ``Random Notes''.
> Q1. When the QC is emitting its stream of one of zeroes, where is it 
> sending that? Is that coming from the status register?  Is this a 10101 
> kind of stream on those 5 bits, or is it alternating 11111 00000 11111 
> whenever you look at it?  I want to be able to detect the prescene of the 
> QC as well.

It's alternating one line, at more like 10 Hz on my system.  I don't 
have the output handy, but if you watch a trace of the QuickCam program 
in Wine, you'll see that it ignores this stream anyway -- it sends a 
reset and waits for an acknoledgement.  Here's the beginning, with the 
first part of the brightness command.

  IO: 0x0020 (1 bytes) to port 0x37a
  IO: 0x0075 (1 bytes) to port 0x378
  IO: read from port 0x378, res = 0x0075
  IO: 0x000b (1 bytes) to port 0x37a
  IO: 0x000e (1 bytes) to port 0x37a
  IO: 0x000b (1 bytes) to port 0x378
  IO: 0x000b (1 bytes) to port 0x378
  IO: 0x000b (1 bytes) to port 0x378
  IO: 0x0006 (1 bytes) to port 0x37a
  IO: read from port 0x379, res = 0x000f
  IO: 0x000e (1 bytes) to port 0x37a
  IO: read from port 0x379, res = 0x00b7

> Q2. When the PC starts a scan, does it then just grab nibbles from the 
> status port until it completes enough bytes to complete the scan?  This 
> is what I'm going to try and do later today.

Yes, from what I can see -- I have enough code to request a scan, but I 
can't parse the return yet -- I'm just about to try again.

> Q3. Is there a contrast command akin to the brightness command or is that 
> postprocessing of the raw scan? 

I've identified a few more commands:

0x07 x	Start scan, already documented.
0x0b x	Set brightness to x.  Already documented.
0x11 x	Set vertical resolution to x.
0x13 x	Set horizontal resolution to 2x.
0x19 x	Set contrast to x.

I've seen 0x0d, 0x0f, and 0x1f commands, but I haven't yet had a chance 
to decode them.  That's my goal for today.

Scott A. Laird   |  "But this goes to 18,446,744,073,709,551,615"
scott@laird.com  |                - Nigel on his new 64-bit computer

Follow-Ups: References: