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.
This commit is contained in:
Solomon Peachy 2024-12-16 19:59:46 -05:00
parent fb0fae779b
commit 61c8726678

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!