Printer Emulation..(ie ESC P printer emulation)

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
scruss
Posts: 152
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: 1396
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: 152
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: 475
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.

rwap
Posts: 18
Joined: Thu Apr 19, 2018 6:51 pm
Contact:

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

Post by rwap » Fri Feb 01, 2019 6:23 am

The Retro-Printer is now available for purchase - www.retroprinter.com

There are a few issues with the BBC, so I will start a separate thread for that.

In the meantime, out of interest, I thought I would run the captured test file from above through the ESC/P2 convertor.
BCPL-Capture - Page1.jpg
BCPL-Capture - Page2.jpg
I have made some recent changes to the PrinterToPDF also (as we spotted an issue with 9 pin printers (which use different line spacing calculations for ESC 3 and ESC A) - this convertor is the same one as used on the Retro-Printer itself but you need to be careful as to what configuration options you set - https://www.github.com/RWAP/PrinterToPDF

However, I can see that the above conversion has an issue with the page size. I therefore added an option to turn off the default paper margins (which are according to the ESC/P2 manual 8.5mm at the top and 13.5mm at the bottom)

I then got
BCPL-Capture - Page1 - no margins.jpg

User avatar
richardtoohey
Posts: 3717
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

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

Post by richardtoohey » Sat Feb 02, 2019 1:11 am

rwap wrote:
Fri Feb 01, 2019 6:23 am
The Retro-Printer is now available for purchase - www.retroprinter.com
=D> That looks interesting! :D

On the web page you've linked to, the last three sections all fizzle out mid-sentence?

User avatar
jgharston
Posts: 3723
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

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

Post by jgharston » Sat Feb 02, 2019 4:50 am

richardtoohey wrote:
Sat Feb 02, 2019 1:11 am
On the web page you've linked to, the last three sections all fizzle out mid-sentence?
Yes, I was starting to convince myself that the cold I had was affecting me more than I thought. ;)

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

rwap
Posts: 18
Joined: Thu Apr 19, 2018 6:51 pm
Contact:

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

Post by rwap » Sat Feb 02, 2019 7:17 am

richardtoohey wrote:
Sat Feb 02, 2019 1:11 am
rwap wrote:
Fri Feb 01, 2019 6:23 am
The Retro-Printer is now available for purchase - www.retroprinter.com
=D> That looks interesting! :D

On the web page you've linked to, the last three sections all fizzle out mid-sentence?
So they do - they seem to be missing the "Read More...." link

Post Reply