VOGONS

Common searches


Colour Printing - DosBox/XP?

Topic actions

First post, by depac_402

User metadata
Rank Newbie
Rank
Newbie

I've been making good use of the Virtual Printer in ykhwong's version of DosBox 0.70 on XP. My understanding is it can only print in black and white. The program I use (data analysis) can output colour graphs when operating in DOS on an older machine via LPT1. Is there any way I can print in colour with DosBox/XP to a USB printer? I tried using DOSPRINTER to capture output to LPT1 and send it to my USB printer but no joy. I've tried saving Virtual Printer output as 'ps', 'bmp' & 'png' files and also straight to USB printer - they all work perfectly BUT in black and white only.

I appreciate DosBox is primarily aimed at gamers and printing isn't a priority for most users so apologies to the DosBox originators for making this request but I'm hoping someone might have a solution/suggestion/recommendation etc. Is anyone out there managing to print in colour? Thanks in advance for any help. BTW, for anyone looking to print from DosBox in black and white, I highly recommend ykhwong's build - a really neat piece of work!

Forgot to mention........ screen capture doesn't work too well in this instance as the graph is diplayed on screen with a black background. When selecting print option, the program must re-render the graph: the data is automatically rescaled and displayed in an easier to read form (with white background). I've tried screen capture and manipulating the image in various ways but results still don't look anything as good as the program's 'real' print output.

Reply 1 of 21, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If you still have a printer that is compatible with the program (esc/p2 or something) you can use my parallel port passthrough (on my homepage). Those modern castrated USB printers lack old solid protocols.

1+1=10

Reply 2 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie

I downloaded the parallel port passthrough, dll files and PortTalk driver. In the [parallel] section of the new config file it currently says: "parallel1=disabled". What must I set this to?

Is it possible to send the info to postscript file or image (png, bmp) instead of a printer (as with ykhwong's version) but in colour instead of B+W?

Thanks for your help.

Reply 3 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

probably not.

In what kind of enviroment do you intend to use this solution ? (compagny/hobby)

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie

In what kind of enviroment do you intend to use this solution ? (compagny/hobby)

Personal use.
I have an old W95 computer and LPT printer that'll probably work OK but I'm not convinced the printer (or computer) will last too long so figured using my XP machine and saving the printer output as a ps or image file would give me more options. The Virtual Printer works great but because the graphs can contain many lines of info, it gets hard to distinguish one curve from another when they're all the same colour 😅

Reply 6 of 21, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author
		case 0x72: // Select printing color (ESC r)
if (params[0] != 0)
LOG(LOG_MISC,LOG_WARN)("PRINTER: Color printing not supported");

Maybe it can be implemented with acceptable effort...

... how do you make colors in SDL? 😀

Reply 7 of 21, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

send an email to the email mentioned on the homepage (crew page).
We might be able to help you out.

Water flows down the stream
How to ask questions the smart way!

Reply 8 of 21, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Virtual Printer with colors in graphics mode:

http://home.arcor.de/h-a-l-9000/test/dosbox_c … aphicsprint.zip

Have fun 😀

Color text-mode letters are not supportet though.
(Is there a easy-to-come-by program that prints those?)

1+1=10

Reply 9 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie

Thanks h-a-l. I tried your parallel port passthrough last night but it was very unstable - cursor movements were very exaggerated and it flicked between menus - almost like someone was playing on the keyboard! DosBox crashed each time I tried to print. I used the dll's from your site, then created a new conf file and set 'parallel1=realltp' as per instructions. Maybe I'm doing something wrong......? 😕

I'll give the new colorgraphics version a try tonight.

Last edited by depac_402 on 2007-04-26, 07:47. Edited 1 time in total.

Reply 10 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie

h-a-l, your Virtual Printer works in colour!!! 😀 😀 😀

I tried ps, png & printer first.....
'ps' files come out blank. Printing to 'png' crashes the program. 'Printer' works, but only in b+w. Saving to 'bmp' works great, and in full colour! Initially it was graphics only and no text. All the text that should have been there was missing. I installed roman.ttf into the folder and text is now displayed. Only downside, as you already mentioned, all text is b+w only. Note: set 'disney' to 'false'.

The program is stable (apart from png crashes) and the ability to print graphs in colour makes this a great choice for my application. The only improvement I can hope for is colour text (as you already mentioned).

Nice work! 😉

Reply 11 of 21, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> Thanks h-a-l. I tried your parallel port passthrough last night but it was very unstable

Strange, this is a CVS build from a little after the 0.70 release with only the parallel port passthrough patch... maybe cycles=auto causes this?

> Printing to 'png' crashes the program.
Works for me... could be the libpng dll version...

Did you contact the DOSBox crew as Qbix suggested?

Reply 12 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie
h-a-l-9000 wrote:
> Thanks h-a-l. I tried your parallel port passthrough last night but it was very unstable […]
Show full quote

> Thanks h-a-l. I tried your parallel port passthrough last night but it was very unstable

Strange, this is a CVS build from a little after the 0.70 release with only the parallel port passthrough patch... maybe cycles=auto causes this?

> Printing to 'png' crashes the program.
Works for me... could be the libpng dll version...

I'll try again with the changes suggested. I also noticed that screen capture 'Ctrl-f5' doesn't work properly but I guess that's also a png related problem: a file gets saved to the 'capture' folder but isn't readable.

One other weird thing.... the graphs I'm printing out from my application have text and figures down both the left and right hand sides of the graph but none of the right hand side figures are displayed in the virtual printer bitmap. All other text and data comes out fine - aside from the colour issue 😉

Despite the niggles it's very satisfying to see those graph lines coming out in glorious colour 😀

h-a-l-9000 wrote:

Did you contact the DOSBox crew as Qbix suggested?

Yes, I've contacted them.

Reply 13 of 21, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> but none of the right hand side figures are displayed in the virtual printer bitmap

Page too small?

width= and height=

in dosbox.conf are set to some US paper format I think. Maybe more width?

(For the directlpt I assumed you have a normal LPT1 at address 0x378. USB won't do.)

Reply 14 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie

Re: h-a-l's Virtual Colour Printer

> Printing to 'png' crashes the program.
Works for me... could be the libpng dll version...

I substituted different lbpng files from my various versions of DosBox but still have the problem. Not sure what else to try. It'd be great to solve the png problem because at the moment the DosBox screencapture function doesn't work. It's not a problem as far as printing is concerned as long as printer=bmp.

Page too small?

width= and height=

in dosbox.conf are set to some US paper format I think. Maybe more width?

I tried different width and height settings and although the full width of the graph fits the page OK, the right hand figures and text (which fit inside the graph boundaries) still don't appear in the bitmap. Very odd!

Reply 16 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie

h-a-l.... version 2 works a treat 😀

On my XP machine it now saves colour print files in both png and bmp. The screenshot feature (Ctrl-f5) saves colour png files to the capture folder and you've obviously incorporated support for colour text cos that now prints in colour as well 😀 😀

Very nice work, thanks 😉

Reply 17 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie

h-a-l, is it possible to configure your colorgraphicsprint2 so you can assign your own directory for the Virtual Printer files? Something along the lines of the "captures=capture" option in the dosbox.conf file?

It's not a problem the way it works at the moment but having the option to store the print files in a specific location would be really neat. Maybe I'm asking for too much 😁

Thanks again for your work on this.

Reply 19 of 21, by depac_402

User metadata
Rank Newbie
Rank
Newbie
h-a-l-9000 wrote:

Absolutely perfect! 😀

I'm probably pushing it a bit now 😉 but do you know why choosing 'printouput=printer' results in black and white, whereas png & bmp are in colour?