From 8e8aa25ce28ee4628df68b8eb4ab1c6599ff6e83 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 8 Jun 2023 11:09:44 -0400 Subject: [PATCH] sonyupd: More updates based on lessons learned about the Nidec Copal printers --- README | 9 +++++++++ backend_sonyupd.c | 28 +++++++++++++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/README b/README index 26a35dd..d0bd0d4 100644 --- a/README +++ b/README @@ -85,7 +85,9 @@ DNP M4 / Q4 DNP M8 + DNP Q8 Fujifilm ASK-500 + Fujifilm ASK-2000, ASK-2500, and ASK-4000 HiTi M610 (not X610!) HiTi P310L / P310W HiTi P322W @@ -102,6 +104,7 @@ Mitsubishi CP3020D/DE and CP3020DA/DAE Mitsubishi CP9000DW, CP9500DW, and CP9600DW-S Mitsubishi CP9800DW, CP9800DW-S, CP9810DW, and CP9820DW-S + Nidec Copal DPB-4000, DPB-6000, DPB-7000 Olmec OP900 Shinko CHC-S6145-5A (aka Sinfonia CS2-c) Sony UP-CR20L (aka DNP DS-SL20) @@ -908,6 +911,12 @@ DNP DS-SL10 + Work-in-progress printers: + + Nidec Copal DPB-4000, DPB-6000, DPB-7000 + Fujifilm ASK-2000, ASK-2500, ASK-4000 + DNP Q8 + Valid commands: -s Query printer status diff --git a/backend_sonyupd.c b/backend_sonyupd.c index 6dc6e92..b045fb7 100644 --- a/backend_sonyupd.c +++ b/backend_sonyupd.c @@ -1,7 +1,7 @@ /* * Sony UP-D series Photo Printer CUPS backend -- libusb-1.0 version * - * (c) 2013-2021 Solomon Peachy + * (c) 2013-2023 Solomon Peachy * * The latest version of this program can be found at: * @@ -306,7 +306,8 @@ static void upd_cleanup_job(const void *vjob) free((void*)job); } -#define MAX_PRINTJOB_LEN (2048*2764*3 + 2048) +//#define MAX_PRINTJOB_LEN (2048*2764*3 + 2048) /* Sony */ +#define MAX_PRINTJOB_LEN (2444*3644*3 + 2048) /* DPB and ASK series */ static int upd_read_parse(void *vctx, const void **vjob, int data_fd, int copies) { struct upd_ctx *ctx = vctx; @@ -741,7 +742,7 @@ static const char *sonyupd_prefixes[] = { const struct dyesub_backend sonyupd_backend = { .name = "Sony UP-D", - .version = "0.46", + .version = "0.47", .uri_prefixes = sonyupd_prefixes, .cmdline_arg = upd_cmdline_arg, .cmdline_usage = upd_cmdline, @@ -758,6 +759,9 @@ const struct dyesub_backend sonyupd_backend = { { 0x054c, 0x02d4, P_SONY_UPCR10, NULL, "sony-upcx1"}, { 0x054c, 0x0049, P_SONY_UPD895, NULL, "sony-upd895"}, { 0x054c, 0x01e7, P_SONY_UPD897, NULL, "sony-upd897"}, + // DPB-6000/ASK-2000 + // DPB-7000/ASK-2500 + // DPB-4000/ASK-4000/DNP Q8 { 0, 0, 0, NULL, NULL} } }; @@ -791,7 +795,9 @@ const struct dyesub_backend sonyupd_backend = { All printer commands start with 0x1b, and are at least 7 bytes long. General Command format: - 1b XX ?? ?? ?? LL 00 # XX is cmd, LL is data or response length. + 1b XX ?? ?? ?? LL 00 # XX is cmd, LL is data/response length + + If least significant bit of XX is 1, it is a WRITE, and LL is number of bytes of the payload. If LSB is 0, it is a READ, and printer will return LL bytes. UNKNOWN QUERY [possibly media?] @@ -799,7 +805,7 @@ const struct dyesub_backend sonyupd_backend = { -> 70 00 00 00 00 00 00 0b 00 00 00 00 00 00 00 00 00 00 00 - UNKNOWN CMD (UP-DR & SL10 & UP-D895 & UP-DP10) [ possibly START ] + UNKNOWN CMD (UP-DR & SL10 & UP-D895 & UP-DP10 & DPB/ASK) [ possibly START? ] <- 1b 0a 00 00 00 00 00 @@ -847,7 +853,7 @@ const struct dyesub_backend sonyupd_backend = { IMAGE DIMENSIONS & OVERCOAT <- 1b e1 00 00 00 0b 00 - <- 00 ZZ QQ 00 00 00 00 XX XX YY YY # XX = cols, YY == rows, ZZ == 0x04 on UP-DP10, otherwise 0x80. QQ == 00 glossy, 08 texture (UP-DP10 + UP-DR150), 0c matte, +0x10 for "nocorrection" on UP-DR200.. + <- 00 ZZ QQ 00 00 00 00 XX XX YY YY # XX = cols, YY == rows, ZZ == 0x04 on UP-DP10/DPB-xxxx/ASK-xxxx, otherwise 0x80. QQ == 00 glossy, 08 texture (UP-DP10 + UP-DR150), 0c matte, +0x10 for "nocorrection" on UP-DR200.. UNKNOWN @@ -857,7 +863,7 @@ const struct dyesub_backend sonyupd_backend = { UNKNOWN (UP-D897) <- 1b e6 00 00 00 08 00 - <- 07 00 00 00 00 00 00 00 + -> 07 00 00 00 00 00 00 00 DATA TRANSFER @@ -885,13 +891,13 @@ const struct dyesub_backend sonyupd_backend = { UNKNOWN (Fujifilm ASK2000 series - <- 1b 23 00 00 00 04 00 ff ff ff ff - -> ?? ?? + <- 1b 23 00 00 00 04 00 + <- ff ff ff ff UNKNOWN (Fujifilm ASK2000/4000 series - <- 1b 1e 00 00 00 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 - -> ?? ?? + <- 1b 1e 00 00 00 0c 00 + 00 00 00 00 00 00 00 00 00 00 00 00 ************************************************************************