Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing on Commodore printer without Commodore 64

759 views
Skip to first unread message

Rami

unread,
Jul 29, 2017, 4:42:36 AM7/29/17
to
Hello fine Commodore people,

I have Commodore MPS 803 printer (I think it is 803, it is in the storage at the moment) and have been toying with the idea of hooking it up to Raspberry Pi or similar... And later maybe even add a CUPS driver and allow remote printing.

I think I did try to dig up information for this couple of years ago and came to understand that the printer serial protocol is non-standard and documentation for it is hard to find. Someone also mentioned some Nuts and Volts article but I was unable to get it from the publisher.

So I would appreciate any information on C64 serial printer protocol / modern tools / github repos / whatever you can provide.

Thanks!


--
Rami Saarinen

Pekka Takala

unread,
Jul 30, 2017, 12:26:50 AM7/30/17
to
The protocol is essentially the same protocol as commodore 1541 disk
drive protocol is. The printer just uses device number 4 instead of 8.

Trust me, it is much easier to find a suitable matrix printer for your
PC than to attach the commodore printer to your pc. The cbm protocol is
very tight in timing.

Sell the printer to someone c64/vic20/c128 enthusiast.

Rami

unread,
Jul 30, 2017, 4:48:57 AM7/30/17
to
Thanks Pekka. If the timing is as tight as you say I might just let this be for now. The idea was basically just hook up something almost useless to modern computer setting for fun and laughs.

I do have (I think) two Commodore 64s (and 2*A500, A500+ and A1200) so I think I keep the printer, find some continuous feed paper for it and hook it up to C64. :)

--
Rami

Andreas Kohlbach

unread,
Jul 30, 2017, 6:10:10 PM7/30/17
to
Not really related. In the early 2000s I bought a Star NL-10 dot matrix
impact printer from Micronics to my Linux box, which I shot at the local
flea market for $5. It didn't take five minutes for the landlord, who
lived in the same building (which is already bad in itself ;-) to knock
at the door and ask WTF am I doing. *g* If it was 20 years earlier (the
80s) no one would had cared about the noise it produced. But it was fun.

Btw. I have forgotten how I get it running. The PC then had a parallel
port and it seems Linux just served the printer right.

> I do have (I think) two Commodore 64s (and 2*A500, A500+ and A1200) so
> I think I keep the printer, find some continuous feed paper for it and
> hook it up to C64. :)

I have no real hardware, only emulate the C64 and Amiga. I once tried to
print from The Print Shop from the C64 to the Linux host via CUPS the
emulator (VICE) runs on. But I set it up wrong and the result was messed
up 50% of the time, the other 50% the emulator crashed when printing.
--
Andreas
You know you are a redneck if
your favorite hangout is the phillips 66 near the freeway.

sblen...@gmail.com

unread,
May 7, 2018, 9:54:00 AM5/7/18
to
Il giorno sabato 29 luglio 2017 10:42:36 UTC+2, Rami ha scritto:

> So I would appreciate any information on C64 serial printer
> protocol / modern tools / github repos / whatever you can provide.

Printing text is quite simple. All you need is a XUM1541 cable (it's an effective PCB card - adapter that let you connect any IEC device to USB ports), the cost is about 30€. Then just download the package "opencbm", here is some example of usage:

http://opencbm.trikaliotis.net/opencbm-17.html

here is a video I made recently:

https://www.youtube.com/watch?v=ffKstbCI7QU


sblen...@gmail.com

unread,
May 7, 2018, 5:35:42 PM5/7/18
to
Il giorno lunedì 7 maggio 2018 15:54:00 UTC+2, sblen...@gmail.com ha scritto:

> Printing text is quite simple.

You can also print graphics. This is an example of what you can do:
https://imgur.com/a/gyxkkqk

I did it writing a simple "driver" in Java that converts images (for now in black and white, with white background) into commands for the Commodore MPS 803 printer:


package eu.sblendorio;

import javax.imageio.ImageIO;
import java.awt.image.*;
import java.io.File;
import java.io.IOException;

public class Main {

public static void main(String[] args) throws IOException {
if (args.length == 0) System.exit(1);
final String filename = args[0];
File f = new File(filename);
BufferedImage bi = ImageIO.read(f);

print(bi);
}

static int getPixel(BufferedImage bi, int x, int y) {
final int w = bi.getWidth();
final int h = bi.getHeight();

if (x >= w || y >= h || x < 0 || y < 0)
return 0;

final boolean pixel = bi.getRGB(x, y) != -1;
return pixel ? 1 : 0;
}

static void print(BufferedImage bi) {
final int pow[] = {1, 2, 4, 8, 16, 32, 64};
final int w = bi.getWidth();
final int h = bi.getHeight();
int rows = h / 7 + (h % 7 == 0 ? 0 : 1);
System.out.write(8);
for (int row=0; row<rows; ++row) {
for (int x=0; x<w; ++x) {
int code = 128;
for (int dy=0; dy<7; ++dy) {
final int pixel = getPixel(bi, x,(row * 7) + dy);
code += pow[dy]*pixel;
}
System.out.write(code);
}
System.out.write(13);
}
System.out.write(15);
System.out.write(13);
}
}

Rami

unread,
May 8, 2018, 6:55:13 AM5/8/18
to

Awesome! I'll have a look as soon as possible.

francesco....@jobrapido.com

unread,
May 15, 2018, 5:16:27 AM5/15/18
to
Here is a ready-to-use solution for printing PNG images:

https://github.com/sblendorio/cbmage

I rewrote it in C (gcc). Compatible with Windows-Linux-macOS

sblen...@gmail.com

unread,
Jun 3, 2018, 4:50:00 PM6/3/18
to
Now, also for UNICODE text, for MPS 803:

https://github.com/sblendorio/cbmtext
0 new messages