Hi Alex,

On Donnerstag, 21. August 2003 23:01, Alexander Feldman wrote:
> Thanks,
>
> This small shit (the scanner) drives me nuts. Reverse engineering the
> protocol takes much more time than I initially anticipated.
>
> The bridge is GL640, I have raised the level of the protocol one level =
up.
> The real trouble is figuring out what the registers do. To help myself
> reading the log I have also disassembled the windows driver. It is prob=
ably
> crappy C code + the stupid MSVC6 that compiled in crappy assembler :(

Wow! It seems you really want to make this crappy hardware work with SANE=
 ;-)

>
> Below is what I have discovered till now (not much):
> =3D=3D=3D
> Little Endian Format (LSB First)
> Register  Type  Description
> -------------------------------------------------
> 96h, 97h  word  Scan width in pixels.
> 9ch, 9dh  word  Motor speed.
> 85h       byte  Device control. See bits below.
>                 Mask            Description
>                 --------------------------------
>                 04h             Motor on.
>                 20h             Lamp on.
>                 40h             Green led on.
> =3D=3D=3D
> I looked at some SANE backends and didn't see anything that resembles t=
his.
> Does it speak to you?
>
> At this moment I have working "lamp on" and "lamp off" and almost worki=
ng
> "scanner go home". Unfortunately I am lacking some general scanner
> knowledge what should happen next. How do the scanner finds the beginni=
ng
> of the slide? Is there a sensor or you scan in some low resolution mode
> until the image begins?=20

The general scan steps are as follows:

- home the image-sensor, mostly supported by a sensor to tell you reachin=
g the
  end of the scan-bed
- move to the calibration area, in general the driver knows how to setup =
the
  motor correctly and how many steps to make to reach this area, this app=
lies
  to all motor movements. The motor control can be tricky, as most ASICs =
have
  a generic stepper-motor support inside, which allows control of a wide =
range
  of motors
- coarse calibration, to find the darkest and brightest values
- fine calibration on a pixel base, to adjust each pixel
- move to the scan area and scan

> Do you know a place where I can find some more info
> about the TWAIN interface?

http://www.twain.org/download.htm
A lot of stuff to check including the TWAIN Developer Toolkit, but why do=
 you
need it?

>
> I am now trying to understand how the scanned image is read. It seems t=
hat
> first the whole image is scanned and then it is transferred in blocks o=
f 30
> lines.

Reply via email to