Printer Emulation..(ie ESC P printer emulation)

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
scruss
Posts: 86
Joined: Sun Jul 01, 2018 3:12 pm
Location: Toronto
Contact:

Re: Printer Emulation..(ie ESC P printer emulation)

Post by scruss » Sun Dec 09, 2018 2:31 am

I have a couple of Epson ROM dumps, and have been all over the Amstrad printer ROMS that are out there. Yeah, the character dots are stored in a weird format, the same as the ESC/P user defined character command. It might be easier to start with the Effects Eighty source code and pick out the pin matrices from the python.

I've been working on a TTF font family (vector, not bitmap) based on DMP rom data. As for completion, don't hold your breath.

Coeus
Posts: 1159
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: Printer Emulation..(ie ESC P printer emulation)

Post by Coeus » Sun Dec 09, 2018 11:24 pm

I have just discovered I have a copy of the Epson FX Printer Operation Manual in my loft so I have fetched it down. In Appendix F the dot patters for the various characters are shown including variations for several languages.

scruss
Posts: 86
Joined: Sun Jul 01, 2018 3:12 pm
Location: Toronto
Contact:

Re: Printer Emulation..(ie ESC P printer emulation)

Post by scruss » Mon Dec 10, 2018 4:23 am

Yeah, they're all in the FX Printer manual, volume 2. That's where the Effects Eighty author got them from

ThomasHarte
Posts: 468
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Printer Emulation..(ie ESC P printer emulation)

Post by ThomasHarte » Wed Jan 09, 2019 9:53 pm

If you promise not to look at any of the rest of the code, or at least not to judge me on it, you can also grab the FX-80 font directly from the ElectrEm code, where I recall retyping it by hand.

Format is a 256-entry array of arrays, each letter being 11*9 ints:

Code: Select all

		{											// 77 M
			W, 0, 0, 0, 0, 0, 0, 0, W, 0, 0,
			W, 0, W, 0, 0, 0, W, 0, W, 0, 0,
			W, 0, 0, W, 0, W, 0, 0, W, 0, 0,
			W, 0, 0, 0, W, 0, 0, 0, W, 0, 0,
			W, 0, 0, 0, 0, 0, 0, 0, W, 0, 0,
			W, 0, 0, 0, 0, 0, 0, 0, W, 0, 0,
			W, 0, 0, 0, 0, 0, 0, 0, W, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
			0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
The 11 coming directly from the fact that the manual lays things out on a grid with six squares, but dots are permitted to be either in the centre of a square or on its boundary. So there are 11 potential strike positions per character per row.

With a helpful comment at the top:

Code: Select all

#define W	1
// W doesn't mean anything, it just contrasts nicely with the 0s in this editor
... and a separate array of character widths, for proportional mode.

So you should be able to copy and paste all of that into a tool that compiles and outputs in your preferred format pretty quickly.
Last edited by ThomasHarte on Wed Jan 09, 2019 9:56 pm, edited 1 time in total.

Post Reply