Klasse MPS803
java.lang.Object
libsidplay.components.iec.SerialIECDevice
libsidplay.components.printer.mps803.MPS803
- Alle implementierten Schnittstellen:
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
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate static final byteBit image printing.protected intBit counter of the bit image printing.private static final byteBusiness mode (lower/upper-case characters).private static final byteCarriage return character.protected static final intCharacter height in dots.protected static final intCharacter width in dots.protected static final intMaximum column with.protected byteDot Address Determination.private static final byteDot Address Determination (Advance to a start position).private static final byteEnhance mode off.private static final byteEnhance mode on (Print characters in double width).private static final byteInitiate escape sequence.protected intDot Address Determination (expected number of the following digits).private static final byteGraphic mode (upper-case/graphic characters).private static final byteLine feed character.protected boolean[][]Buffered line data to print (480 dots horizontal * 7 dots vertical).protected intCurrent line buffer horizontal pixel position.static final intMaximum number of dots horizontally (6 pixels * 80 characters).private final byte[]protected IPaperPaper to print to.private static final byteRepeat Bit Image Printing (print repeated bit image data).protected intRepeat Bit Image Printing.private static final byteTurn off reverse mode.private static final byteTurn on reverse mode (print black pixels white and vice-versa).protected intSecondary address.protected intCurrent printer state (bit-mask of the fields above).protected static final intBIT_IMAGE_PRINTING state.protected static final intENHANCE_ON state.protected static final intESCAPE stateprotected static final intGRAPHIC_MODE state (BUSINESS_MODE, if not set).protected static final intREPEAT_BIT_IMAGE state.protected static final intREVERSE_ON state.private byteprotected booleanStrobe signal.protected byteUserport value.Von Klasse geerbte Felder libsidplay.components.iec.SerialIECDevice
byt, enabled, flags, IECBUS_DEVICE_READ_ATN, IECBUS_DEVICE_READ_CLK, IECBUS_DEVICE_READ_DATA, IECBUS_DEVICE_WRITE_CLK, IECBUS_DEVICE_WRITE_DATA, P_ATN, P_BIT0, P_BIT0w, P_BIT1, P_BIT1w, P_BIT2, P_BIT2w, P_BIT3, P_BIT3w, P_BIT4, P_BIT4w, P_BIT5, P_BIT5w, P_BIT6, P_BIT6w, P_BIT7, P_BIT7w, P_DONE0, P_DONE1, P_EOI, P_EOIw, P_FRAMEERR0, P_FRAMEERR1, P_LISTENING, P_PRE0, P_PRE1, P_PRE2, P_READY, P_TALKING, primary, prnr, secondaryPrev, st, timeout -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprivate voidTurn off bit image printing (print image bits beforehand).voidclose(int device, byte secondary) private booleangetCharsetBit(int chr, int bit, int row) Get a bit of the char-set ROM.byteprivate booleanisState(int s) Check printer state, if the state is enabled.voidlistenTalk(int device, byte secondary) voidopen(int device, byte secondary) private voidprintBitmask(byte c) Bit image printing.private voidprintCBMChar(byte rawchar) Print a character code according to the current mode.final voidprinterUserportWriteData(byte b) voidprinterUserportWriteStrobe(boolean s) voidputc(byte c) This method implements the state machine.byteread(int device, byte secondary) voidreset()Reset printer.abstract voidsetBusy(boolean flag) Signal busy printer.voidSet printer paper output.private voidsetState(int s) Enable printer state.voidturnPrinterOnOff(boolean on) Turn on/off printer.voidunlisten(int device, byte secondary) private voidunsetState(int s) Disable printer state.voiduntalk(int device, byte secondary) voidwrite(int device, byte secondary, byte data) private voidPrint buffered line to output device.Von Klasse geerbte Methoden libsidplay.components.iec.SerialIECDevice
clk, clock, getID, setClock, setDeviceEnable
-
Felddetails
-
MPS803_CHARSET_BIN
private final byte[] MPS803_CHARSET_BIN -
COLUMN_WIDTH
protected static final int COLUMN_WIDTHMaximum column with.- Siehe auch:
-
CHAR_WIDTH
protected static final int CHAR_WIDTHCharacter width in dots.- Siehe auch:
-
CHAR_HEIGHT
protected static final int CHAR_HEIGHTCharacter height in dots.- Siehe auch:
-
MAX_WIDTH
public static final int MAX_WIDTHMaximum number of dots horizontally (6 pixels * 80 characters).- Siehe auch:
-
BIT_IMAGE_PRINTING
private static final byte BIT_IMAGE_PRINTINGBit image printing.- Siehe auch:
-
LINE_FEED
private static final byte LINE_FEEDLine feed character.- Siehe auch:
-
CARRIAGE_RETURN
private static final byte CARRIAGE_RETURNCarriage return character.- Siehe auch:
-
ENHANCE_ON
private static final byte ENHANCE_ONEnhance mode on (Print characters in double width).- Siehe auch:
-
ENHANCE_OFF
private static final byte ENHANCE_OFFEnhance mode off.- Siehe auch:
-
DOT_ADDRESS_TERMINATION
private static final byte DOT_ADDRESS_TERMINATIONDot Address Determination (Advance to a start position).- Siehe auch:
-
BUSINESS_MODE
private static final byte BUSINESS_MODEBusiness mode (lower/upper-case characters).- Siehe auch:
-
GRAPHIC_MODE
private static final byte GRAPHIC_MODEGraphic mode (upper-case/graphic characters).- Siehe auch:
-
REVERSE_ON
private static final byte REVERSE_ONTurn on reverse mode (print black pixels white and vice-versa).- Siehe auch:
-
REVERSE_OFF
private static final byte REVERSE_OFFTurn off reverse mode.- Siehe auch:
-
REPEAT_BIT_IMAGE
private static final byte REPEAT_BIT_IMAGERepeat Bit Image Printing (print repeated bit image data).- Siehe auch:
-
ESCAPE
private static final byte ESCAPEInitiate escape sequence.- Siehe auch:
-
STATE_REVERSE
protected static final int STATE_REVERSEREVERSE_ON state.- Siehe auch:
-
STATE_GRAPHIC
protected static final int STATE_GRAPHICGRAPHIC_MODE state (BUSINESS_MODE, if not set).- Siehe auch:
-
STATE_BIT_IMAGE_PRINTING
protected static final int STATE_BIT_IMAGE_PRINTINGBIT_IMAGE_PRINTING state.- Siehe auch:
-
STATE_ENHANCE
protected static final int STATE_ENHANCEENHANCE_ON state.- Siehe auch:
-
STATE_REPEAT_BIT_IMAGE
protected static final int STATE_REPEAT_BIT_IMAGEREPEAT_BIT_IMAGE state.- Siehe auch:
-
STATE_ESCAPE
protected static final int STATE_ESCAPEESCAPE state- Siehe auch:
-
state
protected int stateCurrent printer state (bit-mask of the fields above). -
lineBuffer
protected boolean[][] lineBufferBuffered line data to print (480 dots horizontal * 7 dots vertical). -
lineBufferPos
protected int lineBufferPosCurrent line buffer horizontal pixel position. -
expectedDigits
protected int expectedDigitsDot Address Determination (expected number of the following digits). -
digitHighByte
protected byte digitHighByteDot Address Determination. Buffered high byte. -
repeatN
protected int repeatNRepeat Bit Image Printing. Number of repetitions to print (1..256). -
bitCnt
protected int bitCntBit counter of the bit image printing. -
secondary
protected int secondarySecondary address. -
value
protected byte valueUserport value. -
strobe
protected boolean strobeStrobe signal. -
paper
Paper to print to. -
status
private byte status
-
-
Konstruktordetails
-
MPS803
Create a printer.- Parameter:
p- primary device numbers- secondary device number
-
-
Methodendetails
-
reset
public void reset()Reset printer.- Setzt außer Kraft:
resetin KlasseSerialIECDevice
-
printerUserportWriteStrobe
public void printerUserportWriteStrobe(boolean s) - Angegeben von:
printerUserportWriteStrobein SchnittstelleUserportPrinterEnvironment
-
printerUserportWriteData
public final void printerUserportWriteData(byte b) - Angegeben von:
printerUserportWriteDatain SchnittstelleUserportPrinterEnvironment
-
turnPrinterOnOff
public void turnPrinterOnOff(boolean on) Turn on/off printer. The paper is opened or closed.- Parameter:
on- true (on), false (off)
-
setPaper
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 codebit- bit to checkrow- 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:
openin KlasseSerialIECDevice
-
close
public void close(int device, byte secondary) - Angegeben von:
closein KlasseSerialIECDevice
-
listenTalk
public void listenTalk(int device, byte secondary) - Angegeben von:
listenTalkin KlasseSerialIECDevice
-
unlisten
public void unlisten(int device, byte secondary) - Angegeben von:
unlistenin KlasseSerialIECDevice
-
untalk
public void untalk(int device, byte secondary) - Angegeben von:
untalkin KlasseSerialIECDevice
-
read
public byte read(int device, byte secondary) - Angegeben von:
readin KlasseSerialIECDevice
-
write
public void write(int device, byte secondary, byte data) - Angegeben von:
writein KlasseSerialIECDevice
-
getStatus
public byte getStatus()- Angegeben von:
getStatusin KlasseSerialIECDevice
-