• Printing on Commodore printer without Commodore 64

    From Rami@3:770/3 to All on Sat Jul 29 01:42:34 2017
    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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pekka Takala@3:770/3 to Rami on Sun Jul 30 07:26:43 2017
    On 29.07.2017 11:42, Rami wrote:
    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!


    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Rami@3:770/3 to Pekka Takala on Sun Jul 30 01:48:55 2017
    On Sunday, July 30, 2017 at 7:26:50 AM UTC+3, Pekka Takala wrote:
    On 29.07.2017 11:42, Rami wrote:
    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!


    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.

    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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andreas Kohlbach@3:770/3 to Rami on Sun Jul 30 18:10:08 2017
    On Sun, 30 Jul 2017 01:48:55 -0700 (PDT), Rami wrote:

    On Sunday, July 30, 2017 at 7:26:50 AM UTC+3, Pekka Takala wrote:
    On 29.07.2017 11:42, Rami wrote:
    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!


    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.

    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.

    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.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From sblendorio@gmail.com@3:770/3 to All on Mon May 7 06:53:58 2018
    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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From sblendorio@gmail.com@3:770/3 to All on Mon May 7 14:35:41 2018
    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);
    }
    }

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Rami@3:770/3 to sblen...@gmail.com on Tue May 8 03:55:12 2018
    Awesome! I'll have a look as soon as possible.



    On Tuesday, May 8, 2018 at 12:35:42 AM UTC+3, sblen...@gmail.com wrote:
    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);
    }
    }

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From francesco.sblendorio@jobrapido.com@3:770/3 to All on Tue May 15 02:16:26 2018
    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

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From sblendorio@gmail.com@3:770/3 to All on Sun Jun 3 13:49:59 2018
    Now, also for UNICODE text, for MPS 803:

    https://github.com/sblendorio/cbmtext

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)