s2145: Work on the s6245 and 6145.
This commit is contained in:
parent
895b723ae5
commit
5e2071d0ae
2
README
2
README
|
@ -46,6 +46,7 @@
|
|||
Mitsubishi CP-3800DW
|
||||
Sony UP-DR10 aka DNP DS-SL10
|
||||
Shinko CHC-S1245 (aka Sinfonia E1)
|
||||
Shinko CHC-S6245 (aka Sinfonia CE)
|
||||
|
||||
***************************************************************************
|
||||
|
||||
|
@ -255,6 +256,7 @@
|
|||
Work-in-process printers:
|
||||
|
||||
Shinko CHC-S1245 (aka "Sinfonia E1")
|
||||
Shinko CHC-S6245 (aka "Sinfonia CE")
|
||||
|
||||
Development was sponsored by:
|
||||
|
||||
|
|
|
@ -52,18 +52,18 @@ enum {
|
|||
/* Structure of printjob header. All fields are LITTLE ENDIAN */
|
||||
struct s2145_printjob_hdr {
|
||||
uint32_t len1; /* Fixed at 0x10 */
|
||||
uint32_t model; /* Fixed at '2145' or '1245' (decimal) */
|
||||
uint32_t unk2;
|
||||
uint32_t unk3;
|
||||
uint32_t model; /* Equal to the printer model (eg '2145' or '1245' decimal) */
|
||||
uint32_t med_type; /* 6145 only, media type */
|
||||
uint32_t unk3; /* Fixed at 0x01 */
|
||||
|
||||
uint32_t len2; /* Fixed at 0x64 */
|
||||
uint32_t unk5;
|
||||
uint32_t media; /* Fixed at 0x10 for 1245 */
|
||||
uint32_t unk6;
|
||||
|
||||
uint32_t method; /* Media type for 1245 */
|
||||
uint32_t mode; /* Matte or Glossy for 1245 */
|
||||
uint32_t unk7;
|
||||
uint32_t method; /* Method for 2145, Media type for 1245, 0x00 for 6245, multicut for 6145 */
|
||||
uint32_t mode; /* Mode for 2145, Matte/Glossy for 1245, 0x00 for 6245, quality for 6145 */
|
||||
uint32_t oc_mode; /* 6145/6245 only, Matte/Glossy/None */
|
||||
uint32_t mattedepth; /* 1245 only */
|
||||
|
||||
uint32_t unk9;
|
||||
|
@ -1516,7 +1516,9 @@ static int shinkos2145_read_parse(void *vctx, int data_fd) {
|
|||
}
|
||||
|
||||
if (le32_to_cpu(ctx->hdr.model) != 2145 ||
|
||||
le32_to_cpu(ctx->hdr.model) != 1245) {
|
||||
le32_to_cpu(ctx->hdr.model) != 1245) ||
|
||||
le32_to_cpu(ctx->hdr.model) != 6145) ||
|
||||
le32_to_cpu(ctx->hdr.model) != 6245) {
|
||||
} else {
|
||||
ERROR("Unrecognized printer (%d)!\n", le32_to_cpu(ctx->hdr.model));
|
||||
return CUPS_BACKEND_CANCEL;
|
||||
|
@ -1664,13 +1666,20 @@ static int shinkos2145_main_loop(void *vctx, int copies) {
|
|||
memset(cmdbuf, 0, CMDBUF_LEN);
|
||||
print->hdr.cmd = cpu_to_le16(S2145_CMD_PRINTJOB);
|
||||
print->hdr.len = cpu_to_le16(sizeof (*print) - sizeof(*cmd));
|
||||
print->id = ctx->jobid;
|
||||
print->count = cpu_to_le16(copies);
|
||||
print->columns = cpu_to_le16(le32_to_cpu(ctx->hdr.columns));
|
||||
print->rows = cpu_to_le16(le32_to_cpu(ctx->hdr.rows));
|
||||
print->media = le32_to_cpu(ctx->hdr.media);
|
||||
print->mode = le32_to_cpu(ctx->hdr.mode);
|
||||
print->method = le32_to_cpu(ctx->hdr.method);
|
||||
|
||||
if (ctx->model == 2145) {
|
||||
print->id = ctx->jobid;
|
||||
print->count = cpu_to_le16(copies);
|
||||
print->columns = cpu_to_le16(le32_to_cpu(ctx->hdr.columns));
|
||||
print->rows = cpu_to_le16(le32_to_cpu(ctx->hdr.rows));
|
||||
print->media = le32_to_cpu(ctx->hdr.media);
|
||||
print->mode = le32_to_cpu(ctx->hdr.mode);
|
||||
print->method = le32_to_cpu(ctx->hdr.method);
|
||||
} else {
|
||||
// s1245, s6145, s6245 use different header fields, don't know mapping!
|
||||
ERROR("Don't know how to initiate print on non-2145 models!\n");
|
||||
return CUPS_BACKEND_FAILED;
|
||||
}
|
||||
|
||||
if ((ret = s2145_do_cmd(ctx,
|
||||
cmdbuf, sizeof(*print),
|
||||
|
@ -1780,10 +1789,12 @@ static int shinkos2145_query_serno(struct libusb_device_handle *dev, uint8_t end
|
|||
#define USB_VID_SHINKO 0x10CE
|
||||
#define USB_PID_SHINKO_S1245 0x0007
|
||||
#define USB_PID_SHINKO_S2145 0x000E
|
||||
#define USB_PID_SHINKO_S6145 XXXXXX
|
||||
#define USB_PID_SHINKO_S6245 XXXXXX
|
||||
|
||||
struct dyesub_backend shinkos2145_backend = {
|
||||
.name = "Shinko/Sinfonia CHC-S2145/S1245",
|
||||
.version = "0.34",
|
||||
.version = "0.35",
|
||||
.uri_prefix = "shinkos2145",
|
||||
.cmdline_usage = shinkos2145_cmdline,
|
||||
.cmdline_arg = shinkos2145_cmdline_arg,
|
||||
|
@ -1794,8 +1805,10 @@ struct dyesub_backend shinkos2145_backend = {
|
|||
.main_loop = shinkos2145_main_loop,
|
||||
.query_serno = shinkos2145_query_serno,
|
||||
.devices = {
|
||||
{ USB_VID_SHINKO, USB_PID_SHINKO_S2145, P_SHINKO_S2145, ""},
|
||||
{ USB_VID_SHINKO, USB_PID_SHINKO_S1245, P_SHINKO_S2145, ""},
|
||||
{ USB_VID_SHINKO, USB_PID_SHINKO_S2145, P_SHINKO_S2145, ""},
|
||||
// { USB_VID_SHINKO, USB_PID_SHINKO_S6145, P_SHINKO_S2145, ""},
|
||||
// { USB_VID_SHINKO, USB_PID_SHINKO_S6245, P_SHINKO_S2145, ""},
|
||||
{ 0, 0, 0, ""}
|
||||
}
|
||||
};
|
||||
|
@ -1827,8 +1840,8 @@ struct dyesub_backend shinkos2145_backend = {
|
|||
|
||||
10 00 00 00 MM MM 00 00 00 00 00 00 01 00 00 00 MM == Model (ie 1245d)
|
||||
64 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00
|
||||
MM 00 00 00 PP 00 00 00 00 00 00 00 ZZ ZZ ZZ ZZ PP = Glossy/Matte, MM = Media Type, ZZ == matte intensity
|
||||
00 00 00 00 WW WW 00 00 HH HH 00 00 XX 00 00 00 X == Copies
|
||||
MM 00 00 00 PP 00 00 00 00 00 00 00 ZZ ZZ ZZ ZZ PP = Glossy/Matte, MM = Media Type, ZZ == matte intensity
|
||||
VV 00 00 00 WW WW 00 00 HH HH 00 00 XX 00 00 00 VV == dust; 0x00 default, 0x01 off, 0x02 on, XX == Copies
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 ce ff ff ff
|
||||
00 00 00 00 ce ff ff ff QQ QQ 00 00 ce ff ff ff QQ == DPI, ie 300.
|
||||
00 00 00 00 ce ff ff ff 00 00 00 00 00 00 00 00
|
||||
|
@ -1838,4 +1851,42 @@ struct dyesub_backend shinkos2145_backend = {
|
|||
|
||||
04 03 02 01 [[ footer ]]
|
||||
|
||||
* CHC-S6245 data format
|
||||
|
||||
Spool file consists of an 116-byte header, followed by RGB-packed data,
|
||||
followed by a 4-byte footer. Header appears to consist of a series of
|
||||
4-byte Little Endian words.
|
||||
|
||||
10 00 00 00 MM MM 00 00 01 00 00 00 01 00 00 00 MM == Model (ie 6245d)
|
||||
64 00 00 00 00 00 00 00 TT 00 00 00 00 00 00 00 TT == 0x20 8x4, 0x21 8x5, 0x22 8x6, 0x23 8x8, 0x10 8x10, 0x11 8x12
|
||||
00 00 00 00 00 00 00 00 XX 00 00 00 00 00 00 00 XX == 0x03 matte, 0x02 glossy, 0x01 no coat
|
||||
00 00 00 00 WW WW 00 00 HH HH 00 00 NN 00 00 00 WW/HH Width, Height (LE), NN == Copies
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 ce ff ff ff
|
||||
00 00 00 00 ce ff ff ff QQ QQ 00 00 ce ff ff ff QQ == DPI (300)
|
||||
00 00 00 00 ce ff ff ff 00 00 00 00 00 00 00 00
|
||||
00 00 00 00
|
||||
|
||||
[[Packed RGB payload of WW*HH*3 bytes]]
|
||||
|
||||
04 03 02 01 [[ footer ]]
|
||||
|
||||
* CHC-S6145 data format
|
||||
|
||||
Spool file consists of an 116-byte header, followed by RGB-packed data,
|
||||
followed by a 4-byte footer. Header appears to consist of a series of
|
||||
4-byte Little Endian words.
|
||||
|
||||
10 00 00 00 MM MM 00 00 HH 00 00 00 01 00 00 00 MM == Model (ie 6245d), HH == 0x02 (5x7 media), 0x03 (4x6 media)
|
||||
64 00 00 00 00 00 00 00 TT 00 00 00 00 00 00 00 TT == 0x08 5x5, 0x03 5x7, 0x07 2x6, 0x00 4x6, 0x06 6x6/6x6+6x2/6x8
|
||||
UU 00 00 00 ZZ 00 00 00 XX 00 00 00 00 00 00 00 XX == 0x00 default, 0x02 glossy, 0x03 matte, ZZ == 0x00 default, 0x01 == std qual; UU == 0x00 normal, 0x04 2x6*2, 0x05 6x6+2x6
|
||||
00 00 00 00 WW WW 00 00 HH HH 00 00 NN 00 00 00 WW/HH Width, Height (LE), NN == Copies
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 ce ff ff ff
|
||||
00 00 00 00 ce ff ff ff QQ QQ 00 00 ce ff ff ff QQ == DPI (300)
|
||||
00 00 00 00 ce ff ff ff 00 00 00 00 00 00 00 00
|
||||
00 00 00 00
|
||||
|
||||
[[Packed RGB payload of WW*HH*3 bytes]]
|
||||
|
||||
04 03 02 01 [[ footer ]]
|
||||
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue