1. 29 Jan, 2022 2 commits
    • Robert Sprowson's avatar
      Fix for errors trying to print 4k/64k/RGB sprites in grey · c3c01533
      Robert Sprowson authored
      The change in PDModules-4_63 handled output in colour, but didn't exercise the code path taken when greyscale PostScript is requested. This failed in two ways:
      1. "Bad X dpi/Y dpi" due to attempting to change a SpriteType_RISCOS5 by manipulating
         bits 27-31 directly (the DPI values are encoded differently for type 15)
      2. "Bad colour translation table" due to always supplying SpriteExtend with a plain
         '32K.' colour translation table to lookup the greys in when an extended '32K+' is
      TranSprite.s: Make the table based on the source sprite mode word first, then map that to an equivalent DPI grey.
      Private.s: New utility routine medusa_same_dpi_g256_mode to get the DPI bits right.
      Sprite.s: Rework sprite_make32Ktable to allow it to generate 4k/32k/64k tables and to generate '32K+' format when appropriate. Shuffle the sprite_mapNNN routines up so they're within ADR range.
      Tested printing a Draw file with all true colour combinations of test sprites, then converting with Adobe Distiller.
      Version 4.65. Tagged as 'PDModules-4_65'
    • Robert Sprowson's avatar
      Reduce JPEG to greys when Level 2 requests printing in grey · 4d5bdafa
      Robert Sprowson authored
      Of the 4 possible combinations
        Printer JPEG
        Colour  Colour  OK to send original JPEG
        Colour  Grey    OK to send original JPEG
        Grey    Colour  <= Not OK
        Grey    Grey    OK to send original JPEG
      we must take care not to send the original colour JPEG to a grey printer. Doing so would previously have been masked because the toner would print it grey on paper, but with much more PostScript printing being used to distill to Adobe PDF it's obvious to see the mistake.
      For simplicity, when this (rare) case is encountered just use the Level 1 policy of converting the JPEG to an 8bpp greyscale sprite. This requires an extra operator (dubbed 'J8G' in Printer Manager's prologue.
  2. 18 Jul, 2018 1 commit
    • Robert Sprowson's avatar
      Let through post 3.50 sprite types in PDriverDP · 36c4fb56
      Robert Sprowson authored
      Pass the sprite type to OS_ReadModeVariable rather than trying to infer the Log2BPP from the sprite type directly.
      Tested printing a Draw file with all true colour combinations of test sprites, via the PCL dumper, to a Kyocera 2551ci colour laser printer.
      Version 4.64. Tagged as 'PDModules-4_64'
  3. 03 Jul, 2018 2 commits
    • Robert Sprowson's avatar
      Add support for 4k/64k sprite printing via PDriverPS · 33efbaaa
      Robert Sprowson authored
      Look harder at the sprite type bits rather than assume the sequence 1/2/4/8/16/32bpp still holds. This lets through the RISC OS 5 sprite type for 4k and 64k colours.
      Look up the RGB ordering via the respective ModeFlags mode variable, change the order of output RGB PostScript bytes as required.
      Add some helper functions to map 4:4:4, 5:5:5, 5:6:5 to deal with the 6 possible 16bpp types, since they all ultimately output RGB888.
      Tested printing a Draw file with all true colour combinations of test sprites, then converting with Adobe Distiller.
      Version 4.63. Tagged as 'PDModules-4_63'
    • Robert Sprowson's avatar
      Update SpriteOp support, loosen/tighten some checks · 5742dc7f
      Robert Sprowson authored
      Core/Header.s,Core/SWIs.s,Core/Constants.s: Define a new bad pointer rather than using &80000000 since that's now a perfectly valid logical address to have.
      Core/Device.s, Core/Sprite.s, PDriverDP/Sprite.s, PDriverPS/Sprite.s: Delete support for the greyscale SpriteOp plots, these were removed from SpriteExtend in 1993. Just error them now. Extend the table of SpriteOps to include letting through TileSpriteScaled.
      PDriverDP/Transprite.s: Allow 0 or -1 to mean "has no translation table" in line with PDriverPS and SpriteExtend.
      PDriverPS/Sprite.s, PDriverPS/TranSprite.s: Use define instead of magic numbers.
      Version 4.62. Tagged as 'PDModules-4_62'
  4. 15 Nov, 2015 1 commit
    • Robert Sprowson's avatar
      Fix for NULL pointer dereference at end of PostScript page · 69c9454e
      Robert Sprowson authored
      When the last rectangle is encountered at the end of list, don't try reading the rectangle details in, just finish the page.
      Manually inspected the PostScript output from a simple Draw file with a line in it - grestores & gsaves/restores & saves match up still.
      Version 4.61. Tagged as 'PDModules-4_61'
  5. 21 Oct, 2014 1 commit
    • Robert Sprowson's avatar
      The case of the mysteriously vanishing text · 81061867
      Robert Sprowson authored
      When trying to print text written in system font using DrawFile to
      render it, via PDriverDP, the system font text would vanish while
      outline fonts would be printed correctly. Creating a drawing in !Draw
      and embedding the result in (for example) !TechWriter would trigger the
      problem, as it uses DrawFile_Render to handle the embedded Draw area.
      Turns out to be a quirk of the way DrawFile renders system font text. It
      creates a temporary MODE0 8x8 sprite on the stack, switches output to
      it, uses OS_WriteC in VDU 4 mode to plot one character, switches output
      back (which at that point would be to PDriverDP which has output
      switched in order to make the bit image to print). This process repeats
      for all characters in the text object.
      When the kernel switches output to a sprite/mask you inherit the
      CursorFlags that were active at the point of the switch - you're free to
      change them if desired, but the important part is they're inherited.
      Unfortunately PDriverDP, in set_sprite_output_state, was turning off
      scroll protect which meant when DrawFile plotted its 1 character to
      convert, the kernel plotted it as requested, but then the cursor reached
      the end of the line (which is only 1 long) and the sprite was scrolled
      up to the new line - making it blank again.
      PDriverPS would show the text correctly, since it doesn't make the image
      by redirecting output to a bitmap, hence leaves the default CursorFlags
      in play.
      This could have been sidestepped if DrawFile had generated the text a
      different way, for example using OS_SpriteOp 51, or by locally turning
      on scroll protection in the CursorFlags for its sprite.
      The PRM is a bit contradictory on the matter. PRM3-589 states that the
      cursor movement control bits are set to &40, then PRM3-590 says that
      "This is designed to be as similar as possible to the state set up by
      the window manager". The latter is not the case, as the Wimp messes with
      CursorFlags in 4 places
      * initvdustring1 which preserves the state of scroll protect
      * writedirnormal which preserves the state of scroll protect
      * writedirreverse which preserves the state of scroll protect
      * scrollprot which turns on scroll protect
      indeed, for it to work in the non printing case DrawFile is already relying on
      this behaviour.
      So, set_sprite_output_state now enables scroll protect like the Wimp,
      and the case of the mysteriously vanishing text is closed.
      Version 4.60. Tagged as 'PDModules-4_60'
  6. 20 Oct, 2014 1 commit
    • Robert Sprowson's avatar
      Some PDModule tidy ups · 60073bd2
      Robert Sprowson authored
      Core/FontSWI.s & PDriverDP/Font.s:
       The pointer compares are now unsigned, so raise the limit for printing strings in top bit set addresses when no length is passed in R7.
       Couple of comment typos.
       A CVS merge mistake left behind two copies of Push/return sequence.
       Unused VersionString removed.
      PDriverDP/Macros.s & PDriverDP/ManageJob.s:
       Single use unhelpful debug message removed.
      PDriverDP/Private2.s & Sprite.s & TranSprite.s:
       Use some of the defines from Hdr:Sprite.
       For ROMming, explicitly state there's no resources phase
       Unjumble the set_sprite_output_state data. The MonoBufferOK and Libra1 switch happen to work when both are {TRUE} but other combinations would output a silly table. Let ObjAsm work out the size instead.
      Tested briefly, still printed OK.
      Version 4.59. Tagged as 'PDModules-4_59'
  7. 17 Dec, 2013 1 commit
    • Jeffrey Lee's avatar
      Fix alignment exceptions in SWI PDriverDP_SetDriver · a66b55c8
      Jeffrey Lee authored
        s/PDriverDP/Configure - Code for handling long strings was failing when encoutering short strings, because although long strings appear to be always word-aligned, short strings are only stored with byte alignment. Fixed to only do an LDR once we know it's a long string we're looking at.
        Tested on BB-xM
        Loading DP printer drivers no longer causes aborts
      Version 4.58. Tagged as 'PDModules-4_58'
  8. 27 Nov, 2013 1 commit
    • Robert Sprowson's avatar
      Remove a couple of dodgy 26 bit-isms · b5167361
      Robert Sprowson authored
      PageBox.s: STRB of PC, hoping the bottom 2 bits are set in SVC mode
      Sprite.s: Push of PC and subsequent pull, hoping to inspect the stacked V flag
      Built, but not tested.
      Version 4.57. Tagged as 'PDModules-4_57'
  9. 26 Jun, 2011 1 commit
    • Robert Sprowson's avatar
      Make FontSWI handling ARMv7 safe(r). · c6bc3b81
      Robert Sprowson authored
      Reflects the changes made in FontManager 3.63, except here the changes must be even more bland as this is a disc component so could find itself on something that doesn't support LDRH.
      Fix for ticket #289.
      Version 4.56. Tagged as 'PDModules-4_56'
  10. 28 May, 2008 1 commit
    • Steve Revill's avatar
      Fix stack imbalance when printing top-bit-set characters in PDriverDP. · 198823d2
      Steve Revill authored
        Attempting to print top-bit-set characters in 8bit encoded strings
        resulted in 8 words not being popped from the stack, thus causing a
        stack imbalance.
        This has been fixed by inserting a Pull.
        Both PDriverDP and PDriverPS tested on an A9Home with Ovation Pro,
        Fireworkz, and Draw.
        Attempts were made to print plain ASCII and top-bit-set characters.
        No ill effects were witnessed.
        Unicode printing has not been tested due to the current lack of a UCS Font
        Manager that will softload on modern ROL OSes. This change should have no
        effect on Unicode printing, as it will only happen in the non-Unicode case.
        This fixes bug #171.
      Version 4.55. Tagged as 'PDModules-4_55'
  11. 05 Nov, 2007 3 commits
    • Steve Revill's avatar
      Fix NULL termination of UCS4 strings in PDriverDP. · a2442433
      Steve Revill authored
        UCS4 strings had the potential to be non-terminated due to using a
        byte-wide store as opposed to a word-wide one.
        This has been fixed by removing the erroneous 'B'.
        Untested as it's an obvious 1-line change.
      Version 4.54. Tagged as 'PDModules-4_54'
    • Steve Revill's avatar
      Fixed printing of UTF-8, UTF-16 and UCS-4 encoded text strings for bitmap printers (PDriverDP). · 482c77f8
      Steve Revill authored
        The device-independent part of the PDriver code processes command
        sequences in text strings. Additionally, it modifies the flags passed
        to Font_Paint by the client application. This resulted in the character
        width bits (12 and 13) of the Font_Paint flags being stripped and
        command sequences being mis-recognised when UTF-16 or UCS-4 text
        strings were printed.
        The PDriverDP device-specific part of the PDriver code prepends an
        underline command sequence (25,position,thickness) to the printed
        string. This resulted in 8bit data being prepended to a potentially
        16bit or 32bit string.
        The device-independent part has been fixed to preserve the character
        width bits in the Font_Paint flags. It has also gained the ability to
        process UTF-8, UTF-16 and UCS-4 characters correctly.
        The PDriverDP device-specific part has been fixed to insert commands of
        the correct bit-width for the text encoding being used.
        PDriverDP tested on Iyonix RO 5.11 with NetSurf for UTF-16 text printing
        and Draw for UTF-8 printing (drawfile exported from NetSurf) and non-UCS
        printing to ensure no regressions occurred.
        PDriverPS tested on Iyonix RO 5.11 with NetSurf and Draw to ensure no
        regression in behaviour. Note that printing of UCS text with PDriverPS
        is not fixed by these changes.
        Changes by John-Mark Bell
      Version 4.53. Tagged as 'PDModules-4_53'
    • Steve Revill's avatar
      Fix debug builds of PDriverDP and PDriverPS. · e09d0bc3
      Steve Revill authored
        With debugging turned on, various minor build issues arose. Namely,
        the lack of ALIGN directives resulting in unaligned code labels and
        out-of-range ADRs.
        These have been fixed by inserting ALIGN directives in the appropriate
        places and converting ADR to ADRL where necessary.
        Testing was limited to ensuring that the code would build.
        Changes by John-Mark Bell
      Version 4.52. Tagged as 'PDModules-4_52'
  12. 11 Jul, 2003 1 commit
  13. 10 Mar, 2003 1 commit
    • Robert Sprowson's avatar
      Fix for the thingy which sits on SpriteV,it got optimised sometime round 2000... · a5eff867
      Robert Sprowson authored
      Fix for the thingy which sits on SpriteV,it got optimised sometime round 2000 which led to it getting the "redirected to sprite" switch in a muddle so printing from some apps ended up on the screen not in the postscript file.
      Changed the "%%Creator" string a bit.
      Took the opportunity to eliminate all the signed pointer comparisons.
      Tightened up the checking of pointers to palettes and translation tables
      so that "0 or -1" means to use the default,not <= 0.
      Version 4.50. Tagged as 'PDModules-4_50'
  14. 17 Jan, 2003 1 commit
    • Robert Sprowson's avatar
      Addition of support for long dump strings to PDriverDP. · 99a9139d
      Robert Sprowson authored
      This calculates the sum length of all the dump strings given to it and
      then takes a local copy (since the caller might be an application) and
      rejigs the block to point to that local copy.
      Will also still accept old format PDriver_SetDriver blocks,plus a mixture
      of the two in theory.
      Version 4.49. Tagged as 'PDModules-4_49'
  15. 17 Dec, 2002 1 commit
    • Steve Revill's avatar
      Build change,no code change. · 06fd6921
      Steve Revill authored
      You no longer have to do all that directory renaming covered in the
      checkin message with 4.47,these are now ready to eat straight out of
      the tin.
      Version 4.48. Tagged as 'PDModules-4_48'
  16. 05 Dec, 2002 1 commit
    • Steve Revill's avatar
      Changed to use objasm to avoid any LDR rN,[rN],#0 problems · e82706a7
      Steve Revill authored
      Changed to use shared Makefiles
      Numerous small 32 bit conversion improvements
      Bugfix to PDriverPS,it was pulling LR not PC - this has been the case for
      many years so not sure how it ever worked.
      Due to a bug in objasm 3.27 this checkin will infact not build directly.
      You must first
       - rename the PDriverDP dir to PDriverDP2
       - rename the PDriverPS dir to PDriverPS2
       - move the 2 source files of the same name up a directory
      checked in in this way to minimise messing in CVS.
      Version 4.47. Tagged as 'PDModules-4_47'
  17. 18 Sep, 2001 1 commit
    • Malcolm Boura's avatar
      Added UpCall to provide information about what the dumper is doing. · 972a3218
      Malcolm Boura authored
      UpCall made at exit from dumper routines to enable page counting. Could also be used for things like progress indication. Code is in place for UpCall at entry to dumper, but not assembled at present.
      Tested with module provisionally called PMonitor.
      Version 4.46. Tagged as 'PDModules-4_46'
  18. 20 Jul, 2001 1 commit
  19. 09 Jan, 2001 1 commit
    • Stewart Brodie's avatar
      Merge of 32-bit branch. · 3c2250e5
      Stewart Brodie authored
        These modules are now thought to work.
        This module has received some testing of both 26-bit and 32-bit
          builds and is believed to function correctly.
      Version 4.45. Tagged as 'PDModules-4_45'
  20. 10 Jul, 2000 1 commit
    • Stewart Brodie's avatar
      Merged Ursula branch. · aacfaf6a
      Stewart Brodie authored
        Moved to srccommit.
        Added fast service call table.
        Tested briefly.
      Version 4.44. Tagged as 'PDModules-4_44'
  21. 28 May, 1997 1 commit
  22. 16 May, 1997 1 commit
  23. 02 May, 1997 1 commit
  24. 21 Jan, 1997 1 commit
  25. 20 Jan, 1997 1 commit
  26. 05 Nov, 1996 1 commit