sane-project-website/old-archive/1999-02/0207.html

132 wiersze
5.4 KiB
HTML
Czysty Zwykły widok Historia

<!-- received="Sat Feb 27 13:00:47 1999 PST" -->
<!-- sent="Sat, 27 Feb 1999 21:53:42 +0100" -->
<!-- name="Svend Daugaard Pedersen" -->
<!-- email="sdp@vip.cybercity.dk" -->
<!-- subject="Re: Epson backend" -->
<!-- id="" -->
<!-- inreplyto="199902272023.MAA06623@panda.mostang.com" -->
<title>sane-devel: Re: Epson backend</title>
<h1>Re: Epson backend</h1>
<b>Svend Daugaard Pedersen</b> (<a href="mailto:sdp@vip.cybercity.dk"><i>sdp@vip.cybercity.dk</i></a>)<br>
<i>Sat, 27 Feb 1999 21:53:42 +0100</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#207">[ date ]</a><a href="index.html#207">[ thread ]</a><a href="subject.html#207">[ subject ]</a><a href="author.html#207">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0208.html">Ewald R. de Wit: "Photosmart patch for better slide scanning"</a>
<li> <b>Previous message:</b> <a href="0206.html">Dr. Andreas Bolsch: "Re: horizontal stripes in your image"</a>
<li> <b>In reply to:</b> <a href="0205.html">David Mosberger-Tang: "Re: Epson backend"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
David Mosberger-Tang wrote:<br>
<p>
<i>&gt;Hi Svend,</i><br>
<p>
<i>&gt;Thanks for the report, but for it to be really useful, could you send</i><br>
<i>&gt;a patch that fixes the two problems you mention? "diff -u" is the</i><br>
<i>&gt;preferred format. Thanks!</i><br>
<p>
Well! I havn't used 'diff' before :-( (I think it is somewhere in my<br>
computer). And there is another problem. The changes are made in the<br>
ported backend and in this there are some very Amiga specific changes.<br>
<p>
But the changes are really small and is listed in this mail.<br>
<p>
<i>&gt;--david</i><br>
<p>
<i>&gt;&gt;&gt;&gt;&gt;&gt; On Sat, 27 Feb 1999 21:08:34 +0100, Svend Daugaard Pedersen</i><br>
<i>&gt;&lt;<a href="mailto:sdp@vip.cybercity.dk">sdp@vip.cybercity.dk</a>&gt; said:</i><br>
<p>
<i>&gt; Svend&gt; During my work on porting the Epson backend to the Amiga I</i><br>
<i>&gt; Svend&gt; found the following minor bugs:</i><br>
<p>
<i>&gt; Svend&gt; - In the call (line 634)</i><br>
<p>
<i>&gt; Svend&gt; 632 buf = (u_char *) head; 633 if (s-&gt;hw-&gt;is_scsi) 634</i><br>
<i>&gt; Svend&gt; receive (s, buf, 4, status); 635 else 636 receive (s, buf, 1,</i><br>
<i>&gt; Svend&gt; status);</i><br>
<p>
<i>&gt; Svend&gt; it is expected that the last two bytes read from the</i><br>
<i>&gt; Svend&gt; scanner form a legal 16 bit integer.</i><br>
<p>
<i>&gt; Svend&gt; This is not the case on a M680x0 processor.</i><br>
<p>
I have not made the "final" solution to this problem. Since my version<br>
of the code is to be used on M680x0 I swapped the to bytes in the 16<br>
bit word <br>
<p>
wordSwap(head-&gt;count);<br>
<p>
by using this macro:<br>
<p>
#define wordSwap(X) {u_char b;u_char* bp=(u_char*)&amp;(X);b=*bp;*(<br>
bp++)=*bp;*bp=b;} <br>
<p>
<i>&gt; Svend&gt; - In line 849 (procedure 'attach')</i><br>
<i>&gt; </i><br>
<i>&gt; Svend&gt; dummy_dev.sane.model = (char *) memcpy (str, buf + 16 +</i><br>
<i>&gt; Svend&gt; 8, 8);</i><br>
<p>
<i>&gt; Svend&gt; 'buf' is not initialized if the scanner is a parallel port</i><br>
<i>&gt; Svend&gt; scanner. (I have not tested it on a parallel scanner but my</i><br>
<i>&gt; Svend&gt; C compiler told me that there is a potential problem).</i><br>
<p>
As I said I have not used it on a parallel scanner and I have not corrected<br>
the error.<br>
<p>
<i>&gt; Svend&gt; The ported backend has been reported to work with the</i><br>
<i>&gt; Svend&gt; following SCSI Epson scanners:</i><br>
<p>
<i>&gt; Svend&gt; GT9000, GT8500, GT7000, GT6500 and Perfection636</i><br>
<p>
<i>&gt; Svend&gt; A little addition around line 750 had to be made to make the</i><br>
<i>&gt; Svend&gt; backend recognize the Perfection scanner.</i><br>
<p>
The lines<br>
<p>
if (buf[0] != TYPE_PROCESSOR<br>
<i> || strncmp (buf + 8, "EPSON", 5) != 0</i><br>
<i> || (strncmp (buf + 16, "SCANNER ", 8) != 0</i><br>
&amp;&amp; strncmp (buf + 14, "SCANNER ", 8) != 0))<br>
<p>
are changed to<br>
<p>
if( (buf[0] != TYPE_PROCESSOR) <br>
<i> || strncmp(buf+8,"EPSON",5) </i><br>
<i> || (strncmp(buf+16,"SCANNER ",8)</i><br>
&amp;&amp; strncmp(buf+14,"SCANNER ",8) <br>
&amp;&amp; strncmp(buf+16,"Perfection",10)<br>
)<br>
)<br>
<p>
<i>&gt; Svend&gt; Svend Daugaard Pedersen</i><br>
<p>
<p>
<p>
<i>&gt; Svend&gt; -- Source code, list archive, and docs:</i><br>
<i>&gt; Svend&gt; <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a> To unsubscribe: echo unsubscribe</i><br>
<i>&gt; Svend&gt; sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a></i><br>
<p>
Svend Daugaard Pedersen<br>
<p>
may be I should have a look at that diff ;-|<br>
<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="0208.html">Ewald R. de Wit: "Photosmart patch for better slide scanning"</a>
<li> <b>Previous message:</b> <a href="0206.html">Dr. Andreas Bolsch: "Re: horizontal stripes in your image"</a>
<li> <b>In reply to:</b> <a href="0205.html">David Mosberger-Tang: "Re: Epson backend"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>