kopia lustrzana https://gitlab.com/sane-project/website
151 wiersze
5.6 KiB
HTML
151 wiersze
5.6 KiB
HTML
<!-- received="Tue Dec 23 11:31:08 1997 PST" -->
|
||
<!-- sent="Tue, 23 Dec 1997 20:30:09 +0100 (MET)" -->
|
||
<!-- name="Andreas Czechanowski" -->
|
||
<!-- email="andreas@inspc44c.ins.uni-stuttgart.de" -->
|
||
<!-- subject="Mustek-0.68: 600 II N patch" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="" -->
|
||
<title>sane-devel: Mustek-0.68: 600 II N patch</title>
|
||
<h1>Mustek-0.68: 600 II N patch</h1>
|
||
<b>Andreas Czechanowski</b> (<a href="mailto:andreas@inspc44c.ins.uni-stuttgart.de"><i>andreas@inspc44c.ins.uni-stuttgart.de</i></a>)<br>
|
||
<i>Tue, 23 Dec 1997 20:30:09 +0100 (MET)</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#127">[ date ]</a><a href="index.html#127">[ thread ]</a><a href="subject.html#127">[ subject ]</a><a href="author.html#127">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0128.html">Christoper.Riddoch: "Xmas Scanner Blues"</a>
|
||
<li> <b>Previous message:</b> <a href="0126.html">David Mosberger-Tang: "Re: How to turn off lamp in ScanJet IIcx"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
Hi !<br>
|
||
<p>
|
||
Here is a patch for the 600 II N part of the SANE backend.<br>
|
||
It fixes :<br>
|
||
- gamma correction is now possible<br>
|
||
- lineart mode now produces more than an all-white image<br>
|
||
<p>
|
||
Below is some general information about configuring SANE for use<br>
|
||
with the Mustek Paragon 600 II N.<br>
|
||
<p>
|
||
This scanner is not accessed as SCSI device, and does not have a<br>
|
||
special device file in /dev assigned to it. The fontends access the<br>
|
||
I/O ports directly. This can either be done through /dev/port<br>
|
||
(may be too slow for some computers), or by running the frontend<br>
|
||
programs (e.g. scanimage, xscanimage) as root or SUID root.<br>
|
||
<p>
|
||
The AB 306 N interface supplied with the scanner can be configured to<br>
|
||
use one of eight I/O address ranges. Each range includes 3 consecutive<br>
|
||
I/O addresses (base+0 to base+2). Choose one of the addresses shown<br>
|
||
below, depending on your hardware (I hope you know what addresses are<br>
|
||
already in use !) :<br>
|
||
<p>
|
||
0x26b <br>
|
||
0x2ab <br>
|
||
0x2eb <br>
|
||
0x22b <br>
|
||
0x32b <br>
|
||
0x36b <br>
|
||
0x3ab <br>
|
||
0x3eb <br>
|
||
<p>
|
||
Instead of "/dev/scanner" or the like, make an entry with the address<br>
|
||
(in hexadecimal notation as shown above) on a line by itself into<br>
|
||
the configuration file mustek.conf . The 600 II N also requires<br>
|
||
<p>
|
||
option line_distance_fix<br>
|
||
<p>
|
||
for proper scanning of color images. You may, before starting one<br>
|
||
of the frontends, enter<br>
|
||
<p>
|
||
export SANE_DEBUG_MUSTEK=2<br>
|
||
<p>
|
||
(or something equivalent for csh), so that you get some debugging<br>
|
||
information on stderr. I would like to know what firmware revisions<br>
|
||
are out there (this is reported during inquiry by the scanner).<br>
|
||
<p>
|
||
Now, here's the patch:<br>
|
||
<p>
|
||
*** ./backend/mustek.c.orig Wed Dec 3 07:49:10 1997<br>
|
||
--- ./backend/mustek.c Sun Dec 14 16:11:24 1997<br>
|
||
***************<br>
|
||
*** 895,900 ****<br>
|
||
--- 895,928 ----<br>
|
||
int i, j, table = 0, len, num_channels = 1;<br>
|
||
u_int8_t gamma[3*256+10], val, *cp;<br>
|
||
<br>
|
||
+ /* sigh! - the 600 II N needs a (dummy) table download even for<br>
|
||
+ lineart and halftone mode, else it produces a completely<br>
|
||
+ white image. Thank Mustek for their buggy firmware ! */<br>
|
||
+ if ((s->hw->flags & MUSTEK_FLAG_PP)<br>
|
||
+ && !(s->mode & MUSTEK_MODE_MULTIBIT))<br>
|
||
+ {<br>
|
||
+ memset (gamma, 0, sizeof (gamma));<br>
|
||
+ gamma[0] = MUSTEK_SCSI_LOOKUP_TABLE;<br>
|
||
+ #if 1<br>
|
||
+ gamma[2] = 0x0; /* indicate any preloaded gamma table */<br>
|
||
+ DBG(3, "gamma_correction: sending dummy gamma table select\n");<br>
|
||
+ return dev_cmd (s, gamma, 6, 0, 0);<br>
|
||
+ #else<br>
|
||
+ /* try to send a custom gamma table, because brightness and<br>
|
||
+ contrast adjustment don't change anything in the single-bit-modes<br>
|
||
+ with the 600 II N. - does not work either :-( */<br>
|
||
+ gamma[2] = 0x27; /* indicate any preloaded gamma table */<br>
|
||
+ cp = gamma + 10;<br>
|
||
+ for (j = 0; j < num_channels; ++j, ++table)<br>
|
||
+ for (i = 0; i < 256; ++i)<br>
|
||
+ {<br>
|
||
+ *cp++ = (i > (128 + s->val[OPT_BRIGHTNESS].w) ? 255 : 0);<br>
|
||
+ }<br>
|
||
+ DBG(3, "gamma_correction: sending gamma table of %d bytes\n", len);<br>
|
||
+ return dev_cmd (s, gamma, 10 + 3*256, 0, 0);<br>
|
||
+ #endif<br>
|
||
+ }<br>
|
||
+ <br>
|
||
if (!s->val[OPT_CUSTOM_GAMMA].w<br>
|
||
<i> || !(s->mode & MUSTEK_MODE_MULTIBIT))</i><br>
|
||
return SANE_STATUS_GOOD;<br>
|
||
*** ./sanei/sanei_ab306.c.orig Wed Nov 26 07:15:29 1997<br>
|
||
--- ./sanei/sanei_ab306.c Sat Dec 13 14:57:50 1997<br>
|
||
***************<br>
|
||
*** 374,380 ****<br>
|
||
break;<br>
|
||
}<br>
|
||
<br>
|
||
! status = ab306_write (p, src, cdb_size);<br>
|
||
if (status != SANE_STATUS_GOOD)<br>
|
||
return status;<br>
|
||
<br>
|
||
--- 374,380 ----<br>
|
||
break;<br>
|
||
}<br>
|
||
<br>
|
||
! status = ab306_write (p, src, 6 /* cdb_size */);<br>
|
||
if (status != SANE_STATUS_GOOD)<br>
|
||
return status;<br>
|
||
<br>
|
||
<pre>
|
||
---
|
||
<p>
|
||
Regards,
|
||
<p>
|
||
Andreas.
|
||
<p>
|
||
<p>
|
||
<p>
|
||
<pre>
|
||
--
|
||
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
|
||
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
|
||
</pre>
|
||
<!-- body="end" -->
|
||
<p>
|
||
<ul>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0128.html">Christoper.Riddoch: "Xmas Scanner Blues"</a>
|
||
<li> <b>Previous message:</b> <a href="0126.html">David Mosberger-Tang: "Re: How to turn off lamp in ScanJet IIcx"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|