Jump to content
IGNORED

Printing from emulators


etownandy

Recommended Posts

Right, you can print to a file in MAME, but this file will be filled with printer control codes for the selected printer. I can imagine that printers could be emulated, but I actually don't know whether there is already work in progress. (If so, may I add some impact printer noise? ;) )

  • Like 1
Link to comment
Share on other sites

Only text, though? I mean, it's pretty simple to "print" to PIO in MAME from something like TI-Writer or Funnelweb, take the resulting .txt file, and import it into a word processor on macOS/Windows/Linux/etc for actual printing. But I'm more interested in graphics (as in my PagePro example).

 

I know Bruce Harrison did some work on printing to ink jet printers...not sure what encoding they used (PCL maybe?) although that was mostly for printing TI-Artist files and such.

 

It's not like I NEED to do this, of course...a modern word processor runs circles around something like PagePro (although I bet most of them won't let me type in any direction as easily). But it would be nice to get some output as I'm playing around.

Link to comment
Share on other sites

Tursi

If you revisit and build it, please let me know! I've looked for an emulator to take a ti-writer file and print to pc. Many doc files for software written back in the old days to be ran thru the formatter. It would be nice to put them to pdf for archival purposes.

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Looks like this might be a thing

 

https://github.com/RWAP/PrinterToPDF

 

Well spotted - this is one of my projects and a spin off from my Retro-Printer project - www.retroprinter.com

 

The PrinterToPDF is the public domain version of the conversion code - it is written in C and tested running on a Raspberry Pi.

 

It handles most of the ESC/P2 control codes so is more versatile than many of the older projects you can find out there.

  • Like 2
Link to comment
Share on other sites

Well spotted - this is one of my projects and a spin off from my Retro-Printer project - www.retroprinter.com

 

The PrinterToPDF is the public domain version of the conversion code - it is written in C and tested running on a Raspberry Pi.

 

It handles most of the ESC/P2 control codes so is more versatile than many of the older projects you can find out there.

 

Cool. Nice to know you are here ;-) :thumbsup: :thumbsup:

Link to comment
Share on other sites

Tursi

If you revisit and build it, please let me know! I've looked for an emulator to take a ti-writer file and print to pc. Many doc files for software written back in the old days to be ran thru the formatter. It would be nice to put them to pdf for archival purposes.

 

I have been thinking for quite a long time about writing a translator in Forth to take a TI-Writer-formatted document to something like PDF or TeX. Lately, I have been looking at RTF as an intermediate output because it looks easier than PDF (I have not looked at TeX for ages). An RTF file can be read and converted by MS Word or OOO Writer to PDF. I think this would be relatively easy to do for Classic99 because it can be configured to write Windows text files.

 

Some limitations I would probably impose:

  1. Ignore any transliterate commands that start with ‘27’, but maybe all transliterate commands
  2. Allow the user to specify fonts other than “Courier New”, but only for fill-formatted text
  3. Impose user-modifiable, but minimum, top and bottom margins of 1/4", managing font size to accommodate page-length format commands
  4. Maybe ignore page-length commands altogether
  5. Ignore mail-merge and alternate-input commands (should not affect any archive-worthy documents)

As you can see, I have not traversed far in this project—just SOC rambling at this juncture!

 

...lee

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

I'd say that all of the codes should be shown in that documentation. I can scrounge around in my files and probably find some other stuff.

 

That would be great.

 

Do you think TL commands will be included?

 

That will be difficult because some of them may be printer control codes and I definitely do not want to support those. For RAG TI Writer v5.0, it is simple. “.PC” is used for printer control codes and are easy to ignore. If I allow “.TL”, I will need to parse each command string to limit the transliteration to acceptable ASCII codes. This would be all printable characters. I may try to convert three-character combinations with a BS character in the middle to the single character likely intended, e.g., “.TL123:110,8,126” would convert ‘{’ to ‘ñ’. But, I will probably not be able to anticipate all combinations and may simply choose the alphabetic character if there is only one, or the first, if there are two. I could also emit a special character, like ‘█’, to signal a need to check the original. TL definitely complicates things.

 

...lee

Link to comment
Share on other sites

At least while printing to a modern system, documents containing .TL codes can make a mess of things, especially when you get to double strike or highlighted text, you'll end up with four lines of normal text instead of one darker section. That kind output requires a lot of post editing. While it would be nice to 'fix' that problem, for how little it would be used, it might not be worth the programming effort.

 

I was never a person who used the Text Formatter much, as most of my documents were much smaller, besides I just hardcoded the control "U" codes directly into the document. If that capability was to be supported, I'm fairly certain the Epson control codes would be the way to go.

Link to comment
Share on other sites

Lee, Hopefully these will help. ...

 

Unfortunately, they did not show me any formatter codes beyond normal TI Writer codes. They did, however, point up the need to handle embedded printer control codes in addition to transliteration. The difficulty with embedded codes is that any codes that include printable characters will not be handled properly, because I am not writing an interpreter for printer control codes. I daresay that most archive-worthy documents did not use embedded printer control codes. If they did, the output will not likely be pretty and will need editing.

 

...lee

Link to comment
Share on other sites

At least while printing to a modern system, documents containing .TL codes can make a mess of things, especially when you get to double strike or highlighted text, you'll end up with four lines of normal text instead of one darker section. That kind output requires a lot of post editing. While it would be nice to 'fix' that problem, for how little it would be used, it might not be worth the programming effort.

 

I was never a person who used the Text Formatter much, as most of my documents were much smaller, besides I just hardcoded the control "U" codes directly into the document. If that capability was to be supported, I'm fairly certain the Epson control codes would be the way to go.

 

As I indicated above, I have no intention of supporting printer control codes. Non-printable characters are easy to ignore, but printable characters that are part of printer control codes are another story.

 

The formatter commands for “bold”, “underline” and “required space” have RTF equivalents that are easy to emit.

 

Transliteration, where not a simple one-to-one, printable-character replacement, though not easy, is not as difficult to handle as embedded printer control codes.

 

...lee

Link to comment
Share on other sites

  • 2 weeks later...

Does anyone know what information is contained in the last record of a TI Writer file? Here are the last records in hex of four D/V80 TI Writer files:

16 80 86 80 AD 86 8B 90 95 9F D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 80 86
17 80 86 80 B6 86 8B 90 95 9F D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 80 86 0D
17 80 86 80 B6 86 8B 90 95 9F D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 80 86 0D
17 80 86 80 AD 86 8B 90 95 9F D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 D5 80 86 0D 

The first byte is the character count of the record.

 

...lee

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...