03-Dec-2022 12:19 GMT.
UNDER CONSTRUCTION
Anonymous, there are 8 items in your selection
[Files] AFPL Ghostscript 8.13 ported to i686-AROSANN.lu
Posted on 01-Jun-2004 01:40 GMT by whoosh8 comments
View flat
View list
I have recompiled my 68k AFPL Ghostscript 8.13 port to i686-AROS. Outside of the viewers everything appears to be functioning, and within the viewers just the truecolour WB viewer for PS and PDF is functioning. revisit http://www.whoosh777.pwp.blueyonder.co.uk This port was done using my recent port to 68k host of the x86-AROS gcc-3.3.1, so the one port was used to port the other port.

Of the 6 viewer options just the most useful one functions!

With the truecolour WB viewer the colours and image are completely correct, and the viewer is very responsive.

Possibly the other viewers dont function because of endianess, so I will look into this possibility,

The 5 non functioning viewers just produce either an empty window or a window with correct image but wrong colours.

As Turboprint hasnt been ported to x86-AROS, the Turboprint devices cannot currently be used but are compiled in,

The port is a very clean port, the few hitches which occured were quite painless. There were no missing API calls at the linker stage,

I will next be attempting ports of AFPL Ghostscript 8.13 to other AmigaOS variants,

:these other ports will be attempted first before trying to fix the 5 non functioning viewers of this port.

The port takes 3.5 hours to build on WinUAE and the resulting binary is 3.2mb,

AFPL Ghostscript 8.13 ported to i686-AROS : Comment 1 of 8ANN.lu
Posted by Joe "Floid" Kanowitz on 01-Jun-2004 02:56 GMT
Nice!

I suppose GSView (or some other sane 'viewer') may be the real solution to any zooming annoyances, unless it isn't... Could an 'interactive' output device be a possible hack (output being only the area requested, at a given scaling, everything else rendered to the bit-bucket), or can rendering rely on actual pixels in whatever the output data structure is, making that a wrong tree?

---

Meanwhile, mind if I ask if there's been any news on the overall "licenses and what they mean" front? Not looking to be an albatross, but as "AmigaOS" and so on grow more amenable to these sort of ports (Hey, that was your work on the pthreads hack, right? Doublenice!), we owe it to ourselves to be vigilant lest we get a reputation.

(In other words, we've been spared in-scene vs. out-of-scene licensing disputes so far, sociopolitical amusements notwithstanding... The more everyone can keep 'deterministically' cool with licensing issues, the better off we are, less we need to worry about Slashdot readers with torches and pitchforks, etc.)
AFPL Ghostscript 8.13 ported to i686-AROS : Comment 2 of 8ANN.lu
Posted by Anonymous on 01-Jun-2004 08:17 GMT
Wow, this is cool! :)

Seeing as there's a parallell port device available, one could
actually start using this to print PDF and PS documents on AROS.
AFPL Ghostscript 8.13 ported to i686-AROS : Comment 3 of 8ANN.lu
Posted by whoosh on 01-Jun-2004 22:46 GMT
In reply to Comment 1 (Joe "Floid" Kanowitz):
@Joe "Floid" Kanowitz

/*
Nice!

I suppose GSView (or some other sane 'viewer') may be the real solution to
any zooming annoyances, unless it isn't...
*/

I've run out of time with regards this particular project area for
GSView or any other variants of the concept,

my time will now be channelled to other programming projects,
GS itself will continue getting time but it will be very carefully
measured

so the Ghostscript project now is maintainance and porting only,
ie fixing bugs, bringing forwards the version number, and
bringing the code to new OS hosts,

in the end I decided that the way my port currently does things is
sufficiently adequate,

right now the program does a lot, it could do even more but its more
trouble than its worth,

the useful thing about Ghostscript is that it is an all rounder,
and also it is self contained,

my real interests are in writing original code from the ground up,
that way there are no license issues and I *own* the IP in its entirety,
I can also control and understand the work in its entirety, which is
usually not possible with open source,

with open source you blow months of time battling with nightmare
frameworks, open source is completely designed to be impenetrable
and unenlightening

ie open source is usually only truly open towards the compiler, not towards the
human(s),

/*
Could an 'interactive' output device be a possible hack
(output being only the area requested, at a given scaling, everything else
rendered to the bit-bucket), or can rendering rely on actual pixels in whatever
the output data structure is, making that a wrong tree?
*/

GS operates in terms of horizontal bands, so only horizontal bands that
intersect with the actual render get computed,

you can also put vertical barriers, the problem I ran into is that
the GS internal API doesnt seem to provide a way to revisit the same page at a
different resolution with different vertical and horizontal boundary,

so I could only see how to visit each page once, each page can have a
totally different resolution and positioning etc, but you cannot
re-render that page in a different way: you can only move on to the
next page,

GS is designed from the POV of printers rather than of viewers,
so my viewers operate by pretending to be a printer device,

my viewer only computes a local subset of the full image,
something like 2 x the viewer window size,
so if you shrink the window rendering will speed up quite drastically,

eg halve the viewer window and rendering will speed up 4 x ,

ie its a virtual image, the parts beyond the window mostly dont exist
until you try to look at them, this is to reduce the time and memory usage,

This time I got the license requirements done correctly
before making the announce,

I will now be attempting ports to some other AmigaOS variants,
AFPL Ghostscript 8.13 ported to i686-AROS : Comment 4 of 8ANN.lu
Posted by whoosh on 01-Jun-2004 23:04 GMT
In reply to Comment 2 (Anonymous):
/*
Wow, this is cool! :)

Seeing as there's a parallell port device available, one could
actually start using this to print PDF and PS documents on AROS.
*/

I hope so, I have been too rushed off my feet to try it out,

but my printer has a parallel port and so does the PC,

so in theory:

gs -sDEVICE=samsung_gdi -r300 -sOutputFile=par: gs813:examples/tiger.eps

should print the tiger,

I will try this as soon as I get some breathing space,

here is the full list of devices in this port:

bbox bit bitcmyk bitrgb bj10e bj200 bjc600 bjc800 bmp16 bmp16m bmp256
bmp32b bmpgray bmpmono bmpsep1 bmpsep8 cdeskjet cdj550 cdjcolor cdjmono
cljet5 cljet5c deskjet devicen djet500 eps9high eps9mid epson epsonc
epswrite faxg3 faxg32d faxg4 ibmpro jpeg jpeggray laserjet lj5gray
lj5mono ljet2p ljet3 ljet3d ljet4 ljet4d ljetplus miff24 nullpage pbm
pbmraw pcx16 pcx24b pcx256 pcxcmyk pcxgray pcxmono pdfwrite pgm pgmraw
pgnm pgnmraw pj pjxl pjxl300 pkm pkmraw pksm pksmraw png16 png16m png256
pngalpha pnggray pngmono pnm pnmraw ppm ppmraw psdcmyk psdrgb psgray
psmono psrgb pswrite pxlcolor pxlmono samsung_gdi spotcmyk stcolor
tiff12nc tiff24nc tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack tp1
tp24 tp8 tp8g uniprint whoosh1 whoosh24 whoosh8 whooshg xcf


tp#? are the Turboprint devices, whoosh#? are my viewers + AmigaOS printer
devices,

as you can see there are all sorts of bubble jets, ink jets,
you will see eg epsons and HPs, there are also fax and graphics formats
such as jpeg and png,

if you have any of the printers in the above list then all you need is
a functioning par: device and you can print,

there may also be GS drivers for printers not in the above, which
I could compile in, you would have to do a websearch to locate them,

as a result Ghostscript is a kind of cross platform printer.library
which understands current PS and PDF

samsung_gdi is where the whole port begun:

It was impossible to print via this Samsung ML-4500 printer on the Amiga,
however a GS driver existed for Linux, so to print with it I had to compile it
into GS,
AFPL Ghostscript 8.13 ported to i686-AROS : Comment 5 of 8ANN.lu
Posted by justnotbill on 02-Jun-2004 06:51 GMT
In reply to Comment 1 (Joe "Floid" Kanowitz):
@whoosh
thank you very much

@Joe "Floid" Kanowitz

Ok, maybe also no sane solution
but you can convert the ps to pdf using
ghostscript and than use Apdf.
AFPL Ghostscript 8.13 ported to i686-AROS : Comment 6 of 8ANN.lu
Posted by Joe "Floid" Kanowitz on 02-Jun-2004 13:27 GMT
In reply to Comment 3 (whoosh):
you can also put vertical barriers, the problem I ran into is that
the GS internal API doesnt seem to provide a way to revisit the same page at a
different resolution with different vertical and horizontal boundary,

so I could only see how to visit each page once, each page can have a
totally different resolution and positioning etc, but you cannot
re-render that page in a different way: you can only move on to the
next page,


Ah, I didn't think about that, and that'd be a joykill. This basically amounts to having to "reflow" the document like having to "reflow" an HTML page (except, of course, Postscript is more programmatic)... So as a wild guess, GSView probably does force it to "run" the whole .PS each time if it offers properly recomputed zooming, but tells it all pages save the one of interest have no lines worth rendering, maybe? Or maybe it just uses a heck of a lot of RAM, as I seem to remember it doing. ;)

(What I was thinking of was the UNIX distribution's X11 output device, which of course behaves similar, but doesn't support any interaction beyond the one scaling picked, and 'hit enter to view the next page.' I'll admit, I haven't even used that version much, because my printers are always broken! Guess your Amiga viewer has long since beaten it...?)

As to the licensing and all, yeah, I don't want to revisit any headaches, as noted... but do remember all the BSD stuff in the world is explicity there for your pleasure, with an 'advertising clause' at the worst. (For all the GPL fans, I'm not even trying to be an evangelist, I'm just saying... ;))

---

Er, and just for the sake of pointing out related software in case anyone doesn't know it exists, the HP IJS drivers might be of interest to anyone with more free time to spend hacking than cash for commercial drivers.

---

@justnotbill: Of course, but "Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can." ;)
AFPL Ghostscript 8.13 ported to i686-AROS : Comment 7 of 8ANN.lu
Posted by whoosh on 02-Jun-2004 16:48 GMT
In reply to Comment 6 (Joe "Floid" Kanowitz):
/* /*
you can also put vertical barriers, the problem I ran into is that
the GS internal API doesnt seem to provide a way to revisit the same page at a
different resolution with different vertical and horizontal boundary,

so I could only see how to visit each page once, each page can have a
totally different resolution and positioning etc, but you cannot
re-render that page in a different way: you can only move on to the
next page,
*/ */

/*
Ah, I didn't think about that, and that'd be a joykill.
This basically amounts to having to "reflow" the document like having to
"reflow" an HTML page (except, of course, Postscript is more programmatic)...
So as a wild guess, GSView probably does force it
to "run" the whole .PS each time if it offers properly recomputed zooming,
*/

for the moment thats the only way I can see to do it,
I actually wrote the code for doing it directly but without the API call available I was stranded!

/*
but tells it all pages save the one of interest have no lines worth rendering,
maybe?
*/

well with PDF you can skip pages via eg: -dFirstPage=100 -dLastPage=200
ie rerender the whole document from scratch but going directly to the
required page,

however with PS this cannot be done, PS is not random access so you have
to plough through all the pages till you reach the required page:

the reason is that PS is a general purpose programming language so the
number of pages could depend eg on the time of day!

in theory you could write a PS document in such a way that each time
you print it out its totally different,

The thing which is really useful about PS is that you can generate PS
documents by hand with a text editor, you could use this to create a
fantastic rescalable fractal logo: a simple example being an infinite
number of concentric squares,

then the larger you made the image the more squares that would get resolved,


/*
Or maybe it just uses a heck of a lot of RAM,
as I seem to remember it doing. ;)
*/

if the machine is fast enough and has huge amounts of ram then
what you could do is generate the image at a
very high resolution and then use naive zoom on this,

what I can say is that naive zoom is actually very useful or at least its
fun, my viewers have a "hacked proper zoom" mechanism where you type
a key at the naive zoom view you want, you do this on each page,
then you restart the program and document from scratch and all the views you selected are now done in full resolution,


/*
Er, and just for the sake of pointing out related software in case
anyone doesn't know it exists, the HP IJS drivers might be of interest
to anyone with more free time to spend hacking than cash for commercial drivers.
*/

maybe this will be useful for the AROS scenario,
I may look into this later, for the moment I will try to get some
further ports done,

BTW I have today completed generating a Morphos native binary of Ghostscript 8.13,
and it is being tested out for me by someone literally as we speak,
the binary is 3.9mb,

I will do a separate announce on this once its ready, I will release some
other Morphos related material in the same announce,

One other thing, one of the AROS developers says he has got most of the
other viewers functioning on Linux hosted AROS by customising AROS,

the non functioning viewers thus seem to be partly at least because of
unimplemented parts of AROS, so possibly there are no endianess problems,
AFPL Ghostscript 8.13 ported to i686-AROS : Comment 8 of 8ANN.lu
Posted by whoosh on 03-Jun-2004 20:17 GMT
In reply to Comment 7 (whoosh):
the first Morphos binary I generated of Ghostscript 8.13
is functioning fine for .pdf and .eps files but malfunctioning
for .ps files,

I think there is a bug in the 2.9.1 ppc-morphos assembler I built,
not sure if this is my fault or the source's fault or the build tools fault,

I think this bug is causing the malfunction, eg on 2 files
the assembler gives error messages
which dont make sense,

(gcc compiles by converting .c c files into assembler .s files, which it
then calls the assembler on)

it complains about a number (32) not being in the range 0 to 31,
but when I look at the line number in the asm I dont see 32, I just
see numbers in the range 0 to 31,

so I am rebuilding the cross compiler again, this time building
2.13.1, with this I have built an unoptimised Morphos binary of GS813
(unoptimised in order to speed up the build),

this time the meaningless assembler error messages vanished,
but the 2.13.1 linker refused to link noixemul,

so I "borrowed" the 2.9.1 linker ppc-morphos-ld and noixemul
linked correctly,

this binary is >5mb, not yet sent it out for testing,

if this one functions fine I will rebuild it as an optimised version,
Anonymous, there are 8 items in your selection
Back to Top