Advertisement
Zoinkity

Color Pocket Printer Commands

Jul 31st, 2020 (edited)
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. Unreleased Color Pocket Printer, as mentioned in DMPJ and DMBJ.
  2. Packet structure identical to Pocket Printer. Not worth reprinting here.
  3. Heartbeat value is 0x82, not 0x81.
  4. A dead print command (x = 0) must preceed actual printing instead of an empty packet instead of an empty data packet. Probably.
  5.  
  6. Printer Commands:
  7. 1 byte
  8. 01 Init clears RAM buffer; reply of 00
  9. 02 Settings
  10. FFFF RR GG BB
  11. F flags?
  12. 8000 ???; set as a default print value
  13. 0100 "fast mode"; set when output is half resolution (src 320x240 -> out 160x120), meaning you can print two lines per data transfer.
  14. 0008 ???; set as a default print value
  15. 0001 ???; set as a default print value
  16. 00?? there were two more values OR'd in, but both set to zero and no reference yet
  17. 00??
  18. R red level; default 0x80
  19. G green level; default 0x80
  20. B blue level; default 0x80
  21. 04 Data sends up to 320 15bit color pixels to printer per command, little-endian (0x280 bytes)
  22. Little-endian, so actual order is gggrrrrr 0bbbbbgg.
  23. 7C00 blue
  24. 03E0 green
  25. 001F red
  26. 06 Print
  27. cc ?? ?? ??
  28. c number of lines printed. probably prints two at a time in "fast mode"
  29. *other values were always set to zero
  30. 08 Cancel
  31. Apparently used to reset any activities, not just printing. Pocket Printer should also have this command.
  32. 0F Status a NOP used to recieve one byte status
  33. 00 is presumed "it's all right!"
  34. 80 low battery
  35. 40 currently printing
  36. 20 ???, maybe unused
  37. 10 ???, maybe unused
  38. 08 error detected
  39. 07 error code (0-7)
  40. 0 feed error? specifics unknown
  41. 1 feed error? specifics unknown
  42. 2 outside operating temperature limit; specifics unknown, though one's obvious overheat and one may be too cool
  43. 3 outside operating temperature limit; specifics unknown
  44. 4 out of paper
  45. 5 cover is open
  46. 6 paper jam
  47. 7 feed error? specifics unknown
  48. responds 00
  49.  
  50. Usage is pretty much the same a Pocket Printer. Responses are 82,xx instead of 81,xx.
  51. Settings (2) can be set at any time before print. Replace the empty data packet with a "print 0 lines" packet.
  52.  
  53. Typical use: (tentative)
  54. send cmd 1; response 82,00
  55. send cmd 2 with settings; response 82,00.
  56. For 320px lines (probably the default) the default is 8009808080
  57. send cmd 4 w/ 0x280 of graphics; response 82,??
  58. All formatting is done on your end, not the printer's!
  59. optional: send cmd F; response 82,00
  60. send cmd 6 w/ 0 lines; response 82,00 # this empty packet is required or the thing will not print!
  61. send cmd 6 w/ one or more lines; response 82,??
  62. send cmd F looped until response 82,00
  63. repeat cmds 4, 6, F until image complete
  64.  
  65. -Zoinkity
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement