Klasse MPS803

java.lang.Object
libsidplay.components.iec.SerialIECDevice
libsidplay.components.printer.mps803.MPS803
Alle implementierten Schnittstellen:
UserportPrinterEnvironment

public abstract class MPS803 extends SerialIECDevice implements UserportPrinterEnvironment
Note: Normally this printer is connected as a serial device, this emulation uses a connection via user port as well
General Specifications
A. Print method Impact Dot Matrix
B. Printing direction Bi-directional
C. Character matrix 7x6 dot matrix
D. Characters Upper/lower case characters, numerals, symbols, and PET graphic characters
E. Bit Image type 7 Vertical Dots Bit Image Printing
F. Character codes CBM ASCII CODE (8 Bit}
G. Character composition Vertical: 7 dots [0.09", 2.4mm), Horizontal: 6 dots [0.08", 2.2mm)
H. Dot size 0.3mm (wire diameter), Horizontal pitch 1/60", Vertical pitch 1/72"
I. Print speed 60 characters per second
J. Column width 80 characters
K. Column spacing 10 characters/inch
L. Line spacing 6 lines/inch (USA) or 8 lines/inch (Europe}. 72/7 lines/inch in bit image printing
M. Line feed speed 4 lines/sec .... in character printing, 5.6 lines/sec ... in bit image printing
N. Paper feed method Friction feed, Tractor feed optional
0. Paper width Cut sheet, A4 210.8mm (8.3"'}, Letter size 2l6mm (8.5"), Continuous, 101.6mm (4.0") to 254mm (10jr), With optional tractor feed
P. Number of copies Original + 2 copies
Q. Inked ribbon Cassette type fabric ribbon [black], 8mm x 10 meters
R. Ribbon life 1.2 x 10 characters
Autor:
Ken Händel
  • Felddetails

    • MPS803_CHARSET_BIN

      private final byte[] MPS803_CHARSET_BIN
    • COLUMN_WIDTH

      protected static final int COLUMN_WIDTH
      Maximum column with.
      Siehe auch:
    • CHAR_WIDTH

      protected static final int CHAR_WIDTH
      Character width in dots.
      Siehe auch:
    • CHAR_HEIGHT

      protected static final int CHAR_HEIGHT
      Character height in dots.
      Siehe auch:
    • MAX_WIDTH

      public static final int MAX_WIDTH
      Maximum number of dots horizontally (6 pixels * 80 characters).
      Siehe auch:
    • BIT_IMAGE_PRINTING

      private static final byte BIT_IMAGE_PRINTING
      Bit image printing.
      Siehe auch:
    • LINE_FEED

      private static final byte LINE_FEED
      Line feed character.
      Siehe auch:
    • CARRIAGE_RETURN

      private static final byte CARRIAGE_RETURN
      Carriage return character.
      Siehe auch:
    • ENHANCE_ON

      private static final byte ENHANCE_ON
      Enhance mode on (Print characters in double width).
      Siehe auch:
    • ENHANCE_OFF

      private static final byte ENHANCE_OFF
      Enhance mode off.
      Siehe auch:
    • DOT_ADDRESS_TERMINATION

      private static final byte DOT_ADDRESS_TERMINATION
      Dot Address Determination (Advance to a start position).
      Siehe auch:
    • BUSINESS_MODE

      private static final byte BUSINESS_MODE
      Business mode (lower/upper-case characters).
      Siehe auch:
    • GRAPHIC_MODE

      private static final byte GRAPHIC_MODE
      Graphic mode (upper-case/graphic characters).
      Siehe auch:
    • REVERSE_ON

      private static final byte REVERSE_ON
      Turn on reverse mode (print black pixels white and vice-versa).
      Siehe auch:
    • REVERSE_OFF

      private static final byte REVERSE_OFF
      Turn off reverse mode.
      Siehe auch:
    • REPEAT_BIT_IMAGE

      private static final byte REPEAT_BIT_IMAGE
      Repeat Bit Image Printing (print repeated bit image data).
      Siehe auch:
    • ESCAPE

      private static final byte ESCAPE
      Initiate escape sequence.
      Siehe auch:
    • STATE_REVERSE

      protected static final int STATE_REVERSE
      REVERSE_ON state.
      Siehe auch:
    • STATE_GRAPHIC

      protected static final int STATE_GRAPHIC
      GRAPHIC_MODE state (BUSINESS_MODE, if not set).
      Siehe auch:
    • STATE_BIT_IMAGE_PRINTING

      protected static final int STATE_BIT_IMAGE_PRINTING
      BIT_IMAGE_PRINTING state.
      Siehe auch:
    • STATE_ENHANCE

      protected static final int STATE_ENHANCE
      ENHANCE_ON state.
      Siehe auch:
    • STATE_REPEAT_BIT_IMAGE

      protected static final int STATE_REPEAT_BIT_IMAGE
      REPEAT_BIT_IMAGE state.
      Siehe auch:
    • STATE_ESCAPE

      protected static final int STATE_ESCAPE
      ESCAPE state
      Siehe auch:
    • state

      protected int state
      Current printer state (bit-mask of the fields above).
    • lineBuffer

      protected boolean[][] lineBuffer
      Buffered line data to print (480 dots horizontal * 7 dots vertical).
    • lineBufferPos

      protected int lineBufferPos
      Current line buffer horizontal pixel position.
    • expectedDigits

      protected int expectedDigits
      Dot Address Determination (expected number of the following digits).
    • digitHighByte

      protected byte digitHighByte
      Dot Address Determination. Buffered high byte.
    • repeatN

      protected int repeatN
      Repeat Bit Image Printing. Number of repetitions to print (1..256).
    • bitCnt

      protected int bitCnt
      Bit counter of the bit image printing.
    • secondary

      protected int secondary
      Secondary address.
    • value

      protected byte value
      Userport value.
    • strobe

      protected boolean strobe
      Strobe signal.
    • paper

      protected IPaper paper
      Paper to print to.
    • status

      private byte status
  • Konstruktordetails

    • MPS803

      public MPS803(IECBus bus, int p, int s, byte[] mps803CharsetBin)
      Create a printer.
      Parameter:
      p - primary device number
      s - secondary device number
  • Methodendetails

    • reset

      public void reset()
      Reset printer.
      Setzt außer Kraft:
      reset in Klasse SerialIECDevice
    • printerUserportWriteStrobe

      public void printerUserportWriteStrobe(boolean s)
      Angegeben von:
      printerUserportWriteStrobe in Schnittstelle UserportPrinterEnvironment
    • printerUserportWriteData

      public final void printerUserportWriteData(byte b)
      Angegeben von:
      printerUserportWriteData in Schnittstelle UserportPrinterEnvironment
    • turnPrinterOnOff

      public void turnPrinterOnOff(boolean on)
      Turn on/off printer. The paper is opened or closed.
      Parameter:
      on - true (on), false (off)
    • setPaper

      public void setPaper(IPaper p)
      Set printer paper output.
      Parameter:
      p - paper to be used
    • putc

      public void putc(byte c)
      This method implements the state machine. Various modes can be turned on/off by sending specific commands to the printer. Additionally characters (normal or graphical) can be printed here.
      Parameter:
      c - byte code to print or printer command
    • printCBMChar

      private void printCBMChar(byte rawchar)
      Print a character code according to the current mode.
      Parameter:
      rawchar - character code to print
    • getCharsetBit

      private boolean getCharsetBit(int chr, int bit, int row)
      Get a bit of the char-set ROM.
      Parameter:
      chr - character code
      bit - bit to check
      row - row number of the character code
      Gibt zurück:
      bit is set?
    • writeLine

      private void writeLine()
      Print buffered line to output device.
    • printBitmask

      private void printBitmask(byte c)
      Bit image printing.
      Parameter:
      c - The bitmask to print.
    • bitmodeOff

      private void bitmodeOff()
      Turn off bit image printing (print image bits beforehand).
    • isState

      private boolean isState(int s)
      Check printer state, if the state is enabled.
      Parameter:
      s - state to check
      Gibt zurück:
      state is currently enabled?
    • setState

      private void setState(int s)
      Enable printer state.
      Parameter:
      s - state to enable
    • unsetState

      private void unsetState(int s)
      Disable printer state.
      Parameter:
      s - state to disable
    • setBusy

      public abstract void setBusy(boolean flag)
      Signal busy printer.
      Parameter:
      flag - busy flag
    • open

      public void open(int device, byte secondary)
      Angegeben von:
      open in Klasse SerialIECDevice
    • close

      public void close(int device, byte secondary)
      Angegeben von:
      close in Klasse SerialIECDevice
    • listenTalk

      public void listenTalk(int device, byte secondary)
      Angegeben von:
      listenTalk in Klasse SerialIECDevice
    • unlisten

      public void unlisten(int device, byte secondary)
      Angegeben von:
      unlisten in Klasse SerialIECDevice
    • untalk

      public void untalk(int device, byte secondary)
      Angegeben von:
      untalk in Klasse SerialIECDevice
    • read

      public byte read(int device, byte secondary)
      Angegeben von:
      read in Klasse SerialIECDevice
    • write

      public void write(int device, byte secondary, byte data)
      Angegeben von:
      write in Klasse SerialIECDevice
    • getStatus

      public byte getStatus()
      Angegeben von:
      getStatus in Klasse SerialIECDevice