Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Feb 2021
Posts: 30
T
Member
Member
T Offline
Joined: Feb 2021
Posts: 30
Does anyone plan to implement both printers into MAME emulator?

I found technical manuals and their schematics show that we can implement both into MAME to emulate Gemini 10X/15X and Okimate 20. Okimate 20 can print in colors. Also Gemini 10X/15X can print graphics data from Print Shop software.

Gemini 10X/15X schematics showed that it uses 7801 microcomputer with 4K ROM/2K RAM (or optional 4K/8K RAM for buffers). It needs 4 version of ROM dumps (parallel w/optional 4K/8K buffer and serial w/optional 4K/8K).

I used my Gemini 10X printer for many years but I do not have it anymore. I now need ROM dumps.

Thanks,
Tim

Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
We'd like to implement a lot of printers, but there's currently a hangup about a central paper abstraction that we'd like to solve before emulating more printers. Specifically we have one and it more or less works for monochrome dot matrix printers, but there's obviously a wide world of paper output devices beyond that. If you (or anyone reading this) has C++ skills and an interest in helping with that, we could certainly point you towards what it should look like.

If you just want to emulate Print Shop, the Epson Action Printer 2000 emulation works in current MAME and it's back-compatible to Epson MX and FX so it works with Print Shop and many other software packages.

2 members like this: Tim Stark, sairuk
Joined: Feb 2014
Posts: 1,135
Likes: 198
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,135
Likes: 198
I've got a few printers that are waiting on the paper abstraction like Silentype, Imagewriter, FX-80 / JX-80 and EX-800.

The Okimate 20 is the same as the Commodore MCS 820.

Joined: Feb 2021
Posts: 30
T
Member
Member
T Offline
Joined: Feb 2021
Posts: 30
Ok thanks for replies. A paper abstraction is new to me. Can you explain me more? I would look toward color printing because Printshop can print in colors.

Does you plan to implement PDF printouts since we can only print on screen at this time?

Yes I have C++ skills. I was able compiling MAME into executable on Linux. Wow. it takes 4 hours to complete!

Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
The -j flag to make speeds up the builds considerably. Traditionally you do -j(number of cores plus 1), so -j9 on an 8-core system or -j13 on a 12-core or whatever.

The paper abstraction is a class that models sheets of paper (you'd set what size and dots-per-inch) and has a virtual drawing pen you can move around vertically and horizontally in real-world units and tell to print in black/cyan/magenta/yellow, which will then properly mix with the color that's already there (just like real multi-color dot matrix or ink jet works). The existing one is in src/devices/machine/bitmap_printer.cpp and .h. If you have real-world C++ experience beyond building MAME, I can find the 5-page email I got listing the defects in it and distill it into actionable tasks with fewer swear words ;-) In the meantime, you can look it over and see what it's trying to do.

One thing for starters: it has the steppers in the paper class when those are an implementation detail of the printer and should just be communicating position changes to the paper class.

Joined: Feb 2014
Posts: 1,135
Likes: 198
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,135
Likes: 198
The feedback I got from the bitmap_printer was that it sucks and we hate it. 8-) Which is fine, just tell me why you hate it.

Joined: Aug 2009
Posts: 1,264
Likes: 198
Very Senior Member
Very Senior Member
Joined: Aug 2009
Posts: 1,264
Likes: 198
Because a printer is not a "screen" to begin with?

Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
For MAME purposes, it's at least a bitmap. And it's fun to watch the printing happen line by line like on a real printer.

GC: I gave you the first reason as a freebie: the paper doesn't care how the print position's being moved, so the steppers should've stayed in the Epson driver and just communicated fractions of an inch or whatever.

Joined: Jul 2019
Posts: 23
E
Member
Member
E Offline
Joined: Jul 2019
Posts: 23
Originally Posted by R. Belmont
We'd like to implement a lot of printers, but there's currently a hangup about a central paper abstraction that we'd like to solve before emulating more printers. Specifically we have one and it more or less works for monochrome dot matrix printers, but there's obviously a wide world of paper output devices beyond that.

Are daisywheels in scope?

Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
Daisywheels can be in scope, but how to do accurate fonts for them makes my head hurt.

Joined: Feb 2014
Posts: 1,135
Likes: 198
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,135
Likes: 198
>> GC: I gave you the first reason as a freebie: the paper doesn't care how the print position's being moved, so the steppers should've stayed in the Epson driver and just communicated fractions of an inch or whatever.

so then just have a bitmap representing the paper and not much else, that's cool.

Couldn't I have a dot matrix printer device that has steppers for the carriage, paper feed, ribbon and draws the printhead? Most of the dot matrix printers need those things and it can just use the paper class for the paper bitmap.

Joined: Feb 2021
Posts: 30
T
Member
Member
T Offline
Joined: Feb 2021
Posts: 30
Does MAME have freetype library for handling fonts for daisywheels and mainframe line printers?

Yeah. I reviewed bitmap_printer.cpp but it need some additional coding for daisywheels/line printers. It may need to implement additional PDF routines for producing printouts in PDF file.

Hercules Studio (for IBM mainframe emulator) already do produces printouts in PDF file in line printer emulation. There is Hercules Studio repository on Sourceforge. May take a look on that.

Joined: Mar 2008
Posts: 230
Likes: 8
R
Senior Member
Senior Member
R Offline
Joined: Mar 2008
Posts: 230
Likes: 8
I've been scanning Amstrad PCW daisywheels, and I'm trying to make a ttf font out of one of them.

Let's see how it goes laugh

1 member likes this: exidyboy
Joined: Mar 2001
Posts: 17,239
Likes: 263
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,239
Likes: 263
MAME does output printer output as a series of PNGs right now, one per page. So you really can get your Print Shop on as-is.

Joined: Feb 2008
Posts: 175
Likes: 15
G
Senior Member
Senior Member
G Offline
Joined: Feb 2008
Posts: 175
Likes: 15
For initial development work there's plenty of mono-spaced daisywheel-like fonts out there already. For the purpose of emulation it doesn't matter which font is used. Anything close is fine for work in progress and it might be fun to substitute any font you want, selectable from a list of installed fonts. The main thing is use any mono-spaced font and get it working, then you could replace the font with one built from scans of an actual daisywheel or just use the freely available daisywheel font. It takes 3 seconds to find it (i.e. https://www.fonts4free.net/daisy-wheel-font.html). No point wasting days/weeks making new truetype fonts from scratch when the emulation of daisywheel printers isn't even implemented.


Dumping ROMs for MAME since 1999!
https://gurudumps.otenko.com
Joined: Feb 2021
Posts: 30
T
Member
Member
T Offline
Joined: Feb 2021
Posts: 30
Originally Posted by R. Belmont
MAME does output printer output as a series of PNGs right now, one per page. So you really can get your Print Shop on as-is.


How do I save printouts into PNG file?

Joined: Feb 2014
Posts: 1,135
Likes: 198
G
Very Senior Member
Very Senior Member
G Offline
Joined: Feb 2014
Posts: 1,135
Likes: 198
Code
void bitmap_printer_device::write_snapshot_to_file()
{
        machine().popmessage("writing printer snapshot");

        emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
        std::error_condition const filerr = machine().video().open_next(file, "png");

        if (!filerr)
        {
                static const rgb_t png_palette[] = { rgb_t::white(), rgb_t::black() };

                // save the paper into a png
                util::png_write_bitmap(file, nullptr, m_page_bitmap, 2, png_palette);
        }
}
you probably don't even need to have the png_palette stuff, I was cribbing from another driver.

Joined: Oct 2014
Posts: 4
R
Member
Member
R Offline
Joined: Oct 2014
Posts: 4
Hi!
Originally Posted by R. Belmont
If you have real-world C++ experience beyond building MAME, I can find the 5-page email I got listing the defects in it and distill it into actionable tasks with fewer swear words ;-)
Do you think you could organize this list with actionable tasks (and/or a review of the current state of implementing paper in MAME)?

I'd like to get back to this at some point, probably not right now, but at some point...

Joined: Mar 2006
Posts: 1,080
Likes: 7
L
Very Senior Member
Very Senior Member
L Offline
Joined: Mar 2006
Posts: 1,080
Likes: 7
Sounds neat! I'd love to see these uploaded somewhere someday, daisywheels are not well preserved, neither are chain printer fonts from the 1960s and 1970s.
EDIT: and neither are the various typeball fonts from IBM and others, particularly prestige elite which I don't think ever got a contemporary .TTF version, other than a relatively recent adobe recreation.

Last edited by Lord Nightmare; 03/17/24 09:03 AM.

"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
Joined: May 2009
Posts: 2,223
Likes: 387
J
Very Senior Member
Very Senior Member
J Offline
Joined: May 2009
Posts: 2,223
Likes: 387
Originally Posted by Ramiro Polla
Hi!
Originally Posted by R. Belmont
If you have real-world C++ experience beyond building MAME, I can find the 5-page email I got listing the defects in it and distill it into actionable tasks with fewer swear words ;-)
Do you think you could organize this list with actionable tasks (and/or a review of the current state of implementing paper in MAME)?

I'd like to get back to this at some point, probably not right now, but at some point...

Sure, because I've been planning to work on this. But if you want to take point on it, I won't stop you, I could use fewer things on my to-do list. You "just" need to keep in mind the following things:

  • Perforated feed vs. form-feed vs. single-sheet feed; the abstraction of a print engine must take all of these into account. Subclassing the printer interface class should be possible with the differentiation being at a constructor level. Worst-case, have separate derivations of the base class for each feed type, but that already sounds like an overly-specialized interface.
  • Black-and-white vs. CMYK; the user (as in, the person implementing a device or driver) should not need to care about that difference. Setters for the current ink color should exist, but should not interfere if they aren't called.
  • Feedstock size. Not every printer accepts all sizes of sheets. This is particularly important when considering that this interface should be able to service plotters as well. Many printers have multiple feed trays / paper cassettes (the origin of the "PC" in "PC Load Letter", BTW), so it can't simply be an enum member, you're going to want to have a list.
  • Length of the print engine, from incoming to outgoing: A plausible emulation of a specific printer will naturally want to ingest feedstock at a realistic rate.
  • Sensor locations: Similar to above, some print engines can have a "paper present" sensor, a "paper outgoing" sensor, and others in between. Starting from a paper-out situation, you need to know how long the ingestion rollers need to be engaged until the "paper present" sensor engages. You also need to know exactly how far the print engine needs to advance the paper before the "paper outgoing" sensor becomes active.
  • Print-head movement: It might be easy to think of a printer as having the print head constrained to one axis, and a plotter having the print head constrained to two axes, but it's not that simple. Some typewriters, including CPU-driven typewriters, can move the print head up or down depending on exactly what the user is trying to type.
  • Print-head location: Same thing but different. Some printers have a Hall effect sensor to determine when the print head hits "home".
  • Geometry: You want to use Metric.


There's a whole shitload more things that would go into providing a generic interface for emulating a print engine, but for the most part I just want to make it abundantly clear that nothing about this is simple, and there are completely valid reasons for Vas to be a bit cagey when it comes to someone rolling up from out of nowhere and saying they want to solve this particular problem.

1 member likes this: R. Belmont
Page 1 of 2 1 2

Link Copied to Clipboard
Who's Online Now
0 members (), 245 guests, and 0 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,331
Posts122,196
Members5,077
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0