mistu9820: Initial support for the CP9820DW-AG model.

_Probably_ won't print yet.
This commit is contained in:
Solomon Peachy 2023-10-02 09:31:35 -04:00
parent 4ce6f60f51
commit aada0892b0
5 changed files with 33 additions and 9 deletions

6
README
View file

@ -107,7 +107,7 @@
Magicard Rio 2E (and other Magicard models)
Mitsubishi CP3020D/DE and CP3020DA/DAE
Mitsubishi CP9000DW, CP9500DW, and CP9600DW-S
Mitsubishi CP9800DW, CP9800DW-S, CP9810DW, and CP9820DW-S
Mitsubishi CP9800DW, CP9800DW-S, CP9810DW, CP9820DW-S, and CP9820DW-AG
Nidec Copal DPB-4000, DPB-6000, DPB-7000
Olmec OP900
Shinko CHC-S6145-5A (aka Sinfonia CS2-c)
@ -897,6 +897,7 @@
Additional model IDs recognized:
sony-updr150 sony-updr200 sony-upcr10l
sony-upd895 sony-upd897 dnp-sl10
fujifilm-ask-2500 ndc-dpb-7000
Model IDs for backwards compatibility with older releases:
@ -1092,7 +1093,7 @@
mitsubishi-9000dw mitsubishi-9500dw mitsubishi-9550dw mitsubishi-9550dw-s
mitsubishi-9600dw mitsubishi-9800dw mitsubishi-9800dw-s mitsubishi-9810dw
mitsubishi-9550d mitsubishi-9550dz mitsubishi-9800d mitsubishi-9800dz
mitsubishi-9810d
mitsubishi-9810d mitsubishi-9820dw-ag
Model IDs for backwards compatibility with older releases:
@ -1118,6 +1119,7 @@
Mitsubishi CP9550DW-A
Mitsubishi CP9550DW-U
Mitsubishi CP9600DW-S/DZ/DZ-S
Mitsubishi CP9820DW-AG
Valid commands:

View file

@ -146,6 +146,7 @@ enum {
P_MITSU_9800,
P_MITSU_9800S,
P_MITSU_9810,
P_MITSU_9820S,
P_MITSU_D70X,
P_MITSU_D80,
P_MITSU_D90,

View file

@ -3533,15 +3533,18 @@ const struct dyesub_backend hiti_backend = {
* Rework to take advantage of auto-vectorization?
* Pre-compute then cache entire map on disk?
* Use external "Cube LUT" implementation?
- Commands 8008, 8011, EST_SEHT, ESD_SHPTC, PCC_STP, CMD_EDM_*
- Commands UNK_8008, UNK_8010, UNK_8011, EST_SEHT, ESD_SHPTC, CMD_EDM_*
- Test with P720, P750
- Start research into P530D, X610
- Incorporate changes for CS-series card printers
- More "Matrix table" decoding work
- More work on other "sheet type" models
- P110S ("P4x6" 1248x1836)
- P310/P320 series ("P4x6" 1280*1818)
- Others?
- More work on remaining "roll type" models
- P530D
- X610
- Others?
- More work on P461 Prinhome
- Quality mode
- Windows supports media types 2 & 3 too, manually specified

View file

@ -354,11 +354,13 @@ static int mitsu9550_attach(void *vctx, struct dyesub_connection *conn, uint8_t
ctx->conn = conn;
if (ctx->conn->type == P_MITSU_9550S ||
ctx->conn->type == P_MITSU_9800S)
ctx->conn->type == P_MITSU_9800S ||
ctx->conn->type == P_MITSU_9820S)
ctx->is_s = 1;
if (ctx->conn->type == P_MITSU_9800 ||
ctx->conn->type == P_MITSU_9800S ||
ctx->conn->type == P_MITSU_9820S ||
ctx->conn->type == P_MITSU_9810) {
ctx->is_98xx = 1;
ctx->need_lib = 1;
@ -576,7 +578,8 @@ hdr_done:
/* 9550S/9800S doesn't typically sent over hdr4! */
if (ctx->conn->type == P_MITSU_9550S ||
ctx->conn->type == P_MITSU_9800S) {
ctx->conn->type == P_MITSU_9800S ||
ctx->conn->type == P_MITSU_9820S) {
/* XXX Has to do with error policy, but not sure what.
Mitsu9550-S/9800-S will set this based on a command,
but it's not part of the standard job spool */
@ -585,7 +588,8 @@ hdr_done:
/* Disable matte if the printer doesn't support it */
if (job->hdr1.matte) {
if (ctx->conn->type != P_MITSU_9810) {
if (ctx->conn->type != P_MITSU_9810 &&
ctx->conn->type != P_MITSU_9820S) {
WARNING("Matte not supported on this printer, disabling\n");
job->hdr1.matte = 0;
} else if (job->is_raw) {
@ -960,6 +964,7 @@ static int validate_media(int type, int media, int cols, int rows)
}
break;
case P_MITSU_9800S:
case P_MITSU_9820S:
switch(media & 0xf) {
case 0x02: /* 4x6 */
case 0x03: /* 4x6 postcard */
@ -1168,7 +1173,8 @@ top:
// XXX no idea how to interpret this.
}
if (ctx->conn->type == P_MITSU_9800S) {
if (ctx->conn->type == P_MITSU_9800S ||
ctx->conn->type == P_MITSU_9820S) {
int num;
/* Send "unknown query 2" command */
@ -1278,6 +1284,15 @@ top:
if ((ret = send_data(ctx->conn,
(uint8_t*) &cmd, sizeof(cmd))))
return CUPS_BACKEND_FAILED;
} else if (ctx->conn->type == P_MITSU_9820S) {
/* Override spool, which may be wrong */
cmd.cmd[0] = 0x1b;
cmd.cmd[1] = 0x50;
cmd.cmd[2] = 0x4e; // XXX THIS IS PROBABLY WRONG!
cmd.cmd[3] = 0x00;
if ((ret = send_data(ctx->conn,
(uint8_t*) &cmd, sizeof(cmd))))
return CUPS_BACKEND_FAILED;
} else {
/* Send from spool file */
if ((ret = send_data(ctx->conn,
@ -1639,9 +1654,9 @@ const struct dyesub_backend mitsu9550_backend = {
{ 0x06d3, 0x03ad, P_MITSU_9800, NULL, "mitsubishi-9800d"}, /* Duplicate */
{ 0x06d3, 0x03ae, P_MITSU_9800S, NULL, "mitsubishi-9800dw-s"},
{ 0x06d3, 0x03ae, P_MITSU_9800S, NULL, "mitsubishi-9800dz"}, /* Duplicate */
{ 0x06d3, 0x3b20, P_MITSU_9820S, NULL, "mitsubishi-9820dw-ag"},
{ 0x06d3, 0x3b21, P_MITSU_9810, NULL, "mitsubishi-9810dw"},
{ 0x06d3, 0x3b21, P_MITSU_9810, NULL, "mitsubishi-9810d"}, /* Duplicate */
// { 0x06d3, USB_PID_MITSU_9820DS, P_MITSU_9820S, NULL, "mitsubishi-9820dw-s"},
{ 0, 0, 0, NULL, NULL}
}
};

View file

@ -237,6 +237,9 @@
# Mitsubishi CP-9800DW-S
0x06d3 0x03ae blacklist
# Mitsubishi CP-9820DW-AG
0x06d3 0x3b20 blacklist
# Mitsubishi CP-9810D/DW
0x06d3 0x3b21 blacklist