Compare commits

...

2 commits

Author SHA1 Message Date
Solomon Peachy 61c8726678 mitsud90: Fixes for the D90-SL variant
Got a sniff of it printing.  Apparently the only change looks to be a
single byte in the plane/data header.
2024-12-16 19:59:46 -05:00
Solomon Peachy fb0fae779b libmitsu: Recognize SilverLab-branded media 2024-12-16 19:58:34 -05:00
3 changed files with 28 additions and 28 deletions

View file

@ -313,6 +313,9 @@ const char *mitsu_media_types(int printer, uint8_t brand, uint8_t type)
return "CK-D769 (6x9)";
else if (type == 0x0f)
return "CK-D768 (6x8)";
} else if (brand == 0xe0) { /* SilverLab */
if (type == 0x0f)
return "CK-D868 SL (6x8)";
} else if (brand == 0x61) { /* Mitsubishi (K60 series & W5000 series) */
if (type == 0x84)
return "CK-K57R (5x7)";
@ -351,19 +354,20 @@ const char *mitsu_media_types(int printer, uint8_t brand, uint8_t type)
return "DNP 6x8";
else if (type == 0x90)
return "DNP 4x8";
} else { /* Default fallback */
if ((type & 0xf) == 0x01)
return "Unknown (3.5x5)";
else if ((type & 0xf) == 0x02)
return "Unknown (4x6)";
else if ((type & 0xf) == 0x04)
return "Unknown (5x7)";
else if ((type & 0xf) == 0x05)
return "Unknown (6x9)";
else if ((type & 0xf) == 0x0f)
return "Unknown (6x8)";
}
/* Default fallback */
if ((type & 0xf) == 0x01)
return "Unknown (3.5x5)";
else if ((type & 0xf) == 0x02)
return "Unknown (4x6)";
else if ((type & 0xf) == 0x04)
return "Unknown (5x7)";
else if ((type & 0xf) == 0x05)
return "Unknown (6x9)";
else if ((type & 0xf) == 0x0f)
return "Unknown (6x8)";
return "Unknown";
// Also CK-D746-U for D70-U model

View file

@ -96,7 +96,7 @@ typedef int (*CPD30_DoConvertFN)(const struct mitsu_cpd30_data *table,
#define REQUIRED_LIB_APIVERSION 10
#define LIBMITSU_VER "0.12"
#define LIBMITSU_VER "0.13"
/* Image processing library function prototypes */
#define LIB_NAME_RE "libMitsuD70ImageReProcess" DLL_SUFFIX

View file

@ -643,7 +643,6 @@ struct mitsud90_ctx {
char fwver_main[7]; /* 6+null */
char fwver_mech[7]; /* 6+null */
uint8_t hdr_model_code;
/* Used in parsing.. */
struct mitsud90_job_footer holdover;
int holdover_on;
@ -922,7 +921,6 @@ static int mitsud90_attach(void *vctx, struct dyesub_connection *conn, uint8_t j
UNUSED(jobid);
ctx->conn = conn;
ctx->hdr_model_code = 0x33;
if (test_mode < TEST_MODE_NOATTACH) {
if (mitsud90_query_media(ctx, &ctx->media))
@ -936,10 +934,6 @@ static int mitsud90_attach(void *vctx, struct dyesub_connection *conn, uint8_t j
}
if (mitsud90_query_fwver(ctx))
return CUPS_BACKEND_FAILED;
if (ctx->conn->type == P_MITSU_D90 &&
ctx->conn->usb_pid == 0x3b62) {
ctx->hdr_model_code = 0x03;
}
} else {
ctx->media.media.brand = 0xff;
ctx->media.media.type = 0x0f;
@ -1179,11 +1173,6 @@ static int mitsud90_read_parse(void *vctx, const void **vjob, int data_fd, int c
return CUPS_BACKEND_CANCEL;
}
/* Override model code as needed */
if (ctx->conn->type == P_MITSU_D90 &&
job->hdr.hdr[5] != ctx->hdr_model_code)
job->hdr.hdr[5] = ctx->hdr_model_code;
/* Initial parsing */
if (ctx->conn->type == P_MITSU_M1 ||
ctx->conn->type == P_FUJI_ASK500) {
@ -1688,6 +1677,12 @@ top:
(uint8_t*) &job->hdr, sizeof(job->hdr))))
return CUPS_BACKEND_FAILED;
/* Override code in plane command if needed */
if (ctx->conn->type == P_MITSU_D90 &&
ctx->conn->usb_pid == 0x3b62) {
job->databuf[3] = 0x0f;
}
/* Send Plane header */
if ((ret = send_data(ctx->conn,
job->databuf + sent, sizeof(job->hdr))))
@ -2667,7 +2662,7 @@ static const struct device_id mitsud90_devices[] = {
/* Exported */
const struct dyesub_backend mitsud90_backend = {
.name = "Mitsubishi CP-D90/CP-M1/CP-W5000",
.version = "0.55" " (lib " LIBMITSU_VER ")",
.version = "0.56" " (lib " LIBMITSU_VER ")",
.flags = BACKEND_FLAG_DUMMYPRINT,
.uri_prefixes = mitsud90_prefixes,
.devices = mitsud90_devices,
@ -2709,7 +2704,7 @@ const struct dyesub_backend mitsud90_backend = {
[[ PAGE HEADER ]]
1b 53 50 30 00 GG XX XX YY YY TT 00 00 01 MM NN XX XX == COLS, YY XX ROWS (BE)
1b 53 50 30 00 33 XX XX YY YY TT 00 00 01 MM NN XX XX == COLS, YY XX ROWS (BE)
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 NN == num of cuts, ?? see below
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 MM == 0 for no margin cut, 1 for margin cut
QQ RR SS HH VV 00 00 00 00 00 ZZ 00 JJ II 09 7c QQ == 02 matte (D90) or 03 (M1), 00 glossy,
@ -2721,7 +2716,7 @@ const struct dyesub_backend mitsud90_backend = {
Z0 is 0x01 (M1 windows) (00 Linux and d90 UNK!)
Z1 is RGB Rate (M1)
Z2 is OP Rate (M1)
GG is 0x03 (D90SL) or 0x33 (rest)
[pad to 512b]
normal == rows 00 00 00 00 00 00 00 00 00
@ -2734,7 +2729,7 @@ const struct dyesub_backend mitsud90_backend = {
9x6div3 == 2724 02 03 90 01 00 07 14 00 00 00 00 00 00
9x6div4 == 2628 03 02 97 01 00 05 22 00 00 07 ad 00 00
PANORAMA [ZZ 00 03 03] onwards, only shows in 8x20" PANORAMA prints. Assume 2" overlap.
PANORAMA [ZZ 00 JJ II] onwards, only shows in 8x20" PANORAMA prints. Assume 2" overlap.
ZZ == 00 (normal) or 01 (panorama)
JJ == 02 03 (num of panorama panels)
II == 01 02 03 (which panel # in panorama!)
@ -2749,7 +2744,7 @@ const struct dyesub_backend mitsud90_backend = {
[[ DATA PLANE HEADER ]]
1b 5a 54 01 00 09 00 00 00 00 CC CC RR RR 00 00
1b 5a 54 XX 00 09 00 00 00 00 CC CC RR RR 00 00
00 00 00 00 LC LC LR LR
...
[pad to 512b]
@ -2758,6 +2753,7 @@ const struct dyesub_backend mitsud90_backend = {
RR RR rows (BE)
LC LC lamination columns (BE, M1 only, same as cols)
LR LR lamination rows (BE, M1 only, rows + 12d )
XX is 0x0f for D90SL, 0x01 for everything else
D90 family:
data is *RGB* packed, @ 8bpp. No padding to 512b!