VICE Output to PostScript (VICEtoPS)

I have created here a utility which will produce a simulated Commodore dot-matrix printout from the "print.dump" or "viceprnt.out" file obtained from the VICE emulator.

The utility creates an Adobe PostScript file which, when printed on a PostScript-enabled printer, displays the full set of Commodore characters. Because I redefine an existing font (in order to have the special Commodore characters and to have the dot-matrix look), there is a large overhead (about 300 kB) that always comes with the PostScript file. Nevertheless, I decided it was a tolerable burden.

I provide this program with the hope that someone may choose to incorporate/modify it into their own Commodore utility or emulation software, or simply make use of it when running VICE. This software is distributed under the GNU General Public Licence, a copy of which is included with each source and executable file.

All versions of this utility require the character set ROM image file in the same directory as the executable. This Commodore character set (8 KB) was obtained from http://www.zimmers.net/anonftp/pub/cbm/firmware/computers/c128/. It is a binary ROM image file.

Here is an example of what the utility does:

Taking my VICE emulator printer dump file print.dump (22.8 KB) or WinVICE emulator printer output file viceprnt.out (23.4 KB), a PostScript printout file viceprnt.ps (zipped, 19 KB) was generated. A pdf version (65 KB) was later created from the PostScript using Adobe Distiller. Note the significant decrease in file size as the PostScript (.ps) is converted to Portable Document Format (.pdf).

Should work with both viceprnt.out and print.dump files.

Available Versions:

Visual Basic.NET

vicetops.vb.zip (122 KB)

This version of VICEtoPS was written in the Visual Basic.NET programming language and has the advantage of incorporating an easy-to-use windows interface.

  • Compiled and linked with Visual Studio 2012 on Microsoft Windows 7.
  • The executable is located in the subdirectory: \ViceToPS\bin\Release\ViceToPS.exe
  • You can copy just that file to where you want it. All other files are project source files and can be ignored unless you want to build from source.
  • Note: to run the executable you require the .NET runtime library. I believe Windows XP SP3 and all later versions of Windows already have it, but if you don't have it you can download it for free from Microsoft.com.

Perl

vicetops.pl.gz (gzipped)

This version of VICEtoPS was written in the Perl programming language.

Usage: ./vicetops.pl at command line to get usage instructions.

C

vicetops.c

This version of VICEtoPS was written in the C programming language.

Usage: ./vicetops[.exe] at command line to get usage instructions.

FORTRAN

vicetops.f

This version of VICEtoPS was written in the FORTRAN programming language.

Note: If at runtime an error occurs reporting a failed attempt to access a non-existent record in the character file, try compiling with "-assume byterecl". For example, with a Linux Intel compiler:

ifort -assume byterecl vicetops.f

The reason for this error is that some compilers assume a record length of 4 bytes, while others assume 1 byte. For gfortran on Ubuntu, this compiler flag is not necessary since it assumes 1 byte record length.

Usage: ./vicetops[.exe] at command line to get usage instructions.

Common Lisp

vicetops.lisp

This version of VICEtoPS was written in the ANSI Common Lisp programming language.

Usage: execute vicetops.lisp and it will ask for upper or lower case and VICE output filename. The PostScript filename will be vice-print.ps.

Python

vicetops.py

This version of VICEtoPS was written in the Python programming language.

Usage: python3 vicetops.py at command line to get usage instructions.

P. David Buchan pdbuchan@yahoo.com