[prev in list] [next in list] [prev in thread] [next in thread]
List: gimp-print-devel
Subject: [Gimp-print-devel] [patch] Add support for SELPHY CP-790,
From: Solomon Peachy <pizza () shaftnet ! org>
Date: 2011-06-30 1:59:40
Message-ID: 20110630015940.GB31390 () shaftnet ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
The attached patch does the following:
* Add SELPHY CP-790 support (new init & plane functions)
* Switch CP-740/750 to use a the same backend as the CP-520 due to
buffering concerns. (user reported success)
* Switch CP-800 to a different backend that matches its paper types.
* Consolidate the CP520 init function to re-use the generic cpx00 init,
plus padding. (not sure if this is really the right way to do it...)
* Consolidate the CP520 plane function into the generic cpx00 plane function;
according to the dumps I've seen the cp520 plane setup is used everywhere.
Anyway, I've compile-tested all of this, and I think it's correct, but
since I don't have any of the affected printers, I'd appreciate someone
willing to test this out..
- Solomon
--
Solomon Peachy pizza at shaftnet dot org
Melbourne, FL ^^ (mail/jabber/gtalk) ^^
Quidquid latine dictum sit, altum viditur.
["gutenprint_more_selphy_work.patch" (text/plain)]
? src/ghost/ijsgutenprint.5.2
? src/gimp2/gutenprint
Index: src/main/print-olympus.c
===================================================================
RCS file: /cvsroot/gimp-print/print/src/main/print-olympus.c,v
retrieving revision 1.98
diff -u -r1.98 print-olympus.c
--- src/main/print-olympus.c 16 Jun 2011 07:47:36 -0000 1.98
+++ src/main/print-olympus.c 30 Jun 2011 01:54:53 -0000
@@ -783,7 +783,8 @@
static void cpx00_plane_init_func(stp_vars_t *v)
{
stp_put16_be(0x4001, v);
- stp_put16_le(3 - privdata.plane, v);
+ stp_putc('\0', v);
+ stp_putc(3 - privdata.plane, v);
stp_put32_le(privdata.w_size * privdata.h_size, v);
dyesub_nputc(v, '\0', 4);
}
@@ -851,38 +852,40 @@
LIST(dyesub_printsize_list_t, cp220_printsize_list, dyesub_printsize_t, \
cp220_printsize);
-
/* Canon SELPHY CP-520 */
static void cp520_printer_init_func(stp_vars_t *v)
{
- char pg = (strcmp(privdata.pagesize, "Postcard") == 0 ? '\1' :
- (strcmp(privdata.pagesize, "w253h337") == 0 ? '\2' :
- (strcmp(privdata.pagesize, "w155h244") == 0 ? '\3' :
- (strcmp(privdata.pagesize, "w283h566") == 0 ? '\4' :
- '\1' ))));
-
- stp_put16_be(0x4000, v);
- stp_putc('\0', v);
- stp_putc(pg, v);
- dyesub_nputc(v, '\0', 8);
+ cpx00_printer_init_func(v);
/* The CP520 does not want the printer_init and plane_init command to be sent
in the same USB-packet so we fill up first USB-Packet with '\0'. */
dyesub_nputc(v, '\0', 1012);
}
-static void cp520_plane_init_func(stp_vars_t *v)
+/* Canon SELPHY CP-790 */
+static void cp790_printer_init_func(stp_vars_t *v)
{
- stp_put16_be(0x4001, v);
- stp_putc(3 - privdata.plane, v); /* The CP520 differs from the cp-printer
- in that it reqires the plane in the 3rd
- byte not in the 4th */
+ char pg = (strcmp(privdata.pagesize, "Postcard") == 0 ? '\0' :
+ (strcmp(privdata.pagesize, "w253h337") == 0 ? '\1' :
+ (strcmp(privdata.pagesize, "w155h244") == 0 ? '\2' :
+ (strcmp(privdata.pagesize, "w283h566") == 0 ? '\3' :
+ '\0' ))));
+
+ stp_put16_be(0x4000, v);
+ stp_putc(pg, v);
stp_putc('\0', v);
+ dyesub_nputc(v, '\0', 8);
stp_put32_le(privdata.w_size * privdata.h_size, v);
- dyesub_nputc(v, '\0', 4);
}
-/* Canon SELPHY ES series */
+static void cp790_plane_init_func(stp_vars_t *v)
+{
+ stp_put16_be(0x4001, v);
+ stp_putc(4 - privdata.plane, v);
+ stp_putc('\0', v);
+ dyesub_nputc(v, '\0', 8);
+}
+/* Canon SELPHY ES series */
static void es1_printer_init_func(stp_vars_t *v)
{
char pg = (strcmp(privdata.pagesize, "Postcard") == 0 ? 0x11 :
@@ -1705,7 +1718,7 @@
cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
NULL,
},
- { /* Canon CP-100, CP-200, CP-300 */
+ { /* Canon CP-100, CP-200, CP-300, CP-800 */
1000,
&ymc_ink_list,
&res_300dpi_list,
@@ -1723,7 +1736,7 @@
},
{ /* Canon CP-220, CP-330, SELPHY CP-400, SELPHY CP-500, SELPHY CP-510,
SELPHY CP-600, SELPHY CP-710, SELPHY CP-720, SELPHY CP-730,
- SELPHY CP-740, SELPHY CP-750 */
+ SELPHY CP-760, SELPHY CP-770, SELPHY CP-780 */
1001,
&ymc_ink_list,
&res_300dpi_list,
@@ -1739,7 +1752,7 @@
cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
NULL,
},
- { /* Canon CP-520, SELPHY CP-530 */
+ { /* Canon CP-520, SELPHY CP-530, SELPHY CP-740, SELPHY CP-750 */
1004,
&ymc_ink_list,
&res_300dpi_list,
@@ -1750,7 +1763,7 @@
| DYESUB_FEATURE_BORDERLESS | DYESUB_FEATURE_WHITE_BORDER
| DYESUB_FEATURE_PLANE_INTERLACE,
&cp520_printer_init_func, NULL,
- &cp520_plane_init_func, NULL,
+ &cpx00_plane_init_func, NULL,
NULL, NULL,
cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
NULL,
@@ -1819,6 +1832,22 @@
cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
NULL,
},
+ { /* Canon SELPHY CP790 (!experimental) */
+ 1008,
+ &ymc_ink_list,
+ &res_300dpi_list,
+ &cp220_page_list,
+ &cp220_printsize_list,
+ SHRT_MAX,
+ DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
+ | DYESUB_FEATURE_BORDERLESS | DYESUB_FEATURE_WHITE_BORDER
+ | DYESUB_FEATURE_PLANE_INTERLACE,
+ &cp790_printer_init_func, NULL,
+ &cp790_plane_init_func, NULL,
+ NULL, NULL,
+ cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
+ NULL,
+ },
{ /* Sony DPP-EX5, DPP-EX7 */
2002,
&rgb_ink_list,
Index: src/xml/printers.xml
===================================================================
RCS file: /cvsroot/gimp-print/print/src/xml/printers.xml,v
retrieving revision 1.130
diff -u -r1.130 printers.xml
--- src/xml/printers.xml 16 Jun 2011 07:47:37 -0000 1.130
+++ src/xml/printers.xml 30 Jun 2011 01:54:53 -0000
@@ -1747,13 +1747,13 @@
<printer translate="name" name="Canon SELPHY-CP-710" driver="canon-cp710" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-710" />
<printer translate="name" name="Canon SELPHY-CP-720" driver="canon-cp720" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-720" />
<printer translate="name" name="Canon SELPHY-CP-730" driver="canon-cp730" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-730" />
- <printer translate="name" name="Canon SELPHY-CP-740" driver="canon-cp740" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-740" />
- <printer translate="name" name="Canon SELPHY-CP-750" driver="canon-cp750" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-750" /> + <printer \
translate="name" name="Canon SELPHY-CP-740" driver="canon-cp740" manufacturer="Canon" \
model="1004" foomaticid="Canon-SELPHY-CP-740" /> + <printer translate="name" \
name="Canon SELPHY-CP-750" driver="canon-cp750" manufacturer="Canon" model="1004" \
foomaticid="Canon-SELPHY-CP-750" />
<printer translate="name" name="Canon SELPHY-CP-760" driver="canon-cp760" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-760" />
<printer translate="name" name="Canon SELPHY-CP-770" driver="canon-cp770" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-770" />
<printer translate="name" name="Canon SELPHY-CP-780" driver="canon-cp780" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-780" />
- <printer translate="name" name="Canon SELPHY-CP-790" driver="canon-cp790" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-790" />
- <printer translate="name" name="Canon SELPHY-CP-800" driver="canon-cp800" \
manufacturer="Canon" model="1001" foomaticid="Canon-SELPHY-CP-800" /> + <printer \
translate="name" name="Canon SELPHY-CP-790" driver="canon-cp790" manufacturer="Canon" \
model="1008" foomaticid="Canon-SELPHY-CP-790" /> + <printer translate="name" \
name="Canon SELPHY-CP-800" driver="canon-cp800" manufacturer="Canon" model="1000" \
foomaticid="Canon-SELPHY-CP-800" />
<printer translate="name" name="Canon SELPHY ES1" driver="canon-es1" \
manufacturer="Canon" model="1003" foomaticid="Canon-SELPHY-ES1" />
<printer translate="name" name="Canon SELPHY ES2" driver="canon-es2" \
manufacturer="Canon" model="1005" foomaticid="Canon-SELPHY-ES2" />
<printer translate="name" name="Canon SELPHY ES20" driver="canon-es20" \
manufacturer="Canon" model="1005" foomaticid="Canon-SELPHY-ES20" />
[Attachment #8 (application/pgp-signature)]
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Gimp-print-devel mailing list
Gimp-print-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic