-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LBP-1120 not supported #20
Comments
I currently do not own any printer of LBP family so I'm unable to check anything. If you can tell what has to be changed, I'll assist you. Regards, |
Та же проблема.
Я что-то делаю не так или действительно LBP-1120 не поддерживается? |
До сих пор не можем? |
LBP-1120 is quite different from other printers of LBP family. It is an early model. While the driver has all of necessary components to support it, nobody wrote the corresponding glue code. |
Why you don't copy compress code from Nicolas Boichat's driver? |
It's about control code, not compress code. All LBP printers are controlled differently. Nicolas Boichat's driver does not have any control code at all. It just sends magic blobs to the printer with zero knowledge about their meaning. Now we know what most of their bytes mean. One has to implement the correct handshake. Supporting compression itself is pretty straightforward. |
How to reverse compression algorithm? |
I tried to use your work in the'anticapt' repository and i don't understand how to use ur captdefilter. You need to write help info |
The compression algorithm is already reversed. That's how it's described:
This seems to describe SCoA completely. |
I don't understand this document) |
I'll explain. It is known how the bitstream is decoded. Byte Bytes (In fact, one could implement "fake" compression by just using these two expressions. The printer will understand this but will work terribly slow.) Byte The document does not mention this, but I would extrapolate that The combination The byte 0x41 repeats the whole last line. |
What contains |
In the bit stream numbers are sometimes split between multiple bytes. Small numbers are encoded just as three bits. For example, to encode a byte repeat 1 to 7 times we write the byte This is pretty straightforward approach if you're worked with any bitstream-based (i.e. Huffman) encodings before. |
But why split the number into parts, isn't it easier to write an 8-bit number and initialize the repetition counter? And what goes in input: PostScript or raw text? |
Wow... I, maybe, can base SCoA compression on Hi-SCoA codebase... |
@agalakhov, можете вы описать алгоритм в SPECS как вы это сделали с Hi-SCoA, чтобы мне было проще писать. Все что вы выше описали - это понятно, но этой информации для меня недостаточно |
Splitting numbers into parts is done to spare bytes. If we only need small numbers, we only need one extra byte: it has enough place for 2-bit message code and two 3-bit numbers. If we need more than 3 bits for a number, first 3 bits are sent just like above and remaining 5 bits are sent in the second byte. There are some spare bits, they could have some meaning too or used just for redundancy. I wrote the Hi-SCoA code with SCoA in mind. The reason there is no SCoA in the code is, I can't test it. The reason I don't write the documentation in SPECS is, I didn't test it myself. If I understood something incorrectly, I don't want to document my guesses instead of proven facts. The simplest way to check if the printer works at all is, just send uncompressed data using the "send 7 bytes" command. Get it working for small messages, then improve the compression. The tricky part is NOT the compression. It's the command level. Especially for older SCoA printers you do NOT send the whole page at once. The printer does not have enough memory for it. You send smaller bands and poll for the printer status after each band. |
Fucking CAPT, and it's creator - Canon |
This is the worst printing protocol I've ever seen. And this is the only printer family that needs bidirectional communication during printing. All others, even low-cost WinPrinter inkjets, only need the page to be sent to them in some special format. Never buy Canon LBP if you have any alternatives. Surprisingly, Canon's inkjets use sane protocol. |
xorval? What it should contain for SCoA? |
Zero. |
I would simply compress band? |
Older printers require just compressed bands, one band at a time. No XOR is done. |
I've find in capt_command.h switch CAPT_SET_PARM_HISCOA. Should I set CAPT_SET_PARM_SCOA and what it should contain? |
|
Yes, The CAPT_SET_PARM_HISCOA command and others are described in SPECS. We don't know any more. If some field is described as "unknown", it is really unknown. |
I should make it to push "mmm" byte: |
Yes, something like that. |
@agalakhov please give me a hex desc of all SCoA commands |
I don't have it. |
What is longrepeat? it's very big repeating of last byte? |
It is repeat of given byte that does not fit into "short repeat". |
maybe u write realization on YOUR code and I test it? |
@agalakhov I need to push hiscoa_params on SCOA realization? |
@agalakhov pushed initial port SCOA compression. Check it) |
If any debug required, please let me know, I'll try help as much I can.
Dist: Ubuntu 19.04
The text was updated successfully, but these errors were encountered: